From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ZQKZLZI9qmm+RRgAWB0awg (envelope-from ) for ; Thu, 05 Mar 2026 21:36:02 -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=qN0TgJh+; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A05771E08D; Thu, 05 Mar 2026 21:36:02 -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 AD27E1E08D for ; Thu, 05 Mar 2026 21:36:01 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 0F5864BA2E16 for ; Fri, 6 Mar 2026 02:36:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F5864BA2E16 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=qN0TgJh+ Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by sourceware.org (Postfix) with ESMTPS id 9DA9B4BA2E11 for ; Fri, 6 Mar 2026 02:35:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9DA9B4BA2E11 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 9DA9B4BA2E11 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::e2c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772764535; cv=none; b=xlH2yt+CZjyvFVFh45NKBqPMQrTuylT8HX+xpg2lpYwYN88fni0MFZiyCvc2ucuiN3ZdSWXS/HoWcIzS1wCPQ+zT+1ZcwaMjIHzwu1PR7kc4V7MeRmsL1wOB/ZtVh5j1TGeRTUeyBqHJEEPzH7guRlIrJHcm+YdtaZJ6ZfxioVE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772764535; c=relaxed/simple; bh=VWYK0LFnLQD4sLSEEaldzO8gP2083WZ8SrH3fSqH68U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=MIQEd8J29m/2ixUkwMNhy1p8yCVVy7BM0sBL9WdgLZI9sUN3qOnVfBBQLfoQQEsvI8SrLg0ldaXg06jtBBbL/6k31oRbQc2y/j+u/SsOuBbbv15cj1EFRCn2JOeIXaVHYm9GsgTnIspO14atYHzXEGzyQYDn0L9X4ZWYHkjUX9Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9DA9B4BA2E11 Received: by mail-vs1-xe2c.google.com with SMTP id ada2fe7eead31-5ffc8987050so868865137.0 for ; Thu, 05 Mar 2026 18:35:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772764535; x=1773369335; 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=/tFX+vu9a7PF5grOuHeh4BOTVqFCjVDdMfuzLxx1vbk=; b=qN0TgJh+ON4b9cqLLiqThMBBWEHCgbo4yRAe0Xw8R8xXSWEHmeWPAKUB4/RAY1+qRt PkidJTuBKwSnIfXTbSSt1tRYi5YHQ+fFvc5Ev15LkGgBJw35oecVyY9kBbkTQ9y7cL/h YOBu2eTU25LcPnKl+rg2EeWCVFRO+EiAn4i3wcTZyV9CoirFwnUipv9zP+MZzwArEVrx 8Q5JjNC9l75HfPoLwAJI1OyJqB42lsrFTxmi7clDpfpNqOwtxP4ieqVqH53dxYQ7nd0c 7lant/OL3CImnaWoqLbm10vKyJgA6C+lCRP3N0O+9aD1XEiYMHE1rlE+Bn3ZnlNJVzN0 ac3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772764535; x=1773369335; 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=/tFX+vu9a7PF5grOuHeh4BOTVqFCjVDdMfuzLxx1vbk=; b=Ssdit2SJqDrnozKBSTdx8iSmrxrC3MDHcO3EoGXzkRL+gpHikvkqKb2QqO5tvnWlBe O+YwADeOPU230WsQmEQWkvgsR9NlcDlmAkEF2v60yNG0cyPMhyk80gCJKV6exVF/+qUM yrx9cUR93HfoVBy2X9dWcwh4opdRjtag11+r+CXPirpBTwHEbItxviTwKaxeVD9Kg19R tPn5wO6WA2l3u/2gQJv44Z5/cBC3+g4MGNEjghwmMbs7KCIdb7btxcmUO0g/qIaCVaj4 2iDXZVKYf2Qo0HCiuh8yh8ziuOTPq7cqwLFO/zCB0WnYqoFpmVnXImjGAZbKmsNVMGTL 8hdg== X-Gm-Message-State: AOJu0Yy4Ki0oON74qViaOn0GTHwlrAfOhbyq3Dcr2Q9cs7DDYj+EtCtQ G4nrhtGTNBsoaaebyW/WOYz9pH4f36ptrPuUZv0yl5fZ8OxMxFXAvBjVZ08RJI3oAmmu0rl2PFx mK886qTs= X-Gm-Gg: ATEYQzx1Z/XKSTNVHMdFXg+MwdArUau9JYQBxQT79FZjE1FX2Bv1ZUfj+zsbu62L0IG qbooAH0N7ou3MtlpF4aucEyOwKG4/Mem3WPfTGULRHwH+BKgBUcclirXl20yvHWVZ1l+w6ogyNE VZ779JXKDvkT1bECRsz4BROUayDpyMzrWH/RPazqJG5rvNsAFLHcdqowZ5u78t2e+dJTBFEh/GX OzvAHlFW4pEEGsT9zJNbZmIc/gpNyTRj4NT3NRtaN6g8CToV8Nx2VQPrKEOx/yAXPe8KkCgwkI0 vPqzJS4nssYjtTXDVzuQeykJSCOQOUv90s4O7sPkAyDD4Jr9OkiwciJ7iOqc2IEeaHW6MmVps/g XIYlLQ8CUoeK8U2bU5XKH7e2JVcYL5Q6I5xiSD6O9DCrdMe7HsGTNeZ2jcFqDzxYPnleFwrhpSR VY1P22dlgeOFxsVEuK+dZ+W3lV6g3nrWSFRg== X-Received: by 2002:a05:6102:c53:b0:5ff:b3f7:48de with SMTP id ada2fe7eead31-5ffe5a6aae5mr279559137.0.1772764535048; Thu, 05 Mar 2026 18:35:35 -0800 (PST) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-94e7b57031fsm165242241.13.2026.03.05.18.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 18:35:33 -0800 (PST) From: Thiago Jung Bauermann To: "Schimpe, Christina" Cc: "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, 22 Jan 2026 17:04:23 +0000") References: <20250923111842.4091694-1-christina.schimpe@intel.com> <20250923111842.4091694-7-christina.schimpe@intel.com> <874irfsoqc.fsf@linaro.org> <877bvdsah7.fsf@linaro.org> <871plkpxiz.fsf@linaro.org> User-Agent: mu4e 1.12.15; emacs 30.2 Date: Thu, 05 Mar 2026 23:35:31 -0300 Message-ID: <87ldg5znv0.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 17:30 >> To: Schimpe, Christina >> Cc: gdb-patches@sourceware.org >> Subject: Re: [PATCH 6/9] gdb: Implement 'bt shadow' to print the shadow >> stack backtrace. >> >> Thiago Jung Bauermann writes: >> >> > "Schimpe, Christina" writes: >> > >> >> And if not, do you have an idea how we can fix this? >> > >> > I suggest adding a gdbarch method which given RANGE, returns how many >> > entries there are in the shadow stack. >> >> Actually I miswrote. The method shouldn't get the RANGE as argument >> because then it wouldn't know where the stack ends. It should get the >> addresses of the first and last elements in the shadow stack. >> >> -- >> Thiago > > Hi Thiago, > > Hm, how would we know if we should pass the first or second value of range, > if we don't know which arch we're on? > We could examine in which direction the stack grows, but wouldn't it be safer > if we'd pass SSP and RANGE ? Maybe some arch needs all this information. > You're right. I see that's what you did in v2 with the gdbarch_get_shadow_stack_size hook. Looks great to me. Thanks! -- Thiago