MCPcopy Create free account
hub / github.com/asterinas/vostd / check_vaddr

Function check_vaddr

kernel/src/context.rs:319–328  ·  view source on GitHub ↗

Checks if the user space pointer is below the lowest userspace address. If a pointer is below the lowest userspace address, it is likely to be a NULL pointer. Reading from or writing to a NULL pointer should trigger a segmentation fault. If it is not checked here, a kernel page fault will happen and we would deny the access in the page fault handler either. It may save a page fault in some occas

(va: Vaddr)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 5

read_bytesMethod · 0.85
read_valMethod · 0.85
write_bytesMethod · 0.85
write_valMethod · 0.85
read_cstringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected