lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1364839041.21627.63.camel@x61.thuisdomein>
Date:	Mon, 01 Apr 2013 19:57:21 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH 2/8] headers_check: add check for kernel integer types

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@...cali.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ