From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 074CF3858D32 for ; Thu, 13 Apr 2023 10:11:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 074CF3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmtuv-0001Su-HZ; Thu, 13 Apr 2023 06:11:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=rm9xwFOtchFkz5ViMRTFryCAYXwUE0JIEe48ljxZ63U=; b=XE6DzXyoa+00FzbEVXGV vqfmR7GgBvW3GLDCdGGEEQ/niHHJtWph0A4x8vJuhNUJI7XTHGkOtLGynppkE9vfjhPYwt/07iGbM c+8rWsIau9cKjjVNkS5viO6bNnR9CaKER/7nehr4HF6+FLQntGBVoKNFHRyL8EoeSpakHAwRL9APU ALddQBTGmXXV3S+8KGnFhWCywdd7oK+qqfp9siTcGDh6HqqkTyUYufCicpFpQ2pZabVbiaDlUpC4c G/DalPxpd2SWz/FqKeC9nG9GQpL0wKDn/on8i1ENYbdS0BmVit022QmeevYlZaff7fRc+992/3Ywe eCjBFElHIpo/5g==; Received: from nat-inria-interne-52-gw-01-bso.bordeaux.inria.fr ([194.199.1.52] helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmtuv-0003Fl-Ba; Thu, 13 Apr 2023 06:11:01 -0400 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pmtus-0023Rb-39; Thu, 13 Apr 2023 12:10:58 +0200 Date: Thu, 13 Apr 2023 12:10:58 +0200 From: Samuel Thibault To: Sergey Bugaev Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: Re: [RFC PATCH glibc 24/34] hurd: Only check for TLS initialization inside rtld or in static builds Message-ID: <20230413101058.wfmy7mb4dexsrbio@begin> Mail-Followup-To: Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd@gnu.org References: <20230412234657.ntztyz7iau55lcwt@begin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,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 List-Id: Sergey Bugaev via Libc-alpha, le jeu. 13 avril 2023 13:02:58 +0300, a ecrit: > this is our very own thread port, the result of mach_thread_self () > which was called just several moments ago in hurd_self_sigstate ()! IIRC this is cached inside glibc... in a TLS variable probably. And thus if that cache is not properly set up because TLS/non-TLS is not clear at some point, mayhem happens :) > > (gdb) watch $gs > > Watchpoint 2: $gs > > (gdb) c > > Continuing. > > Cool, I didn't know you could watch a register like that -- although > it appears to be super slow, so it must be not using hardware > watchpoints. Yes, it's all software. Gdb can do a lot in software, it's just very slow :) > What you should really check is not what GDB prints on "l __write", > but rather what the GOT/PLT slots inside ld.so contain; Yes, sure, I just don't have time to dive into that. Samuel