From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wPdfBZMlmWpIJyMAWB0awg (envelope-from ) for ; Thu, 03 Sep 2026 03:45:23 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=OV5nxT6c; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 05E5A1E09B; Thu, 03 Sep 2026 03:45:23 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 579031E09B for ; Thu, 03 Sep 2026 03:45:22 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A762F4B9DB5E for ; Thu, 3 Sep 2026 07:45:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A762F4B9DB5E Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=OV5nxT6c Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by sourceware.org (Postfix) with ESMTPS id 72BB64BA7999 for ; Thu, 3 Sep 2026 07:44:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 72BB64BA7999 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 72BB64BA7999 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1133 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788421499; cv=none; b=XW3lHD8+G/bktTom4gnm4FffLbr22NdNstrODx685MBEqmoct+R/Wcqbx1F4nRmL8oRwo8SY78pUDtjQZQIMMmC7/cvwTMAojlggV3iaeC4s9lcdLhy+MSVyoM1fRbbkkVYsyFVC6wFO7j2EgsLwhGv7KXJQz6dSpkni0Uhv5lM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788421499; c=relaxed/simple; bh=PeC17BTEmOSEtkp3SzvkeLjKU40mZzhUiOwy44fyQco=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=nA3uSrVgyk4hMw4zrdRozSk9V/f6NRH8vqyEewuPG2hyndWwWIbVgMJ60Pj2eB8yBD0HbIkgQHD66cSJxvKvOUqoWTdlayKgc34DrXfcid27z++aUsIrHuzCgTWcPNtt9HDMr1jTLWyCSwsJClVj2aoBKSHkupES6moUIOJe5ic= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=OV5nxT6c DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72BB64BA7999 Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-86c0e4dd49cso20671587b3.3 for ; Thu, 03 Sep 2026 00:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1788421499; x=1789026299; darn=sourceware.org; h=content-type:mime-version:message-id:date:user-agent:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=p53AX8skqiy8hiuKoKrQ4zwdLeQcalM2Xcicg37LGYI=; b=OV5nxT6cR1y2a/4F3O3UwTn9Vc2wJ57SJANnNfww26zlrzE92ZCoZVZhwNi79rd2i6 0a/bU6r3zgYRvQYypEZq7uyUDp3FtoDOPAv92KcunlqgT9Y1ESGl/ROGOLJs4bV4zQgN pNfuQLUQxRrKIdGw0dY+ELtbAoF1arz1pRNYpblBKThd5ihU4V0n0435CZN4VkSjq9an d5ZVsEfCu30FEqnHiLn8kc2kWuoiLh8wWJh5gtq6X5Mx5wDUCj0ioFdJJMc7yzEnQEki VBi3TMinDaqyg457xYFvC0QtdmpeM7kSsKeZyOH0sO8fFiwAEm1voMxPERqJCb0qLucn jGMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788421499; x=1789026299; h=content-type:mime-version:message-id:date:user-agent:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=p53AX8skqiy8hiuKoKrQ4zwdLeQcalM2Xcicg37LGYI=; b=EBhFUxtFWBc0mojLM5QXjhUxe3zCFEsfjBN6oUaSXuFw8082Ui/ehcMwy72/642pHr 8A6RauFZhemEsblSt8yx0+tbP9s5Eh1f/9/ZeaKpBOg7C2tEOlMshi1ATKXMiMmziO84 01hEoAJwo60ew+TVETazcCg7VLGzRncN15jvozObMSctiUJBfoF7B+SoNiEESKYueJwB vMJjfJG8p3H5p9dpaIashxerFg5iPo8G1PCU6YTLpvSeVbQP9yNwJ2cbxeHe3I/oqTOI OGeT9t+V4+1rDEDE1CIdR92gYX0cx3BSU0ICMJNIS13qc/aPKSr+ZXM23Doo76IX99sO 9jaw== X-Gm-Message-State: AFuF++nJnCkne9bYQ0BNiqGVqLpn8/gTWCpQEDSMPHu8CYWcX/jsNZdw qZ6tSm1E1QSKjyu3nvMSE1w0zQ4tqnSNxBcj7apwEB0bxGXvQZifNASGWp0WeNDGNn4= X-Gm-Gg: AYBFou0/2ovpyHR1oyamw24ULn6C7U9ZO/Duoshd/5eVzBPb82FZdCxuVFG125gDsGZ V0vGHEQOX2B0h8tMNQnLyg4wonR/m0F9veiCV9jwv2v9TCHM0fHnNDuhN6zfL5bOO2DyATPj9c8 xqW72YnWhcmAw6ODKDhF+e8lQAtrBpTR8LD0WIN6Wl3vOUHQYdzrt68FbOlGUk3YZZvQi4KZdnW UBb8G078Pg2KBXJyLCNqBUvJyuTPodz7ixyNzKpvgWi6lgN9UUrKI8D8r3AKWPjO4lCePCWLyj/ Cx7IC3yqT6E16znx0Vl1UTxFOoPM977Pe+HUeQvX+QUu7sXcEDmN2K/50HTJu/OzlO6iyk9OEaZ BNerliQtyawj79KJYIMV8IkW4uGDQUj4suPfDMeZNImJ3b32c5e+kHg2c1Uqkq/py9/jeNpkhuM eSNoGqd5coNXkE8DPYsOmgK5bbxiIPe8huuMOr43NT6xaT3oK02RLq6UKd2MbWaFcf0tHj/FM= X-Received: by 2002:a05:690c:dc8:b0:845:cc1a:af6e with SMTP id 00721157ae682-86c5415d15cmr50948647b3.30.1788421498757; Thu, 03 Sep 2026 00:44:58 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id 00721157ae682-86c1183f2f9sm35021697b3.13.2026.09.03.00.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2026 00:44:58 -0700 (PDT) From: Thiago Jung Bauermann To: Christina Schimpe Cc: gdb-patches@sourceware.org, tom@tromey.com Subject: Re: [PATCH v4 09/13] gdb: Provide gdbarch hook to distinguish shadow stack backtrace elements. In-Reply-To: <20260708143639.2214689-10-christina.schimpe@intel.com> (Christina Schimpe's message of "Wed, 8 Jul 2026 14:36:35 +0000") References: <20260708143639.2214689-1-christina.schimpe@intel.com> <20260708143639.2214689-10-christina.schimpe@intel.com> User-Agent: mu4e 1.14.3; emacs 30.2 Date: Thu, 03 Sep 2026 07:44:56 +0000 Message-ID: <8733vqsrrb.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain 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 Christina Schimpe writes: > On x86 with CET or on ARM with GCS, there can be elements on the shadow > stack which are not return addresses. In this case, we don't want to print > the shadow stack element, but a string instead which describes the frame > similar to the normal backtrace command for dummy frames or signals. > > Provide a gdbarch hook to distinguish between return and non-return > addresses and to configure a string which is printed instead of the > shadow stack element. > --- > gdb/doc/gdb.texinfo | 19 +++++++++++++++++++ > gdb/gdbarch-gen.c | 32 ++++++++++++++++++++++++++++++++ > gdb/gdbarch-gen.h | 19 +++++++++++++++++++ > gdb/gdbarch_components.py | 25 +++++++++++++++++++++++++ > gdb/shadow-stack.c | 36 +++++++++++++++++++++++++++++++++++- > gdb/shadow-stack.h | 26 ++++++++++++++++++++++++++ > 6 files changed, 156 insertions(+), 1 deletion(-) Reviewed-by: Thiago Jung Bauermann -- Thiago (he/him)