Q: s390/s390x SIGSEGV SEGV_MAPERR reporting
Mike Frysinger
vapier at gentoo.org
Sat Feb 28 19:38:45 UTC 2015
On 28 Feb 2015 18:40, Dmitry V. Levin wrote:
> On Fri, Feb 27, 2015 at 01:06:22AM -0500, Mike Frysinger wrote:
> > vFAIL: test; s390/32-bit/MSB linux-3.18.1 kernel-headers-3.16.0 glibc-2.19 gcc-4.8.3
> > FAIL: pc.test
> > 00400000-00401000 r-xp 00000000 5e:05 17513 /home/vapier/strace/tests/pc
> > 00401000-00402000 r--p 00000000 5e:05 17513 /home/vapier/strace/tests/pc
> > [pid 24037] [fd4eaa6e] munmap(0x400000, 8192) = 0
> > [pid 24037] [80400702] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x400000} ---
>
> > vFAIL: test; s390x/64-bit/MSB linux-3.18.1 kernel-headers-3.16.0 glibc-2.19 gcc-4.8.3
> > 80000000-80001000 r-xp 00000000 5e:05 28901 /home/vapier/strace/tests/pc
> > 80001000-80002000 r--p 00000000 5e:05 28901 /home/vapier/strace/tests/pc
> > [pid 17223] [000003fffd1cf31a] munmap(0x80000000, 8192) = 0
> > [pid 17223] [00000000800008f4] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x80000000} ---
>
> On all other architectures we tested si_addr matches instruction pointer.
> Could it be an s390/s390x kernel bug in SIGSEGV SEGV_MAPERR reporting?
that does look like the case. this change to the kernel lets the test pass:
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -282,7 +282,7 @@
report_user_fault(regs, SIGSEGV);
si.si_signo = SIGSEGV;
si.si_code = si_code;
- si.si_addr = (void __user *)(regs->int_parm_long & __FAIL_ADDR_MASK);
+ si.si_addr = (void __user *)regs->psw.addr;
force_sig_info(SIGSEGV, &si, current);
}
i'll contact upstream on the topic.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150228/1d5f0ecd/attachment.bin>
More information about the Strace-devel
mailing list