*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> kernacc (9)              
Title
Content
Arch
Section
 

KERNACC(9)

Contents


NAME    [Toc]    [Back]

     kernacc, useracc -- check memory regions for accessibility

SYNOPSIS    [Toc]    [Back]

     #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    [Toc]    [Back]

     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    [Toc]    [Back]

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

BUGS    [Toc]    [Back]

     The process pointer should be passed in as an argument to useracc().


FreeBSD 5.2.1			 June 16, 1996			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
eaccess FreeBSD check accessibility of a file
access FreeBSD check accessibility of a file
vm_map_check_protection FreeBSD check memory protection for a vm_map
mvalid Tru64 Check memory region for validity
mprotect HP-UX set or check protection of memory mapping
lockf Tru64 Lock and unlocks regions of open file descriptors
access HP-UX determine accessibility of a file
access Tru64 Determines the accessibility of a file
access IRIX determine accessibility of a file
vxinfo HP-UX print accessibility and usability of volumes
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service