Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200825164316.GQ3265@brightrain.aerifal.cx>
Date: Tue, 25 Aug 2020 12:43:20 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: [PATCH] [RFC] cleanup/refactor pthread_arch.h, pthread_impl.h

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.

Once this is upstream I may try to further clean up struct __pthread,
possibly moving "important" fields like tid to be near end for
TLS_ABOVE_TP archs to ensure that small negative offsets suffice to
access them.

Rich

View attachment "0001-deduplicate-TP_ADJ-logic-out-of-each-arch-replace-wi.patch" of type "text/plain" (7648 bytes)

View attachment "0002-deduplicate-__pthread_self-thread-pointer-adjustment.patch" of type "text/plain" (10630 bytes)

View attachment "0003-remove-redundant-pthread-struct-members-repeated-for.patch" of type "text/plain" (4900 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.