freebsd-dev/sys
Mark Johnston 4b136ef259 amd64: Set GS.base before calling init_secondary() on APs
KMSAN instrumentation requires thread-local storage to track
initialization state for function parameters and return values.  This
buffer is accessed as part of each function prologue.  It is provided by
the KMSAN runtime, which looks up a pointer in the current thread's
structure.

When KMSAN is configured, init_secondary() is instrumented, but this
means that GS.base must be initialized first, otherwise the runtime
cannot safely access curthread.  Work around this by loading GS.base
before calling init_secondary(), so that the runtime can at least check
curthread == NULL and return a pointer to some dummy storage.  Note that
init_secondary() still must reload GS.base after calling lgdt(), which
loads a selector into %gs, which in turn clears the base register.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31336
2021-07-29 10:22:37 -04:00
..
amd64 amd64: Set GS.base before calling init_secondary() on APs 2021-07-29 10:22:37 -04:00
arm allwinner: rsb: Set the PMIC to RSB mode 2021-07-24 17:46:25 +02:00
arm64 Add missing arm64 ID registers 2021-07-28 19:01:30 +00:00
bsm
cam cam: clear stack-allocated CCB in the target layer 2021-07-21 10:18:28 +01:00
cddl
compat linux(4): Eliminate a now unused includes after futexes refactoring. 2021-07-29 12:56:39 +03:00
conf xen/timer: make xen timer optional 2021-07-28 17:27:03 +02:00
contrib ena: Remove redundant declaration of ena_log_level. 2021-07-23 16:07:35 -07:00
crypto crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
ddb
dev Fix mac_veriexec version mismatch 2021-07-29 11:05:13 +02:00
dts arm64: allwinner: dtbo: Add dtb overlays to disable mmc node 2021-07-24 22:53:33 +02:00
fs nfscl: Cache an open stateid for the "oneopenown" mount option 2021-07-28 15:48:27 -07:00
gdb
geom geom_disk: use a preallocated geom_event for disk destruction. 2021-07-23 18:08:52 -06:00
gnu
i386 linux(4): Eliminating an accidental comment. 2021-07-29 12:51:56 +03:00
isa newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf 2021-06-22 20:52:06 -06:00
kern link_elf_obj: Invoke fini callbacks 2021-07-29 09:46:25 -04:00
kgssapi
libkern Switch to an ifunc in the kernel for crc32c 2021-07-22 20:54:21 +00:00
mips Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01:00
modules ibcore: Kernel space update based on Linux 5.7-rc1. 2021-07-28 13:28:29 +02:00
net debugnet: Fix false-positive assertions for dp_state 2021-07-28 16:34:14 -07:00
net80211 net80211: ieee80211_probereq_ie fix length calculation for hw scans 2021-06-28 12:17:11 +00:00
netgraph socket: Implement SO_RERROR 2021-07-28 09:35:09 -07:00
netinet socket: Implement SO_RERROR 2021-07-28 09:35:09 -07:00
netinet6 socket: Implement SO_RERROR 2021-07-28 09:35:09 -07:00
netipsec socket: Implement SO_RERROR 2021-07-28 09:35:09 -07:00
netpfil pf: Validate user string nul-termination before copying 2021-07-28 10:41:01 -04:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed ibcore: Kernel space update based on Linux 5.7-rc1. 2021-07-28 13:28:29 +02:00
opencrypto crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00
powerpc powerpc: change mfpvr return type to uint32_t 2021-07-28 14:08:19 -03:00
riscv riscv: Fix pmap_kextract racing with concurrent superpage promotion/demotion 2021-07-22 20:02:14 +01:00
rpc Consistently use the SOLISTENING() macro 2021-06-14 17:32:27 -04:00
security Fix mac_veriexec version mismatch 2021-07-29 11:05:13 +02:00
sys link_elf_obj: Invoke fini callbacks 2021-07-29 09:46:25 -04:00
teken
tests tests: Revise FIB lookups per second benchmarking routines 2021-06-17 08:49:09 +02:00
tools booti: Enable loading the kernel image to any address aligned to 2 MB 2021-07-28 13:42:13 +02:00
ufs FFS: remove ffs_fsfail_task 2021-07-24 12:52:41 -07:00
vm redzone: Raise a compile error if KASAN is configured 2021-07-23 10:47:13 -04:00
x86 Do not expose to scheduler caches of single CPU. 2021-07-28 16:38:01 -04:00
xdr
xen xen: introduce xen_pv_disks_disabled() 2021-07-28 17:27:04 +02:00
Makefile