Date: Thu, 9 Dec 2021 13:49:05 -0800 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8bcdb144ebe3 - main - TLS: Use <machine/tls.h> for libc and rtld. Message-ID: <9f3177fd-0270-9021-906d-44954558e23b@FreeBSD.org> In-Reply-To: <202112092123.1B9LNkK8047121@gitrepo.freebsd.org> References: <202112092123.1B9LNkK8047121@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/9/21 1:23 PM, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8bcdb144ebe391ce243c71caf06cf417d96ce335 > > commit 8bcdb144ebe391ce243c71caf06cf417d96ce335 > Author: John Baldwin <jhb@FreeBSD.org> > AuthorDate: 2021-12-09 21:17:54 +0000 > Commit: John Baldwin <jhb@FreeBSD.org> > CommitDate: 2021-12-09 21:23:05 +0000 > > TLS: Use <machine/tls.h> for libc and rtld. > > - Include <machine/tls.h> in MD rtld_machdep.h headers. > > - Remove local definitions of TLS_* constants from rtld_machdep.h > headers and libc using the values from <machine/tls.h> instead. > > - Use _tcb_set() instead of inlined versions in MD > allocate_initial_tls() routines in rtld. The one exception is amd64 > whose _tcb_set() invokes the amd64_set_fsbase ifunc. rtld cannot > use ifuncs, so amd64 inlines the logic to optionally write to fsbase > directly. > > - Use _tcb_set() instead of _set_tp() in libc. > > - Use '&_tcb_get()->tcb_dtv' instead of _get_tp() in both rtld and libc. > This permits removing _get_tp.c from rtld. > > - Use TLS_TCB_SIZE and TLS_TCB_ALIGN with allocate_tls() in MD > allocate_initial_tls() routines in rtld. > > Reviewed by: kib, jrtc27 (earlier version) > Differential Revision: https://reviews.freebsd.org/D33353 I should have noted that all of the changes in this series were runtime tested on amd64, armv7, aarch64, i386, and riscv. The changes were build-tested (make tinderbox) on mips and powerpc. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9f3177fd-0270-9021-906d-44954558e23b>