lkml.org 
[lkml]   [2013]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/8] headers_check: add check for kernel integer types
From
Date
The u8, u16, u32, and u64, and the s8, s16, s32, and s64 types shouldn't
be exported to userspace. Add a simple check for these.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
scripts/headers_check.pl | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
index 64ac238..317aa3a 100644
--- a/scripts/headers_check.pl
+++ b/scripts/headers_check.pl
@@ -39,6 +39,7 @@ foreach my $file (@files) {
&check_include();
&check_asm_types();
&check_sizetypes();
+ &check_kerneltypes();
&check_declarations();
# Dropped for now. Too much noise &check_config();
}
@@ -159,3 +160,12 @@ sub check_sizetypes
#$ret = 1;
}
}
+
+sub check_kerneltypes
+{
+ if ($line =~ m/^[[:space:]]*([us](8|16|32|64))\b/) {
+ printf STDERR "$filename:$lineno: " .
+ "found $1 type exported to userspace; " .
+ "use __$1 instead\n";
+ }
+}
--
1.7.11.7


\
 
 \ /
  Last update: 2013-04-01 20:41    [W:0.020 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site