Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3452517rdb; Sun, 10 Dec 2023 06:23:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTEu3d7O2/DA/ZHSkUXm6v6sTzHuxkhEJU6O4Nh47drpbfQTRXVWhwGO9pPSRxj4E4Oi38 X-Received: by 2002:a17:902:e5c5:b0:1d0:c532:84e1 with SMTP id u5-20020a170902e5c500b001d0c53284e1mr1215374plf.81.1702218185104; Sun, 10 Dec 2023 06:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702218185; cv=none; d=google.com; s=arc-20160816; b=CKkB9ovuRJAuAkK4fFCFnKBZ+sFHC6MnPp566n+WP1oG8MRarOIv9yvLCkTSSPZmA6 hcUw+/lJUdY+gOdrY8nrtXfiT1gL2cIs9m8UfEUmT8Z0vl+5CURdnKC7kSzCnICwcs7h X/JDoka6zoUATA3YwgVRJX0XDV1qqWGYVZuaUH9hGdo/2lQjaCDf1XHrsTFOU+hgPp4g sgtCu8T+GNvrQjLJwyp5YnuspmGSjso0KbEWWQufKNw55tivkuRbTWFlXuxXv6cDnDoQ QNqkHW5uvX09EB1RgjHi9Hqrd9BOxnGxLuOVkX+pPgPtHR5dzPuxplFzqq4HJ3aGaVF3 tU1g== 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=VHAxAIRUs+KU0ASZpcte/odR4i9qfgEal3+H9P+rl2Y=; fh=2cOLKalsvJWgp6X/iQQOoa8XWKauU+XcecEfmW3UZwY=; b=IMJIKmdlDdHTQzl6hXhM8kzIZIVqkH6Z8CSLRDn/Lc+8us7uLdsi3nD5V2+dRheWy0 TS9xc/uHF6dHN4YOYTcGCO4qAp4C8z66KvNufuboEDhgv9Ht6DnuntQDnFguZVOcTJ3f 1YYirpA41YFy2l5LXaMKZvpJGqnGYwN8r9xbiuQtt4nxVvgV46POzhD6Ub7E3UyjGsui XADK0mo1JnYPlTiYBNu8W8RCBnJRaKqGkoBgLi3mmJ8a3KY/F2DXaCnLwDkFKF402N1j bXPMrjnaL6pgTSQ/nuwtjce1Sw8SaE/t6ZXOUDKQ95h7mEllJ9yGzorPBoPWBLQzVjiM U/2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z46OPbu3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id o3-20020a170902d4c300b001d003f8b649si4623327plg.142.2023.12.10.06.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 06:23:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z46OPbu3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 AE710806B568; Sun, 10 Dec 2023 06:23:03 -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 S232271AbjLJOWy (ORCPT + 99 others); Sun, 10 Dec 2023 09:22:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbjLJOWx (ORCPT ); Sun, 10 Dec 2023 09:22:53 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5E0CF5 for ; Sun, 10 Dec 2023 06:22:59 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9FFDC433C7; Sun, 10 Dec 2023 14:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702218179; bh=8tne0aaAREf7h+qiY6KAldko6jyI6LRXnoNCM9fma6Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z46OPbu3lxs+nSXwJj7g5+uM236T8qcWVMENzV16W8PRn+wPA90J2c/MU1TR09r9G V7uktPMYA+kX07nhFqGBeWzVnfPGq1sWi8TmA2O/Ypbc+HHzOKCOCc6aUZpI1E2ux5 i7a4xJ46nLuCB9P/YSDucazqkfc40Pwk2ruWwXth0yedV7jS/lBPvlu9h8D8FqQQ5E 7NrgTVM832Ck4BiiNruf7natGB4ETT1vuYgIR5796kVSPSFEDz9SqMvV2j2pOXJx2O kYv2KFYNFZhj2cny4Ad3h63HQeFh23ezu4307DrPbna88E2yARpEbrhoRhlGsNFA2m xH4AUl7qyB+aQ== Date: Sun, 10 Dec 2023 14:22:56 +0000 From: Mark Brown To: Thiago Jung Bauermann Cc: Catalin Marinas , Will Deacon , Jonathan Corbet , Andrew Morton , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Arnd Bergmann , Oleg Nesterov , Eric Biederman , Kees Cook , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy , "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v7 26/39] arm64/ptrace: Expose GCS via ptrace and core files Message-ID: References: <20231122-arm64-gcs-v7-0-201c483bd775@kernel.org> <20231122-arm64-gcs-v7-26-201c483bd775@kernel.org> <877clney35.fsf@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+xOPyWhFp+ttqF+R" Content-Disposition: inline In-Reply-To: <877clney35.fsf@linaro.org> X-Cookie: You might have mail. X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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]); Sun, 10 Dec 2023 06:23:03 -0800 (PST) --+xOPyWhFp+ttqF+R Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Dec 09, 2023 at 08:49:02PM -0300, Thiago Jung Bauermann wrote: > Mark Brown writes: > > Provide a new register type NT_ARM_GCS reporting the current GCS mode > > and pointer for EL0. Due to the interactions with allocation and > > deallocation of Guarded Control Stacks we do not permit any changes to > > the GCS mode via ptrace, only GCSPR_EL0 may be changed. > The code allows disabling GCS. Is that unintended? No, it's intentional - ptrace has a lot of control over the process, there's not a huge point trying to protect against it doing a disable. The reason we prevent enabling is the allocation of a GCS along with enable, the complexity of doing that on a remote process seemed unjustified. If clone3() ends up allowing manual allocation and placement that'll likely be revised. --+xOPyWhFp+ttqF+R Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmV1yb8ACgkQJNaLcl1U h9BWYwf/Tu6vlQCwGJ174Zum1yyKhNrP0gXrNj0hXhil/y9CwTApo4pvBUMmBwQz JO0qoPePZDOSlxns1bELpj5O5sFq0c8qB1e29Y1nFzNClHf+uyVDswS2nZDBU6Rk QyW/T7yJerJVj/Lw5Mh1iJMbf8+iOPyRCJ8iMOnYiCbPpOmz7FuarOxPowUXUTqe e/bnana1ic+ctkWCw67wxEB6SJsOSaN2uW7mCj2ftjf9Cq9GmxzYnn8WuOvPHLxQ 1id5Q0hqIWUqpgKGWDeIng5VHThiIuZDUa4EWQga6fnVZnApv4pRNJY7ttyNS6SS VfquKJpzBaa9lItRtIz5Dxs2gX1jyg== =9ttk -----END PGP SIGNATURE----- --+xOPyWhFp+ttqF+R--