]> 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)
commitfa797e62a7bf9736bab28a8d57045e79d8db72d4
tree994cdb43aaa3c3297236bc5de8b139f287977a62
parent2fb05fa6b91622963af94540034279b62381d5ce
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