From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DUsKDTe3gmXPkyUAWB0awg (envelope-from ) for ; Wed, 20 Dec 2023 04:43:19 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=vALTRPPo; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 265EA1E0C3; Wed, 20 Dec 2023 04:43:19 -0500 (EST) 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 10E1D1E091 for ; Wed, 20 Dec 2023 04:43:17 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 820B03861884 for ; Wed, 20 Dec 2023 09:43:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 820B03861884 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703065396; bh=FbSNHSwya22Vnt0DE/KZM4wz290aKjBJEY/DnHHhZYk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=vALTRPPowYgEyGBP4iyP2osNL0osm/ZyIvxfCfSBhGK4NgnbU7+tvvrZlETln/KL6 ATIy3XBVlnHXSYYrIHTd/NRzI/vHmz1GWE/6WE4Utb8CON2ALe/FZx2NpJs1cwV1rB lw46GLmG8C3kJIXW2//72qgQTG6kt9oS/Z0nbXcw= Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by sourceware.org (Postfix) with ESMTPS id 96EF23857BAE for ; Wed, 20 Dec 2023 09:42:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 96EF23857BAE ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 96EF23857BAE ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1703065367; cv=fail; b=Rcfj8+RepVrrDlpfzo0hXBRX9A4omYTeGg6RRq5pF1jsVqqWjFBiKDLo/tpHcXkVTLTo2HZcVspSNZ7koRpDnzPW1IaQ9K53IpgDUmnJlaY9qTrJ/bTscK9VDuk/okmvhkOtxdWQYi7bNcpiDe8rEawfzZvAAXXzYKjUgPYpNcI= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1703065367; c=relaxed/simple; bh=QAzTmDvMmeto9a2IzwEZ1Ipi89tMVEDV9kn9wZHP/K0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=TGQpL73L7lBhhk1OOkTdONg2hSWxpAkQNSAoL6P0hSxN0VIMOuY9MziW5sQ2fvjF8tmBWTwShgyHe9IOSI3l3i3HZhSCFkY9Zy0S84VpxkCpLivkAFbgqDJ7P9wJnfsDFVItkcrmAbxWmMtF4fgqsAYf8etW/xW4+6ATx7l4xpY= ARC-Authentication-Results: i=2; server2.sourceware.org X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="14476805" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="14476805" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 01:42:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10929"; a="866915656" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="866915656" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Dec 2023 01:42:42 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 20 Dec 2023 01:42:41 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.35 via Frontend Transport; Wed, 20 Dec 2023 01:42:41 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 20 Dec 2023 01:42:41 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MkBRBFvsxe8Q9pMyngz6MKPBLmSLIYh69U+b3rrAW0RyiS6a8yOg71fH7tfgKyLeep0T9vi9o9V/JGEzd/vgxzork4yRC5MbsdQCFwUKmcF6pTuDlpQKtAtK+xg3fd3KfQzxPyt79ruRuGiGY6VhIsdALj6K9aAJB5YZQd4sdI4Z0qiZrgarB2Am0IPiMQhtimx+1/oz0Dc1jaGqKtNfecHQAxqK5Fm40cRvQAscnFnVE+dtS7YV5cJwJq02nQr95VfUDNzdy8O7cV43/p4JIbskYN9seTn7PvNQBci1tsiwAR7C1OoFfhiMWXlpyD10YNA+yYRi0ez9c8BQCyL9eQ== 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=jICsrpzA/alZfzaiIoyZ4+DOaVKmsb2uyhMYjUid+wk=; b=MXRyl0o8TrMVWaXso736uZx+uvTyju5yCU4yvOEf0LhL6gaA52gfglMLnLi8hYGLwRHWqAqlwQTD3J+VQTf9BevaNGxopPD4tUFb87bTFWxsgCQphgO2CBjgbLydxJawYbzu18uqRjqNhZev/3mabyhzO20GEHjVeyTsez+3/X/1Xdls3n8XessOF8+q8P3MgGjYNQ/zhOjG2AEBSbuZCcwRCdaf3qkzRN+N290ysoFShcsg9cBoJSzY7yikG1vKIMy0AzE9ZrMByqrBCjChY5DbhKy9HSH1OVjupyS/HY+8yWC24IYHZjHWZR+rRm9XCi8v3N5uDAemgRsBsr1org== 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 DS0PR11MB8687.namprd11.prod.outlook.com (2603:10b6:8:1be::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.18; Wed, 20 Dec 2023 09:42:39 +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.7091.034; Wed, 20 Dec 2023 09:42:39 +0000 To: "gdb@sourceware.org" Subject: Shadow stack backtrace command name Thread-Topic: Shadow stack backtrace command name Thread-Index: AdozJwW2cA0IuLedSP6o6CeJM6Xuyw== Date: Wed, 20 Dec 2023 09:42:39 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB7638:EE_|DS0PR11MB8687:EE_ x-ms-office365-filtering-correlation-id: c8b69f0c-dea1-4bab-7e6e-08dc0140015b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dnwnZdcp26W87ok0Ld//+r93naQwmPPNkCwhwPIuvshfQ2b35QflAnixy8x3DEIvQqYPH4oBkbKYoCM/9XY9lAIn4D11swUVIJs+CWa1HN63rMTGYZhKm/ocNOgMqM23ty/VTGRfoB8nXPyvGJUIDCx1dl3SKXnKX9hpr9nfmhaQEjkvfy0K2PWiQbELfF9Ejq/7JSieh/yccHxyb4N8P/A5gHUwSpy4oaYIt4gYUsLb6+okWNAIXdWzrqgamnPf85uV2sixFECfVycmGNIrw+ATT7Q/iSbIBDVNlFWaFBeum/+mxQU4OplXt9mxeGSFOAkn+8jedfbUur1RH6XVwxaW5iX+T/xWyoz17WcgkW/TXPbLUFif0mhcM3AFfjQsR/BMENN2fPODPEBcg2za0z4r1/NTV0ho8MTF0k50B8aARbQG2K7Zpil17BT+zqa5V+2mScCjozRC2KIZeEhKx8Q9FEhYd0b93X+QitRoQCwpFEh/G9cojv0eZcNo+c5tkFndXM40JpgIv1xkX8/M2762JibS/48GmViNiq9ChqgrSYUIkAYx3+QOLGc69ifYpDauDRiwFgTn1bXZql1/cvMf60vEVIXZZTPZ0toDJ/C+PgBuKBK/qEL9aweJwPgW 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)(346002)(366004)(39860400002)(396003)(376002)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(33656002)(478600001)(26005)(41300700001)(6506007)(6916009)(76116006)(64756008)(66556008)(66476007)(66446008)(66946007)(71200400001)(55016003)(9686003)(316002)(86362001)(7696005)(66899024)(8936002)(8676002)(122000001)(38100700002)(2906002)(52536014)(5660300002)(38070700009)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GQkhnjcyIlaac9a6rvNn2TR+R5/YII/4jf1AMqIwgu3Cn5F+T8n8jvlrZNSU?= =?us-ascii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kWPLul?= =?us-ascii?Q?dRhqzFB6SjDM31bAFG8o6VgZSsjoRnARudZSx722S/f8c9bD9JB5neHHADim?= =?us-ascii?Q?LNwFThHSWPBwl07puNGxRxOQM1V+UFY1dSVanufz0T3envkoAJnvTKms9RyA?= =?us-ascii?Q?Bs5NO3+OlqBW0TyswWavKsjwcLrgPjml1hv2ViMublskNURPHQyZhP5tr6Tx?= =?us-ascii?Q?9ZqOkzTZPiXbopuVr5/zBr9VLxLKaeTl97PXT8kWKTDM7Fj9kgY88Beuu4Mv?= =?us-ascii?Q?3hZKTSyF91l/avXvb73z2g8BgSTCvrIdYLoO3Og97CmIXDK+jHYvzxCiLmM4?= =?us-ascii?Q?8EJPHXWvysLdwVeMSvUeCy9GUaPNMSm0affLspCejPKEu2xNe+uh8R/8Ow0k?= =?us-ascii?Q?+6rq97DfYmTPXXui95t8eI+2yetox5yEGTVdWdcLgN9AKvM9vEH2V85VnuSL?= =?us-ascii?Q?UFh1np1J6Mw1vmmLLev+5aRd6PFhzfcRCWHP2fHf6NLfB853KkQXIr0RurK4?= =?us-ascii?Q?VvXTAeXJCU0McoDnaolr/bbMWEiFdNgs0sOime78AaIymGg1xXqsVD9UXsIS?= =?us-ascii?Q?jrl4yuq8+s/bDZpTE0Jq9UOHwEQEXnm/cD9DKmH1/ptzEKyfIX/sjyIxWLOH?= =?us-ascii?Q?jxJO9ALOcFOM2elnU6fs0XZBQUn+GuRlhScXRvpVk6aM+Cvc+xX2H+cFlQI/?= =?us-ascii?Q?ng=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: c8b69f0c-dea1-4bab-7e6e-08dc0140015b X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2023 09:42:39.1846 (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: Ik3SADfrEvyaJzjeZdwplkb5udpDPBrk/I8DxaJctzV9KpmP9KXnXxHqjQ/OxUoL7pvvfcJVxo5H+LB0L105mAuRRnkapYFhoHrRQ2BYkFQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB8687 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.0 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 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "Schimpe, Christina via Gdb" Reply-To: "Schimpe, Christina" Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Hi all, = I am writing to you to collect feedback for the name of a new command, we w= ould like to introduce. The command shall be used to print the shadow stack bac= ktrace. A shadow stack is a second stack for a program introduced in the Intel (R) Control-Flow Enforcement Technology (CET). The shadow stack is used for control transfer operations to store the return addresses. This is an example command name and output for the shadow stack backtrace: ~~~~ (gdb) info shadow-stack bt Address Symbol #0 0x0000000000401131 call1 #1 0x0000000000401145 main #2 0x00007ffff7c3fe70 __libc_start_call_main #3 0x00007ffff7c3ff20 __libc_start_main_impl (gdb) set print symbol-filename on (gdb) info shadow-stack bt Address Symbol #0 0x0000000000401131 call1 at amd64-shstk.c:51 #1 0x0000000000401145 main at amd64-shstk.c:56 #2 0x00007ffff7c3fe70 __libc_start_call_main #3 0x00007ffff7c3ff20 __libc_start_main_impl (gdb) help info shadow-stack bt info shadow-stack backtrace, info shadow-stack bt Print the entire backtrace of shadow stack, or the innermost [COUNT | -COUNT] addresses for the current process. To print the source filename and line number in the backtrace, the "symbol-filename" option of the print command should be toggled on. (See "show print symbol-filename") ~~~ 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 We also considered other command names such as = - "info cet bt", "info cet backtrace" (+) Short syntax possible (-) Not so easy to understand by just looking at the command name. I miss t= he name "shadow stack". - "info shstk bt", "info shstk backtrace" (+) Short syntax possible (-) "shstk" ist not an official abbreviation (in contrast to "cet"). "shstk= " is mostly used by the linux kernel and might not be known by the user. - "info shstk", "info shadow-stack" (+) short syntax possible (-) Without "backtrace" in the name, it might not be so easy to understand. Having in mind that that the shadow stack is not only a x86-specific feature but can be seen as a generic concept we also considered that it could be part of the existing backtrace command, e.g.: - "bt -shadow" (+) Short syntax (+/-) Most of the settings of the bt command don't apply to the shadow stack (frame arguments and info). This might cause confusion. For this option, it might make sense to introduce a new setting for the bt command which is for shadow stack only, e.g. "-symbol-filename [on|off]". What are your thoughts on this topic? Any feedback and new ideas are welcom= e. Best Regards, Christina 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