From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Z33HFEmopGcgMSYAWB0awg (envelope-from ) for ; Thu, 06 Feb 2025 07:17:13 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VUCYePhV; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 474411E105; Thu, 6 Feb 2025 07:17:13 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 92AEB1E05C for ; Thu, 6 Feb 2025 07:17:11 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 212CB385840D for ; Thu, 6 Feb 2025 12:17:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 212CB385840D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VUCYePhV Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by sourceware.org (Postfix) with ESMTPS id 4B0E93858CD1 for ; Thu, 6 Feb 2025 12:16:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B0E93858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4B0E93858CD1 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=198.175.65.21 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1738844190; cv=fail; b=mmymC2P6/DdOqqSM/YZqCom/4ZUV6DmX2CNudT0m+1Uj8DKVAA/Zl/Xw8W1AgtItkXus1LhEEHsNT0mT98JSkrhYykETa0f26XskstchSuiIz2fccALV7KNGaBY5aRi8rMXXXn4WdoVRWZ92Kh2uTjhQUdAhpZEXmmtxoeOnEt0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1738844190; c=relaxed/simple; bh=uBvQzMgr6AhrSHAKGilOnXjJC7hU6O/m6JkgyHKncbU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=nXXrMTQpVOCKlt5EbZ7DitAwj9xxowaWG0WdT1eZKRVk9pCIYkN+zuGSt5aWxaE5J0bD1cR3RJ0rtVDVq+rZJyzsOYd2x9qV9ip4BOwesu/H20FbS071PZch+IilitT+7PjHlbb0uebgGHKPkqy8Q+B71PZE/USzCVxmi7KdSg8= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B0E93858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738844189; x=1770380189; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=uBvQzMgr6AhrSHAKGilOnXjJC7hU6O/m6JkgyHKncbU=; b=VUCYePhVgQuwqCZN6DKpc6ve6Thwu+oRHNdcFhfmDl/y8dLHTST9AF4j iiXr1IXD69S/hrGz22aXiXiGKyxe2NuvPmk3ZxShFClSu8al+ELKc4L+r tYdhwh6+GY/VdXXhz6Q6ZdOVc3ln4Jm1QnD9nVseL3CWEKTfKnbSrDrqu BrnVL2uDC1T3X6XRzuAz9vkbeWPin/DH9QKsf9ZYAWud13umHfiAQFoBo JPTAbVxlP7oauzcMmiIZ5cb5YqoW5j9P6kulvAe3SVbTLJdIgFzlDFvzZ NG592ORHtIj7SsB+7nFxltZzlB7V4pM4+dFWDfNZnvusDTPueeq6hCCex w==; X-CSE-ConnectionGUID: hKadxQHVQTGbimqZDna77w== X-CSE-MsgGUID: TB8Jk7uhQg2tv7oVjREziA== X-IronPort-AV: E=McAfee;i="6700,10204,11336"; a="39338581" X-IronPort-AV: E=Sophos;i="6.13,264,1732608000"; d="scan'208";a="39338581" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2025 04:16:28 -0800 X-CSE-ConnectionGUID: anAGpZttR1SB7OKYm3P0tA== X-CSE-MsgGUID: JVSRhYJjTlCUPLR7kf+WOA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="115810594" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa005.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Feb 2025 04:16:29 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Thu, 6 Feb 2025 04:16:27 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44 via Frontend Transport; Thu, 6 Feb 2025 04:16:27 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.49) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.44; Thu, 6 Feb 2025 04:16:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nqJtUMTeAkWjDLBMpk2mJjSPZIsOg9RQ8cx6Rsg2mlpXAwr1T4tXoYCLSSoNYFUis0+cupDX0uBM5w96USXhWUeTlIErjKTmb9QcDLRSrNOT7ZwsocxCQOCXsj3/J5/Ch9WR574L676KEXkEpY80POFHjZh5lgxxoXvg+IvYA4niPx7JWX94Qt+AuctekENc+sOx+2WRkxuSAt0l1J5GKtsUOP2+YwjqNxoG5r8jq2F2RbZFOxdVTFWapQJM7gJAS3TxrVimiwAbm1lQUhSlFCmx9SpKOyiiidfpMYDE0JC+ZrafY75kJELDL+jrAZn/G/a2u2SaZ10JHc5GR+sJrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mwnD5wz5KQuymaH08dUHv+JOc4OuZAE/OEzQ3+RGVCQ=; b=SsD41N+PDlpWDjoVyjBagEa0jx23TwyIbm7zi3dst5SJtBSlO02d0XWsAkQVvjwlZMV/v4ljlXMWlgdfLHaWB130Ozg5RaUkvJnc3ggeQqbZjC/VH0t1iHXLyzG/Y0IzT7CBdoogJjDirnts66fq7HxLGyRI+Dp1Tc1sJKltZcL5kkS7B8UvMbT0bPJ8cdkqU4KpuT9o2IyvLBTkQUz+bj8/FfOKwWtoMD50G82rgaP6HCo4254PHHNA36cZWN9SVjA4+UF3+2BWfgri3d06Eec4IWoOEUVUFynTCmVO2wYtRKGgT24OY3ZsFmSG1677mJLTbZc/EF+6N/ZwDRqvpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN7PR11MB7638.namprd11.prod.outlook.com (2603:10b6:806:34b::22) by CH3PR11MB8154.namprd11.prod.outlook.com (2603:10b6:610:15f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.12; Thu, 6 Feb 2025 12:15:49 +0000 Received: from SN7PR11MB7638.namprd11.prod.outlook.com ([fe80::25b8:16dc:755e:34d1]) by SN7PR11MB7638.namprd11.prod.outlook.com ([fe80::25b8:16dc:755e:34d1%4]) with mapi id 15.20.8398.021; Thu, 6 Feb 2025 12:15:49 +0000 From: "Schimpe, Christina" To: Thiago Jung Bauermann CC: Guinevere Larsen , "gdb-patches@sourceware.org" Subject: RE: [PATCH 02/12] gdbserver: Add optional runtime register set type. Thread-Topic: [PATCH 02/12] gdbserver: Add optional runtime register set type. Thread-Index: AQHbUxrU2gAlb8SJ2EqWNe0HUPOCmrMsbMYAgABUWQCADR8i54AAl0Mw Date: Thu, 6 Feb 2025 12:15:49 +0000 Message-ID: References: <20241220200501.324191-1-christina.schimpe@intel.com> <20241220200501.324191-3-christina.schimpe@intel.com> <17373ce7-75d2-458f-a9a0-dd9db428371a@redhat.com> <87tt97ixqz.fsf@linaro.org> In-Reply-To: <87tt97ixqz.fsf@linaro.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB7638:EE_|CH3PR11MB8154:EE_ x-ms-office365-filtering-correlation-id: 9857f9fc-5194-4c34-f365-08dd46a7fe39 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?6wdYHBu2/A2ukw/sbs6enLC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?EhPC047kbGGRCJUURTvvjkjt2GZoxTYbTQBL8koiRz1NpbX/p+TLBjC9xmRh?= =?us-ascii?Q?0/MDr89gVoUWdJmky1PjgBOT8vZe/qCCEkfymKG4KNf+G7oB5W668sDMXzjc?= =?us-ascii?Q?idB8ODyy7MpDrQ8fur93b5CbApHcsZWhm6nOoQPh5rAw9VvW/5yzg6JdJ2GN?= =?us-ascii?Q?+K4XDQuX2vmUIiteWpN8/FYDGQY7TvBU7vyvPKzoNBMLPOEpzmNpHCdZeNKq?= =?us-ascii?Q?/g6uJqf2LPwLqnOgL+YSrxNmOSmClgcYMcSMbKUiYXe+yg2AKByQgMWLW54x?= =?us-ascii?Q?qIhma238YM919b6f+3x2KU6Cbfrkgw4PiLfR2Nd5gUXd6d0NVkr2pGGMvX42?= =?us-ascii?Q?XYaI4zNbpqEmxj51HGPZBt1CwMh6hWh17nIwNwFPhXO/QIGFKveaicDTum5S?= =?us-ascii?Q?PgCPxz16y0e7Oi06fBXeZ9E0cxGIlghGQa9y3+6i/EdeIkz9aXe5yDV8uMIT?= =?us-ascii?Q?ou5jQUPSj8s4KXDvI8zNYKFzalflRPJ05FPHV4fNwROGTsjr6w=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB7638.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?yho+H1W3YQYc+KNQ2hxoXaqo6eTWFxO/DTfC9tyewQeqYqGQJej5o+Ma2KkK?= =?us-ascii?Q?Vw9SwB5rgy57Xy3+QS2eYfdUE76bWoG5MmERavcH8/MkhcJebopgqN7Rlk7E?= =?us-ascii?Q?id1Xg+DtDGTOPBzT5C4yw9eGWPtUZjZeQKrsZ87Y3S9p6cRI9RSIz69qKajn?=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T57P18bfnHfigUaHTjz?= =?us-ascii?Q?8Rk0sV1rmNScTD5TQZe5yynHWger3uYPnlCOSG1fCJdUlLi9rjLIEnwcd1eT?= =?us-ascii?Q?la44Nzd3o5lvLssycyxBsAID5t8Np3DdX9j8T8/qdEB8/TRuUk1+89aa9P+e?= =?us-ascii?Q?kphVnBYZdc9umtIBXVonhHe5s24D7aXimC5cnq3UDO/URyyY7pu66Pyv/uIR?= =?us-ascii?Q?HZ6mT93l+5szPHFheP5BQYek7wW9k/waARtoFP6J6I77J0GYUWXpFxjhfgjS?= =?us-ascii?Q?kgE2W4q1lJzVQjh9zl3aDSa5YQo2Ykin6pilqVMksz2MQXdDPUr2JMrF5CQE?= =?us-ascii?Q?UbeuVEzyyaRl8zBm2yrjpH8wugvIKwJSdKSsOgdyfCZLR9n1KxT66SeBR607?= =?us-ascii?Q?opXjqbAmmI5RZ08EcBoW/WLB7nOYqq6YlTHwaQFg9zzDD5sBBXC03Xdsk1Hp?= =?us-ascii?Q?bQnA1CwFp+mRSDe7oBj4YMtF5tNkRKLRDK7LNI+35p0s3QL8IkaXADxWBrW1?= =?us-ascii?Q?O8cQGrMnz/zAwnDrBPD2o5ER+rl9tNKCaKYbrpvoebjXpOHYNWsu2ck6sdSV?= =?us-ascii?Q?rw=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7638.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9857f9fc-5194-4c34-f365-08dd46a7fe39 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Feb 2025 12:15:49.4601 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3AYyPxAz6Ztkx1funARuw1Hyz5KFNf8mtfQtK0NHPBzS+5T/rFKl74w8gm+oSLOei7uyOllFQ89KbGFViPuBZH8FtAa9BpiL8tzTcAhlyUs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8154 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > -----Original Message----- > From: Thiago Jung Bauermann > Sent: Thursday, February 6, 2025 4:00 AM > To: Schimpe, Christina > Cc: Guinevere Larsen ; gdb-patches@sourceware.org > Subject: Re: [PATCH 02/12] gdbserver: Add optional runtime register set t= ype. > = > = > "Schimpe, Christina" writes: > = > >> -----Original Message----- > >> From: Guinevere Larsen > >> Sent: Tuesday, January 28, 2025 2:35 PM > >> To: Schimpe, Christina ; gdb- > >> patches@sourceware.org > >> Subject: Re: [PATCH 02/12] gdbserver: Add optional runtime register se= t type. > >> > >> On 12/20/24 5:04 PM, Schimpe, Christina wrote: > >> > Some register sets can be activated and deactivated by the OS > >> > during the runtime of a process. One example register is the Intel > >> > CET shadow stack pointer. This adds a new type of register set to > >> > handle such cases. We shouldn't deactivate these regsets and > >> > should not show a warning if we fail to read them. > >> > --- > >> > gdbserver/linux-low.cc | 40 ++++++++++++++++++++++++++++----------= -- > >> > gdbserver/linux-low.h | 7 ++++++- > >> > 2 files changed, 34 insertions(+), 13 deletions(-) > >> > > >> > diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index > >> > 50ce2b44927..355b28d9fe4 100644 > >> > --- a/gdbserver/linux-low.cc > >> > +++ b/gdbserver/linux-low.cc > >> > @@ -5007,23 +5007,31 @@ regsets_fetch_inferior_registers (struct > >> regsets_info *regsets_info, > >> > if (res < 0) > >> > { > >> > if (errno =3D=3D EIO > >> > - || (errno =3D=3D EINVAL && regset->type =3D=3D OPTIONAL_REGS= )) > >> > + || (errno =3D=3D EINVAL > >> > + && (regset->type =3D=3D OPTIONAL_REGS > >> > + || regset->type =3D=3D OPTIONAL_RUNTIME_REGS))) > >> > { > >> > /* If we get EIO on a regset, or an EINVAL and the regset is > >> > - optional, do not try it again for this process mode. */ > >> > + optional, do not try it again for this process mode. > >> > + Even if the regset can be enabled at runtime it is safe > >> > + to deactivate the regset in case of EINVAL, as we know > >> > + the regset itself was the invalid argument of the ptrace > >> > + call. */ > >> > disable_regset (regsets_info, regset); > >> > >> I'm somewhat confused by this patch. > >> > >> The commit message and other comments here say that > >> optional_runtime_regs shouldn't be disabled. However, in here, if we > >> get EINVAL we *will* disable the regset. Did you mean to use !=3D inst= ead of =3D=3D > ? > >> > >> I'll be honest, I don't know enough about the regset subsystem to > >> know which is the correct option, I just think it has to be consistent. > >> > > > > Hi Guinevere, > > > > Thank you for the review. > > > > For the errno EINVAL we want to disable the regset, as we don't want > > to call ptrace using NT_X86_SHSTK again. This specific errno can > > happen if the kernel does not support ptrace using NT_X86_SHSTK (older = linux > kernels). I tried to explain that here: > > > >> > + Even if the regset can be enabled at runtime it is safe > >> > + to deactivate the regset in case of EINVAL, as we know > >> > + the regset itself was the invalid argument of the ptrace > >> > + call. */ > = > I agree with Guinevere's remarks, and also with the suggestion of improvi= ng the > commit message. > = > But I would also like to suggest being a bit more direct in the comment a= bove. At > least the way I read it, I thought that EINVAL was a normal thing for ptr= ace to > return if shadow stack was disabled for the process. What about something= like: > = > Even if the regset can be enabled at runtime it is safe > to deactivate the regset in case of EINVAL, as we know > the regset itself was the invalid argument of the ptrace > call which means that it's unsupported by the kernel. */ Hi Thiago, = Thank you for the review. I think we can add that sentence "which means that it's unsupported by the = kernel", if it is generic behaviour for any regset. This seems to be the case: https://github.com/torvalds/linux/blob/master/ke= rnel/ptrace.c#L895 So I'd enhance the commit message but also the comment for the next version. Christina Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928