lkml.org 
[lkml]   [1997]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectveryfiing a memory address
Happy new year!

Is there a way to verify if one can read/write an address in memory, other
than handling the segfault that would happen if it failed?

Under Mach one has a system call "vm_region" which returns such
information on a region.

We have "mprotect" which verifies, but also sets a flag. It would be great
if mprotect could be used as a checker without changing the flags on the
region.

For example we could do this by letting "mprot" change nothing but just
verify if the prot argument is negative.

Maybe something else is in place already?

- Peter -
braam@cs.cmu.edu


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.019 / U:1.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site