Re: linux-next: x86: Unalbe to run x32 processes on the x86_64 kernel

From: Adam Borowski
Date: Mon Mar 20 2017 - 22:54:59 EST


On Mon, Mar 20, 2017 at 04:57:39PM -0700, Andrei Vagin wrote:
> We run CRIU tests on linux-next. And today we found that when we start
> x32 processes, a kernel bug is triggered:
>
> [root@fc24 ~]# uname -a
> Linux fc24 4.11.0-rc2-next-20170320 #159 SMP Mon Mar 20 16:53:58 PDT
> 2017 x86_64 x86_64 x86_64 GNU/Linux
> [root@fc24 ~]# cat t.c
> int main()
> {
> return 0;
> }
> [root@fc24 ~]# gcc -m32 t.c

-m32 is i386, for x32 you need -mx32.

> [root@fc24 ~]# ./a.out
> Killed
> [root@fc24 ~]# dmesg
> [ 90.033310] BUG: unable to handle kernel paging request at ffffffffff576060

Indeed, same for me for i386.
On x32 the process gets killed with SEGV with no core, no kernel output.

On the other hand, a bare glibc-less process (write(), _exit()) works fine
both on i386 and x32.

I haven't looked any closer yet.

--
âââââââ Meow!
âââââââ
âââââââ Collisions shmolisions, let's see them find a collision or second
âââââââ preimage for double rot13!