RE: [Linux-ia64] determining read or write on a page fault

From: Hoeflinger, Jay P <>
Date: 2002-04-04 02:18:45
We want to report success using the 2.4.18 kernel and the 
info sent to the segv handler on a page fault for our distributed
virtual shared memory system on IA64.  Thanks for your help.  We had
to make one assumption, though, that wasn't covered in your mail

The assumption was that if si_code==0, that the access was a "read".
We had originally assumed it was a "write", but this caused some errors.
When we changed to assuming "read", things worked.  Is this assumption
valid?  When does this case occur?  Our scan of the kernel source seemed
to indicate that this case can't happen.


Jay Hoeflinger and Naveen Neelakantam

-----Original Message-----
From: David Mosberger []
Sent: Friday, February 22, 2002 7:25 PM
To: Hoeflinger, Jay P
Subject: RE: [Linux-ia64] determining read or write on a page fault

If you want to try with a new kernel, the attached patch should give
you what you want.  Specifically, if you get a SIGSEGV or a SIGBUS and
si_code is non-zero, you can check si_flags.  If it has the
__ISR_VALID flag set, then the code in si_isr is valid.  If si_isr is
valid, you can check whether bit 34 (read exception) or bit 35
(non-access exception) is set.  If so, you may assume that the signal
was due to a load (or lfetch or some such).  In all other cases, you'd
have to play it safe and assume that you're dealing with a write


< patch deleted >
Received on Wed Apr 03 08:19:04 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:07 EST