Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3567326rwo; Fri, 4 Aug 2023 06:56:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGMV3TGPzX3mFugxQs/eYMrOFMAS3tv3vQs3olQ/m/Gqn2mMriHzCW4e8sqhOtfHWwAb1b5 X-Received: by 2002:aa7:8884:0:b0:682:a6bd:e952 with SMTP id z4-20020aa78884000000b00682a6bde952mr2023341pfe.6.1691157388111; Fri, 04 Aug 2023 06:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691157388; cv=none; d=google.com; s=arc-20160816; b=FlNa1ii84ETwlzntU1VYoHpKiGbCZFpMgulB9QYnx0ZoYLuv9bACkuiiP6aGE5u19K BL/e8E/V0ieaBTRojLqVJ+tzkGL5bGcs224d1NEafMPStLAXQ7kj8Ta3sypUy4k0em9F byVexaYebFPvC+1gg9WNK3tJoHHt+XOarjzPQg5S6zargkn7nTVMFmFK6EIr/8kdFaiJ F7cgH7Oe3vPuxBxLHn0TXkZzU0/1sTLustjQtdb67mUcLqAMzHWOMjSHM3lrfgy0r8uf aaF21qjXBY12ILqT5yUTxeZF6taXM5j696YX52F42X5xujTRN/lKjU2+EuMbIjHNG8mS mH1w== 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=x8SdAY5r2gCNfgPrv4VgBhvANOcy1S43aP0twQo15Sw=; fh=DOkv0qTXKSU/oU7H7/huz0zq9kQDcN6rSSbN/BkOvuA=; b=U5zDvd9drcWviTum/bjuXbtlTh+5QmBasWjUzWYJSN0u1+EibEC45lWJozHJcRezvZ Ra9iHf48yqki8jCxq3UfPynFG7Orcm0jE1vRttHVxUpaBuO6yYctHb8PBvQyzP56Fh9+ eJ0vTEvos5nf1D1W7Gv4tKbFt8+Y/A7uhniR+JOQ8tg/7s01K26sN/iI0XejMiy0hcHt PO6lX+d8O2cPv0PLsiXuG222vQjPY7rlcxcadHMJIGdCo6Dkqxsv81KYwJKrWL5rHRkm LVfOpGaAHr5C+rZVoe8Tl7nQdlPNsLqhirf5zGM+aCYjB92Ahz8+h5GnK4RErmhDfJ++ w4Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pKWFc+S5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a13-20020a65640d000000b005644a9be955si1868518pgv.179.2023.08.04.06.56.15; Fri, 04 Aug 2023 06:56:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pKWFc+S5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231197AbjHDNir (ORCPT + 99 others); Fri, 4 Aug 2023 09:38:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbjHDNin (ORCPT ); Fri, 4 Aug 2023 09:38:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC96049F0; Fri, 4 Aug 2023 06:38:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1D6C962023; Fri, 4 Aug 2023 13:38:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6D02C433C7; Fri, 4 Aug 2023 13:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691156299; bh=wz8HX6muu9LEz/2ek8kzkra/H24iTN93xTauZhv3QGs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pKWFc+S5JQzJIvia/Cee11Wc7lC17Yfs17ShI7jFKpqMYVJ6USFNAEIyrZROgkamJ 9eDQFB0x2XjaK/28bV2LKBLOuQ6vuy7TbjLAZtQCwqw4iCfihs9wTmszLFoO9oRbnr JJmj8c3cIfcozr6pDH2j5JPmEh0V8jJXlPF9UmlVO3nrB+QoiVGpF1TO/hnkJDzpwq QibstZcUH8jSdOliLu6T2qRWJjx6M450vEyW8nWXsWYJ+a/XKVP1CPX/ytlFMIvE0x Zp4Xa0yF3k1t51L4SPW6Xv0UIn1kEs5u6H0y43HR4NK7dDMCNb+qVj6fL3E6RMthax XYN/sfX3+6sCg== Date: Fri, 4 Aug 2023 14:38:10 +0100 From: Mark Brown To: "Edgecombe, Rick P" Cc: "corbet@lwn.net" , "ardb@kernel.org" , "keescook@chromium.org" , "Szabolcs.Nagy@arm.com" , "shuah@kernel.org" , "maz@kernel.org" , "james.morse@arm.com" , "debug@rivosinc.com" , "aou@eecs.berkeley.edu" , "akpm@linux-foundation.org" , "catalin.marinas@arm.com" , "hjl.tools@gmail.com" , "paul.walmsley@sifive.com" , "linux-mm@kvack.org" , "palmer@dabbelt.com" , "oleg@redhat.com" , "arnd@arndb.de" , "ebiederm@xmission.com" , "will@kernel.org" , "linux-kernel@vger.kernel.org" , "suzuki.poulose@arm.com" , "kvmarm@lists.linux.dev" , "linux-doc@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kselftest@vger.kernel.org" , "linux-arch@vger.kernel.org" , "oliver.upton@linux.dev" , "linux-riscv@lists.infradead.org" Subject: Re: [PATCH v3 21/36] arm64/mm: Implement map_shadow_stack() Message-ID: <9902dd7e-1427-4c7e-b602-c1fbf6512f10@sirena.org.uk> References: <20230731-arm64-gcs-v3-0-cddf9f980d98@kernel.org> <20230731-arm64-gcs-v3-21-cddf9f980d98@kernel.org> <5461c56cf4896f18bddaa66c3beec7b909fc8fb9.camel@intel.com> <0a6c90d6-f790-4036-a364-d4761fdd0e95@sirena.org.uk> <21d7e814-8608-40ce-b5d3-401f2110ad91@sirena.org.uk> <55c629cc-0545-460b-91cb-2ebdb8ae9051@sirena.org.uk> <7d03be1277a5f4be23df35ca96f4d6cd77735e2b.camel@intel.com> <475f31e1-0f6f-44a9-b93a-540c1d43e1bb@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EaObfDz4CndjI5sX" Content-Disposition: inline In-Reply-To: <475f31e1-0f6f-44a9-b93a-540c1d43e1bb@sirena.org.uk> X-Cookie: I'm hungry, time to eat lunch. X-Spam-Status: No, score=-2.1 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 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 --EaObfDz4CndjI5sX Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 02, 2023 at 05:27:54PM +0100, Mark Brown wrote: > On Tue, Aug 01, 2023 at 08:57:59PM +0000, Edgecombe, Rick P wrote: > > To make sure we are on the same page: What I'm saying is say we do > > something like add another flag SHADOW_STACK_SET_MARKER that means add > > a marker at the end (making the token off by one frame). Then you can > > just reject any flags !=3D (SHADOW_STACK_SET_MARKER | > > SHADOW_STACK_SET_TOKEN) value, and leave the rest of the code as is. So > > not really implementing anything new.=A0 > > Then x86 could use the same flag meanings if/when it implements end > > markers. If it doesn't seem worth it, it's not a big deal on my end. > > Just seemed that they were needlessly diverging. > Yes, my understanding of the flags is the same. I'll definitely > implement omitting the cap since there's an actual use case for that > (extending an existing stack, it's marginally safer to not have any > opportunity to pivot into the newly allocated region). BTW are you planning to repost the series for this release? We're almost at -rc5 which is pretty late and I didn't see anything yet. It looks like there's a branch in tip that's getting some updates but it's not getting merged for -next. --EaObfDz4CndjI5sX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmTM/0EACgkQJNaLcl1U h9Dhngf9HaBpp4WdjxabvyUIkHFeitGGLlR98c80xyh19bY1UWx4BOojqe0fcQqc K1kS+mCmTH9c1RZEdUe+O5upQl099AzBqsJUu8aXBh/Pf6wDXwxinNVPL/WSO00B 9jlg3iozKyd5PQJjJIbbJwHoCTkHLe+Wun/qG9P75FL4w+7REzD+pOpSZBwoPqYR 2h00HfuO1pAX54ubVTARphHAZEIBJHYusx2fJQ8pP4JjLdYU7ot48CfVZa35VPuM JJFU92h6YEdnqQPfc79hwp/UqvGWAowJ5QMM/3E8s6CDE7n4dTP8wXihArd0rlrk OzsV73Hx8i3GvjV1DR1vc4vAC7DxRA== =G9bO -----END PGP SIGNATURE----- --EaObfDz4CndjI5sX--