Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
7e557a25
Commit
7e557a25
authored
Dec 27, 2008
by
Sam Ravnborg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kbuild: check for leaked CONFIG_ symbols to userspace
Signed-off-by:
Sam Ravnborg
<
sam@ravnborg.org
>
parent
46b8af50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
scripts/headers_check.pl
scripts/headers_check.pl
+10
-1
No files found.
scripts/headers_check.pl
View file @
7e557a25
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#
#
# 2) It is checked that prototypes does not use "extern"
# 2) It is checked that prototypes does not use "extern"
#
#
# 3)
TODO: c
heck for leaked CONFIG_ symbols
# 3)
C
heck for leaked CONFIG_ symbols
use
strict
;
use
strict
;
...
@@ -36,6 +36,7 @@ foreach my $file (@files) {
...
@@ -36,6 +36,7 @@ foreach my $file (@files) {
$lineno
++
;
$lineno
++
;
check_include
();
check_include
();
check_prototypes
();
check_prototypes
();
check_config
();
}
}
close
FH
;
close
FH
;
}
}
...
@@ -64,3 +65,11 @@ sub check_prototypes
...
@@ -64,3 +65,11 @@ sub check_prototypes
printf
STDERR
"
$filename
:
$lineno
: extern's make no sense in userspace
\n
";
printf
STDERR
"
$filename
:
$lineno
: extern's make no sense in userspace
\n
";
}
}
}
}
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
";
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment