From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Saul Wold <sgw@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/2 v2] bitbake.conf: Add SECURITY_*FLAGS overridable definition
Date: Fri, 28 Jun 2013 22:04:37 +0100 [thread overview]
Message-ID: <1372453477.25291.3.camel@ted> (raw)
In-Reply-To: <51CDEFEF.2090801@linux.intel.com>
On Fri, 2013-06-28 at 13:19 -0700, Saul Wold wrote:
> On 06/28/2013 12:51 PM, Phil Blundell wrote:
> > On Fri, 2013-06-28 at 12:23 -0700, Saul Wold wrote:
> >> This will allow for SECURITY_CFLAGS and SECURITY_LDFLAGS to be
> >> defined in the security_flags.inc and override the empty default.
> >
> > Why can't security_flags.inc just append to CFLAGS and LDFLAGS
> > respectively, or some other set of variables that already exists?
> >
> So, if I remember correctly there was issues with this because there are
> a number of packages that have to modify specifically the security
> related flags (see the list in security_flags.inc), the ordering/timing
> of being able to due that correctly did not allow for setting it
> directly in CFLAGS or TARGET_CFLAGS.
>
> > Creating new variables in bitbake.conf does have a cost in terms of
> > parse time and memory footprint for every recipe. If the variables are
> > referenced in ${CFLAGS} etc then it also adds an extra substitution
> > whenever CFLAGS is expanded. The cost of those things isn't enormous,
> > but it isn't zero either and adding them isn't something that we should
> > do capriciously.
> >
> I understand, and RP and I talked about this, we needed a separate
> variable to ensure the correct substitution occurred for those that
> needed to disable or remove certain flags.
What RP said was that he'd prefer to see no bitbake.conf changes and to
do this all in the .inc. We should have a variable like the
SECURITY_FLAGS you have but this can also be appended in the .inc.
If we need to modify it on a per recipe basis we still then can so:
SECURITY_CFLAGS = "-fstack-protector-all -pie -fpie -D_FORTIFY_SOURCE=2"
TARGET_CFLAGS_append = " ${SECURITY_CFLAGS}"
SECURITY_LDFLAGS = "-Wl,-z,relro,-z,now"
TARGET_LDFLAGS_append = " ${SECURITY_LDFLAGS}"
all in the .inc. Or am I missing something?
Cheers,
Richard
next prev parent reply other threads:[~2013-06-28 21:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 19:23 [PATCH 1/2 v2] bitbake.conf: Add SECURITY_*FLAGS overridable definition Saul Wold
2013-06-28 19:23 ` [PATCH 2/2 v2] security_flags: Add the compiler and linker flags that enhance security Saul Wold
2013-06-28 22:11 ` Khem Raj
2013-06-28 19:28 ` [PATCH 1/2 v2] bitbake.conf: Add SECURITY_*FLAGS overridable definition Mark Hatle
2013-06-28 22:13 ` Khem Raj
2013-06-28 19:51 ` Phil Blundell
2013-06-28 20:19 ` Saul Wold
2013-06-28 21:04 ` Richard Purdie [this message]
2013-06-28 21:07 ` Phil Blundell
2013-06-28 21:52 ` Saul Wold
2013-06-28 22:17 ` Khem Raj
2013-06-28 22:16 ` Khem Raj
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=1372453477.25291.3.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=sgw@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.