From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 79zTN2s8qmmnRBgAWB0awg (envelope-from ) for ; Thu, 05 Mar 2026 21:31:07 -0500 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=YN1y53us; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id BCA511E0DD; Thu, 05 Mar 2026 21:31:07 -0500 (EST) 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 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 045CB1E08D for ; Thu, 05 Mar 2026 21:31:07 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 575614BA23C0 for ; Fri, 6 Mar 2026 02:31:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 575614BA23C0 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=YN1y53us Received: from mail-ua1-x930.google.com (mail-ua1-x930.google.com [IPv6:2607:f8b0:4864:20::930]) by sourceware.org (Postfix) with ESMTPS id 73EEC4BA2E11 for ; Fri, 6 Mar 2026 02:30:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 73EEC4BA2E11 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 73EEC4BA2E11 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::930 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772764240; cv=none; b=KQOkpdV6L1fJ3Sab3Iks8c6lGQBKfM3/gD10D8Vp4/zQjwvhziFPCoFVJcY+J00f6Nc/aR4xCaEmHHxISy9UIOV+NXOsHkDbLqBjBEb1oBK96EIqvNTcKY7tt4WH/tbsIpLlT4OCg4QROG3rAAlpGmUMPKFos5EyL0qfN283Oe8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772764240; c=relaxed/simple; bh=IzYfObJKxxFnQ7rpf6j/JqVCYykREuEjqaS90o3TXOc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=sDUxySwvdMnkKA7l5Io3jFMN7KmySjm/u0jV/xrVJ/emf18xJtNfSuOuCiZTvxq9ad6EfYbWWaMSJcDQgicI22h3snfXG39WGeJkYxwi3j6bnDS4RzIUQQmze3md4wjNtMiQI4ov3OR5pcuYPOjCUG31KwHwigTfP7dAQgEo7w8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73EEC4BA2E11 Received: by mail-ua1-x930.google.com with SMTP id a1e0cc1a2514c-94dd7178d63so5313767241.3 for ; Thu, 05 Mar 2026 18:30:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772764240; x=1773369040; darn=sourceware.org; h=content-transfer-encoding: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=7SrJPdt0j73o32cvNUW3jzb5uWCFmb8D4DHU29cc8Ks=; b=YN1y53usnIh06y0I6MtbMu1632lgLERUALVYRGQQHXpelJriyhaEfvY3egVQH1Sryn i6utPfLoCwbum0b6Td68t6KQUFEnNU2flQXa043A7j/vvHKz6/wF+OlkdRVwBWiN7Oi4 WnmopXNtL3KGRJnqnCkfk3rv3e32xBKAwoCc/w0G8Wnrb29z7IXxZzXt0HoOOEWj5Z8S H38yofrgARBOBKuoAb/z9Do7GZ74SqjiPPWHrf9my9eB50OLObisS3MJza5CZRp4pgdy ncVnJXu+XoM126WHeAZs+PsyZ4TSgECkQ0mkI55Nkb2C1enZcx5bEtICwBq5fSgfD5Y9 O8Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772764240; x=1773369040; h=content-transfer-encoding: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; bh=7SrJPdt0j73o32cvNUW3jzb5uWCFmb8D4DHU29cc8Ks=; b=cyP7o1B7bbeVv/gQsAWFXaBQXmJn5m9N27QdC6fTeajomZAW0qIBdLOA3CVx+cPB5G 3VWxP5rtORjHjL7iyvHAvgBThag6On98pCwbtmKaF1DMVcZ0eV5CE2gVok5NW9FPM+c5 AjgiA2eDK6j0RbjMpe0KUD6vp1ZZjmnmS81s93gqOC9XiSH4W36x8j5AKQJ/Uam3nF+i iahDRgiO5PDVoFRH/Ek2kgMdkPYPLMAJ2J9xgEAyEwLJUtiGVODyvNi51NPnA7nYODor UysFH4YnGyZsj+GCBzoCmCrvKrdK4mVScnXtJcB0mNbwLFzwjMXAiUaDqPQeh4iqXkaN 9p2A== X-Gm-Message-State: AOJu0YwpN0E0ZsyaoKRTvEHX/dLdipixaQtC7AHn0wHZI6ze0+8lnNTh 9kolv0Hjxg9Yap6AMC/+5S5D8nPBX0vOZVOC63fM4oL9k+3dlh5baLggKNWDHL84je450m3FQbM bCR24R3c= X-Gm-Gg: ATEYQzwGwqHPqywqIBVQOpKCUhQRwCmfS2S6tOf84RUCCRx2LXXTRqjLl/L3kAM3lsY yQEq6htYcpumxUnA7V9TSXBdgYi+EbOleb9hzM/gyqTZzRTXFvacPADOolcSgzYYohCA6cJjNRz IsjDOoMAMcNvkrX8BQgMV+D3gOsIuQ25Va/akDi2SZiQ+4XVqEs56Id6vT9gESVN/NG4zVYg3Iy vNKzWZFDtJdVJukogrrkygk55QdYOvxa2URiZeXyHshY6xsaspwzaUoAhg7K+e30UaRYqpofKGc oNOh0oHGbA9RlLbqov0ndA/P4g3DqLHLlpwEp86D+WzRUH8SLW5TqRl8JHjn3XuO7cFnO7lrixZ CeqKYVagBcj58ZwwPkDqPWOGGQmsOQP7xOkiVXph4EULy6Pk/RrGs7AEdkUJP428WVrsoDIfnC1 OusljLtD28ZPb9nrK1hX08FOH7apgLxQGk6Q== X-Received: by 2002:a05:6102:d8c:b0:5f9:39eb:590a with SMTP id ada2fe7eead31-5ffe5f38f1bmr261462137.9.1772764239741; Thu, 05 Mar 2026 18:30:39 -0800 (PST) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-94e7b57ec19sm157348241.14.2026.03.05.18.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 18:30:39 -0800 (PST) From: Thiago Jung Bauermann To: "Schimpe, Christina" Cc: "'gdb-patches@sourceware.org'" Subject: Re: [PATCH 0/9] Add new command to print the shadow stack backtrace In-Reply-To: (Christina Schimpe's message of "Tue, 30 Dec 2025 10:16:54 +0000") References: <20250923111842.4091694-1-christina.schimpe@intel.com> <871pne2min.fsf@linaro.org> <87wm4zoayl.fsf@linaro.org> <87ikfvyk1e.fsf@linaro.org> User-Agent: mu4e 1.12.15; emacs 30.2 Date: Thu, 05 Mar 2026 23:30:36 -0300 Message-ID: <87pl5hzo37.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 Hello Christina, "Schimpe, Christina" writes: > Hi Thiago, > > apologies for the delayed feedback. Please find my comments below. Sorry for the even longer delay. I said I'd provide my comments this week, but things didn't go exactly as I planned and I will be out tomorrow so for now I will send what I have =E2=80=94 which isn't much. I'll send additional comments next week. Especially regarding patch 6 where there are some open questions and comments. I'm still thinking through them and experimenting. >> -----Original Message----- >> From: Thiago Jung Bauermann >> Sent: Freitag, 31. Oktober 2025 01:47 >> To: Schimpe, Christina >> Cc: 'gdb-patches@sourceware.org' >> Subject: Re: [PATCH 0/9] Add new command to print the shadow stack >> backtrace >>=20 >> "Schimpe, Christina" writes: >>=20 >> > Also I should probably add proper error messages when the >> > configuration of ssp_regnum is missing, >>=20 >> Is that possible? How would GDB distinguish between missing ssp regnum >> configuration versus the target not supporting shadow stacks? > > I would add it to the error message that already exists for the absence o= f the hook > gdbarch_address_in_shadow_stack_memory_range: > > --- a/gdb/shadow-stack.c > +++ b/gdb/shadow-stack.c > @@ -537,7 +537,8 @@ backtrace_shadow_command (const shadow_stack_print_op= tions &print_options, > error (_("No shadow stack.")); >=20=20 > gdbarch *gdbarch =3D get_current_arch (); > - if (!gdbarch_address_in_shadow_stack_memory_range_p (gdbarch)) > + if (!gdbarch_address_in_shadow_stack_memory_range_p (gdbarch) > + || gdbarch_ssp_regnum (gdbarch) =3D=3D -1) > error (_("Printing of the shadow stack backtrace is not supported fo= r" > " the current target.")) > > So the error message could mean both, either missing ssp regnum or the ta= rget > not supporting shadow stack. Later in that function we check if the shado= w stack > is enabled for the current target. > > Does that sound ok? Ah, I thought you wanted to have different error messages for each case. Yes, this looks good to me. --=20 Thiago