From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0GeRIsE4iGZHshwAWB0awg (envelope-from ) for ; Fri, 05 Jul 2024 14:17:37 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=fZAu7tjR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 790781E0C3; Fri, 5 Jul 2024 14:17:37 -0400 (EDT) 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 609471E030 for ; Fri, 5 Jul 2024 14:17:35 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E106038313A2 for ; Fri, 5 Jul 2024 18:17:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E106038313A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1720203454; bh=4qkoa6osnpCN50+pgUNWKC4dsjiaVN0QCtNVk2rJcEg=; h=To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=fZAu7tjRAaLQhUqxpDJne5aFIBIQzcqlV16rSgXxPXWu0CeILaV4Nc4Z+pFHOG2fm XGeJdyl/pKuR+M2PL+SV5O5nmUu/qgfa8AYcoMyac4JImejAF1SyImI1tyiWj/dbV5 oU3UOEgNbYd4qqLF6tW/J/YPvpIxikZMS4CrWZuI= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 18CC538323C2 for ; Fri, 5 Jul 2024 18:16:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 18CC538323C2 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 18CC538323C2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720203404; cv=none; b=IaxMujv/avnxudMKbX/jj97To5WmYneLE7WLOwGvF9KPpgBC9mVzkjwLqIHCwuF6opmqNfBKa5yS0Nm5eTFmz37hyWWwo5zoLAWFX6qvz3XTi3d2wQal2icrsmnKR1GKdZSXl4JuwXk1C/gPusGySjG3jp5kSOECWKWBbk3J0gw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720203404; c=relaxed/simple; bh=VQJ+qpikt4VVbbZq9evVKIiQ117foFo7kygy5GYtwdU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hD1mhqMbphEOJAH0eQy1kWsiMourm3Ku0KK/CuyXgvAEG/dMe+TF2lTjU/oWUQi6Vrt+3AYdCOe2rl/qEeQbuLa7HxziioRMNH5CfzhOEmvDCumt8tUYTWr9XqlbwOvDFB/x8jBRfoM/qaAaX0Ag/g3qbwoA+B2K8hYzTnpBZ4E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-688-qjYaMupQOhCCRnjenjb4RA-1; Fri, 05 Jul 2024 14:16:37 -0400 X-MC-Unique: qjYaMupQOhCCRnjenjb4RA-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6D0171955BCC; Fri, 5 Jul 2024 18:16:36 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.45.224.6]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 48D0F1955F3B; Fri, 5 Jul 2024 18:16:33 +0000 (UTC) To: "Schimpe, Christina via Gdb" Cc: Thiago Jung Bauermann , Tom Tromey , "Schimpe, Christina" Subject: Re: Shadow stack backtrace command name In-Reply-To: (Christina via Gdb Schimpe's message of "Tue, 9 Jan 2024 10:21:02 +0000") References: <87a5q0eq34.fsf@tromey.com> <871qb6c5y8.fsf@linaro.org> Date: Fri, 05 Jul 2024 20:16:31 +0200 Message-ID: <874j93vh4w.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Gdb Reply-To: Florian Weimer Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" * Christina via Gdb Schimpe: > However, based on the use cases that I am aware of, I am not sure if > the user wants to always see the shadow stack bt in the ordinary bt > output (if shadow stack is enabled). Based on my experiments, Linux currently does not push the instruction pointer onto the shadow stack if code is interrupted by a signal. It still works because the return mechanism is different. This would be a very visible difference between ordinary backtraces and shadow stack based backtraces. As far as I understand it, the kernel could change, and it may still be early enough to make this change. By the way, is there a way to tell if a process is in shadow stack mode using upstream GDB today? Preferably something that does not rely on glibc internals? Thanks, Florian