Commit Graph

1339 Commits

Author SHA1 Message Date
4lDO2 b94904a660 Use correct addrsp when setting sighandler. 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
Andrey Turkin 2663873d45 Fix Dtb scheme reads 2024-07-09 09:52:16 +03:00
Jeremy Soller 15c7e10d52 Implement kreadoff for dtb scheme 2024-06-24 11:57:20 -06:00
4lDO2 d4997150d8 Temporarily suppress some cases of EINVAL for unknown SKMSGs. 2024-06-15 15:12:04 +02:00
4lDO2 6aa5ed020e Add missing fevent impl for RootScheme. 2024-06-15 12:29:05 +02:00
4lDO2 10714a4659 Make explicit flags optional for SYS_{READ,WRITE}2. 2024-06-14 13:58:10 +02:00
4lDO2 dd8661bcb3 Add debug print for SYS_READ2/SYS_WRITE2. 2024-06-14 13:57:56 +02: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
Jeremy Soller e7d00a8e05 Add driver for arm,gic-v3 2024-05-08 11:24:46 -06:00
Jeremy Soller 9e3688b507 Revert "Support arm,gic-v3"
This reverts commit e33015a5f8.
2024-05-07 15:24:50 -06:00
Jeremy Soller e33015a5f8 Support arm,gic-v3 2024-05-07 15:20:34 -06:00
4lDO2 7f409d46bf Fix futex wakeup when CoW has occurred. 2024-04-28 15:17:32 +02:00
Jeremy Soller 3ad6427e28 Disable AP if it has the same ID as BSP 2024-04-13 10:01:36 -06:00
Jeremy Soller 5b5b2dbc97 Debug messages during device init 2024-04-13 09:34:00 -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 e4246d6704 Re-enable sys:log 2024-04-10 10:38:46 -06:00
4lDO2 3fc9103826 Fix altreloc remap, always NOP-fill padding bytes.
This fixes a very rare (requires that an altreloc span two pages) kernel
crash where it writes past the region that was remapped as RWX, thus
triggering an in-kernel "wrote without write access" page fault.

Additionally, this fixes the logic for unavailable features. It fixes
the short-circuit that would forget to remap the memory back from RWX to
R-X. NOP bytes are also now replaced with multi-byte NOP regardless of
whether the CPU supports the given feature.
2024-04-10 16:16:37 +02:00
Jacob Lorentzon cd3f937861 Make futex timeout absolute, and properly return ETIMEDOUT 2024-04-05 20:31:03 +00:00
4lDO2 fbaa93e8fa Fix profiling stack trace bp bounds checking. 2024-04-04 15:45:47 +02:00
4lDO2 68e072aac9 Return correct fevent flags in PipeScheme.
This fixes a Cargo deadlock.
2024-04-02 15:04:39 +02:00
4lDO2 ed075474b0 Fix syscall_debug feature. 2024-03-31 14:40:57 +02:00
4lDO2 2f1551a6bb Mark allocated p2frame used *before* freelist unlock. 2024-03-26 17:07:37 +01: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 9253e16240 Fix kernel stack sizes, other arches. 2024-03-25 16:29:07 +01:00
4lDO2 b5523df187 Only support power-of-two frame allocations. 2024-03-24 14:40:15 +01:00
4lDO2 b2d52d6736 Implement allocator free/used bookkeeping. 2024-03-24 14:27:25 +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 1b3e024f7d Fix profiling code. 2024-03-23 15:52:18 +01:00
4lDO2 299a829ff3 Remove debug code. 2024-03-22 17:21:17 +01:00
4lDO2 676368f5d2 Fix booting to desktop. 2024-03-22 16:35:29 +01:00
4lDO2 c0f3b6ccca Fix refcount assert 2024-03-22 13:32:14 +01:00
4lDO2 660acb4d94 Improve debugging 2024-03-22 13:32:14 +01:00
4lDO2 343f89f240 Fix unaligned section end append_pages. 2024-03-22 13:32:14 +01:00
4lDO2 baf46a3555 Far more progress 2024-03-22 13:32:13 +01:00
4lDO2 f4d270c7ce Ensure freelist does not contain used pages. 2024-03-22 13:31:24 +01:00