From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DI9WI6jC5WgrnyMAWB0awg (envelope-from ) for ; Tue, 07 Oct 2025 21:47:20 -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=Tl/M2zeP; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 83D0B1E04C; Tue, 07 Oct 2025 21:47:20 -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 A91DC1E04C for ; Tue, 07 Oct 2025 21:47:19 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D082A385B513 for ; Wed, 8 Oct 2025 01:47:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D082A385B513 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=Tl/M2zeP Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id B00F53858CDA for ; Wed, 8 Oct 2025 01:46:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B00F53858CDA 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 B00F53858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759888004; cv=none; b=pg10pPqNGdob/DHHzKEhFBxvybfqx0GV7oVy1JDsE/FijqFc+qiJkHOldmBcALvnKv5tEgfDViq7sA1BmJGEZS2zqOXYOQRuG2P0qpWH4iAQxq+8EkZqZHG+Oyio1NxGXEKfO9EolPqw5cTmZwSaKH2c5uNAb84Fpx5c0oWYA/I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759888004; c=relaxed/simple; bh=hxOTpQD0fYB1o5zQTDcL+H2D4ngIlwIllarG+o5M7w0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JI1W67ExO90S0BShgpWASqefbLeJmVkhooTv4+LQpKm1ElOB8rfDLIBzxGwU0jZboLv0Og23ZCxdwKCgGbeAmhnsv8rBQjJYda9wcJ/eadVy5yeoppJ10p0yGnOppMxBYPcYG1j1iqdlo8dhu+zJ0QNJO43VH1n5tFzQW4KF4dA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B00F53858CDA Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-78115430134so4257780b3a.1 for ; Tue, 07 Oct 2025 18:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1759888003; x=1760492803; 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=5R3TLXwm4VB7gx6coXoIWq5PPBDJXfnM1m9+gEKbezo=; b=Tl/M2zePXxsaMaM3KSCcpH/xlq5Jpzg/VCHZVgJMJtXxYVRrH6hvvrK7Xy/qa4LsUA wyJ84SxF83C19wSEt/ouJRYvPnvMTuc5rESsxpeerXmQSE0zVZRxgEHeicfZ54KUASYp fMCatlQwyABlgFTFOxECOBcv4UIKJbnV0kFcWTwXZas4XotnOuAOsoYAD5oTImxEJrQ7 lt86oY63vQOTJ4FRMK/xT/k1oWcjvPLsny7JZdY2Ns6CMbnNFY3NeBFI7rHQbQYaTI82 DnDzaoaOBqiFm9RpzSJ6VBdg+twYXR5jLudTNIxPbhrmxmLrodODJiK31Xxwpn6fDssz qyuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759888003; x=1760492803; 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=5R3TLXwm4VB7gx6coXoIWq5PPBDJXfnM1m9+gEKbezo=; b=iRzr647+j/FS8rFvkuTkrng9qhxPJci/BAVW/23YvEEOlOVhIXd0onsFVJ3zG1kC6o 0wFFKdPHqytN2pyP8OZU6EgsL/x3+fpSCwhHEYxj26tt1oehFY+YcggD5joznwPwIQ21 SjVvRCff1C4SNmPqSf9qBhszjW62fxwfKIvZonsu3ckugZLq9QF6n0SEACJdJ8MRjKc5 bWT0wgZIfBjCMSsNlOh2kwNtVak1EFpJ0UgrRj8JIJA9vo51bcAms7HnXSZg3UNyXfxA uV8/o768bfITfXoaSwqHi60+Sp6CMuYwk9dwBkoQtQ1vHoAY9KrLVcB6BNyI6hyHWZGA ogkw== X-Gm-Message-State: AOJu0YzB8UgxWaJaHD6LNanUUlZJjlAOwdRLfNxb/I/8Daj9CC7Nq/eY eqveHNznMGEBmqJYKuw4x3L2SAhNFJuY59ahcMi0GvMEU2cQTA54e9eGlcomweGVIVZrrCnMfAO 96YxP X-Gm-Gg: ASbGncuaKluY/JQ5tQMS/8DYUbkO2+lMvl1msZouaXCt5mlGcfFbUnpE1tNRQAXmya7 EjKHyPZiO2SB+7C3wVaTDyZJE5AK6MgRhnQhBGpDEwRpByNrzEPJRSGiGqfNpPhizBmuHB01UVd gF+AY+FS5zf5JXch+00Oxmo0eAcrP/5B3JUW41eu7Dt2Fa7FlwIJ4hfGz0xy356cr/YxEoJNOnY sBwgfPHogy8aCIiNV6PlbWRqfJ9YUuASgiU3Q0L6vH792OlDXr7gylBxsDSUivWiHvHxKhwqM61 p/b6HdjRDNTHEAfrhZc0+SDDrbDxObFjTEn9YDLqn1fT/sqQhB+i/v1cZiqsnMjsdq6ff3TlFRX e8XEYtWRnBBhEyZaIL36kifCo/86AwsYdHX2YlvDrmahENHS1Lwxb0LsqnmBNE9RdYmW8sqw= X-Google-Smtp-Source: AGHT+IElagsw6C5oS516OmnmTFxY3j9nxQ3F8lj79rScc+DtDs60IxnNaHoF3j3edaefBZPxN9sFNw== X-Received: by 2002:a05:6a00:4fca:b0:781:f0a9:a38 with SMTP id d2e1a72fcca58-79387929b01mr1827033b3a.24.1759888003485; Tue, 07 Oct 2025 18:46:43 -0700 (PDT) Received: from localhost ([2804:14d:7e39:88d6:cf1d:3daa:78ae:d44d]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-78b01fb1d27sm17197256b3a.36.2025.10.07.18.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Oct 2025 18:46:42 -0700 (PDT) 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 "Thu, 25 Sep 2025 11:46:00 +0000") References: <20250923111842.4091694-1-christina.schimpe@intel.com> User-Agent: mu4e 1.12.11; emacs 30.2 Date: Tue, 07 Oct 2025 22:46:40 -0300 Message-ID: <871pne2min.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, Sorry for the delay. I'm going over them now and will have some review comments soon. "Schimpe, Christina" writes: > I did not test the "bt shadow" command for ARM's GCS. Does the command make sense for GCS, > too ? Yes, it does. I think this is useful, thanks! > If yes, does the implementation I shared here makes sense to you in general? I'm still in the middle of reviewing it, but so far I think so. > I tried to address the different Aarch and Intel behavior we discussed here > https://sourceware.org/pipermail/gdb-patches/2025-June/218947.html > by introducing a new gdbarch hook top_addr_empty_shadow_stack. > > Does that go into the right direction for your purposes? Yes, I believe so. Thank you for addressing this difference between the architectures. I tested your patches and there's a bug unfortunately: FAIL: gdb.arch/aarch64-gcs-disp-step.exp: continue to breakpoint at blr FAIL: gdb.arch/aarch64-gcs-disp-step.exp: continue until exit FAIL: gdb.arch/aarch64-gcs.exp: call inferior function FAIL: gdb.arch/aarch64-gcs-return.exp: test inferior call and continue: call (int) call2() FAIL: gdb.arch/aarch64-gcs-return.exp: test inferior call and continue: continue until exit FAIL: gdb.arch/aarch64-gcs-return.exp: test frame level update: check gcspr of frame 1 FAIL: gdb.arch/aarch64-gcs-return.exp: test frame level update: check gcspr of frame 2 FAIL: gdb.arch/aarch64-gcs-return.exp: test return from current frame: continue until exit In each FAIL above a GCS error happens unexpectedly in the inferior. It appears that GDB isn't updating the shadow stack correctly. I still have to see what exactly is the problem. -- Thiago