Commit Graph

391 Commits

Author SHA1 Message Date
4lDO2 e8060b259d Only save ip and 'archdep' regs when signalling. 2024-07-15 17:20:56 +02:00
4lDO2 93a3401df4 Fix bug causing raise() to not deliver any signals. 2024-07-15 17:20:56 +02:00
4lDO2 87046b77c7 Compile on aarch64. 2024-07-15 17:20:56 +02:00
4lDO2 c1ce1d76f9 Compile on i686. 2024-07-15 17:20:56 +02:00
4lDO2 5b25e2cda7 Fix excp_handler deadlock. 2024-07-15 17:20:56 +02:00
4lDO2 cc406804c0 Don't double-clear is_pending flag. 2024-07-15 17:20:55 +02:00
4lDO2 35aa24800b Implement correct context sig unblocking behavior. 2024-07-15 17:20:55 +02:00
4lDO2 93f0573b5d Use improved signal control struct defs. 2024-07-15 17:20:55 +02:00
4lDO2 d6e0eef065 Implement signal delivery code (untested). 2024-07-15 17:20:55 +02:00
4lDO2 9b68d4de80 Fix add_ref(Shared) refcounting bug. 2024-07-15 17:20:55 +02:00
4lDO2 7d5b2e6c21 Prevent infinite userspace crash loops. 2024-07-15 17:20:55 +02:00
4lDO2 55fe58adf6 WIP: implement kill syscall prototype 2024-07-15 17:20:55 +02:00
4lDO2 639ba74a7e Fix kernel compilation. 2024-07-15 17:20:55 +02:00
4lDO2 295cc820e6 WIP: userspace signal handling 2024-07-15 17:20:55 +02:00
Andrey Turkin 198151a355 Make sure aarch64 kernel doesn't use any FP registers 2024-07-13 12:06:50 +00:00
Andrey Turkin 9c639af217 Fix debug assertion bug 2024-07-12 23:15:33 +03:00
Jacob Lorentzon bf0fc66ac1 Improved scheme protocol. 2024-06-14 11:31:51 +00:00
Jeremy Soller 81e6fc70d2 Enable use of MmapMode::Cow 2024-06-05 12:56:29 -06:00
4lDO2 161a92c9c2 Forbid strong fdtbl refs after setting context's.
This fixes a possible file table leak if a filetable contains an fd
referring (strongly) to the filetable itself. Now, it will automatically
be downgraded to a weak reference after it becomes a context's active
file table.

TODO: maybe support consuming a context's filetable to get a strong
reference back, provided it's exclusively owned.
2024-04-10 21:49:43 +02:00
Jeremy Soller 168692f09d x86: use initial_top for tss stack 2024-03-25 14:15:43 -06:00
4lDO2 c17279f5bf Allocate kernel stacks using the frame allocator. 2024-03-25 16:31:16 +01:00
4lDO2 b5523df187 Only support power-of-two frame allocations. 2024-03-24 14:40:15 +01:00
4lDO2 12282439b6 Reduce dead code, fix aarch64. 2024-03-23 23:51:12 +01:00
4lDO2 e6dc0e96f0 Fix aarch64. 2024-03-23 19:16:53 +01:00
4lDO2 7261dccb72 Fix i686. 2024-03-23 16:54:47 +01:00
4lDO2 d2dc3302a7 Remove RefCount::Zero.
Only the allocator is allowed to switch between 0 and 1. Refcounts above
1 are however controlled by the virtual memory system.
2024-03-22 13:31:22 +01:00
4lDO2 2ba9ff720c Doubly-linked list. 2024-03-22 13:25:07 +01:00
4lDO2 d5b1ad2cd5 WIP: Improve allocation performance 2024-03-22 13:17:59 +01:00
4lDO2 66eb3361d3 Use saved regs instead of costly context.syscall. 2024-03-19 11:33:55 +01:00
4lDO2 4862977fa5 Optimize syscall fast path without tracing. 2024-03-18 20:38:11 +01:00
4lDO2 d62aada7ad Replace iopl with either empty or full PIO bitmap. 2024-03-18 10:27:51 +01:00
4lDO2 4a3dc2dadd Fix the SIGKILL fd leak bug. 2024-03-16 17:49:32 +01:00
4lDO2 8e19da338b Fix kstop and kreset. 2024-03-16 17:49:31 +01:00
4lDO2 b97e733d94 Boot to desktop on aarch64. 2024-03-16 17:49:31 +01:00
4lDO2 57c3119a83 Fix i686 triple fault by always initializing int stack. 2024-03-16 17:49:31 +01:00
4lDO2 5ecba176f4 Compile on aarch64. 2024-03-16 17:49:31 +01:00
4lDO2 776a140212 Fix rax being overwritten, and compile on i686. 2024-03-16 17:49:31 +01:00
4lDO2 239bd317e9 Fix signal ordering wrt syscall return. 2024-03-16 17:49:31 +01:00
4lDO2 e57573c428 Ensure signals can't start new contexts too early. 2024-03-16 17:49:30 +01:00
4lDO2 e012d6cfca Fix altstack calculation typo. 2024-03-16 17:49:30 +01:00
4lDO2 6d1e436d29 Remove some dead code. 2024-03-16 17:49:30 +01:00
4lDO2 6bf8238fb1 Unset procmask for kmain. 2024-03-16 17:49:30 +01:00
4lDO2 5ac0be7ec1 Start with full procmask, fix signal delivery. 2024-03-16 17:49:30 +01:00
4lDO2 5336cbd9e5 Improve signal interfaces and implementation. 2024-03-16 17:49:30 +01:00
bjorn3 b5f94a5a2e Fix bug in the unmapping code
Previously trying to funmap an address after the start of the grant
would result in an overflow only caught when compiling the kernel with
debug assertions enabled.
2024-03-14 12:15:43 +01:00
4lDO2 ec58d6c541 Compile on aarch64 as well. 2024-03-05 10:40:54 +01:00
4lDO2 d38d8b66bd Fix i686 compilation. 2024-03-05 10:26:57 +01:00
4lDO2 b35c9d1e62 Properly free phys-contiguous grants, TLB-delayed. 2024-03-04 19:03:01 +01:00
4lDO2 4e392d05e4 Delay cow() dealloc until after TLB shootdown. 2024-03-04 19:03:01 +01:00
4lDO2 fa3e2a24d4 Optimize TLB flushing. 2024-03-04 19:03:01 +01:00