From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by sourceware.org (Postfix) with ESMTPS id E4BBB3858D35; Thu, 16 Dec 2021 21:09:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E4BBB3858D35 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 9E8A33A3767; Thu, 16 Dec 2021 16:09:19 -0500 (EST) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gAQRcXPat_Vl; Thu, 16 Dec 2021 16:09:19 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 5A8A33A3868; Thu, 16 Dec 2021 16:09:19 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 5A8A33A3868 X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PgeeSgobjlYq; Thu, 16 Dec 2021 16:09:19 -0500 (EST) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 4F7503A3B9D; Thu, 16 Dec 2021 16:09:19 -0500 (EST) Date: Thu, 16 Dec 2021 16:09:19 -0500 (EST) From: Mathieu Desnoyers To: Florian Weimer Cc: libc-alpha , Simon Marchi , gdb@sourceware.org Message-ID: <1507387605.36435.1639688959308.JavaMail.zimbra@efficios.com> Subject: rseq and gdb MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_4173 (ZimbraWebClient - FF94 (Linux)/8.8.15_GA_4177) Thread-Index: sOh2VMRqGUUKEv8VTztChMR8lOZZeA== Thread-Topic: rseq and gdb X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2021 21:09:21 -0000 Hi Florian, I suspect that gdb should ideally do something to allow it to single-step through rseq critical sections. In librseq [1], we emit the __rseq_cs_ptr_array and __rseq_exit_point_array sections to allow gdb to know about rseq critical sections and skip over those critical sections as needed. Otherwise single-stepping over each instruction of a rseq critical section will loop forever. Now that glibc plans to enable rseq by default starting with glibc 2.35, it appears to be a good timing to raise this topic with the gdb community. Thanks, Mathieu [1] https://git.kernel.org/pub/scm/libs/librseq/librseq.git -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com