Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hardened kernel compilation fails on parse_vdso
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
RickDeckard
n00b
n00b


Joined: 08 Apr 2014
Posts: 7

PostPosted: Sun May 10, 2015 1:46 am    Post subject: Hardened kernel compilation fails on parse_vdso Reply with quote

Hi,

I'm using 3.17.7-hardened-r1 with the default hardened gcc-config, and trying to compile a new kernel (I've tried 3.18.9-hardened and 4.0.1-hardened) but the compilation throws a bunch of vDSO errors my way related to the __stack_chk_fail function in parse_vdso.c and vdso_standalone_test_x86.c. It's telling me that it can't find any references, and I've practically been beating my head against a brick wall on this. Disabling the stack protector doesn't help, nor do other answers to this kind of problem that suggest manually changing the makefile. This is what I'm dealing with:

Sorry for the Japanese, I'll provide a reasonable translation in brackets.

Code:

HOSTCC  Documentation/ptp/testptp
HOSTCC  Documentation/vDSO/parse_vdso.o
HOSTLD  Documentation/vDSO/vdso_standalone_test_x86
HOSTCC  Documentation/spi/spidev_fdx
Documentation/vDSO/parse_vdso.o: 関数 `elf_hash' 内: (In function)
parse_vdso.c:(.text+0xa4): `__stack_chk_fail' に対する定義されていない参照です (Undefined reference to '__stack_chk_fail')
Documentation/vDSO/parse_vdso.o: 関数 `vdso_init_from_sysinfo_ehdr' 内:
parse_vdso.c:(.text+0x445): `__stack_chk_fail' に対する定義されていない参照です
Documentation/vDSO/parse_vdso.o: 関数 `vdso_match_version' 内:
parse_vdso.c:(.text+0x545): `__stack_chk_fail' に対する定義されていない参照です
Documentation/vDSO/parse_vdso.o: 関数 `vdso_sym' 内:
parse_vdso.c:(.text+0x6f2): `__stack_chk_fail' に対する定義されていない参照です
Documentation/vDSO/parse_vdso.o: 関数 `vdso_init_from_auxv' 内:
parse_vdso.c:(.text+0x7ad): `__stack_chk_fail' に対する定義されていない参照です
collect2: エラー: ld はステータス 1 で終了しました (Error: ld completed with status 1)
scripts/Makefile.host:129: ターゲット 'Documentation/vDSO/vdso_standalone_test_x86' のレシピで失敗しました (compilation failed)
make[2]: *** [Documentation/vDSO/vdso_standalone_test_x86] エラー 1
scripts/Makefile.build:403: ターゲット 'Documentation/vDSO' のレシピで失敗しました (Target compilation failed)
make[1]: *** [Documentation/vDSO] エラー 2
make[1]: *** 未完了のジョブを待っています.... (Waiting for incomplete jobs)
Makefile:990: ターゲット 'vmlinux' のレシピで失敗しました
make: *** [vmlinux] エラー 2
acidstar linux-4.0.1-hardened #


I'd appreciate any help I can get because this is driving me nuts. I've even tried defining __stack_chk_fail in the .c files themselves, and it still won't compile. This has been my fourth failed attempt.
_________________
The nine most dangerous words in the English language are "I'm from the government, and I'm here to help."
Back to top
View user's profile Send private message
RickDeckard
n00b
n00b


Joined: 08 Apr 2014
Posts: 7

PostPosted: Sun May 10, 2015 2:28 pm    Post subject: Reply with quote

Well, hell, I might have solved this just by taking CONFIG_BUILD_DOCSRC under "Kernel Hacking" and unchecking it. Can't believe I missed that.
_________________
The nine most dangerous words in the English language are "I'm from the government, and I'm here to help."
Back to top
View user's profile Send private message
pepoluan
n00b
n00b


Joined: 28 Feb 2011
Posts: 39
Location: Jakarta, Indonesia

PostPosted: Thu May 19, 2016 6:04 am    Post subject: Reply with quote

Hey, thanks for sharing that CONFIG!

I ran into the same trouble, searched a lot... and only your solution works.

It's amazing how much grief that one line can cause... :roll:
_________________
Nobody is Perfect.
I am Nobody.
Back to top
View user's profile Send private message
kakarot
n00b
n00b


Joined: 02 Feb 2004
Posts: 10

PostPosted: Fri Feb 24, 2017 1:50 pm    Post subject: Reply with quote

I would like to thank you, too.
Now I run a hardened kernel...

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum