From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29946 invoked from network); 26 Aug 2020 21:53:14 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 26 Aug 2020 21:53:14 -0000 Received: (qmail 27696 invoked by uid 550); 26 Aug 2020 21:53:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 27672 invoked from network); 26 Aug 2020 21:53:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=X2tEAqThmZm7MELDsNtCoekbM6aNZp+mBZulWI3GypQ=; b=Zl3bb5esyrY/kUwLqmBM+8WxF9kdhuo/Bsx2AYXmPQIQovqlWhlPCKHimMvZQXXvEs 3RroBjPqwdj6zXbSQH9rT1lhvzptV80RSEIi0E4BoxTMh8yBIruSYVN6F2CN93SYNas7 ST8T2o/7vgmROrR0/LwXS8i+aAN9etfQ/cUglGVA/n1Ra9LpKLxX1YJkwZjf0emfn3tH louQ9vawYnvovyOlrnAtBOONjFO6BEwN75frn0duPgLRhct3P0dPNhLFDCH5CjdKq7MQ ru7vrtI9UcPyYuBUNg0xu3BcWzmleZ52wrbiwUTeeuhuFAb3xoFsPiU8kLjtdOCZ+jW5 xEyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=X2tEAqThmZm7MELDsNtCoekbM6aNZp+mBZulWI3GypQ=; b=ejbuE6TOkvUsjeKa6V6ASoxvSlUXAAMc5Mxj0N/7gBhNMFZKEz/FEKWL0+rmcU6yPr Zn9KnWiXoSjY3/yTo6FpvkrWDnBJLyODQNMydw3HMmqRiRofO2Kkvq3fIFwnNK1mrxyW 4AARDcLMuqn53B0QehJJBH42ctnoC5ni+CfJjT1b+Eq15gsyb6bGLNxAn51vY5wDhbWc s3KlAi6kYx/Wr0A441tOBdwaPBV9dOHG5Dssm4Mamb7u+ARyGGOzGv05chj8M/BFHNbz C/Vqg7IpZmb15yVRry9n7vrs4jlJoCnPfpzwWsYm0casznIkpqNRMSuAAgFIV26+uE28 WvgA== X-Gm-Message-State: AOAM532juSLKDJFWSQeq9jsN6kZUvWKEuvKoVAVNlCgRNsWAqyp49MFF YrjwD7BVQoxFHqmmJyyVEIti3rzEh4rWpDIjLTGp8VDzIKU= X-Google-Smtp-Source: ABdhPJzEFDrRVy4bSgLIXb4UEV6GY7FsH++Ivbiu5p3oFh9h3wURYk9lTl+J4i7rtx0wXtvvebvtb7ry8iaAfgsHfHY= X-Received: by 2002:a05:620a:144b:: with SMTP id i11mr15661250qkl.485.1598478777469; Wed, 26 Aug 2020 14:52:57 -0700 (PDT) MIME-Version: 1.0 References: <20200825164316.GQ3265@brightrain.aerifal.cx> In-Reply-To: <20200825164316.GQ3265@brightrain.aerifal.cx> From: Bartosz Brachaczek Date: Wed, 26 Aug 2020 23:52:46 +0200 Message-ID: To: musl@lists.openwall.com Content-Type: multipart/alternative; boundary="000000000000b64eae05adced760" Subject: Re: [musl] [PATCH] [RFC] cleanup/refactor pthread_arch.h, pthread_impl.h --000000000000b64eae05adced760 Content-Type: text/plain; charset="UTF-8" On Tue, Aug 25, 2020 at 6:43 PM Rich Felker wrote: > The attached patch series refactors fragments from pthread_arch.h to > reduce redundancy and allow pthread_arch.h to be included at the top > of pthread_impl.h, where it can be used to influence the > definition/layout of struct __pthread, rather than the middle of the > file. This makes it possible to get rid of the duplicate canary and > dtv members that existed just to match multiple ABIs silumtaneously. > > This involved a good deal of manual conversion/deduplication so it's > possible there are bugs for some archs. That's why I've posted the > series for review rather than just pushing. Reports of success/failure > (disassembly of pthread_self.o before/after probably suffice to > confirm no regression) would be very helpful. > I mechanically confirmed for all archs that with the first two patches applied, disassembly of pthread_self.o before/after doesn't change. The third patch obviously changes the offset for most archs due to change in sizeof struct pthread. Only other remark: ricv64's __get_tp misses the change of the variable type from char * to uintptr_t. --000000000000b64eae05adced760 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue,= Aug 25, 2020 at 6:43 PM Rich Felker <dalias@libc.org> wrote:
The attached patch series refact= ors fragments from pthread_arch.h to
reduce redundancy and allow pthread_arch.h to be included at the top
of pthread_impl.h, where it can be used to influence the
definition/layout of struct __pthread, rather than the middle of the
file. This makes it possible to get rid of the duplicate canary and
dtv members that existed just to match multiple ABIs silumtaneously.

This involved a good deal of manual conversion/deduplication so it's possible there are bugs for some archs. That's why I've posted the<= br> series for review rather than just pushing. Reports of success/failure
(disassembly of pthread_self.o before/after probably suffice to
confirm no regression) would be very helpful.

I mechanically confirmed for all archs that with the first two patch= es applied, disassembly of pthread_self.o before/after doesn't change. = The third patch obviously changes the offset for most archs due to change i= n sizeof struct pthread.

Only other remark: ricv64= 's=C2=A0__get_tp misses the change of the variable type from char * to = uintptr_t.
--000000000000b64eae05adced760--