lkml.org 
[lkml]   [1997]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: veryfiing a memory address
On Sat, 4 Jan 1997, Peter J. Braam wrote:

> 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
>

Intel has VERR and VERW which will verify a segment for reading or writing.
Page 26-278 of the Intel rag, ISBN 1-55512-159-4.

Cheers,
Dick Johnson
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Project Engineer
Analogic Corporation
Voice : (508) 977-3000 ext. 3754
Fax : (508) 532-6097
Modem : (508) 977-6870
Ftp : ftp@boneserver.analogic.com
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.20 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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