Page 1 of 1

Compile error for x86 code

PostPosted: Sat May 24, 2008 12:59 pm
by specs
I ran into a problem with compiling 2.6.25.4-grsec-200805181334.
The compilation ends with:
AS arch/x86/kernel/head_32.o
CC arch/x86/kernel/init_task.o
LDS arch/x86/kernel/vmlinux.lds
CC [M] arch/x86/kernel/msr.o
CC [M] arch/x86/kernel/cpuid.o
CC arch/x86/mm/init_32.o
CC arch/x86/mm/pgtable_32.o
CC arch/x86/mm/fault.o
arch/x86/mm/fault.c: In function â:
arch/x86/mm/fault.c:421: warning: suggest explicit braces to avoid ambiguous â
arch/x86/mm/fault.c: In function â:
arch/x86/mm/fault.c:782: error: â has no member named â
make[1]: *** [arch/x86/mm/fault.o] Error 1
make: *** [arch/x86/mm] Error 2

When I look at the code the error seems located at the following code (line 782, I compile without SMP support):
Code: Select all
#ifdef CONFIG_SMP
        if (likely(address > get_limit(regs->cs) && cpu_isset(smp_processor_id()
, mm->context.cpu_user_cs_mask)))
#else
        if (likely(address > get_limit(regs->xcs)))
#endif

Changing the xcs to cs produces compiling code.
I build the 32-bit code on a 64-bit Athlon using the ARCH=i386 environment setting.

The "stable" grsec-patch compiles without a hitch (2.6.24.7-grsec-200805121951)
In 2.6.24.7 it says in ./arch/x86/mm/fault_32.c
Code: Select all
#ifdef CONFIG_SMP
        if (likely(address > get_limit(regs->xcs) && cpu_isset(smp_processor_id(
), mm->context.cpu_user_cs_mask)))
#else
        if (likely(address > get_limit(regs->xcs)))
#endif

Re: Compile error for x86 code

PostPosted: Sat May 24, 2008 1:13 pm
by specs
This code has been changed in the latest pax testpatch.