Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 567732

Summary: sys-kernel/hardened-sources-4.1.7-r1: CONFIG_BUILD_DOCSRC is broken with -fstack-protector
Product: Gentoo Linux Reporter: Richard Yao (RETIRED) <ryao>
Component: [OLD] Core systemAssignee: Anthony Basile <blueness>
Status: RESOLVED OBSOLETE    
Severity: normal CC: atoth, ccx, genkernel, hardened, kent.f.davis, pageexec, spender
Priority: Normal Keywords: Bug, REGRESSION
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: disable ssp

Description Richard Yao (RETIRED) gentoo-dev 2015-12-07 19:39:04 UTC
This likely affects all versions of sys-kernel/hardened-sources. It is a problem because we set CONFIG_BUILD_DOCSRC by default in the ~arch genkernel version and will block us from stabilizing it unless we stop doing that. We likely will, but this is a bug that should be fixed.
Comment 1 Magnus Granberg gentoo-dev 2015-12-07 22:01:19 UTC
Created attachment 418736 [details, diff]
disable ssp

The problem is that parse_vdso.o get compile with ssp and
vdso_standalone_test_x86.o with no ssp as it should but
vdso_standalone_test_x86 dep on parse_vdso.o
so it fail to link.
It is more a upstream bug.
Comment 2 Anthony Basile gentoo-dev 2015-12-16 00:39:44 UTC
(In reply to Magnus Granberg from comment #1)
> It is more a upstream bug.

Okay, let's let pipacs look at this.
Comment 3 PaX Team 2015-12-16 02:51:22 UTC
i don't see any plugin issues here? what's the exact error and how do you reproduce it?
Comment 4 ephemer0l 2015-12-16 21:59:40 UTC
I think it was a CFLAG thats coded into the kernel calling -fno-stack-protector.

See https://github.com/torvalds/linux/blob/master/Documentation/vDSO/Makefile
Comment 5 Anthony Basile gentoo-dev 2015-12-16 22:08:39 UTC
(In reply to scott from comment #4)
> I think it was a CFLAG thats coded into the kernel calling
> -fno-stack-protector.
> 
> See https://github.com/torvalds/linux/blob/master/Documentation/vDSO/Makefile

yes it is.

@pipacs, sorry for the noise, i didn't read the bug carefully enough
Comment 6 Magnus Granberg gentoo-dev 2016-02-08 20:13:40 UTC
*** Bug 574214 has been marked as a duplicate of this bug. ***
Comment 7 Jason Zaman gentoo-dev 2016-02-09 02:59:47 UTC
The patch looks like it just moves no-stack-protector from HOSTCFLAGS_vdso_standalone_test_x86.o to plain HOSTCFLAGS. Is it overkill to add it everywhere? should it instead be added only to the other objects that fail?