[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[bug-libsigsegv] Re: sigsegv on s390 only giving start address of page in segv handler



On Tue, 15 Mar 2011 01:28:06 +0100
Bruno Haible <bruno at clisp.org> wrote:

> Christian Borntraeger wrote:
> > I even think that this cannot be fully solved by looking at the instruction, 
> > e.g. you cannot tell which access triggered the fault for instruction with
> > two memory accesses (mvc) in the same page.
> 
> Sure you can. If it's a "read" fault (i.e. the page has no readable mapping),
> you can claim the source address operand is the fault address. Otherwise,
> i.e. if it's a "write" fault, the destination address operand is the fault
> address.

Even with the access-exception-fetch/store-indication facility you'll find
on the latest machine it is not possible to distinguish read from write
faults in all cases (if bits 52 & 53 in the translation exception identifier
are zero you don't know). On older machines the TEID does not carry an
indication if the page translation exception has been for a read or a
write. You could look at the two addresses of the mvc, if the address on
the sigsegv unambiguously points to one of the two memory areas you
can deduce if it has been a read or a write. But there are cases where
you still don't know.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.




Reply to: