Two gates for a user buffer

This figure documents the historical i386 source baseline. Current native x86-64/AArch64 qualification is recorded separately; this is not an ELF64 or native SMP implementation diagram.

Two gates for a user buffer A syscall buffer must pass the non-null, overflow and user-range checks, then the current task page-table permission walk. A failed check returns an error. Direct ring-3 access to supervisor-only or unmapped pages faults in hardware independently of those software checks. call->range range->walk yes range->reject no walk->use yes walk->reject no call Ring-3 syscall with address + length range Non-null, no wrap, inside user virtual range? walk Current page tables: present + user + writable if needed? use Kernel follows validated buffer reject Return syscall error hardware Direct ring-3 access to supervisor or unmapped pages → CPU page fault
Two gates for a user buffer A syscall buffer must pass the non-null, overflow and user-range checks, then the current task page-table permission walk. A failed check returns an error. Direct ring-3 access to supervisor-only or unmapped pages faults in hardware independently of those software checks. call->range range->walk yes range->reject no walk->use yes walk->reject no call Ring-3 syscall with address + length range Non-null, no wrap, inside user virtual range? walk Current page tables: present + user + writable if needed? use Kernel follows validated buffer reject Return syscall error hardware Direct ring-3 access to supervisor or unmapped pages → CPU page fault

Software buffer validation complements, rather than replaces, hardware page isolation.

Text equivalent and source references
  • A syscall buffer must pass the non-null, overflow and user-range checks, then the current task page-table permission walk.
  • A failed check returns an error. Direct ring-3 access to supervisor-only or unmapped pages faults in hardware independently of those software checks.

Decision flow. Source paths refer to the atlas baseline; the kernel checkout is private.

  • include/memory.h · is_user_ptr
  • kernel/core/memory.c · vmm_user_range_ok
  • kernel/core/syscall.c · syscall_handler