DragonFly On-Line Manual Pages

Search: Section:  

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


kernacc, useracc -- check memory regions for accessibility


#include <sys/types.h> #include <vm/vm.h> #include <vm/vm_extern.h> int kernacc(c_caddr_t addr, int len, int rw); int useracc(c_caddr_t addr, int len, int rw);


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 combi- nation 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.


Both functions return boolean true if the type of access specified by rw is permitted. Otherwise boolean false is returned.


The process pointer should be passed in as an argument to useracc(). DragonFly 5.3 June 16, 1996 DragonFly 5.3

Search: Section: