ladybird/Kernel
Sönke Holz 243d7003a2 Kernel+LibC+LibELF: Move TLS handling to userspace
This removes the allocate_tls syscall and adds an archctl option to set
the fs_base for the current thread on x86-64, since you can't set that
register from userspace. enter_thread_context loads the fs_base for the
next thread on each context switch.
This also moves tpidr_el0 (the thread pointer register on AArch64) to
the register state, so it gets properly saved/restored on context
switches.

The userspace TLS allocation code is kept pretty similar to the original
kernel TLS code, aside from a couple of style changes.

We also have to add a new argument "tls_pointer" to
SC_create_thread_params, as we otherwise can't prevent race conditions
between setting the thread pointer register and signal handling code
that might be triggered before the thread pointer was set, which could
use TLS.
2024-04-19 16:46:47 -06:00
..
API Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
Arch Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
Boot Kernel: Enable i8042 first port translation by default 2024-01-12 16:02:13 -07:00
Bus Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Devices Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
FileSystem Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Firmware/ACPI Kernel: Overhaul system shutdown procedure 2023-07-15 00:12:01 +02:00
Heap Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Interrupts Kernel/Interrupts: Move PCIIRQHandler => PCI::IRQHandler 2023-09-16 14:04:17 -06:00
Library Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Locking Kernel: Share Processor class (and others) across architectures 2023-10-03 16:08:29 -06:00
Memory Kernel/riscv64: Don't hard-code the page fault reason on RISC-V 2024-03-25 14:18:38 -06:00
Net Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Prekernel Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Security Everywhere: Use east const in more places 2024-04-19 06:31:19 -04:00
Syscalls Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
Tasks Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
Time Kernel/riscv64: Add RISC-V support to TimeManagement 2024-01-02 06:50:59 -07:00
CMakeLists.txt Kernel+LibC: Introduce new archctl syscall 2024-04-19 16:46:47 -06:00
Debug.h.in Kernel: Add a framebuffer driver for 3Dfx Voodoo 3 2023-10-16 01:25:45 +02:00
embedmap.sh Kernel: Make new kernel build process work on macOS 2021-07-15 11:04:30 +02:00
Forward.h Kernel/Devices: Introduce the LoopDevice device 2024-03-13 15:33:47 -06:00
generate-version-file.sh Kernel: Bake version information into the Kernel 2022-10-14 13:45:33 +02:00
kprintf.cpp Kernel: Only write text to serial console if no ConsoleDevice attached 2024-01-02 06:16:53 -07:00
kstdio.h Kernel: Remove includes to LibC stdarg definitions 2023-03-01 19:36:53 -07:00
KSyms.cpp Kernel/riscv64: Fix backtrace generation on RISC-V 2023-12-30 23:24:18 +01:00
KSyms.h Kernel: Add ability to dump backtrace from provided frame pointer 2022-10-01 14:09:01 +02:00
mkmap.sh Kernel: Use the toolchain's nm in mkmap.sh 2021-12-30 18:10:51 +01:00
SanCov.cpp Kernel: Add KCOV recursion debugging 2024-04-15 21:16:22 -06:00
Sections.h Kernel: Move all boot-related code to the new Boot subdirectory 2023-06-04 21:32:34 +02:00
UnixTypes.h Kernel/Net: Implement TCP_NODELAY 2023-11-08 09:31:54 +01:00