Gentoo Archives: gentoo-dev

From: "Anthony G. Basile" <blueness@g.o>
To: "Michał Górny" <mgorny@g.o>, gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] To enable ssp default in Gcc the toolchain.eclass need some changes.
Date: Thu, 09 Jan 2014 23:01:37
Message-Id: 52CF2A4D.5000703@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] To enable ssp default in Gcc the toolchain.eclass need some changes. by "Michał Górny"
1 On 01/09/2014 05:21 PM, Michał Górny wrote:
2 > Dnia 2014-01-09, o godz. 17:06:52
3 > "Anthony G. Basile" <blueness@g.o> napisał(a):
4 >
5 >> On 01/09/2014 04:57 PM, Pacho Ramos wrote:
6 >>> What are the advantages of disabling SSP to deserve that "special"
7 >>> handling via USE flag or easily disabling it appending the flag?
8 >> There are some cases where ssp could break things. I know of once case
9 >> right now, but its somewhat exotic. Also, sometimes we *want* to break
10 >> things for testing. I'm thinking here of instance where we want to test
11 >> a pax hardened kernel to see if it catches abuses of memory which would
12 >> otherwise be caught by executables emitted from a hardened toolchain.
13 >> Take a look at the app-admin/paxtest suite.
14 > Just to be clear, are we talking about potential system-wide breakage
15 > or single, specific packages being broken by SSP? In other words, are
16 > there cases when people will really want to disable SSP completely?
17 >
18 > Unless I'm misunderstanding something, your examples sound like you
19 > just want -fno-stack-protector per-package. I don't really think you
20 > actually want to rebuild whole gcc just to do some testing on a single
21 > package...
22 >
23 Correct, you'd only want to turn off ssp per package and then only in
24 rare cases. You should never have to rebuild gcc for this. With ssp on
25 by default, gcc specs would add -fstack-protector to all builds. If you
26 don't want a package build with ssp, then just do
27 CFLAGS="-fno-stack-protector" and you're building without ssp.
28
29 --
30 Anthony G. Basile, Ph.D.
31 Gentoo Linux Developer [Hardened]
32 E-Mail : blueness@g.o
33 GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
34 GnuPG ID : F52D4BBA

Replies

Subject Author
Re: [gentoo-dev] [PATCH] To enable ssp default in Gcc the toolchain.eclass need some changes. "Rick \\\"Zero_Chaos\\\" Farina" <zerochaos@g.o>