Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp814369lqt; Fri, 19 Apr 2024 11:07:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBozIpWnXYFDxOK69gIr9ghtD8vQiBJEoxNNOESrDxT2UEucjokTr2CH+xsMxL6c6GBxbdDewXt4jYUtavrFlFhPHfiy+DJ0KcDOWKig== X-Google-Smtp-Source: AGHT+IH8cNjyUc7ji5mF6cnuMGrfmvrjXhyX2wWFo4kJyVUvWwlvWmupPeExoE12ujIwXnXXQEIF X-Received: by 2002:a17:90a:7347:b0:2ac:eb19:2807 with SMTP id j7-20020a17090a734700b002aceb192807mr46110pjs.36.1713550076435; Fri, 19 Apr 2024 11:07:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713550076; cv=pass; d=google.com; s=arc-20160816; b=S0HVhaPZLsCbVLbmnY7/fVGNd6hT+6Edjv0kF+4eJjLveB3dvor5RRDy+Hh0ynohHa 7gfkyKGMKwGKwkA83FqQQ6O3T1S0vO5u23R7qIsCWd2h32myhQmvP8HRAE0enO9tXjl9 Fv2LPD+Ql1rtjjTmJ/TURrHXbqxdL4OiiqWEFCYXAlcPd4WHEYf99EdbyFC/NMeR1Wzd T4EbelN3u+V4VmYtUsqC1k2rc3KkP7WosBVqoz+EsfONyC6IlgwA1KhmoV2RIhqlFJiC 1/yco5FCEUm+M1RlZktC92LpPSiVLOC2qZR0awFkTMhhJAfqOvuwnyQFAGDrNGYMto25 dc/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=i+RkQ0fAdFsHf6ypx8OjdXsE+EQog103BFBc7/h4HzM=; fh=qPjHOk6TB6o1sSPRZ13tUpzCCjUCcysw7iQWDbttIww=; b=nBiBdi9z5ttksACyCPlxLffj4JVxSqYIKmZ+cr5sQHqByTiskhHy4MstBQb4BMZVmI HjprSVK5Uv1hyJ8B95/c9ApAOLJBMxs7UrYbLrA87/BxA8tFd2GtbsDpmjyc3+zVbwLl g3AV2NF4OJDTcrLswPs56+5D7f3Yr3oxiAlmWaMRaX1+5QToJF37vzxMYIeFNGAabv5a QnhD5XBjzXpELWcANrddslZel8GjNDoAaFrGf0OKCU+1qnDADDz3PLQePUu4vub8CtQH BsW3VbJIn2S3cFW/sIbGHloe7kKwW0S1H9aQ94EaVI2kTRBPzQnRu4P/qUnJWThZotCX bFGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-151851-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a4-20020a17090a8c0400b002abfbd1352asi2918666pjo.133.2024.04.19.11.07.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 11:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151851-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-151851-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 31109B212A9 for ; Fri, 19 Apr 2024 18:05:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0BE112FB3C; Fri, 19 Apr 2024 18:05:20 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63143130AC4; Fri, 19 Apr 2024 18:05:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713549920; cv=none; b=GEM1zCmLsVhvquHbIKe0tUyaWmeRMyZ3uGIekgdAR72WAFt1+SKJTXmJon5RiiVFWJ3bGBKUe+OFrmU5IuuX14SQQ4VAUJFZ9fnjdHeGZcFnF0o/6EbH33mOtZo1KEQr8bH8ducmxL7gacnevUS3YSHodlKqvGRx1x3dBcmoBz0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713549920; c=relaxed/simple; bh=UEVFeS+/tMCw0E76rQZ5tWlTwk4nDLScKXAuUGbS/4Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a+CmthJMEQITN3wMyFh4o882A2xCXEjXUpivdDlbgnMN4GUoddRnEVmblRXlhXyDJs1hAVuvYLPhKL1JNS3kXPp/0pFQozXITuB4p2XHsFKkHZCKxMjyfRFX9rHNKOcvONBG86fhbhIaA5g+TOqnNgtGM0tvpm6bcXhNJAEAJD0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CC5CC116B1; Fri, 19 Apr 2024 18:05:13 +0000 (UTC) Date: Fri, 19 Apr 2024 19:05:12 +0100 From: Catalin Marinas To: Will Deacon Cc: Zayd Qumsieh , Hector Martin , Marc Zyngier , Mark Rutland , Justin Lu , Ryan Houdek , Mark Brown , Ard Biesheuvel , Mateusz Guzik , Anshuman Khandual , Oliver Upton , Miguel Luis , Joey Gouly , Christoph Paasch , Kees Cook , Sami Tolvanen , Baoquan He , Joel Granados , Dawei Li , Andrew Morton , Florent Revest , David Hildenbrand , Stefan Roesch , Andy Chiu , Josh Triplett , Oleg Nesterov , Helge Deller , Zev Weiss , Ondrej Mosnacek , Miguel Ojeda , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Asahi Linux Subject: Re: [PATCH 0/4] arm64: Support the TSO memory model Message-ID: References: <20240416022242.89623-1-zayd_qumsieh@apple.com> <20240419165826.GB4020@willie-the-truck> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240419165826.GB4020@willie-the-truck> On Fri, Apr 19, 2024 at 05:58:26PM +0100, Will Deacon wrote: > On Mon, Apr 15, 2024 at 07:22:41PM -0700, Zayd Qumsieh wrote: > > >I'm probably going to make myself hugely unpopular here, but I have a > > >strong objection to this patch series as it stands. I firmly believe > > >that providing a prctl() to query and toggle the memory model to/from > > >TSO is going to lead to subtle fragmentation of arm64 Linux userspace. > > > > It's definitely not our intent to fragment the ecosystem. The goal > > of this memory ordering is to simplify emulation layers that benefit > > from this. If you have suggestions to reduce the risk of it being > > misused outside of emulators, we'd be happy to look into it. > > Once you have exposed this toggle via prctl(), it doesn't really matter > what your intentions where. It will get used outside of emulation laters > and we'll be stuck supporting it. Just FTR, I fully agree with Will. I'm strongly against this kind of ABI for a non-architected, implementation defined feature. I can't even tell exactly what TSO means on the Apple hardware. Is it close to the x86 TSO? Is there a formal memory model for it? Are future Apple (or other Arm vendor) implementations going to follow exactly the same model to be able to call it some form of "Apple standard" that deserves an ABI? So, sorry, I'm going to NAK these approaches proposing imp def features as generic opt-in mechanisms (the microVMs thing sounds doable though, to my limited understanding; I guess that would mean running the emulator in a VM). -- Catalin