public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>,
	David Rientjes <rientjes@google.com>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Ralf Baechle <ralf@linux-mips.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@linux.intel.com>,
	James Hogan <james.hogan@imgtec.com>,
	Michal Marek <mmarek@suse.cz>, Paul Mundt <lethal@linux-sh.org>,
	Shawn Guo <shawn.guo@linaro.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	"linux-tip-commits@vger.kernel.org"
	<linux-tip-commits@vger.kernel.org>
Subject: Re: [patch core/stackprotector] stackprotector: Fix build when compiler lacks support
Date: Sun, 5 Jan 2014 23:13:04 +0100	[thread overview]
Message-ID: <20140105221304.GA11197@ravnborg.org> (raw)
In-Reply-To: <20140101222808.GB19648@free.fr>

Hi all.

> > 
> >   config CC_SUPPORTS_STACKPROTECTOR_STRONG
> >       bool
> >       option exec="$CC -fstack-protector-strong -c empty.c"
> > 
> > or something like that. No?
> 
> This is an implementation detail, but the original patch expected the
> result to be 'y' or 'n' (or empty=='n') on stdout. That way, it could
> also be used to fill-in config options that are strings, or ints. Hence
> the use of a script.
> 
> But H. Peter suggested it should only return a boolean, which seems
> entirely reasonable, given the purpose of this. In this case, using 'y'
> or 'n' from stdout, or 0 or !0 from the exit code are equally easy.
> 
> Also, using a single shell script allows to fix/enhance all of those
> calls in a single place, and avoids duplicating all the check logic in
> every tests (eg. who is going to create empty.c in your example? Clean
> up the output file?). And since kconfig is run from the top-level of the
> Linux source tree (even for out-of-tree builds), we can safely use a
> path relative to that to call our script(s).
> 
> I'll wait a bit until the end of the holiday season before I poke Sam
> again on this.

The thinking behind the exec option was that it should return a string,
and then the content of the string were parsed depending on the type used in
the kconfig language.
So for a bool "y" and "n" would be recognized.
For tristate in adddition "m" would be recognized.
For int we should be able to parse numbers.
And string would be string.

An if an exec'ed command gave e return code != 0 then this should result in a warning,
so user is told that the attempt to execute /bin/some_thing_random failed.
Otherwise we would end in situations were this would be difficult to debug.

I have no time to actually implement the above proposal - sorry!
But things are busy at my day-time job etc.
So I hope someone can step in and help here.

PS. I have suffered from a faulty linux box + change of mail provider.
    And in the end I deleted all mails from the last three months.
    This was much quicker than to actually read them :-)

	Sam

  reply	other threads:[~2014-01-05 22:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 19:35 [PATCH v5] provide -fstack-protector-strong build option Kees Cook
2013-12-19 19:35 ` [PATCH v5 1/2] create HAVE_CC_STACKPROTECTOR for centralized use Kees Cook
2013-12-19 19:35 ` [PATCH v5 2/2] provide -fstack-protector-strong build option Kees Cook
     [not found]   ` <tip-8779657d29c0ebcc0c94ede4df2f497baf1b563f@git.kernel.org>
2013-12-30 21:37     ` [patch core/stackprotector] stackprotector: Fix build when compiler lacks support David Rientjes
2013-12-31  0:45       ` Kees Cook
2014-01-01  0:16         ` Linus Torvalds
2014-01-01 11:42           ` Yann E. MORIN
2014-01-01 19:33             ` Linus Torvalds
2014-01-01 19:50               ` H. Peter Anvin
2014-01-01 22:28               ` Yann E. MORIN
2014-01-05 22:13                 ` Sam Ravnborg [this message]
2013-12-31 14:39       ` Arjan van de Ven

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=20140105221304.GA11197@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=james.hogan@imgtec.com \
    --cc=keescook@chromium.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@kernel.org \
    --cc=mmarek@suse.cz \
    --cc=peterz@infradead.org \
    --cc=ralf@linux-mips.org \
    --cc=rientjes@google.com \
    --cc=sfr@canb.auug.org.au \
    --cc=shawn.guo@linaro.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=yann.morin.1998@free.fr \
    /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