grsecurity-2.1.14-2.6.31-200909112301 wont compile

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

grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby coderx » Sat Sep 12, 2009 3:40 am

LD vmlinux
ld: vmlinux: section .text lma 0x40001100 overlaps previous sections
ld: vmlinux: section `.text' can't be allocated in segment 0
ld: final link failed: Bad value
make[2]: *** [vmlinux] Error 1
make[1]: *** [deb-pkg] Error 2
make: *** [deb-pkg] Error 2
coderx
 
Posts: 37
Joined: Tue Mar 25, 2008 3:57 am

grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby adren » Sat Sep 12, 2009 5:32 am

here is another error on the latest available grsec patch :

[...]
CC arch/x86/kernel/paravirt.o
arch/x86/kernel/paravirt.c:410: error: expected expression before 'struct'
make[3]: *** [arch/x86/kernel/paravirt.o] Error 1
adren
 
Posts: 7
Joined: Sat Sep 12, 2009 5:21 am

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby PaX Team » Sat Sep 12, 2009 9:21 am

coderx wrote:LD vmlinux
ld: vmlinux: section .text lma 0x40001100 overlaps previous sections
ld: vmlinux: section `.text' can't be allocated in segment 0
can you post your .config and your ld version?
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby PaX Team » Sat Sep 12, 2009 9:22 am

adren wrote:arch/x86/kernel/paravirt.c:410: error: expected expression before 'struct'
thanks, will be fixed in the next patch.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby coderx » Sat Sep 12, 2009 9:51 am

PaX Team wrote:
coderx wrote:LD vmlinux
ld: vmlinux: section .text lma 0x40001100 overlaps previous sections
ld: vmlinux: section `.text' can't be allocated in segment 0
can you post your .config and your ld version?


root@ssh:/usr/src# ld --version
GNU ld (GNU Binutils for Debian) 2.18.0.20080103
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
root@ssh:/usr/src# cat /etc/issue
Debian GNU/Linux 5.0 \n \l

http://pastebin.ca/1563157
coderx
 
Posts: 37
Joined: Tue Mar 25, 2008 3:57 am

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby coderx » Sun Sep 13, 2009 1:49 am

its the same with grsecurity-2.1.14-2.6.31-200909121839
any idea ?
coderx
 
Posts: 37
Joined: Tue Mar 25, 2008 3:57 am

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby radegand » Wed Sep 16, 2009 12:03 pm

I seem to be affected by the same issue:
CC init/version.o
LD init/built-in.o
LD vmlinux
ld: vmlinux: section .text lma 0x40001140 overlaps previous sections
ld: vmlinux: section `.text' can't be allocated in segment 0
ld: final link failed: Bad value
make: *** [vmlinux] Error 1

That's an x86 box - I've successfully compiled the kernel on two amd64 boxes and it seems to be running fine so far. All systems in questions are running hardened gentoo with glibc-2.10.1
ld version below:
# ld --version
GNU ld (GNU Binutils for Debian) 2.18.0.20080103

Thanks
radegand
 
Posts: 19
Joined: Wed Aug 05, 2009 7:09 am

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby spender » Wed Sep 16, 2009 5:25 pm

Could you try the latest patch? Some changes were made to the linker script. If that still doesn't work, could you confirm for us that you can build a vanilla 2.6.31 kernel? It seems that the problem may be dependent upon the binutils version you're using, as I wasn't able to reproduce the problem here with binutils 2.18.50 or 2.19

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

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby radegand » Thu Sep 17, 2009 3:19 pm

Hi,
The latest patch did not work :(

It bailed out here:

CC arch/x86/kernel/pcspeaker.o
kernel/futex.c: In function 'exit_robust_list':
kernel/futex.c:2434: warning: 'next_pi' may be used uninitialized in this function
AS arch/x86/kernel/head_32.o
arch/x86/kernel/head_32.S: Assembler messages:
arch/x86/kernel/head_32.S:838: Error: local label `"6" (instance number 1 of a fb label)' is not defined
make[2]: *** [arch/x86/kernel/head_32.o] Error 1
make[1]: *** [arch/x86/kernel] Error 2
make: *** [arch/x86] Error 2

However - upgrading binutils to 2.19.1 did the trick and so far my x86 is running 2.6.31-grsec fine...thanks! :)
radegand
 
Posts: 19
Joined: Wed Aug 05, 2009 7:09 am

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby spender » Thu Sep 17, 2009 6:05 pm

I've fixed two compile errors with the patch and uploaded updated versions. Is there anyone still using binutils 2.18 that can confirm they're still unable to build a working kernel?

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

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby final_inode » Thu Sep 17, 2009 7:09 pm

Although with 2.19.1 it compiles,I'm getting a Kernel panic - not syncing: Out of memory and no killable processes...
on 2.6.31-grsec

I'm using the hardened profile "hardened/linux/x86/10.0"

sys-libs/glibc-2.9_p20081201-r2 hardened debug
dev-libs/klibc-1.5.12-r1 debug

Some toolchain info
zakaqere@ThunderFox ~ $ gcc-config -l && binutils-config -l
[1] i686-pc-linux-gnu-3.4.6
[2] i686-pc-linux-gnu-3.4.6-hardenednopie
[3] i686-pc-linux-gnu-3.4.6-hardenednopiessp
[4] i686-pc-linux-gnu-3.4.6-hardenednossp
[5] i686-pc-linux-gnu-3.4.6-vanilla
[6] i686-pc-linux-gnu-4.3.4 *
[7] i686-pc-linux-gnu-4.3.4-hardenednopie
[8] i686-pc-linux-gnu-4.3.4-vanilla
[1] i686-pc-linux-gnu-2.18 *
[2] i686-pc-linux-gnu-2.19.1
zakaqere@ThunderFox ~ $

[quote="spender"]I've fixed two compile errors with the patch and uploaded updated versions. Is there anyone still using binutils 2.18 that can confirm they're still unable to build a working kernel?

-Brad[/quote]
No, the 2.6.31-grsec still fails to build against ld version 2.18
---
bzImage + vmlinux + config http://www.sendspace.com/file/si27me
Last edited by final_inode on Tue Sep 22, 2009 12:42 am, edited 1 time in total.
final_inode
 
Posts: 1
Joined: Thu Sep 17, 2009 6:39 pm

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby ngsupb » Sat Sep 19, 2009 12:36 am

I have the same problem, can't compile.
the patch version grsecurity-2.1.14-2.6.31-200909171758.patch
binutils 2.18.50
kernel 2.6.31

here is the error:
CC init/version.o
LD init/built-in.o
LD vmlinux
ld: section .init.data [0000000001843860 -> 0000000001876c46] overlaps section .exit.text [0000000001841ee0 -> 0000000001843861]
make: *** [vmlinux] Error 1
ngsupb
 
Posts: 8
Joined: Wed Sep 09, 2009 6:34 am

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby spender » Sat Sep 19, 2009 1:23 am

Can you post your config?

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

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby ngsupb » Sat Sep 19, 2009 1:49 am

sure it is: http://vetala.org.ua/config

it is on 64 if it makes any difference.
ngsupb
 
Posts: 8
Joined: Wed Sep 09, 2009 6:34 am

Re: grsecurity-2.1.14-2.6.31-200909112301 wont compile

Postby PaX Team » Sat Sep 19, 2009 6:40 am

ngsupb wrote:sure it is: http://vetala.org.ua/config
2.19 linked this fine but that can be due to other reasons as well. in any case, could you stick a
Code: Select all
. = ALIGN(16);
just before the .init.data section in arch/x86/kernel/vmlinux.lds.S (similar to how .init.setup has one already) and see if it helps?
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Next

Return to grsecurity support

cron