1 |
On Mon, 7 Sep 2015 14:27:38 -0400 |
2 |
Michael Orlitzky <mjo@g.o> wrote: |
3 |
|
4 |
> On 09/07/2015 01:10 PM, wabenbau@×××××.com wrote: |
5 |
> > Michael Orlitzky <mjo@g.o> wrote: |
6 |
> > |
7 |
> > I don't think so (but maybe I'm wrong). You have to compile your |
8 |
> > entire system with a hardened toolchain to get full hardened |
9 |
> > support (SSP and maybe some other things). I think, to go back to a |
10 |
> > "normal state", you have to recompile everything again with a non |
11 |
> > hardened toolchain. |
12 |
> |
13 |
> GCC 4.8 already defaults to -fstack-protector, but you do need to |
14 |
> recompile to get -fstack-protector-all and you're right that you would |
15 |
> need to recompile again to make it go away. The full SSP is considered |
16 |
> safe though, and only slows things down a bit. |
17 |
|
18 |
Full SSP is something I want and I'll gladly suffer the speed penalty |
19 |
to get it. Can I just add -fstack-protector-all to my CFLAGS in |
20 |
make.conf? Or is it more complicated than that? |
21 |
|
22 |
Hmm. Quoting from the gcc man page: |
23 |
|
24 |
-fstack-protector-strong |
25 |
Like -fstack-protector but includes additional functions to |
26 |
be protected --- those that have local array definitions, or |
27 |
have references to local frame addresses. |
28 |
|
29 |
NOTE: In Gentoo GCC 4.9.0 and later versions this option is |
30 |
enabled by default for C, C++, ObjC, ObjC++, if neither |
31 |
-fno-stack-protector, -nostdlib, -ffreestanding, |
32 |
-fstack-protector, -fstack-protector-strong or |
33 |
-fstack-protector-all are found. <===== are found *where*? |
34 |
|
35 |
English is my native tongue and I confess I can't make any sense of |
36 |
that advice. |
37 |
|
38 |
The words 'enabled' and 'are found' don't tell me what I need to *do* |
39 |
to wind up with full/strong SSP in my compiled code. Does gcc add the |
40 |
appropriate SSP flags without my intervention when building my sources, |
41 |
or do I need to invoke those flags myself, e.g. by adding them to CFLAGS |
42 |
as I asked above? |
43 |
|
44 |
<sigh> Communicating is hard to do: |
45 |
|
46 |
https://en.wikipedia.org/wiki/Breaking_Up_Is_Hard_to_Do |