grsecurity-2.9.1-3.2.42-201303292017 compile issue

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

grsecurity-2.9.1-3.2.42-201303292017 compile issue

Postby SysA » Tue Apr 02, 2013 1:34 pm

I'm compiling recent kernel v3.2.42 with the latest grsecurity-2.9.1-3.2.42-201303292017.patch in Debian GNU/Linux 6.0.7 (squeeze) environment (gcc (Debian 4.4.5-8) 4.4.5) and have got the following errors:

exec make kpkg_version=12.036+nmu1 -f /usr/share/kernel-package/ruleset/minimal.mk debian APPEND_TO_VERSION=-g3 INITRD=YES
exec debian/rules APPEND_TO_VERSION=-g3 INITRD=YES kernel_image
scripts/selinux/genheaders/genheaders.c: In function 'main':
scripts/selinux/genheaders/genheaders.c:78: warning: comparison between signed and unsigned integer expressions
scripts/selinux/genheaders/genheaders.c:88: warning: comparison between signed and unsigned integer expressions
scripts/selinux/genheaders/genheaders.c:129: warning: comparison between signed and unsigned integer expressions
scripts/mod/file2alias.c: In function 'do_vmbus_entry':
scripts/mod/file2alias.c:750: warning: comparison between signed and unsigned integer expressions
kernel/sched.c:1887: warning: 'update_idle_cpu_load' declared 'static' but never defined
In file included from /usr/src/linux-3.2.42/arch/x86/include/asm/uaccess.h:634,
from include/linux/uaccess.h:5,
from /usr/src/linux-3.2.42/arch/x86/include/asm/stacktrace.h:9,
from /usr/src/linux-3.2.42/arch/x86/include/asm/perf_event.h:181,
from include/linux/perf_event.h:488,
from kernel/sys.c:16:
In function 'copy_to_user',
inlined from 'override_release' at kernel/sys.c:1231:
/usr/src/linux-3.2.42/arch/x86/include/asm/uaccess_64.h:170: warning: call to 'copy_to_user_overflow' declared with attribute warning: copy_to_user() buffer size is not provably correct
In file included from /usr/src/linux-3.2.42/arch/x86/include/asm/uaccess.h:634,
from include/linux/uaccess.h:5,
from include/linux/regset.h:18,
from arch/x86/kernel/tls.c:5:
/usr/src/linux-3.2.42/arch/x86/include/asm/uaccess_64.h: In function 'regset_tls_set':
/usr/src/linux-3.2.42/arch/x86/include/asm/uaccess_64.h:109: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
drivers/idle/intel_idle.c: In function 'intel_idle_cpuidle_devices_init':
drivers/idle/intel_idle.c:554: warning: cast to pointer from integer of different size
net/ipv4/route.c:3450: error: __setup_str_set_rhash_entries causes a section type conflict
make[3]: *** [net/ipv4/route.o] Error 1
make[2]: *** [net/ipv4] Error 2
make[2]: *** Waiting for unfinished jobs....
net/core/dev.c:599: error: __setup_str_netdev_boot_setup causes a section type conflict
make[3]: *** [net/core/dev.o] Error 1
make[2]: *** [net/core] Error 2
make[1]: *** [net] Error 2
make[1]: *** Waiting for unfinished jobs....
drivers/scsi/mpt2sas/mpt2sas_scsih.c: In function '_scsih_sas_broadcast_primative_event':
drivers/scsi/mpt2sas/mpt2sas_scsih.c:5729: warning: unused variable 'event_data'
In file included from /usr/src/linux-3.2.42/arch/x86/include/asm/uaccess.h:634,
from include/linux/poll.h:14,
from drivers/scsi/sg.c:44:
/usr/src/linux-3.2.42/arch/x86/include/asm/uaccess_64.h: In function 'sg_write':
/usr/src/linux-3.2.42/arch/x86/include/asm/uaccess_64.h:109: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'sg_proc_write_dressz' at drivers/scsi/sg.c:2401:
/usr/src/linux-3.2.42/arch/x86/include/asm/uaccess_64.h:109: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
In function 'copy_from_user',
inlined from 'sg_proc_write_adio' at drivers/scsi/sg.c:2378:
/usr/src/linux-3.2.42/arch/x86/include/asm/uaccess_64.h:109: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct
make: *** [debian/stamp/build/kernel] Error 2
SysA
 
Posts: 2
Joined: Tue Apr 02, 2013 1:11 pm

Re: grsecurity-2.9.1-3.2.42-201303292017 compile issue

Postby spender » Tue Apr 02, 2013 8:29 pm

Hi,

Thanks for the report. This has been fixed in the latest patches. If possible, you should also use a newer gcc to be able to benefit from a number of PaX features that use gcc plugins.

-Brad
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm

Re: grsecurity-2.9.1-3.2.42-201303292017 compile issue

Postby SysA » Wed Apr 03, 2013 6:51 am

Thank you!

It is working now.
As regarding newer gcc - I did it yesterday moving build server to gcc4.7@wheezy.

Regards!
SysA
 
Posts: 2
Joined: Tue Apr 02, 2013 1:11 pm


Return to grsecurity support