Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3361045rdb; Thu, 16 Nov 2023 07:36:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7lx3/nVBKQcGR0CXCKwD6n+x+2yAqYYLtMS9pMKqvZ/4q2VTOdEAzlO2g20NnhC/MfusT X-Received: by 2002:a05:6a00:1c89:b0:6b2:baa0:6d4c with SMTP id y9-20020a056a001c8900b006b2baa06d4cmr15587537pfw.33.1700148986993; Thu, 16 Nov 2023 07:36:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700148986; cv=none; d=google.com; s=arc-20160816; b=C/J0B75tN6TwJjHW1/Ayyd8NXv81CSVcu3mxs8ElsHwTe19ojKYd1ArRnWMIGBg9lT 7co/EORKhIjP4HLztH8rvgzSmsmPwna6lxryGPfrFnDH1/pCh6fQ4CsqYK1xHabtEneX V9feWQ+WAdokVJEL3EbWaW2N8vYR5CM8oZDs7JUhPT0vK5Si3UAqX5jlIwNotaN40BpT g+2bQVO6MkUaKfnmvSC99JM6Yri0ToUFK1P9MFHue2h1GXnJRvQMOqageogd/ECHxb1R WajZzNrwDVvWRNfc5RmpJISkMPtFr/uTdgaux1GdK/qWTnsX1sF/4oZuUibOyQmqYXLj 6XrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6C/AOQWdfUU4GssUzzyFj3g9QVT/w7qFRNOlqS3TXuE=; fh=trJnynZgunHaPqh8hC+lhP1zccL5QSodwVbsknUF+Rs=; b=uQQA6ALii7Pl43Rl10QeSwP1cbJ9oT1DrVUHdAGCRMmvSdrcCmPgAy2JhJYbW/OL1U 3F8wxWQOwU8lszB+fcguuXhBGmSzABnwJNht9TBz4xNcEWEJVgPcdV9CUXWiAWDopI2s qG/QOzfwftXFLQCwjZEmK2kApu9jH4X90JgiCsGsK8N4MChs33P49LokN+HWlk+Xawb6 Md+biqKCcO3+Nn7Ez6aAeh7Ht/qyv0CBWnrSXpYdj859FL7RbtteofX6uqajSIMjHGuJ QtnN+UUINhP1kr6uN3Sxzw8D7O3zhs9pu3E4gYAS5O/6ChSsXGRcjO5EIuuDLnGWNiOf WwYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BEJAVynU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h13-20020a056a00218d00b00690dbd360basi12754135pfi.152.2023.11.16.07.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 07:36:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BEJAVynU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4DE5F802A355; Thu, 16 Nov 2023 07:36:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231202AbjKPPgN (ORCPT + 99 others); Thu, 16 Nov 2023 10:36:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230019AbjKPPgL (ORCPT ); Thu, 16 Nov 2023 10:36:11 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBD35195 for ; Thu, 16 Nov 2023 07:36:07 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66805C433C8; Thu, 16 Nov 2023 15:36:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700148967; bh=6C/AOQWdfUU4GssUzzyFj3g9QVT/w7qFRNOlqS3TXuE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BEJAVynUeohXm9vE0j4lxmkxs22+mduLhGWHLSixGxPbtfq3aMf+74bEl9cUNW077 wnP2Gf7K3RYrEiHWA2FS3RWdS1XDV3IseFhmxVL20I6GNcjWFVuce4U6XvbfFtCFQQ B5oOlDaNQ9neSxDhV2NRByiOvZmGJL94L8mg/sw5gycFj6/dW0tgW3VhaIri/GHyEa ufg9P7qJDr67mP8Mp5aR7Jrbnp1haOE/JQAzP5Y8ldcwE0NjF6NzCK9U+Gu3YCnJ+T CmgnWtML24xN3hm6CWTQt1Sndds5hX61RuaixHI/0Fr3mFyaIhYwAmAu/X6hjDzsyG GQxSgiHoQrhjA== Date: Thu, 16 Nov 2023 15:35:57 +0000 From: Mark Brown To: "Szabolcs.Nagy@arm.com" Cc: "Edgecombe, Rick P" , "dietmar.eggemann@arm.com" , "keescook@chromium.org" , "shuah@kernel.org" , "brauner@kernel.org" , "dave.hansen@linux.intel.com" , "debug@rivosinc.com" , "mgorman@suse.de" , "vincent.guittot@linaro.org" , "fweimer@redhat.com" , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" , "hjl.tools@gmail.com" , "rostedt@goodmis.org" , "tglx@linutronix.de" , "linux-api@vger.kernel.org" , "vschneid@redhat.com" , "catalin.marinas@arm.com" , "bristot@redhat.com" , "will@kernel.org" , "hpa@zytor.com" , "peterz@infradead.org" , "jannh@google.com" , "bp@alien8.de" , "bsegall@google.com" , "linux-kselftest@vger.kernel.org" , "Pandey, Sunil K" , "x86@kernel.org" , "juri.lelli@redhat.com" Subject: Re: [PATCH RFC RFT v2 2/5] fork: Add shadow stack support to clone3() Message-ID: <54d3bc9c-9890-49f0-9e9d-78ea4d0d7199@sirena.org.uk> References: <20231114-clone3-shadow-stack-v2-0-b613f8681155@kernel.org> <20231114-clone3-shadow-stack-v2-2-b613f8681155@kernel.org> <1bd189e0-a7dd-422c-9766-ef1c9b0d3df8@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uQPPwN7Bpn582Rw8" Content-Disposition: inline In-Reply-To: X-Cookie: micro: X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 07:36:24 -0800 (PST) --uQPPwN7Bpn582Rw8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 16, 2023 at 01:55:07PM +0000, Szabolcs.Nagy@arm.com wrote: > The 11/16/2023 12:33, Mark Brown wrote: > > On Thu, Nov 16, 2023 at 10:32:06AM +0000, Szabolcs.Nagy@arm.com wrote: > > > i guess the tricky case is stack!=0 && shadow_stack_size==0: > > > the user may want a new shadow stack with default size logic, > > > or (with !CLONE_VM || CLONE_VFORK) wants to use the existing > > > shadow stack from the parent. > > If shadow_stack_size is 0 then we're into clone() behaviour and doing > > the default/implicit handling which is to do exactly what the above > > describes. > to be clear does clone with flags==CLONE_VM|CLONE_VFORK always > use the parent shadow stack independently of the stack argument? !CLONE_VM rather than CLONE_VM but yes, that's what the clone() and hence current clone3() behaviour is here. > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. There are mechanisms for disabling this... --uQPPwN7Bpn582Rw8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmVWNtwACgkQJNaLcl1U h9A8OAf+L47MiEGy1oAQUIl/rvLWqgZ8e3qktbrm7eRIk6aacjo+7k3qdr6L7EHh EoHwrpV3QlU1LOlZUuorSIjpKhs1FbWxUZd1Ga9NIqOl9h58OAmTJPMyGKqj1O8V SBPrXY79ObkfEOV2W9O9KzOlTAzHbbn2Jx2SwmetnkCeAaBeIm8tU9mU/mt45Xz3 cn7H9ZbgXHYl/NbV01v8nilfK/5r07B1iyghvD8Ojwbq2QC1gXrRd+a4jzfS8Sp0 23Nx/lWmpn6PPAGl6iAUjScyWBCuklVHxAwYq1ilPPIeN/AVQOuDJ5enoQuNJcUA eCNt8qYz4y6MmEATAyUySV/IPaEGOg== =JqPF -----END PGP SIGNATURE----- --uQPPwN7Bpn582Rw8--