[PATCH] kbuild: uapi: Drop check_config()

Thomas Weißschuh posted 1 patch 1 month, 1 week ago
usr/include/headers_check.pl | 8 --------
1 file changed, 8 deletions(-)
[PATCH] kbuild: uapi: Drop check_config()
Posted by Thomas Weißschuh 1 month, 1 week ago
headers_install.sh already tests for CONFIG symbols. It does so in a
more comprehensive way, by only checking for references in code and
also running even if CONFIG_UAPI_HEADER_TEST is disabled.
And check_config() has been disabled any case.

Drop the pointless check.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 usr/include/headers_check.pl | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/usr/include/headers_check.pl b/usr/include/headers_check.pl
index af5a513eaa00..6cd6eb652c8d 100755
--- a/usr/include/headers_check.pl
+++ b/usr/include/headers_check.pl
@@ -40,7 +40,6 @@ foreach my $file (@files) {
 		&check_include();
 		&check_asm_types();
 		&check_declarations();
-		# Dropped for now. Too much noise &check_config();
 	}
 	close $fh;
 }
@@ -77,13 +76,6 @@ sub check_declarations
 	}
 }
 
-sub check_config
-{
-	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";
-	}
-}
-
 my $linux_asm_types;
 sub check_asm_types
 {

---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251229-uapi-check_config-8aa43e365846

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Re: [PATCH] kbuild: uapi: Drop check_config()
Posted by Nathan Chancellor 1 month, 1 week ago
On Tue, 30 Dec 2025 08:09:29 +0100, Thomas Weißschuh wrote:
> headers_install.sh already tests for CONFIG symbols. It does so in a
> more comprehensive way, by only checking for references in code and
> also running even if CONFIG_UAPI_HEADER_TEST is disabled.
> And check_config() has been disabled any case.
> 
> Drop the pointless check.
> 
> [...]

Applied to

  https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-next

Thanks!

[1/1] kbuild: uapi: Drop check_config()
      https://git.kernel.org/kbuild/c/1b5e068d598e1

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped or
reverted.

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>

Re: [PATCH] kbuild: uapi: Drop check_config()
Posted by Nicolas Schier 1 month, 1 week ago
On Tue, Dec 30, 2025 at 08:09:29AM +0100, Thomas Weißschuh wrote:
> headers_install.sh already tests for CONFIG symbols. It does so in a
> more comprehensive way, by only checking for references in code and
> also running even if CONFIG_UAPI_HEADER_TEST is disabled.
> And check_config() has been disabled any case.
> 
> Drop the pointless check.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  usr/include/headers_check.pl | 8 --------
>  1 file changed, 8 deletions(-)

Thanks for spotting!

Reviewed-by: Nicolas Schier <nsc@kernel.org>