Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1504184
| From | Dmitry Safonov <0x7f454c46@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" |
| Date | 2016-10-19 19:50 +0200 |
| Message-ID | <su3a2-4te-41@gated-at.bofh.it> (permalink) |
| References | <su2GZ-4ip-7@gated-at.bofh.it> <su30m-4pj-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2016-10-19 20:33 GMT+03:00 Mikulas Patocka <mpatocka@redhat.com>:
>
>
> On Wed, 19 Oct 2016, Mikulas Patocka wrote:
>
>> Hi
>>
>> In the kernel 4.9-rc1, the x32 support is seriously broken, a x32 process
>> is killed with SIGKILL after returning from any signal handler.
>
> I should have said they are killed with SIGSEGV, not SIGKILL.
>
>> I use Debian sid x64-64 distribution with x32 architecture added from
>> debian-ports.
>>
>> I bisected the bug and found out that it is caused by the patch
>> 6846351052e685c2d1428e80ead2d7ca3d7ed913 ("x86/signal: Add
>> SA_{X32,IA32}_ABI sa_flags").
>>
>> example (strace of a process after receiving the SIGWINCH signal):
>>
>> epoll_wait(10, 0xef6890, 32, -1) = -1 EINTR (Interrupted system call)
>> --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_USER, si_pid=1772, si_uid=0} ---
>> poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}])
>> write(4, "\0", 1) = 1
>> rt_sigreturn({mask=[INT QUIT ILL TRAP BUS KILL SEGV USR2 PIPE ALRM STKFLT TSTP TTOU URG XCPU XFSZ VTALRM IO PWR SYS RTMIN]}) = 0
>> --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=NULL} ---
>> +++ killed by SIGSEGV +++
>> Neoprávnìný pøístup do pamìti (SIGSEGV)
>>
>> Mikulas
>
> BTW. when I take core dump of the killed x32 process, it shows:
>
> ELF Header:
> Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
> Class: ELF32
> Data: 2's complement, little endian
> Version: 1 (current)
> OS/ABI: UNIX - System V
> ABI Version: 0
> Type: CORE (Core file)
> Machine: Intel 80386
> ^^^^^^^^^^^^^^^^^^^
>
> So, the kernel somehow thinks that it is i386 process, not x32 process. A
> core dump of a real x32 process shows "Class: ELF32, Machine: Advanced
> Micro Devices X86-64".
Thanks for catching, will check it today.
--
Dmitry
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" Mikulas Patocka <mpatocka@redhat.com> - 2016-10-19 19:20 +0200
Re: x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" Mikulas Patocka <mpatocka@redhat.com> - 2016-10-19 19:40 +0200
Re: x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" Dmitry Safonov <0x7f454c46@gmail.com> - 2016-10-19 19:50 +0200
Re: x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" Dmitry Safonov <0x7f454c46@gmail.com> - 2016-10-20 00:10 +0200
Re: x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" Adam Borowski <kilobyte@angband.pl> - 2016-10-20 05:20 +0200
Re: x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" Thomas Gleixner <tglx@linutronix.de> - 2016-10-20 11:30 +0200
Re: x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" Dmitry Safonov <0x7f454c46@gmail.com> - 2016-10-20 13:10 +0200
[tip:x86/urgent] x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi() tip-bot for Dmitry Safonov <tipbot@zytor.com> - 2016-10-20 11:30 +0200
Re: x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" Mikulas Patocka <mpatocka@redhat.com> - 2016-10-20 17:30 +0200
[tip:x86/urgent] x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi() tip-bot for Dmitry Safonov <tipbot@zytor.com> - 2016-10-21 08:00 +0200
csiph-web