Skip to contentSkip to conversation

scripts/headers_check.pl: correct RE in header CONFIG leak check

PATCH Applied [email protected] 2 participants 2 messages May 12, 2009 – Jun 5, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 scripts/headers_check.pl: correct RE in header CONFIG leak check

From: "Robert P. J. Day" <[email protected]>

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.

---

 scripts/headers_check.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/headers_check.pl renamed from scripts/headers_check.pl~scripts-headers_checkpl-correct-re-in-header-config-leak-check +1 -1
diff -puN scripts/headers_check.pl~scripts-headers_checkpl-correct-re-in-header-config-leak-check 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";
 	}
 }

_

Applied
#1 lore raw
Quoted 16 lines · On Tue, May 12, 2009 at 01:43:36PM -0700, [email protected] wrote:

From: "Robert P. J. Day" <[email protected]>

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();
Quoted 3 lines

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