GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


     kernacc, useracc — check memory regions for accessibility


     #include <sys/param.h>
     #include <sys/proc.h>
     #include <vm/vm.h>
     #include <vm/vm_extern.h>

     kernacc(void *addr, int len, int rw);

     useracc(void *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
     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.


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

  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to
Page load time: 0.100 seconds. Last modified: November 04 2018 12:49:43.