From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id h/FoOQkOsGcMyzEAWB0awg (envelope-from ) for ; Fri, 14 Feb 2025 22:46:17 -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=nP/zaudZ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D81291E105; Fri, 14 Feb 2025 22:46:17 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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.0 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 259771E08E for ; Fri, 14 Feb 2025 22:46:17 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE9563858415 for ; Sat, 15 Feb 2025 03:46:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE9563858415 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=nP/zaudZ Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) by sourceware.org (Postfix) with ESMTPS id A5942385840B for ; Sat, 15 Feb 2025 03:45:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A5942385840B 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 A5942385840B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::a2a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739591131; cv=none; b=gAOwWgbLC/i64cOoNAHHtAolnu94p8/kPJblEP6NLBX6PFQoxLmOaH1zdpXEnktt6hXTwfYHCtS6D56oUQs/leD8g51MpQ6xkAqCaAnYw2KOKyHPka0QCn8UqKivrRkVTd5bzlK5LIc26kidylnaNv5fdpE8n/Asg+8Q6NsUf2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739591131; c=relaxed/simple; bh=YqdncHvC0p/0qPzBJDyeL34yH5pQGKUTd63nclN+9B4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=aZtoXuaK7VePSsGIWJTEZZmmeaI0mdEACWGfWxLh3BlBpE4jkYPGjnBo/Oxdq26Bi/Wkpz7osToo/+GWFWl5xbrzi9wa2QtK2uD1FKPZvIxn1VqQqlcRFjBN88oi7QlLpkS7EEyX+nduhIkWVXiAMK6C22H/Ud/SFJDog8ft10I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5942385840B Received: by mail-vk1-xa2a.google.com with SMTP id 71dfb90a1353d-51eb1a6ca1bso784666e0c.1 for ; Fri, 14 Feb 2025 19:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739591131; x=1740195931; 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=C5M3PdlrTOFJ6GnJm1BzKnCyidakvVSrdeJPkTdbJCk=; b=nP/zaudZobCD0rI/px/9Wg1R49ii9C9DRIrgzLaUVzv/fDXK9q8qL4M2ewPzJhLM9P acTtnK4Hgq8gC/giD1p/oOsvqUUX/tu21Uswvr7DfDTvaVghll85Xo7FiUrqgXOqNhM6 0WBnm9yxsFbHSfumcXRQdi+JJYDKWdVnhCItKCiVllwJw6VteDWbFZj0MuOzuMpUE9gR MeO9NTsDTJS8gRxgQU9TYm0BC0uisz0meGgkuPlS5OqLF8flOh/e3vpnQMNguAMwcQ1+ P0+nyg0lETSUZizyT6TVClQhmSISU3RwdNAyUJEnvTZu0RQAM1KZ6YjmPMtHZHW7CEvD BuYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739591131; x=1740195931; 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=C5M3PdlrTOFJ6GnJm1BzKnCyidakvVSrdeJPkTdbJCk=; b=DIOU9hqUvTlWy25esH805ol8chvW2dpudv/KYLc0dYYkOrNk3BdVQxTlRjLi/pbBcZ Ueu3AAtNchFvfH1TGYkJ6kI4jru7Ecx/f/mAoYnYkH2u3iKHgGsmkP6wljXiXulEwdI2 Wlz2ZTMkkSlykMRc6th2jje/zNdiWQcbwDkyAbbmYmpeTaT8SbyzOnxPlTBP+qA6A2il Mwv17QxgGGScMSRGvgb6bSE6aK65e9UrcWqdKknz+JH0GvjbrTK9GQSBa3Tfod8Y3yxy 43AFilqV8+AC1bHGgk9AIWv1e/Q0lCxWkj5D51xxWNbGBcb4AMbD+3BQxgIqpwPtbiBW Snpw== X-Gm-Message-State: AOJu0Yz+nTdSS+qiaQAIfsCY8pKbpaYDPIBVrBLViYyuviI6G/w/OGLY 3VwqmFR1NXDHPxM5UjGSgVKXKWCSmYbvIw2EkHMHRuDG6PhsdxARAfs7p1tzvuU= X-Gm-Gg: ASbGncvmlxH2hmpC43yhVGzCI1uvH90CsIyWaM28Rvf5Eegrp+rfeW+CqxdHOie7z1q 7GqKEUSlzBzVRDVWYWc5TAKH1uGM2tegGbsVacxK6G6ty5/LoESFFhHmzN5tVBYjdzYf+MVBQcw IRmLhPF9rfy5P/QHHsWIBVgg9aFGaReKUlMIOpYK4rPaEuySXAMB5iGypQAYC8/BEZ2FYJ7e9Zl qaFEarvvezuY/40zYYEtFRHCq9U1Pcj98Y+8rbIfAPg4eWqcl//YbcEbtxN1g/alquCAI03CbSU b5sQ3icgv6CpRY/Qkx6ItpXIVg== X-Google-Smtp-Source: AGHT+IEuDgqeiATDMY/deupwZ/zHBa03ilImJ5fBJNIvqkg1w0d5ka2DjPCfjqtbqvzQuhtcPx1Yuw== X-Received: by 2002:a05:6122:1b0d:b0:520:4c93:d9a7 with SMTP id 71dfb90a1353d-5209dcd93c0mr1034785e0c.9.1739591130030; Fri, 14 Feb 2025 19:45:30 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:5282:196b:f03b:271d]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-52097e27968sm507757e0c.18.2025.02.14.19.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 19:45:28 -0800 (PST) From: Thiago Jung Bauermann To: "Schimpe, Christina" Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH 11/12] gdb, gdbarch: Introduce gdbarch method to get the shadow stack pointer. In-Reply-To: <87v7ths0v8.fsf@linaro.org> (Thiago Jung Bauermann's message of "Mon, 10 Feb 2025 22:53:31 -0300") References: <20241220200501.324191-1-christina.schimpe@intel.com> <20241220200501.324191-12-christina.schimpe@intel.com> <87ldujhhjh.fsf@linaro.org> <87v7tlqdzw.fsf@linaro.org> <87v7ths0v8.fsf@linaro.org> User-Agent: mu4e 1.12.8; emacs 29.4 Date: Sat, 15 Feb 2025 00:45:25 -0300 Message-ID: <87seofhnvu.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, Thiago Jung Bauermann writes: > "Schimpe, Christina" writes: > >> Would something like that be acceptable as well? >> >> Method( >> comment=""" >> If possible, return the shadow stack pointer. On some architectures, the shadow stack >> pointer is available even if the feature is disabled. To return the shadow stack >> enablement state configure SHADOW_STACK_ENABLED. >> """, >> type="std::optional", >> name="get_shadow_stack_pointer", >> params=[("bool &", "shadow_stack_enabled")], >> predefault="default_get_shadow_stack_pointer", >> invalid=False, >> ) > > Yes, this looks good. I was rebasing my Guarded Control Stack code on top of this series, and noticed that I will need to access the thread's regcache for the aarch64 implementation of this gdbarch method. Then I noticed that the x86_64 version also needs it, and calls "get_thread_regcache (inferior_thread ())". It would be better to pass the regcache as an argument instead. -- Thiago