On 02 Mar 2015 09:56, Christian Borntraeger wrote: > Am 28.02.2015 um 22:24 schrieb Mike Frysinger: > > when running strace tests, we noticed that si_addr appears to be wrong. the > > attached test shows the problem -- si_addr isn't set to the faulting address. > > > > i hacked arch/s390/mm/fault.c:do_sigsegv to load regs->psw.addr (sans mask), > > and it worked for insn based crashes. but obviously that doesn't work for > > data based ones. i'm not familiar with how regs->int_parm_long works though, > > so maybe it's supposed to be loaded indirectly. the use of __FAIL_ADDR_MASK > > blindly is most certainly incorrect ... > > > > whatever the fix, do_sigbus probably needs it too. > > The problem is that all faults on s390 give the address only on page > granularity (HW-wise) > e.g. if you use 0x123456 as fail address you get si_addr == 0x123000 can't you detect when the fault is data-vs-code access ? you could at least make the code fault exact. -mike
Attachment:
signature.asc
Description: Digital signature