git: 3a94bbfdcd09 - main - amd64: Add AMD64_DISABLE_TLSBASE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 31 May 2025 14:56:03 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3a94bbfdcd09c655031e2a1ae343af6292d97d5d commit 3a94bbfdcd09c655031e2a1ae343af6292d97d5d Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2025-05-30 21:58:33 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2025-05-31 14:55:24 +0000 amd64: Add AMD64_DISABLE_TLSBASE Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/amd64/sys_machdep.c | 6 ++++++ sys/x86/include/sysarch.h | 1 + 2 files changed, 7 insertions(+) diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index 6deebba5babc..51f55687bbcf 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -208,6 +208,7 @@ sysarch(struct thread *td, struct sysarch_args *uap) case AMD64_CLEAR_PKRU: case AMD64_GET_TLSBASE: case AMD64_SET_TLSBASE: + case AMD64_DISABLE_TLSBASE: break; case I386_SET_IOPERM: @@ -395,6 +396,11 @@ sysarch(struct thread *td, struct sysarch_args *uap) vm_map_unlock_read(map); break; + case AMD64_DISABLE_TLSBASE: + clear_pcb_flags(pcb, PCB_TLSBASE); + update_pcb_bases(pcb); + break; + default: error = EINVAL; break; diff --git a/sys/x86/include/sysarch.h b/sys/x86/include/sysarch.h index a67e5c2265a3..cf7ee9ee5518 100644 --- a/sys/x86/include/sysarch.h +++ b/sys/x86/include/sysarch.h @@ -63,6 +63,7 @@ #define AMD64_CLEAR_PKRU 134 #define AMD64_GET_TLSBASE 135 #define AMD64_SET_TLSBASE 136 +#define AMD64_DISABLE_TLSBASE 137 /* Flags for AMD64_SET_PKRU */ #define AMD64_PKRU_EXCL 0x0001