Received: by 2002:a05:622a:4ca:b0:41c:c224:f26f with SMTP id q10csp518399qtx; Thu, 16 Nov 2023 10:14:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvAUNov8YtylFVpvRp/h5yDXrqP4VAdgzmc7gKn0eDfn0xterQJfY4DhwNOdZm+/0juvGU X-Received: by 2002:a17:90b:3a8d:b0:283:21d3:11eb with SMTP id om13-20020a17090b3a8d00b0028321d311ebmr14190001pjb.3.1700158468006; Thu, 16 Nov 2023 10:14:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700158467; cv=none; d=google.com; s=arc-20160816; b=LC3JVLMlzjxNAO32PfYJn/DUPGVr8U7sGnPGG0re61QOK35qUcpQ6sIvWhuf4Bv0Ib /RNNMcOLyP1tAZGs97VCOUuW99L4oc2ehy9CbgSzorgxxg1fLecvFFOmH1x3G14dNLl4 8Q+Qi6GAzKz/VG3cvhL6adV0k+VoyV7DJeH8p/7cPanycMk4dWK8+DV8VqsWO7M1TcbC 6j2k3vqhbMKa3sJIKhvEKjq+hKzAaH4YLRgS7rjfqadL3tgKXARrg80End4sHbZjf/j8 LDoWziYqjiCmBYrcgqvru2LNspG3xxPNXVhdBlwkiBGGBw/PgNE9caxwTmhzV4SA5Ink TqYA== 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=M05ECFN3GLQsoo2vb3Ft30/RHRq7x3n3sQd/ztNZ9y0=; fh=rArvQ4muZ0aC13cZMOngEsfZCIIcjMMnIVljJAxTLqQ=; b=SIfOeWnx2gf+zhesXtiIAlhRcUEAF/k1X00jhWJ/U215fKjwEEIwPDrMCS7gYTZce8 2PxTI7ZOR8flCnGR08FduddTJi877cxhTa3Zxn39zvwqSxBK4+PU6aeOsadQslqK5iah glyCKAEY+YW5Y1L2m2e/ifP5xWcL2TNd2A7iIHVJQ+5T2RiOc/ePD8026bJNBq7a+kX9 Q06fAd88PHgU6gJSVrWlLS5uf4youGg9838ju1s/f6KQSJ+qJFa2NkicB0wiB2laiWc0 cnVhk75UKOEqKk18pIYfQDCFkc+4uDn5quKckSYTO1jAVlIBmAkgikKD9ZQoy1JEv2QM 3cTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tAviU7ju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id pv17-20020a17090b3c9100b0027db9371d09si40604pjb.107.2023.11.16.10.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 10:14:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tAviU7ju; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 942B381DC798; Thu, 16 Nov 2023 10:14:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345373AbjKPSOW (ORCPT + 99 others); Thu, 16 Nov 2023 13:14:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345368AbjKPSOV (ORCPT ); Thu, 16 Nov 2023 13:14:21 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 026B419D for ; Thu, 16 Nov 2023 10:14:19 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 408A5C433C8; Thu, 16 Nov 2023 18:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700158458; bh=fU9UbtrsIqmGuD7XgmjRY/5d5B/QYSrBZgF4IZZYGTw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tAviU7jubktNs951PoKcGBu4o5sD3xt8QsVKXloraDS99HD4ozv6XhqsV2PXFtK+S R1It3k0KIsLumPM77URN6Yrq1mQ7y25JL04zaPvM75PjvZDufW9ls45UOoxokroHak Vv9RUij8AiP5+wTpq0Z4ZgcO3r5WFBAKAjkWXpUha97JiWHO0kciorfu59zd6ufLjq ryC6wk0hbWkL71gJ4xT+QZizLMqFjqQaI6bUBrnbO+J2lZ6JgIA+srmG1cOALOAdAn dTin/yRPGTktcUWlHlF6RM5EXwjZ4dknmbaWN5vOY2rQQoHxWvtZsdVjS/2v/xhklk NrB/wrQeykMtg== Date: Thu, 16 Nov 2023 18:14:09 +0000 From: Mark Brown To: "Edgecombe, Rick P" Cc: "Szabolcs.Nagy@arm.com" , "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: <2b4b935e-aea1-4283-a459-5d6004b24b28@sirena.org.uk> References: <20231114-clone3-shadow-stack-v2-0-b613f8681155@kernel.org> <20231114-clone3-shadow-stack-v2-2-b613f8681155@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="15rJUYEsjrHhwsZm" Content-Disposition: inline In-Reply-To: X-Cookie: micro: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 16 Nov 2023 10:14:26 -0800 (PST) --15rJUYEsjrHhwsZm Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 16, 2023 at 12:52:09AM +0000, Edgecombe, Rick P wrote: > On Wed, 2023-11-15 at 18:43 +0000, Mark Brown wrote: > > > end marker token (0) needs it i guess. > > x86 doesn't currently have end markers.=A0 Actually, that's a point - > > should we add a flag for specifying the use of end markers here? > > There's code in my map_shadow_stack() implementation for arm64 which > > does that. > Hmm, I guess there isn't a way to pass a flag for the initial exec > stack? So probably it should just mirror that behavior. Unless you > think a lot of people would like to skip the default behavior. I don't really know that anyone would particularly want to use a flag on arm64, I was more thinking for the benefit of x86 where any termination record would be a change. It's certainly easier to not have flags so I'm more than happy to leave things as they are, there's nothing stopping further extensions of the ABI if we decide we want them later. > And of course we don't have a marker on x86 (TODO with alt shadow > stacks). We could still check for size < 8 if we want it to be a > universal thing. It does seem simpler, size < 8 is all edge case. --15rJUYEsjrHhwsZm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmVWW/AACgkQJNaLcl1U h9CzZQf/dIUyUF/fRB2YA6pvIXvNE5ZU2z1Domwxa98+bLpNitJrcbiBgQGOxFZb ryxcalGm1nhzTbcyGM45iJQb48ageOjQEVGr2ztoKX8bVsRBNCfCSWEATPhSAi0r ek28N2U9wEVNiQyoYaDztE7wMABEihBZLacKKYSsQ8tSyLfcJOU7o3FN9DdVx316 GfkPWEC2uSTgHvZozm66MUoP1n+GIFobMATYrdtxu2LI65rjrP5YxmMe5/c7TqB2 3b2ctcgr3SiKHg+rOl4rxmYR1nlACbJnE9sF4NZv6BYIgTYaze9EHizu44+Usm2N we2gOehM/hZyskUKxv/NvW7skuQl2w== =zUsz -----END PGP SIGNATURE----- --15rJUYEsjrHhwsZm--