]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
security: Round 4.4-4.5 futex per-process keying (K17) and dlopen per-process (K22)
authorTulio A M Mendes <[email protected]>
Mon, 25 May 2026 18:46:19 +0000 (15:46 -0300)
committerTulio A M Mendes <[email protected]>
Wed, 3 Jun 2026 04:02:35 +0000 (01:02 -0300)
commit23b48a5b425876fa477b7c82d11d2c0935b19273
treec12f3ed9f5a4ed30602f2bf23f88262acb98eb98
parent91eda622d6a25b6f26159c84f3266d055ec5ace1
security: Round 4.4-4.5 futex per-process keying (K17) and dlopen per-process (K22)

K17: Futex keyed by (addr_space, uaddr)
- Added addr_space field to futex_waiters struct
- FUTEX_WAIT now stores current_process->addr_space
- FUTEX_WAKE matches by (addr, addr_space) to prevent cross-process interference
- Cleanup on process exit clears addr_space field

K22: dlopen handles per-process
- Added dl_handles array to struct process (PROCESS_MAX_DLOPEN=4)
- Each handle stores: active, path, base, nsyms, and 64 symbols
- Removed global dl_table and dl_lock
- dlopen/dlsym/dlclose now use current_process->dl_handles
- Cleanup on SYSCALL_EXIT clears all dl_handles

Tests: 119/119 PASS (smoke test, SMP=4)
include/process.h
src/kernel/syscall.c