From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rcMWB3cXmWpB9CIAWB0awg (envelope-from ) for ; Thu, 03 Sep 2026 02:45:11 -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=smPBT81U; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F2D341E166; Thu, 03 Sep 2026 02:45:10 -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 [IPv6:2620:52:6:3111::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 2595A1E09B for ; Thu, 03 Sep 2026 02:45:10 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E0ABE4BA79AC for ; Thu, 3 Sep 2026 06:45:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0ABE4BA79AC 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=smPBT81U Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 8FC6B4BA23E8 for ; Thu, 3 Sep 2026 06:44:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8FC6B4BA23E8 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 8FC6B4BA23E8 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788417883; cv=none; b=Na6sDKMU74wLClKanbWMs1TEaUYuyWBN2oCHZelqxykYBh+Wei8In9upSyagQtsQGjkPqnUFCyKXbcZSkjPjsA8Fs/F3UXuwjOT7n7aWOcbUI2SEojgzQtGG44ZDLEWaZJuY4IjT2HvW9zfize2B+7bNQ2qpv5w6zJMM064cxUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788417883; c=relaxed/simple; bh=RwOU3MIBl91pU/OsFSGsjhCWGo4bIiem3YHLEf0d2HU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=CbXZQDtv0j4z0qvhxXFl++E1axbZyITqS6PWqvnWIpc9RPtwUf23qlgNOB7dYlrbyURAxVxrIvCeXkylvbu4JvFe912O00PY1LugDZ4G/pi7LT/ULVtMsh5yahlMgG3w37+dk5VgIXwI4Ly5auh7xaIl7apjS5oTJJABx7MFJFQ= 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=smPBT81U DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FC6B4BA23E8 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-853e2610bb4so489171b3a.0 for ; Wed, 02 Sep 2026 23:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1788417882; x=1789022682; 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=Cjk+guhszIm2deHr+AiMTURW7cVjij2kPHIL+IRHOiI=; b=smPBT81UuV8tnxrdCfqjje3mdCS39d+D0AQUbl7wtgL+NqnpYhqI7UnkMTjNoZCERX 3YS0yYfxzRf2w8lkieqfx4675t7qxNKUwyarMgA9XDv2t8t/vVW17ATgqnM7oGMAoTaN asz0Ra63FY4gmvlhSIWp0hNNrMcZSc0vGD+phbgSiiFpUc3kfxYgtUEBKVluSBwxcm9u ln1s954fSh6cn0Oxf03Ba5ENviRi1NRpH1ZObwyVUT/wrhcbrbcF1Th6WfVeLyqotSKI DV8OEmGzWuoovA1sIH/OWIIm6pyn/l3FE8WYeEQSN5VG6R2eXDMpNMHkvu3o0gTUq/mR lQLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788417882; x=1789022682; 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=Cjk+guhszIm2deHr+AiMTURW7cVjij2kPHIL+IRHOiI=; b=XhS1Qwi9nJ65nDTku8u5bal810pZY3PPBzspriJ1NLSHTuO8GgkPkMLRxohxO2xk/z 4DHaGDzMCoBAgeFC/7K7MNRtVAwDC4PFmiz2R+HUx2mayDSLB+rGbfJX4JaNUR2XTkiG wD27XK6uWJZMvKhAWKwOr8/HNqIVp9nVRck4nZVrLZEf5ILZGymfqmnxGA0bNNzp1Jox Kc1aTTy1RkGZCb6d1BTcFpm1xYQnHiCmUv2QDO0gfMCuuEfFfwLrnFoy1jnVv8Gr8ASj p6eCTXJbM4ZnR+A9Cjx9+7xdkqKy37+X8UOobQLMbqyrCDXaDrUeO0LdjHLLHrBzpyt6 7ygA== X-Gm-Message-State: AFuF++li5efpEGH5VrBgI8PXY4PEtGSVmWEuPwziI2+mjusFnZu0CJAb dv8Z66vxjDQ8kaSptksMz/HADcVXRes0YVy/FPIQB2TeXwdlhIOud/RcekgUntm8OzQ= X-Gm-Gg: AYBFou2WqW9bVm1fbXGVUaC+7Xa9zXvRD/XgRvfMMBywnbGrbURqZft02+LhWlzY3q9 UUjFJdvd9xJTSWMzBsMQ9qaancSD5pybOkEvpsXmQeWfX66DY15yvEjQsV4NtST+k7d4fGWXzLs xfOVWt820eANcwxlbPz3gECl0HLskGXMZNwtGBc2BkJPH8VpfGzeX008as0hWljYkjYdWk8sE+7 kp/I6PNhgxsdai8ELjHJ2K8MH1p8erNxzYXgnYd4tuhGCsph+FCn1SvgAHk3BFUz14u1feWrSFW Y2VUTVuHodjSDJlsgyIA/LC9Xpr/k9CwDJKLSnqZGRyWOtnLMhMW4cIEvT1x1sxaUgdetej7mkY Iv3nk78z5Bez8htAKKSYe/Wti/z7ijnPUOipdyGs+UvlS7jWp14a0QLeI21TJS0SZUTmp900kJE barQRvt1tU7/opUD5oe58K7toNisOj+gCqdURWwopqlGmr/CDVT35VM92EOyhP5Tp3M0iSnv8= X-Received: by 2002:a05:6a20:2d09:b0:3d3:aed2:6f24 with SMTP id adf61e73a8af0-3da216426edmr4159939637.24.1788417882422; Wed, 02 Sep 2026 23:44:42 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-14319976a4asm3063083c88.13.2026.09.02.23.44.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 23:44:41 -0700 (PDT) From: Thiago Jung Bauermann To: Christina Schimpe Cc: gdb-patches@sourceware.org, tom@tromey.com Subject: Re: [PATCH v4 00/13] Add new command to print the shadow stack backtrace In-Reply-To: <20260708143639.2214689-1-christina.schimpe@intel.com> (Christina Schimpe's message of "Wed, 8 Jul 2026 14:36:26 +0000") References: <20260708143639.2214689-1-christina.schimpe@intel.com> User-Agent: mu4e 1.14.3; emacs 30.2 Date: Thu, 03 Sep 2026 06:44:39 +0000 Message-ID: <87pkyusujs.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 Christina, Thank you for this new version and for addressing the review comments. Also thank you for this detailed cover letter. It's very helpful. Christina Schimpe writes: > Hi all, > > this is my v4 of the series > "Add new command to print the shadow stack backtrace". > > ***Diff of v4 to v3***: > > - Minor fixup for ARM compilation > - The commit > "gdb: Provide gdbarch hook to distinguish shadow stack backtrace elements." > was accidentially merged into the previous one > ("gdb: Add command option 'bt -shadow' to print the shadow stack backtrace."). > Isolate it again. > > Other than that, I am keeping the full cover letter summarizing the > changes for v3 (diff of v3 to v2). It has not been reviewed yet, since I posted > it just a couple days ago. > > ***Diff of v3 to v2***: > > It now includes: > - the implementation of the -past-main command line option > - support for inferior calls > (printing of instead of the shadow stack element) > - full support for signals > (printing of instead of the shadow stack element) Great improvements! > Due to this some larger refactoring was required; I summarized it here: > https://sourceware.org/pipermail/gdb-patches/2026-May/227481.html > > The refactoring mostly affected the following commits: > "gdb: Provide gdbarch hook to distinguish shadow stack backtrace elements." > "gdb: Add command option 'bt -shadow' to print the shadow stack backtrace." > "gdb: Implement the hook 'is_no_return_shadow_stack_address' for amd64 linux." > I did not add any Reviewed-By or Approved-By tags for the 3 commits, since > they changed significantly. > > Furthermore, I addressed (hopefully all) the comments of Tom, Thiago and Eli: > - Remove annotations > - Some better code reuse (especially for the mi patch) > - A new patch "aarch64: Implement gdbarch function top_addr_empty_shadow_stack." > This also allows to remove some target dependent GCS code in aarch64-*.c Nice! Thanks. > - Various smaller issues and nits > - Fixes for check-gdbarch.py > > And finally some smaller issues I noted myself (mostly for patch #1 > "gdb: Generalize handling of the shadow stack pointer."): > - Remove unused gdbarch parameter in some of the introduced hooks > - Changes in gdb/aarch64-tdep.c when calling shadow_stack_push, since > some code for getting the shadow stack pointer and checking the enablement > state was duplicated. > > Opens: > 1) Thiago suggested changing the frame numbering so that it always starts > at #1, since for the shadow stack we don't have frame #0 printed by the > normal backtrace. > 2) Or, consider printing frame #0 similarly to what the normal backtrace does I still prefer option 1, but I'm also fine if some other option is chosen. > 3) Consider printing frame arguments (but I believe, if possible, this should > better be added in a follow-up series) IMHO it's not necessary, but I agree it's for a follow-up series if it is implemented. > 4) Show the selected frame, for details see here: > https://sourceware.org/pipermail/gdb-patches/2026-June/227720.html It would be nice to show the selected frame. If the selected frame is frame 0, then I think it's fine to simply not show it. -- Thiago (he/him)