linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 3/3] scripts/headers_check.pl: correct RE in header CONFIG leak check
@ 2009-05-12 20:43 akpm
  2009-06-05 22:14 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2009-05-12 20:43 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, akpm, rpjday, dwmw2

From: "Robert P. J. Day" <rpjday@crashcourse.ca>

Correct the regular expression in scripts/headers_check.pl to include '_'
as a valid character in the class; otherwise, the check will report a
"leaked" symbol of CONFIG_A_B_C as merely CONFIG_A.

This patch will make no difference whatsoever in the current kernel tree
as the call to the perl routine that does that check is currently
commented out:

                &check_include();
                &check_asm_types();
                &check_sizetypes();
                &check_prototypes();
                # Dropped for now. Too much noise &check_config();

However, I noticed that problem when I was building the yum downloadable
kernel source rpm for fedora 11 (beta), which *does* run that check, and
that's where the problem became obvious.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/headers_check.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN scripts/headers_check.pl~scripts-headers_checkpl-correct-re-in-header-config-leak-check scripts/headers_check.pl
--- a/scripts/headers_check.pl~scripts-headers_checkpl-correct-re-in-header-config-leak-check
+++ a/scripts/headers_check.pl
@@ -70,7 +70,7 @@ sub check_prototypes
 
 sub check_config
 {
-	if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9]+)[^a-zA-Z0-9]/) {
+	if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9_]+)[^a-zA-Z0-9_]/) {
 		printf STDERR "$filename:$lineno: leaks CONFIG_$1 to userspace where it is not valid\n";
 	}
 }
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 3/3] scripts/headers_check.pl: correct RE in header CONFIG leak check
  2009-05-12 20:43 [patch 3/3] scripts/headers_check.pl: correct RE in header CONFIG leak check akpm
@ 2009-06-05 22:14 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2009-06-05 22:14 UTC (permalink / raw)
  To: akpm; +Cc: linux-kbuild, rpjday, dwmw2

On Tue, May 12, 2009 at 01:43:36PM -0700, akpm@linux-foundation.org wrote:
> From: "Robert P. J. Day" <rpjday@crashcourse.ca>
> 
> Correct the regular expression in scripts/headers_check.pl to include '_'
> as a valid character in the class; otherwise, the check will report a
> "leaked" symbol of CONFIG_A_B_C as merely CONFIG_A.
> 
> This patch will make no difference whatsoever in the current kernel tree
> as the call to the perl routine that does that check is currently
> commented out:
> 
>                 &check_include();
>                 &check_asm_types();
>                 &check_sizetypes();
>                 &check_prototypes();
>                 # Dropped for now. Too much noise &check_config();
> 
> However, I noticed that problem when I was building the yum downloadable
> kernel source rpm for fedora 11 (beta), which *does* run that check, and
> that's where the problem became obvious.

Applied,
	Sam

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-05 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 20:43 [patch 3/3] scripts/headers_check.pl: correct RE in header CONFIG leak check akpm
2009-06-05 22:14 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).