From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 77aTGc8/qmkHSBgAWB0awg (envelope-from ) for ; Thu, 05 Mar 2026 21:45:35 -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=NbZLf4C+; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4D6711E08D; Thu, 05 Mar 2026 21:45:35 -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 963B81E08D for ; Thu, 05 Mar 2026 21:45:34 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id CFF7E4BA2E11 for ; Fri, 6 Mar 2026 02:45:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFF7E4BA2E11 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=NbZLf4C+ Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) by sourceware.org (Postfix) with ESMTPS id 0F4E64BA2E11 for ; Fri, 6 Mar 2026 02:44:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F4E64BA2E11 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 0F4E64BA2E11 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::936 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772765093; cv=none; b=QasWh9bpae6v8ksh4siJgtzbosO4HbgA5Os4957u+GdM+slxnknhgg8EC8GLelsx8quh8b+A4WJ+e9QJEWd95s34mFiiv4AuQByVRNrbD7HlfhCv4np77kSsQ3YkLN/R9o3BjwCE/QT98lYKwlcVFUtK9PEODADfzpARmE/2E/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772765093; c=relaxed/simple; bh=fvilTkHWp5Na116zyI4UU+azk6EptUniKhssdApMWLo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rbXlFWlXLYgMO6z+j8bKT+7CsY42Z3OUwwlmccz61HCAgOUd5Ef5Ey4z7vVMoF58eJmSH/IXwXIvje75FhR++0iswx3JADt9ZuL307akPa2eMvfYflOC920RjUajQVGk2PGo/bEZE99LtUupv2e7U1RDdfaS6kDPdryT2VSOEuk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F4E64BA2E11 Received: by mail-ua1-x936.google.com with SMTP id a1e0cc1a2514c-94dda16ff9fso2625920241.1 for ; Thu, 05 Mar 2026 18:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772765092; x=1773369892; 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=uoA+S9sumbCX9kUCiF7XQ/2MbeNSmpiMVIX4j3xAp54=; b=NbZLf4C+I4g9SEayme/yIf9/GjCzNKIoUh+xmtpK+dkdR+ugWzyCdNkE8sYnHDlWPl CUvBF9Vwj1NWp+47psAioUwW4w6kUClCnbQfISGx8QlDWx7wa5cNVUbcUZBJRoTvRwaN zeq5WzKtwmu+N4+1+OTHIVjV7PW7zhm+PG7ziA3qv6JMisNyxNYCwtQipPWYSqc7gwVM kMtmJmCkEmneojdcfL3MIUaMIz2IQ2ANu5DxVjsNlYBplDEkbLxtNYaqj/sreQH4M6zL 8cbPTGqNHs8PCZW75nMZgoYJRJkvdLoyveFXja+8BK7sutHVz1Ia1h8BLjA64iWJLDNE 4dJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772765092; x=1773369892; h=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=uoA+S9sumbCX9kUCiF7XQ/2MbeNSmpiMVIX4j3xAp54=; b=QH4zFzcbqUHl4N2KSiDq7ErMmxWv4zcTW3UVbOQ+bcZLVA3rO9++T5FgHaE5nvD1nh e2n3J5C40rIPtPphhNq66b87c6bMPw8oTFz51wvPqdeqNIm3aRE9VpeDaEg1t3EMFDKQ QMmIR0yDAQ6IZiqfRssJjMXsWlRAFfUeL4q4BqrttJz4cy54bV+kttFa8Rh6DjxPKHUR OICmItxbKMu7wUMgrQdb86nSZvr5cayXl/7qpl/xtyEG141nyA3Tp3EOpPx3I8lns6wi j9T79OH9wFhNZOPW3mWQaa8H9IBRLAPYUyKJP2W1Vi3hyvz9jJu7RuCA4wsksuVmPl/V prDA== X-Gm-Message-State: AOJu0Yz7/90LUKqS4xb7zDzLC5z4ep8DYldU6+zEjaxMizJ6wIyQBc19 1RHf3Ig/RAqltXSjCZxK0zzA7/R1abFYZvTqT47MgMA2hRDpcvINKtjey27DyP6BLAI= X-Gm-Gg: ATEYQzx0qQXQVk/PzaQ2M9ebCN46gJeV3x6Dow0Dy4jMJH0/JQPxqvqteABaI4fZ2cJ E3Jsr9LJcIK00Onv2HCPQBoxSMFt7HUJME9Hblz7fr0KTHtxdQwKdwbgzZJ23fu8Yfjvyo2s8Yp yJhN3yrjNkgzIT6uH5/OupZq2JjEq67ZpkZiEj11IyZNnhkLxZFWjP50/oOSJXNOu0OwQ4I30ac ny9NB1gOAZecwl4jMfF/ZA8hoZdetZU5Dc9KK91cINhImhwJBQoPlt1g1FUVMD5tf8ruNin6Gv1 CgcMIvPzZq4E2Z/QIwFhqPyApjKquSb/9RdtX+D9vrzxeODKimXrMZFQN1Jm8/e7KhC+MY22mRa 6VeblMuJJ687cZweRSzfg9AX9HBjggkC9Evupx9ROxWqBJcNLcmeQpWN83RnbNxsjXX9g62vz6Y VnzMDFF9BLoxGsPYhr21mHEH/CL9OYue//Lg== X-Received: by 2002:a05:6102:4407:b0:5ff:d1c8:a85e with SMTP id ada2fe7eead31-5ffe61e85b9mr229890137.32.1772765092330; Thu, 05 Mar 2026 18:44:52 -0800 (PST) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-5ffe88a55fesm179863137.1.2026.03.05.18.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 18:44:51 -0800 (PST) From: Thiago Jung Bauermann To: "Schimpe, Christina" Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH 9/9] gdb, mi: Add -shadow-stack-list-frames command In-Reply-To: (Christina Schimpe's message of "Thu, 22 Jan 2026 17:01:01 +0000") References: <20250923111842.4091694-1-christina.schimpe@intel.com> <20250923111842.4091694-10-christina.schimpe@intel.com> <87a509pgfw.fsf@linaro.org> User-Agent: mu4e 1.12.15; emacs 30.2 Date: Thu, 05 Mar 2026 23:44:49 -0300 Message-ID: <878qc5znfi.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 "Schimpe, Christina" writes: >> -----Original Message----- >> From: Thiago Jung Bauermann >> Sent: Mittwoch, 26. November 2025 05:27 >> To: Schimpe, Christina >> Cc: gdb-patches@sourceware.org >> Subject: Re: [PATCH 9/9] gdb, mi: Add -shadow-stack-list-frames command >> >> Christina Schimpe writes: >> >> > diff --git a/gdb/testsuite/gdb.mi/mi-shadow-stack-signal.exp >> > b/gdb/testsuite/gdb.mi/mi-shadow-stack-signal.exp >> > new file mode 100644 >> > index 00000000000..219f1b8ad78 >> > --- /dev/null >> > +++ b/gdb/testsuite/gdb.mi/mi-shadow-stack-signal.exp >> >> My only suggestion for this testcase is to add "amd64" to the filename, since >> it can only run on x86. Perhaps mi-amd64-shadow-stack-signal.exp? >> >> > diff --git a/gdb/testsuite/gdb.mi/mi-shadow-stack.exp >> > b/gdb/testsuite/gdb.mi/mi-shadow-stack.exp >> > new file mode 100644 >> > index 00000000000..bbbc7ec5460 >> > --- /dev/null >> > +++ b/gdb/testsuite/gdb.mi/mi-shadow-stack.exp >> >> Samme suggestion here, about adding "amd64" to the filename. > > I applied all of it except the filename, since for mi I don't see any file > starting with amd64-* in the testsuite folder gdb.mi/*. > > What happens if you run this for GCS ? Could we create a source file > which is architecture independent? I tried that but didn't get very far. There is the tunable "glibc.cpu.aarch64_gcs" which can be used to force GCS to be enabled, but then GDB gets a SIGSEGV at startup if it's not itself built to use GCS. I need to make the inferior use the prctl syscall to enable shadow stack explicitly. I assume this doesn't happen in your case because for Intel you need both the tunable and the compiler flag "-fcf-protection=return" to activate shadow stacks? Speaking of tunables, now that I looked closer into the testcase I was surprised that you need to explicitly enable the SHSTK bit in glibc.cpu.hwcaps. On AArch64, if the CPU and the kernel both support GCS, then the GCS hwcap will be automatically enabled. This doesn't mean that GCS will be used by applications though. Anyway, nothing to worry about. I'm just noting the difference. My suggestion is to leave the testcase as you currently have it, then I can adapt it later for AArch64 with a separate patch. -- Thiago