]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
refactor: move x86 uaccess page table walking to src/arch/x86/uaccess.c
authorTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 06:19:36 +0000 (03:19 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 06:19:36 +0000 (03:19 -0300)
commite7443cfc964d7f144e6efe1e780c2ee31160e299
tree4e860f0c89a5373a996ba92af703377e8fdf78a8
parent96a10e4840e08ffc9a4765d77b55e3254888398d
refactor: move x86 uaccess page table walking to src/arch/x86/uaccess.c

The uaccess implementation used x86-specific recursive page table
mapping (0xFFFFF000/0xFFC00000) for user_range_ok, copy_from_user,
copy_to_user, and uaccess_try_recover. This is 100% arch-dependent.

- Move full x86 implementation to src/arch/x86/uaccess.c (no guards)
- Replace src/kernel/uaccess.c with weak stubs (simple memcpy-based)
- The linker picks the arch-specific version when available

Passes: make, cppcheck, QEMU smoke test.
src/arch/x86/uaccess.c [new file with mode: 0644]
src/kernel/uaccess.c