From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by sourceware.org (Postfix) with ESMTPS id AF5993858C33 for ; Tue, 9 Jan 2024 08:34:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF5993858C33 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 AF5993858C33 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=198.175.65.13 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1704789279; cv=fail; b=NDhW1fKohj1X6Tm+3r1/JHOP71iiW+DUHWq3pNHM7A7Ad5llgnh46L2+OiuFxPx3VshfcZjp1hqfbHny7MnhaAT5LTw3IAR8yEFDEVTUuyKFIwvHGdjCchXS11YS1potNzzlnmwiefKJ0c5wHRETQJXXQoHF+CZ88u1PWNTs9EU= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1704789279; c=relaxed/simple; bh=na2ZfCWgFgoh0jZhuLv9dMZ842Rixspg4ad/spbKf2A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bjgbS/36gHc+2nLF7S+UglwEUSqKuisRoCUaxNhmVQxP6RiZgop5iqOsUkBWVwReawaaDMhxilM18lnST8t83uNalGB5z6AISQqGaLIWG7tQ2pKve3y6b/c35NJvWv7+zUvJdTjNPrVYuOzgQNOs53+xjHSnaTHPNPT3ACq/ZFI= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704789269; x=1736325269; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=na2ZfCWgFgoh0jZhuLv9dMZ842Rixspg4ad/spbKf2A=; b=hCbRJWzKi66lil+xPVmrS0ytSkIcTXKoGteLIqkmqi8IqElwhB4PY3ji Y6Q9PqnWkywn6Y0mPVV2TSZIdVP4ASn9p9YISNJBqirf/Oz6oFOqg/d3g 7ZyFjt6c9TaqJHSx6LbkOOrsZ+OX+9cwLNk5iAFgaQd6v7AnzE10AwEuF rzQ6yyXe+dNzAy4I9xtBw8WOyDHo6B2rMYrtTV/kz8ZjlaPZufOSaFbGp 6bRC4Em7OYF7QzHZC+YLdWSkp3htCmoDRxJHZZNZb3i6y7yB5CzOu4cW7 wwZ2G1JGcQY6E6oC21ZQsvRGe6V0rx50+6nESd/SMon+UG2I6zU0DuOef g==; X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="5213439" X-IronPort-AV: E=Sophos;i="6.04,182,1695711600"; d="scan'208";a="5213439" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 00:34:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="900681654" X-IronPort-AV: E=Sophos;i="6.04,182,1695711600"; d="scan'208";a="900681654" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 09 Jan 2024 00:34:26 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 9 Jan 2024 00:34:25 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 9 Jan 2024 00:34:25 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 9 Jan 2024 00:34:25 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B9BhWM0HE5HHu2hdrcjjv+qiQVbRLNSXnrFJlGKGIBGxtJ1ZRZQPc/2puhkzDS80vZbfiahvLRsM/UOJ8IBJgnwFi8KEyAmMTgNBPGK6N3Ulnmzvu0S9GX16ltJkG7KQuUyBOg4Nbio5aEHsNUi5TtfYv2vLeGNLOoGnhNYb3Y96cXua8VKthT5Y9hEHpP3SE2/q7cDhnCQzTgkFE5kmpSXFBuyHGCIXv9b6Iz4/RP+IL8sIuk1UvpDTjx3ubnxjdbmyA2WPFwQnKO6HSxIypokKOSoYx/+wW3TZZ5ae0VwwW5rqmkfYowDKOgmskKkr8L/31yv9wy94XgBgREag0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=kqXZfLz8vWMy74eZkdS/FNMwj3D+jsM711/plOd4vug=; b=buhLKxCblx7eXwVL7s9N2UloiEojfH3SHII6MUfCmgK52qCNUMn7DZ+1XQqco4Ay2GwQPqhe9mCdqOE2bOGUNOtLn4uJYZJ+ZjmLjM9PsVfNmZo9i9nzubEsyNuxvtcvMAE0wkpKMRF54n9+836bP2aSTdf/sCh8qK6cp0DQA//EyTnC8KmSLsg8ReTbQqSNqyX/i1LJpVN27tdA5B9Nx6cKjq2eBxSjHeS/pC7MNRvf6LA11bSIFuJCsm8awyqaSLgIMDBeGZMbnvNgvUONY4CFB7IT0c35xrKL0XgJpruQ+3jh1z9PmCm0rxcNHIIBDVRrT4GLhxva9MNApEVZPA== 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 BN9PR11MB5531.namprd11.prod.outlook.com (2603:10b6:408:104::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.24; Tue, 9 Jan 2024 08:34:18 +0000 Received: from SN7PR11MB7638.namprd11.prod.outlook.com ([fe80::885b:923:2a03:5a6a]) by SN7PR11MB7638.namprd11.prod.outlook.com ([fe80::885b:923:2a03:5a6a%5]) with mapi id 15.20.7159.020; Tue, 9 Jan 2024 08:34:17 +0000 From: "Schimpe, Christina" To: Thiago Jung Bauermann CC: "gdb@sourceware.org" Subject: RE: Shadow stack command to host related subcommands (was Re: Shadow stack backtrace command name) Thread-Topic: Shadow stack command to host related subcommands (was Re: Shadow stack backtrace command name) Thread-Index: AQHaNFzxoQsLCBSb5E2AqoBujjxQrrDQKm8A Date: Tue, 9 Jan 2024 08:34:17 +0000 Message-ID: References: <87h6kbfazh.fsf@linaro.org> In-Reply-To: <87h6kbfazh.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_|BN9PR11MB5531:EE_ x-ms-office365-filtering-correlation-id: db27afb0-359e-4301-b355-08dc10edc4f4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: S+IigwchN5ImJu3W3P8Ff487ZpOtRkIOMG3q82naX8NrZ5jCTgTYyc97DbSA7i3/LNW6mEUbLZlYBE/XtvA7Uxyps3hhpy8ViGVMAq5+f4fNTWFAjPXKEUDyqNBFBvTSXKtYh7xNj003DogN7s4pmnSl5pTuWe9aai722azkQi35Pfa6yGJRsMIIin4YgkWLmFaGyJiVY9/DJZSET1lSUz7o41ePF/zrooknXLDWxvzZsVS89LCmVj5+2aUdXaAz2i+2Fz3Q7GuDsR71lgAJCb6LHyGhw8U0VhTaMW4LXkocCct+g5tMquaJ4pIYjzm9F8rqNQja9hCcF/3Gsa1xxkVYRPzsZRIvES3mPSK++4zVKnxuuh7CE38U1r/2ZIAwTIu8kSmfMbbCSgfV61UU/3zHk89YbgvdNmJGjsWfVqaTjWejIIunjiAP9jWjIV5NogvIrv/Th5SKL9LbcNTT16dlmcDzFr7KuAzYgwkJM2gOYFpvPPO/wRb6rINC8Z2/iHEuEWekKgRxK+Z2jD1OGER1Ew4+EDqH+GxlAuk/390cyb3N7ZtRTLeuOzfZd5sYz6J7ZII9cTPIdtdGCeU/mF910Y8fWmflSPEifKBYBrg= 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:(13230031)(136003)(376002)(396003)(366004)(39860400002)(346002)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(83380400001)(9686003)(53546011)(6506007)(26005)(122000001)(38100700002)(8936002)(8676002)(4326008)(52536014)(5660300002)(2906002)(966005)(7696005)(478600001)(64756008)(6916009)(71200400001)(66446008)(66556008)(66476007)(316002)(66946007)(76116006)(41300700001)(38070700009)(86362001)(82960400001)(33656002)(55016003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?oGU0UbUSwYM20e8dZ8QNHUUxSfNx+AZlmy7wFzfyA1VZDoHvzU0Jp5KQeLaJ?= =?us-ascii?Q?o4ZPOSMCbyLkAjQzs9gKOpEnQjsSt7W7GPshHdh9RkujRjolIa323QOP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DGwok9CxkF/J/QHrSL/ryTMjy9OqIyGcLeYA51/7Lz?= =?us-ascii?Q?4P0ul6eG2lnKDYBIqScLUTwG8ms04zt0339M/VzHhi2QCq2oGsUEdG1xW74V?= =?us-ascii?Q?jqz1T3SgDoPjAyPd9wHz8mELbGGnC2ab+Zoco/IYtdDy+yOQxioikIrTu2ig?= =?us-ascii?Q?kYI7+DQf8c6+P1mWSABJfnql9/eLcDjtY4WEQW+w+/Hu8HA7eERBXFJRlJpW?= =?us-ascii?Q?kssrEaTGq5Z3DYSmXUGpG2SlZMkrO8tyKH5UWJ+4RArBryHB31YhRNnWl5gs?= =?us-ascii?Q?2DYTM7jqGvWQXDKvD2lNtZl/CzHi8NPSvhW2AXfozB3QuY3W+Dx4XeKKVCk2?= =?us-ascii?Q?a56UZL1c5PcYBEzTDWF/EgEEUF8bAbIkqhlYHYRZbt2S8rxuqpQCxkpolbAL?= =?us-ascii?Q?96vPhlI6ke3oBv+ayw6g3r1yitffOa/6YvjZXJ33tlBUlN6ArlGmMvRi+BRq?= =?us-ascii?Q?Qr91zLP8Sls1iIaHTis1lQuHMyNETb9hWwg8ihEZUoQYrrwJrM6lGw74F+Jw?= =?us-ascii?Q?/unGITu5aWTAmlN5A9u9m3EeqDNqbpsWXupFmvDMHNw2J03HM/71bcVZTXnZ?= =?us-ascii?Q?ExZ7Fukluw0ftnjxVn8Lajg95yANa8facjWwk5s9RoSYWOb2SOCPjoyBSXsc?= =?us-ascii?Q?XA=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: db27afb0-359e-4301-b355-08dc10edc4f4 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2024 08:34:17.7177 (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: Q2+7qUydDVoAZwGrGGO5lZb9AaZ1aFY3hgs9iNq5yjmB5POjqjILbitNpUlW4/s+7pbhu1hCyI3EmUyey8HnuC0alalc5RgXRF04HDzO138= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5531 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,TXREP,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 server2.sourceware.org List-Id: Hi Thiago, For "info shadow-stack enabled": We will expose the shadow stack pointer as register, so the user can check if it is available. = It is only available in case shadow stack is enabled for a program. = Based on that, I don't see the need to have an extra command for shadow stack enablement state, I think. In case the user runs "bt -shadow" and shadow-stack is not enabled, we could also provide a useful command output. For "info shadow-stack locked": We don't have a separate note for such a feature a but similar information would be available using "/proc/$PID/status", which the user could check himself: https://github.com/torvalds/linux/commit/0ee44885fe9cf19eb3870947c8f3c27501= 7e48a7 So I am not sure if the two commands would make much sense for our case. Does that sound reasonable to you? Christina > -----Original Message----- > From: Thiago Jung Bauermann > Sent: Thursday, December 21, 2023 11:27 PM > To: Schimpe, Christina > Cc: gdb@sourceware.org > Subject: Shadow stack command to host related subcommands (was Re: > Shadow stack backtrace command name) > = > = > Hello again, > = > This isn't about backtrace, but still related to your proposal I think. > = > "Schimpe, Christina via Gdb" writes: > = > > It is configurable using "print symbol-filename" and COUNT. > > The command can be called by the following names: > > - "info shadow-stack bt", "info shadow-stack backtrace" > > > > From my perspective, the command name has the following pros and cons: > > (+) Easy to understand by just looking at the command name. > > (-) Rather long syntax > = > As I mentioned yesterday, I like the "bt -shadow" proposal but I'd also l= ike to > have an "info shadow-stack" command (or just "shadow-stack" as suggested = by > Guinevere) to hang a couple of GCS subcommands onto, e.g.: > = > info shadow-stack enabled > info shadow-stack locked > = > which would get/set the GCS features that are enabled or locked. These > correspond to a couple of entries in the structure returned by ptrace's > NT_ARM_GCS regset in Linux: > = > struct user_gcs > { > uint64_t features_enabled; > uint64_t features_locked; > uint64_t gcspr_el0; > }; > = > Initially I thought of exposing them as pseudo-registers, but this way se= ems more > straightforward. > = > What do you think? Would this be useful for Intel CET as well? > = > -- > Thiago Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva = Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928