Q: s390/s390x SIGSEGV SEGV_MAPERR reporting

Mike Frysinger vapier at gentoo.org
Sat Feb 28 21:27:21 UTC 2015


On 28 Feb 2015 23:09, Dmitry V. Levin wrote:
> On Sat, Feb 28, 2015 at 02:38:45PM -0500, Mike Frysinger wrote:
> > 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);
> >  }
> 
> Thanks.  __FAIL_ADDR_MASK certainly shouldn't be applied in this case,
> passing unmodified regs->int_parm_long will fix s390x.  Not sure about
> replacing int_parm_long with psw.addr -- it would surely make the test
> pass, but whether strace is correct in printing unmodified psw.addr as
> instruction pointer on s390?

yeah, i noticed the nuances between data & insn based crashes when putting 
together a test case.  posted here:
	https://marc.info/?l=linux-s390&m=142515870124248&w=2

i guess we just ignore the failure on s390/s390x and let upstream sort it out.
-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/ccf3c95e/attachment.bin>


More information about the Strace-devel mailing list