freebsd-dev/sys
John Baldwin 1a62e9bc00 Add <machine/tls.h> header to hold MD constants and helpers for TLS.
The header exports the following:

- Definition of struct tcb.
- Helpers to get/set the tcb for the current thread.
- TLS_TCB_SIZE (size of TCB)
- TLS_TCB_ALIGN (alignment of TCB)
- TLS_VARIANT_I or TLS_VARIANT_II
- TLS_DTV_OFFSET (bias of pointers in dtv[])
- TLS_TP_OFFSET (bias of "thread pointer" relative to TCB)

Note that TLS_TP_OFFSET does not account for if the unbiased thread
pointer points to the start of the TCB (arm and x86) or the end of the
TCB (MIPS, PowerPC, and RISC-V).

Note also that for amd64, the struct tcb does not include the unused
tcb_spare field included in the current structure in libthr.  libthr
does not use this field, and the existing calls in libc and rtld that
allocate a TCB for amd64 assume it is the size of 3 Elf_Addr's (and
thus do not allocate room for tcb_spare).

A <sys/_tls_variant_i.h> header is used by architectures using
Variant I TLS which uses a common struct tcb.

Reviewed by:	kib (older version of x86/tls.h), jrtc27
Sponsored by:	The University of Cambridge, Google Inc.
Differential Revision:	https://reviews.freebsd.org/D33351
2021-12-09 13:17:13 -08:00
..
amd64 Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
arm Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
arm64 Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
bsm Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9). 2021-08-05 23:20:42 +08:00
cam cam/iosched: fix off by one error 2021-12-05 23:00:01 -07:00
cddl Allow ddb and dtrace use the DMAP region on arm64 2021-10-01 11:27:33 +01:00
compat modules: increase MAXMODNAME and provide backward compat 2021-12-09 18:09:53 +00:00
conf cxgbe(4): Update firmwares to 1.26.4.0 2021-12-09 11:25:31 -08:00
contrib modules: increase MAXMODNAME and provide backward compat 2021-12-09 18:09:53 +00:00
crypto cryptosoft: Fully support per-operation keys for auth algorithms. 2021-12-09 11:52:42 -08:00
ddb Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
dev ioat: plug set-but-not-unused vars 2021-12-09 20:21:16 +00:00
dts add rk3328 overlay for enabling analog sound 2021-11-13 11:09:23 +02:00
fs modules: increase MAXMODNAME and provide backward compat 2021-12-09 18:09:53 +00:00
gdb
geom Revert "geom_bde: plug set-but-not-used vars" 2021-12-09 19:23:05 +00:00
gnu
i386 Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
isa
kern modules: increase MAXMODNAME and provide backward compat 2021-12-09 18:09:53 +00:00
kgssapi
libkern libkern: remove bcopy 2021-08-24 11:24:07 +00:00
mips Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
modules cxgbe(4): Update firmwares to 1.26.4.0 2021-12-09 11:25:31 -08:00
net net/if.c: plug set-but-not-unused vars 2021-12-09 20:39:40 +00:00
net80211 net80211(4): Fix a typo in a sysctl description 2021-12-04 12:09:17 +01:00
netgraph ng_ubt(4): Add missing module dependency for _net_bluetooth sysctl node. 2021-12-08 10:18:32 +01:00
netinet ifnet_byindex() actually requires network epoch 2021-12-06 09:32:31 -08:00
netinet6 in6p_set_multicast_if(): fix malloc(M_WAITOK) with epoch 2021-12-06 14:33:23 -08:00
netipsec ipsec: fix a panic with INVARIANTS 2021-12-03 14:22:23 -09:00
netpfil pfsync: fix incorrect enabling of defer mode 2021-12-06 13:25:14 +01:00
netsmb
nfs kernel: partially revert e9efb1125a15, default inet mask 2021-11-14 14:12:25 -06:00
nfsclient
nfsserver
nlm
ofed socket: De-duplicate SBLOCKWAIT() definitions 2021-09-14 09:01:32 -04:00
opencrypto cryptosoft: Stop single-threading requests within a session. 2021-12-09 11:52:43 -08:00
powerpc Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
riscv Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
rpc mbuf: Only allow extpg mbufs if the system has a direct map 2021-11-16 13:31:04 -05:00
security MAC/priority module for realtime privilege group 2021-12-04 20:19:25 +02:00
sys Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
teken
tests routing: add IPv6 fib validation procedure. 2021-08-16 23:04:01 +00:00
tools syscalls: add COMPAT13 2021-12-09 02:48:32 +02:00
ufs Revert "ffs(3): Fix a typo in a sysctl description" 2021-12-05 13:45:47 +01:00
vm swapoff: add one more variant of the syscall 2021-12-09 02:48:46 +02:00
x86 Add <machine/tls.h> header to hold MD constants and helpers for TLS. 2021-12-09 13:17:13 -08:00
xdr
xen xen/privcmd: fix MMAP_RESOURCE ioctl to copy out results 2021-11-18 09:46:44 +01:00
Makefile