issue with 3.2.60 and P4/old xeon arch

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

issue with 3.2.60 and P4/old xeon arch

Postby klimo » Fri Jun 13, 2014 1:38 am

Hi,

there is a bug in latest 3.2 grsec patch. It won't compile kernel with this error:
CC fs/aio.o
fs/aio.c: Assembler messages:
fs/aio.c:1718: Error: operand type mismatch for `add'
make[1]: *** [fs/aio.o] Error 1
make: *** [fs] Error 2

This error appears with P4/Old xeon processor archtecture selected. Selecting new xeon and kernel compiles with same config without error.

gcc version 4.7.3 (Gentoo Hardened 4.7.3-r1 p1.3, pie-0.5.5)

I first noticed this compile error in hardened-sources-3.2.59-r5
klimo
 
Posts: 2
Joined: Fri Jun 13, 2014 1:24 am

Re: issue with 3.2.60 and P4/old xeon arch

Postby PaX Team » Fri Jun 13, 2014 6:18 am

can you post aio.i and aio.s produced by make fs/aio.i ; make fs/aio.s?
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: issue with 3.2.60 and P4/old xeon arch

Postby klimo » Sat Jun 14, 2014 7:49 am

both requested files can be found in archive located at https://www.klimo.sk/~klimo/grsec.tgz
klimo
 
Posts: 2
Joined: Fri Jun 13, 2014 1:24 am

Re: issue with 3.2.60 and P4/old xeon arch

Postby PaX Team » Sat Jun 14, 2014 9:49 am

thanks, it's actually a bug in vanilla linux too (wrong asm constraint somewhere) that triggers in PaX and with march=nocona for some reason. i'll fix it in the next patch, you can apply this in the meantime:
Code: Select all
--- linux-3.2.60-pax/arch/x86/include/asm/uaccess.h     2014-06-02 19:01:44.774236502 +0200
+++ linux-3.2.60-pax/arch/x86/include/asm/uaccess.h     2014-06-14 15:40:54.028938748 +0200
@@ -58,7 +58,7 @@
        __chk_user_ptr(addr);                                           \
        asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0"             \
            : "=&r" (flag), "=r" (roksum)                               \
-           : "1" (addr), "g" ((long)(size)),                           \
+           : "1" (addr), "rm" ((long)(size)),                          \
              "rm" (current_thread_info()->addr_limit.seg));            \
        flag;                                                           \
 })
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm


Return to grsecurity support