Commit Graph

15 Commits

Author SHA1 Message Date
8ca3c5d778 Kernel: Clean up signal handling
We now appreciate sa_mask and SA_NODEFER and change the signal mask for
the duration of signal handler. This is done by making a sigprocmask
syscall at the end of the signal handler. Back-to-back signals will
still grow stack as original registers are popped AFTER the block mask
is updated. I guess this is why linux has sigreturn(?).
2026-04-05 02:25:59 +03:00
bd426199f8 Kernel: Remove unused (and broken) code from signal trampoline 2025-12-28 03:53:38 +02:00
dd636ffcb2 Kernel: Add support for SA_SIGINFO 2025-11-17 05:26:07 +02:00
0dfe0b7023 Kernel/LibC: Implement sigaltstack 2025-08-21 02:52:49 +03:00
f73bb242f3 Kernel: Save fpu state and flags in signal handler
This was causing some weird crashes :D
2025-06-28 16:55:13 +03:00
99fc7817c6 Kernel: Cleanup stack alignment assembly 2025-04-20 16:55:18 +03:00
969563c06a Kernel: Don't load AP init code to 0xF000, but relocate it later
This cleans up the kernel executable as bootloaders don't have to
load AP init code straight to 0xF000, but it will be moved there once
kernel is doing the AP initialization.
2024-08-21 13:37:50 +03:00
061012a268 Kernel: Fix signal trampoline
32 bit did not even support it and 64 bit did not align stack
2024-04-18 13:32:40 +03:00
9314528b9b Kernel: Improve syscall handling
Syscalls are now called from a list of function pointers
2024-02-12 21:51:11 +02:00
1c78671078 Kernel: Rework all signal code
Signal handling code was way too complex. Now everything is
simplified and there is no need for ThreadBlockers.

Only complication that this patch includes is that blocking syscalls
have to manually be made interruptable by signal. There might be some
clever solution to combat this is make this happen automatically.
2023-12-06 13:02:17 +02:00
Bananymous
20eafb4cc4 Kernel: align userspace stacks
I was getting #GP on sse instructions
2023-08-03 18:09:48 +03:00
Bananymous
1a6100f083 Kernel: Cleanup signal trampoline 2023-07-30 15:58:35 +03:00
Bananymous
2dce0a0415 Kernel: Userspace signal handlers are now called one at a time
I added a syscall for telling the kernel when signal execution has
finished. We should send a random hash or id to the signal trampoline
that we would include in the syscall, so validity of signal exit can
be confirmed.
2023-07-23 13:34:53 +03:00
Bananymous
8063700d7b Kernel: add default signal actions 2023-07-21 18:02:35 +03:00
Bananymous
c2cf98e32f Kernel/LibC: Add bareboness signals
You can now call raise() to raise a signal. Signal handlers are
not yet supported, but the handling works :)
2023-07-21 15:45:02 +03:00