From: walt <w41ter@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: Anyone running a hardened profile?
Date: Mon, 7 Sep 2015 18:15:06 -0700 [thread overview]
Message-ID: <20150907181506.6565ff2a@a6> (raw)
In-Reply-To: 55EDD71A.1060707@gentoo.org
On Mon, 7 Sep 2015 14:27:38 -0400
Michael Orlitzky <mjo@gentoo.org> wrote:
> On 09/07/2015 01:10 PM, wabenbau@gmail.com wrote:
> > Michael Orlitzky <mjo@gentoo.org> wrote:
> >
> > I don't think so (but maybe I'm wrong). You have to compile your
> > entire system with a hardened toolchain to get full hardened
> > support (SSP and maybe some other things). I think, to go back to a
> > "normal state", you have to recompile everything again with a non
> > hardened toolchain.
>
> GCC 4.8 already defaults to -fstack-protector, but you do need to
> recompile to get -fstack-protector-all and you're right that you would
> need to recompile again to make it go away. The full SSP is considered
> safe though, and only slows things down a bit.
Full SSP is something I want and I'll gladly suffer the speed penalty
to get it. Can I just add -fstack-protector-all to my CFLAGS in
make.conf? Or is it more complicated than that?
Hmm. Quoting from the gcc man page:
-fstack-protector-strong
Like -fstack-protector but includes additional functions to
be protected --- those that have local array definitions, or
have references to local frame addresses.
NOTE: In Gentoo GCC 4.9.0 and later versions this option is
enabled by default for C, C++, ObjC, ObjC++, if neither
-fno-stack-protector, -nostdlib, -ffreestanding,
-fstack-protector, -fstack-protector-strong or
-fstack-protector-all are found. <===== are found *where*?
English is my native tongue and I confess I can't make any sense of
that advice.
The words 'enabled' and 'are found' don't tell me what I need to *do*
to wind up with full/strong SSP in my compiled code. Does gcc add the
appropriate SSP flags without my intervention when building my sources,
or do I need to invoke those flags myself, e.g. by adding them to CFLAGS
as I asked above?
<sigh> Communicating is hard to do:
https://en.wikipedia.org/wiki/Breaking_Up_Is_Hard_to_Do
next prev parent reply other threads:[~2015-09-08 1:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-06 20:15 [gentoo-user] Anyone running a hardened profile? walt
2015-09-06 20:52 ` [gentoo-user] " James
2015-09-06 20:59 ` [gentoo-user] " Hinnerk van Bruinehsen
2015-09-06 21:53 ` Fernando Rodriguez
2015-09-07 17:02 ` wabenbau
2015-09-08 1:07 ` Fernando Rodriguez
2015-09-06 22:06 ` Michael Orlitzky
2015-09-07 17:10 ` wabenbau
2015-09-07 18:27 ` Michael Orlitzky
2015-09-08 1:15 ` walt [this message]
2015-09-08 1:34 ` [gentoo-user] " Fernando Rodriguez
2015-09-08 1:38 ` Michael Orlitzky
2015-09-08 20:42 ` Fernando Rodriguez
2015-09-06 23:09 ` [gentoo-user] " Andreas K. Huettel
2015-09-07 17:07 ` wabenbau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150907181506.6565ff2a@a6 \
--to=w41ter@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox