Gentoo Archives: gentoo-hardened

From: Ned Ludd <solar@g.o>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] Problems compiling xen - please help...
Date: Thu, 02 Feb 2006 15:50:13
Message-Id: 1138895302.24052.25.camel@localhost
In Reply to: [gentoo-hardened] Problems compiling xen - please help... by Ed W
1 On Thu, 2006-02-02 at 15:03 +0000, Ed W wrote:
2 > I am trying to get Xen running under a hardened kernel. The machine is
3 > currently booted with "selinux=1 enforcing=0". I am having trouble
4 > compiling:
5 >
6 >
7 > gcc -DDEBUG -D_ACPI_ -DTEXTADDR=0x000D0000 -I. -I../../../tools/libxc
8 > -Wall -fno-builtin -O2 -msoft-float -m32 -march=i686 -D__ASSEMBLY__
9 > -DDEBUG -D_ACPI_ -DTEXTADDR=0x000D0000 -c trap.S
10 > gcc -DDEBUG -D_ACPI_ -DTEXTADDR=0x000D0000 -I. -I../../../tools/libxc
11 > -Wall -fno-builtin -O2 -msoft-float -m32 -march=i686 -c vm86.c
12 > gcc -DDEBUG -D_ACPI_ -DTEXTADDR=0x000D0000 -I. -I../../../tools/libxc
13 > -Wall -fno-builtin -O2 -msoft-float -m32 -march=i686 -c setup.c
14 > gcc -DDEBUG -D_ACPI_ -DTEXTADDR=0x000D0000 -I. -I../../../tools/libxc
15 > -Wall -fno-builtin -O2 -msoft-float -m32 -march=i686 -c util.c
16 > cpp -P -DDEBUG -D_ACPI_ -DTEXTADDR=0x000D0000 vmxassist.ld > vmxassist.tmp
17 > ld -o vmxassist -m elf_i386 -nostdlib --fatal-warnings -N -T
18 > vmxassist.tmp head.o trap.o vm86.o setup.o util.o
19 > vm86.o: In function `address':
20 > vm86.c:(.text+0x19): undefined reference to `__guard'
21 > vm86.c:(.text+0x56): undefined reference to `__stack_smash_handler'
22 > vm86.o: In function `trace':
23 > vm86.c:(.text+0xe9): undefined reference to `__guard'
24 > vm86.c:(.text+0x141): undefined reference to `__guard'
25 > vm86.c:(.text+0x15d): undefined reference to `__stack_smash_handler'
26 > vm86.o: In function `getreg':
27 > vm86.c:(.text+0x278): undefined reference to `__guard'
28 > vm86.o: In function `.L23':
29 > ...etc...
30
31 That points at a faultly build system. Normally __guard &
32 __stack_smash_handler are symbols provided to userland. For kernels the
33 hardened specs have a rule to not add ssp. It uses !D__KERNEL__
34 and or uses the --nostdlib rules.
35
36 Chances are it needs to use -nostdlib for all the object code it
37 creates.
38
39 Now if your just lazy and dont want to fix xen itself then just switch
40 over to a set of set of vanilla specs. Compile whatever then switch
41 back. if that fails then include some ssp stubs to it. Same way
42 that's done in udev.
43
44
45
46 > I have tried various combinations of compiler using gcc-config. Neither
47 > gcc-3.4.4 or gcc-3.3.6 seem to do any better, hardened or not
48 >
49 > I suspect that this could be a problem with the compiler still using
50 > some hardend profile despite me asking for a non-hardened gcc? Can
51 > anyone please help debug this
52 >
53 > Ed W
54 --
55 Ned Ludd <solar@g.o>
56 Gentoo Linux
57
58 --
59 gentoo-hardened@g.o mailing list

Replies

Subject Author
Re: [gentoo-hardened] Problems compiling xen - please help... Ed W <lists@××××××××××.com>