From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id D19033857810 for ; Thu, 19 Nov 2020 20:35:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D19033857810 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1kfqeT-0007sl-1T; Thu, 19 Nov 2020 20:35:33 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1kfqeS-00085F-RQ; Thu, 19 Nov 2020 21:35:32 +0100 From: Florian Weimer To: Matheus Castanho Cc: Matheus Castanho via Libc-alpha , tuliom@linux.ibm.com Subject: Re: [PATCH 3/4] powerpc: Runtime selection between sc and scv for syscalls References: <20201118144703.75569-1-msc@linux.ibm.com> <20201118144703.75569-4-msc@linux.ibm.com> <87pn4avgor.fsf@mid.deneb.enyo.de> <6547146f-7f09-9c11-3bd4-256f44b207f5@linux.ibm.com> Date: Thu, 19 Nov 2020 21:35:32 +0100 In-Reply-To: <6547146f-7f09-9c11-3bd4-256f44b207f5@linux.ibm.com> (Matheus Castanho's message of "Thu, 19 Nov 2020 17:29:19 -0300") Message-ID: <87pn49nkyz.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2020 20:35:36 -0000 * Matheus Castanho: > That should work for shared libc, but in the static case we may also > hit the same problem: trying to access the TLS to read hwcap2 before > it has been initialized, but this time in csu/libc-tls.c Ahh. > Is there a way to also check if we are in the static startup code at > compile time? If not, I'm afraid I'll have to keep the check for the > thread pointer. Is the thread pointer in a regular register? Then you could install a fake TCB early on that has a zero bit in the right place. The other option would be to always use the old interface for !SHARED. Just saying. 8-)