Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2313029rdb; Mon, 20 Nov 2023 07:48:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUg+epY8+x4lrrvnYV9peORwL69dVC96zVaueEaHPIUKOZMgGSlSfVou2+5Blg/vPoFraK X-Received: by 2002:a05:6a20:549e:b0:187:b735:81a9 with SMTP id i30-20020a056a20549e00b00187b73581a9mr7094960pzk.60.1700495289065; Mon, 20 Nov 2023 07:48:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700495289; cv=none; d=google.com; s=arc-20160816; b=BPMHfYMKHY6BKhnafunbL6rLgkxxfILDrTDr618eFIHOydqw75w61zyuG+221i98+x gms/tBJ+Uu/P5rpvCuPUHvH0c2MA/6YVN11AOFBf3nt/hHenycpo8W4stUcQN9g/4k8n ZfpUtgDlyiZJ0bvU/1EJcBnV8l/3aoJrix/nUvP/nxSEL9fwqn9gvqyyk1r6xcE9k7il QAqtcRLcF1l3pIN8ApfaYglNVV6zE4Jpdtg5CaWPW+Z330S/YtvxL+Wa+TU/Z2GB/hl9 5wiuOW1xAQR07zwfiNYgEEAk8UzCJBM5llLTU6YodOL0pttYYQvzmVJqvJfcfO9EEQMm ZQlQ== 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=7a9wZHXQEKHLueX+Nx8vwRmMArAq5nzApO7mMifTnXw=; fh=q5y21zvsjZ9wBjZJpJ2JjNlVrICVEq2NYAJVyU32uX8=; b=rCUl0lzZ7ueugsxc/c/2W6Uw0n6Vc4z28rcAVyADobVUeAFXrAuU2nM9IKZzycaBpm qFNXkByuuJsZ4X/6WcJfEGLY3D+tMfI+ljD6iDjPTQ8eypKIfgzMLG2yiIC5XPbIPlHL h1LiQbVMSFjO/rZ8fZqhfUjfnf5zxU7SJSoAE/0fL5285/eF/dMp5nY4+7n4M5O+w90R 9auzPv4YG+nFl6CLv606Bxntz91fz2IrR+Uebl/9MeAJUSOeJ5dWYJcVly9k9rntlyHi 4tmBcpDvJqSGrBO/Q6+SL2km4xyQuZv79V2UGyMcoXITgs88zmLfq+ZhlUCKR1Vxy6yg bhWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LFGlYdyZ; 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 cf4-20020a056a02084400b00578d3f8d4d4si7727632pgb.448.2023.11.20.07.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:48:09 -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=LFGlYdyZ; 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 C0A2C802C5B5; Mon, 20 Nov 2023 07:48:07 -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 S234066AbjKTPsI (ORCPT + 99 others); Mon, 20 Nov 2023 10:48:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233731AbjKTPsG (ORCPT ); Mon, 20 Nov 2023 10:48:06 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DBC1A0 for ; Mon, 20 Nov 2023 07:48:02 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8761EC433C7; Mon, 20 Nov 2023 15:47:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700495281; bh=Pqf0n0WeWapO2rexMfY7DVUbXOQsxxnsm5OV8uzP0l0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LFGlYdyZ4aooQny7HpcVdwiEhDOv+NfyxvwJDl5MhddiGZMQcQfPexiJQG5vduf+2 e6usNZrsf9DQAJavs1p0ZasnPuxM7z42rQB5u3DPzTMUV8hocsdghKfYkL/wCemVHA AEQwyTdHo9DB50LPO9wiYjrKDkMo361uqixSnd4x7QE1PrBQVguNmxViYJQj8xC4L/ QoK060hByDKtkmW7XJLgEWlg/5Pr+2adCARB2Fn0/mW3E7XBWGvOghm/6LwqcTkwFj ezh6zPw5NfemTc8o89g3ZOSALWluWZsI5q2KhV3AXoOz9UaKggQprcdsb35h3npn1y ZM6/+pcUkOJwA== Date: Mon, 20 Nov 2023 15:47:52 +0000 From: Mark Brown To: Deepak Gupta Cc: "Edgecombe, Rick P" , "dietmar.eggemann@arm.com" , "Szabolcs.Nagy@arm.com" , "brauner@kernel.org" , "dave.hansen@linux.intel.com" , "mgorman@suse.de" , "vincent.guittot@linaro.org" , "fweimer@redhat.com" , "mingo@redhat.com" , "rostedt@goodmis.org" , "hjl.tools@gmail.com" , "tglx@linutronix.de" , "vschneid@redhat.com" , "shuah@kernel.org" , "bristot@redhat.com" , "hpa@zytor.com" , "peterz@infradead.org" , "bp@alien8.de" , "bsegall@google.com" , "x86@kernel.org" , "juri.lelli@redhat.com" , "linux-kselftest@vger.kernel.org" , "linux-api@vger.kernel.org" , "keescook@chromium.org" , "jannh@google.com" , "linux-kernel@vger.kernel.org" , "catalin.marinas@arm.com" , "will@kernel.org" , "Pandey, Sunil K" Subject: Re: [PATCH RFC RFT v2 5/5] kselftest/clone3: Test shadow stack support Message-ID: References: <20231114-clone3-shadow-stack-v2-0-b613f8681155@kernel.org> <20231114-clone3-shadow-stack-v2-5-b613f8681155@kernel.org> <309927ad8bfa72ce2d084ee16cd0cd84e69fef16.camel@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3acFUUbMZ6fZyK3o" Content-Disposition: inline In-Reply-To: X-Cookie: I *like* the chicken 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,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]); Mon, 20 Nov 2023 07:48:07 -0800 (PST) --3acFUUbMZ6fZyK3o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 17, 2023 at 01:12:46PM -0800, Deepak Gupta wrote: > On Tue, Nov 14, 2023 at 11:11:58PM +0000, Edgecombe, Rick P wrote: > > It seems like there will be a need for some generic method of checking > > if shadow stack is enabled. Maybe a more generic compiler > > intrinsic/builtin or glibc API (something unrelated to SSP)? > Exposing a new file under procfs would be useful? > Something like "/proc/sys/vm/user_shadow_stack_supported" > `map_shadow_stack` can return MAP_FAILED for other reasons. > I think `kselftests` are fine but I don't want people to pick up this > as test code and run with it in production :-) > So kernel providing a way to indicate whether it supports shadow stack > mappings in user mode via procfs would be useful and arch agnostic. I can see that might be useful for some higher level code that wants to tune the size and nothing else. I'd be tempted to do it through adding a tuneable for the maximum default shadow stack size (x86 currently uses 4G) just so it's *vaguely* useful rather than just a file. I question the utility of that but just a plain file doesn't feel quite idiomatic. In any case it feels like it's off topic for this series and should be done separately. --3acFUUbMZ6fZyK3o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmVbf6cACgkQJNaLcl1U h9Ak7wf8CA50MceuP83I2frKM1LB7rUjimAktBhZrwl5FbVW7GLI9WxpLtXZ4Gce 6+H6sDQmMtCmAiYmwZG214ZNu95rQr8HUxQCVs8WY7Ir3h9U02/MNpcaIXswd1oe kbT14fSM/GGsA+uSKGkbuXMSQAONUKNC7iNF6R52pKZs4J4clVxxylydo47OFrDD /EkwidMFHpPlsJkv48ETgjih58pssM9+B/oBIP1RlwmS4sgPshT9+wyEGnFjs83O susJUcqp61pP6dV2CQN1YRfvGWo+vsZ6ByHLKOrOM9SEVJAm01FzzwYPEyRhXj+S FxAsuQ+E51GZknCUfOkBnAjqeuY8hw== =L/Yb -----END PGP SIGNATURE----- --3acFUUbMZ6fZyK3o--