freebsd man page for kernacc

Query: kernacc

OS: freebsd

Section: 9

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

KERNACC(9)						   BSD Kernel Developer's Manual						KERNACC(9)

NAME
kernacc, useracc -- check memory regions for accessibility
SYNOPSIS
#include <sys/param.h> #include <sys/proc.h> #include <vm/vm.h> #include <vm/vm_extern.h> int kernacc(void *addr, int len, int rw); int useracc(void *addr, int len, int rw);
DESCRIPTION
The kernacc() and useracc() functions check whether operations of the type specified in rw are permitted in the range of virtual addresses given by addr and len. The possible values of rw are any bitwise combination of VM_PROT_READ, VM_PROT_WRITE and VM_PROT_EXECUTE. kernacc() checks addresses in the kernel address space, while useracc() considers addr to represent an user space address. The process context to use for this operation is taken from the global variable curproc.
RETURN VALUES
Both functions return boolean true if the type of access specified by rw is permitted. Otherwise boolean false is returned.
BUGS
The process pointer should be passed in as an argument to useracc().
BSD
June 16, 1996 BSD
Related Man Pages
mprotect(2) - opensolaris
vslock(9) - debian
vsunlock(9) - debian
mprotect(2) - sunos
vslock(9) - osx
Similar Topics in the Unix Linux Community
FreeBSD Kernel Internals, Dr. Marshall Kirk McKusick
A simple UNIXtime component in Vue.js
Reason for no directory creation date
Valid separator in time and date format
UNIX Environment Setup - (Just starting!)