]> 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]>
Mon, 25 May 2026 18:46:19 +0000 (15:46 -0300)
commit663410bb326af2baad704963ea7e98994b4344cf
tree77a367a680df4d17726a89bccffd7ae14e0acf49
parent742f3e4c57f51dd5b5753d400bdb17cadc8c6fc3
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