Page 1 of 1

2.6.39.4 build failure on i386

PostPosted: Sat Aug 13, 2011 4:23 pm
by linkfanel
With grsecurity-2.2.2-2.6.39.4-201108071438 I get the following on i386:

CC arch/x86/kernel/asm-offsets.s
In file included from include/linux/fs.h:393:0,
from include/linux/module.h:19,
from include/linux/crypto.h:21,
from arch/x86/kernel/asm-offsets.c:8:
include/linux/semaphore.h: In function ‘sema_init’:
include/linux/semaphore.h:35:17: error: assignment of read-only location ‘*sem’
In file included from /usr/src/linux-2.6.39.4/arch/x86/include/asm/uaccess.h:11:0,
from include/linux/uaccess.h:5,
from include/linux/crypto.h:26,
from arch/x86/kernel/asm-offsets.c:8:
include/linux/sched.h: In function ‘thread_group_cputime_init’:
include/linux/sched.h:2579:2: error: assignment of member ‘rlock’ in read-only object
make[3]: *** [arch/x86/kernel/asm-offsets.s] Erreur 1

Also, when cross-compiling from amd64 to i386, I get:

CC kernel/bounds.s
kernel/bounds.c:1:0: error: CPU you selected does not support x86-64 instruction set
kernel/bounds.c:1:0: warning: -mregparm is ignored in 64-bit mode
make[3]: *** [kernel/bounds.s] Erreur 1

Re: 2.6.39.4 build failure on i386

PostPosted: Sat Aug 13, 2011 6:05 pm
by HellFire
I've been meaning to post about this too. Several drivers also fail to compile with similar errors.

Code: Select all
drivers/staging/hv/hv_mouse.c: In function 'reportdesc_callback':
drivers/staging/hv/hv_mouse.c:901:3: error: assignment of read-only location '*hid_dev->ll_driver'
drivers/staging/hv/hv_mouse.c:902:3: error: assignment of read-only location '*hid_dev->ll_driver'

Re: 2.6.39.4 build failure on i386

PostPosted: Sat Aug 13, 2011 7:32 pm
by spender
Enable SMP for now as a workaround.

-Brad

Re: 2.6.39.4 build failure on i386

PostPosted: Sat Aug 13, 2011 7:35 pm
by HellFire
Already is enabled for me. Full error log: http://kpaste.net/8a9?raw

Re: 2.6.39.4 build failure on i386

PostPosted: Sat Aug 13, 2011 8:05 pm
by spender
Your case is different than that of the OP. Some patches will have to be created for those drivers. If you don't need them, they can be disabled. I'll try to come up with a patch soon for it however.

-Brad

Re: 2.6.39.4 build failure on i386

PostPosted: Sat Aug 13, 2011 8:56 pm
by spender
The test patch I just uploaded should resolve the staging driver compilation errors. Let me know if any of the errors persist.

-Brad

Re: 2.6.39.4 build failure on i386

PostPosted: Tue Aug 16, 2011 11:49 am
by HellFire
Yeah that fixes it. Thanks.