From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2I3SOkNT7GixDi0AWB0awg (envelope-from ) for ; Sun, 12 Oct 2025 21:17:55 -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=eRH5oP6t; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E18D91E0B6; Sun, 12 Oct 2025 21:17:55 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 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 9948B1E04C for ; Sun, 12 Oct 2025 21:17:54 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 079153858C2A for ; Mon, 13 Oct 2025 01:17:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 079153858C2A 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=eRH5oP6t Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 3BE933858D26 for ; Mon, 13 Oct 2025 01:17:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3BE933858D26 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 3BE933858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760318237; cv=none; b=cRFYI2oVVZMLHdyMGZURHFp6/A/PjG7YcSdJSv5s2SJw90EM9kVPTZeUNXuJYaV+XOLauT0kkcpmgzo6Rei/mT2PdNGbk5kqYgizjefiN0O2BXWjlntZvY9557qLVE1PsAHvvZS4/epoKqPdvclD9SHmpAmk+owGgGwJEVjsNH8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760318237; c=relaxed/simple; bh=4Hk6l/Yme9coygsww6L4Dg0PdH2vVXJMtqAu/qQ/bD0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EZPC1NQ956uyp29n7HGQ03NaSNMAMgCEvBzD/mDlETzCTHIYElpluUKOHIZqOkA9i73blfC7UFLBgSwrfkF05iKkkGMQiPJWX7WqklbTuGoyq0Ketnnm7pvpbA2Hleyo6IiZEANhdODoDT8e66glulrYUpjdPuhXGvcmBHXP1mY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3BE933858D26 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-76e4fc419a9so3292125b3a.0 for ; Sun, 12 Oct 2025 18:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1760318236; x=1760923036; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Bw1eCB0WKrQ4EWKIKqq/Zq/zgSmGDBZ2YXYREoG0aM4=; b=eRH5oP6t2/8znIOk5/lOA+8Yh/0yLqCS/VwE+cr2dNgMcSWBNljlUCuKauBPDYLupV hbN/0w0f9TsJYoQwdTLv9YLZeCFJDBP7WSb9bbNkhWVilml8PC5IpRz9dMughiNP/a3t xwzDtwN5rwgLFYufFYffIgx0J1aa8m633lnJOul72YMQ2zbfYV+dk7IT98FA59rUsuAM FktRHOh/v26Hwu5sy+VxFnDfnNu0/Tpl8xMzitZJ26x58AEJnLES10VWbZjr3BXsY3nY xyl9+48cJpNVuH2Dkjhp1wb3efmf7NC4dPPOXXG3FEeG22v2yUeruRt4116+VKn6/Flh lqPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760318236; x=1760923036; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Bw1eCB0WKrQ4EWKIKqq/Zq/zgSmGDBZ2YXYREoG0aM4=; b=Li1C27zt2tMlaE+u89uOMrzCZ1407tKlsRKb6HKzBYPoKKk3xpmzZ8wlCtCXc+JjjS yJk5jcCFJgfqd2RxnnrogreXgIkye+JjH9+iz7AGFdcEqVM/hVWtwrC7GeZpcv37j8Dz ywe93uTBCrxOM2KULLLXDsJ7mm95+A/0XGjJw2mEx513ZUWaAPyAe735dFxldiaCE/lz lQySESzQqU8oBTK68rQQoNGypfoqd6GhgjjSVOT35phneqr/rdr0y4DlFpOvv4wojptV DQ5cS5IWgJ5/OOubb0ExwmyBIZV5uptoOAF6fMEhgEIJOWlwuo7h3RisVrodRj8PvW64 AzPQ== X-Forwarded-Encrypted: i=1; AJvYcCWeFW9/mA74XGaLkjT/5afGQHFczBHjSmN+bsINolScllstGkgmQ9L/UxckKLzBDnsdNVejP4q9MIEwmQ==@sourceware.org X-Gm-Message-State: AOJu0Yz4tLId9e1vj7eFOAiqVrLpe4czzTsXEmZTbDhNrd3UzXQFvtLy mBZD7e/4CDbw2k9O7xxhw0EUNQsIzzCrJ7Gg7LLymDxNwRS1qN831eHG1JiBV6cdnMw= X-Gm-Gg: ASbGncswpeQ27RIVuBmeVmi6/QAx7YL6PlThvhl8PsWvL9YERYichy0qliLl4dAmElr 7cJ5Arm3F5IjJB0MCIFFUi1H+kc71KVe8kquxfQp0d0CmpJPCkQpni+yh1tHEc93gdwTjk8LMD6 Ih8H815fpjs7ofOSgAT4mrzZwm5FGArApfSyWa1XBQpprBoyKKPGqvxaEOmOaxun4ZmX4QuB9md zYQjbopYU8FiWi4+UqnmzRpR+uiphvN3unYp0yXGkMDkuevGssSYXIY2QCMzDoAsdGblqkv3xDD svrhii05wb4XJXAvn0vGBVLXdjXnjpFKUdgkXUvi15hpy5gydrOVfB13yzdRlgoWbekDBt/1jUQ m/Vt0Y43ezYEIQTlrxHtzul7VjowxuzjtPyL7iL6moTPOMeshhYRrV49HkyOGcLuilQ== X-Google-Smtp-Source: AGHT+IFvSeScYJgez4zCJL78vrT5Qp0oJkxahANGNxcQTjYYBdoVmn84g66m7Px5hY10M5ODdCoehQ== X-Received: by 2002:a05:6a00:3c84:b0:781:1e80:f0c6 with SMTP id d2e1a72fcca58-79387440a4dmr26147982b3a.17.1760318236156; Sun, 12 Oct 2025 18:17:16 -0700 (PDT) Received: from localhost ([2804:14d:7e39:88d6:d9ee:d9e8:b4ea:6b6f]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7992d09f407sm9738100b3a.43.2025.10.12.18.17.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Oct 2025 18:17:15 -0700 (PDT) From: Thiago Jung Bauermann To: "Schimpe, Christina" Cc: Eli Zaretskii , "gdb-patches@sourceware.org" Subject: Re: [PATCH 6/9] gdb: Implement 'bt shadow' to print the shadow stack backtrace. In-Reply-To: (Christina Schimpe's message of "Thu, 25 Sep 2025 11:06:32 +0000") References: <20250923111842.4091694-1-christina.schimpe@intel.com> <20250923111842.4091694-7-christina.schimpe@intel.com> <86y0q5crwq.fsf@gnu.org> User-Agent: mu4e 1.12.11; emacs 30.2 Date: Sun, 12 Oct 2025 22:17:13 -0300 Message-ID: <871pn7pply.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 Hello, "Schimpe, Christina" writes: >> -----Original Message----- >> From: Eli Zaretskii >> Sent: Tuesday, September 23, 2025 1:47 PM >> To: Schimpe, Christina >> Cc: gdb-patches@sourceware.org >> Subject: Re: [PATCH 6/9] gdb: Implement 'bt shadow' to print the shadow >> stack backtrace. >> >> > From: Christina Schimpe >> > Date: Tue, 23 Sep 2025 11:18:39 +0000 >> > >> > Add a subcommand 'bt shadow' for the ordinary backtrace command which >> > prints the shadow stack backtrace. >> > Similar to the ordinary backtrace command 'bt shadow' can be >> > configured using COUNT and the command line option -frame-info. >> > However, we always print the address and the command is not affected >> > by the setting "print address" as well as the setting "print frame-info >> location-and-address". >> > Also we do not print the frame arguments. >> > >> > Usage: backtrace|bt shadow [OPTION]... [COUNT | -COUNT] >> > >> > Help output: >> > ~~ >> > (gdb) help bt shadow >> > Print backtrace of all shadow stack frames, or innermost COUNT frames. >> > Usage: backtrace shadow [OPTION]... [COUNT | -COUNT] >> >> We have just got rid of qualifier arguments like "full" >> and "hide". Instead of introducing qualifier arguments anew, why not go the >> way of thread-related commands and add a new command "shadow", so the >> user could say "shadow backtrace" and maybe in the future also other sub- >> commands? > > This has been discussed in a thread years ago: > https://sourceware.org/pipermail/gdb/2023-December/051024.html > The direction was to make it part of the ordinary bt command. > > Currently, we don't plan any further commands for the shadow stack. But > maybe for ARM's Guarded Control Stack any further options are planned? > I added Thiago in cc here. Maybe he has some more input. Yes, I plan to add two commands for AArch64 Guarded Control Stack, as mentioned in that thread: https://inbox.sourceware.org/gdb/87h6kbfazh.fsf@linaro.org/ In that email, I suggested putting them under "info shadow-stack", but later the people in the thread considered that just adding a top-level "shadow-stack" command would be better. I do think that "backtrace -shadow" is a good option, so IMO we could have both it and the "shadow-stack" umbrella command. It could even have "shadow-stack backtrace" as an alias to "backtrace -shadow" to improve discoverability. You mentioned that x86 doesn't need the "enabled" and "locked" commands because for that architecture the user can look in /proc/$PID/status, but with those commands I also plan to allow the user to change the enabled and locked GCS features. Wouldn't that be useful for x86? -- Thiago