tail head cat sleep
QR code linking to this page

Manual Pages  — KERNACC

NAME

kernacc, useracc – check memory regions for accessibility

CONTENTS

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().

KERNACC (9) June 16, 1996

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

Our grievance is not just against Unix itself, but against the cult of Unix zealots who defend and nurture it. They take the heat, disease, and pestilence as givens, and, as ancient shamans did, display their wounds, some self-inflicted, as proof of their power and wizardry. We aim, through bluntness and humor, to show them that they pray to a tin god, and that science, not religion, is the path to useful and friendly technology.
— The Unix Haters' handbook