From patchwork Tue May 12 20:43:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 23347 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4CL5mYP024836 for ; Tue, 12 May 2009 21:05:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753244AbZELVFq (ORCPT ); Tue, 12 May 2009 17:05:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754156AbZELVFp (ORCPT ); Tue, 12 May 2009 17:05:45 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:54838 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754453AbZELVFo (ORCPT ); Tue, 12 May 2009 17:05:44 -0400 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id n4CL2qQt010526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 May 2009 14:03:33 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id n4CL2q6F007223; Tue, 12 May 2009 14:02:52 -0700 Message-Id: <200905122102.n4CL2q6F007223@imap1.linux-foundation.org> Subject: [patch 3/3] scripts/headers_check.pl: correct RE in header CONFIG leak check To: sam@ravnborg.org Cc: linux-kbuild@vger.kernel.org, akpm@linux-foundation.org, rpjday@crashcourse.ca, dwmw2@infradead.org From: akpm@linux-foundation.org Date: Tue, 12 May 2009 13:43:36 -0700 X-Spam-Status: No, hits=-3.488 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: "Robert P. J. Day" 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 Cc: Sam Ravnborg Cc: David Woodhouse Signed-off-by: Andrew Morton --- 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"; } }