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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 30 Nov 2010 08:36:07 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Alexander Shishkin <virtuoso@...nd.org>
Cc:	linux-kernel@...r.kernel.org,
	Stephen Hemminger <shemminger@...tta.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michal Marek <mmarek@...e.cz>, WANG Cong <amwang@...hat.com>
Subject: Re: [PATCH] headers_check: better search for functions in headers

On Tue, 30 Nov 2010 18:21:59 +0200 Alexander Shishkin wrote:

> Some headers don't bother with "extern" in function prototypes,
> which results in said prototypes being unnoticed and exported
> to userland.
> 
> This patch slightly improves detection of such cases by checking
> for C type names as well in the beginning of a line.
> 
> Signed-off-by: Alexander Shishkin <virtuoso@...nd.org>
> CC: Stephen Hemminger <shemminger@...tta.com>
> CC: Andrew Morton <akpm@...ux-foundation.org>
> CC: Michal Marek <mmarek@...e.cz>
> CC: WANG Cong <amwang@...hat.com>
> CC: linux-kernel@...r.kernel.org
> ---
>  scripts/headers_check.pl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl
> index 50d6cfd..e0e25a1 100644
> --- a/scripts/headers_check.pl
> +++ b/scripts/headers_check.pl
> @@ -64,7 +64,7 @@ sub check_include
>  
>  sub check_declarations
>  {
> -	if ($line =~m/^\s*extern\b/) {
> +	if ($line =~m/^(\s*extern|unsigned|char|short|int|long|void)\b/) {
>  		printf STDERR "$filename:$lineno: " .
>  		              "userspace cannot call function or variable " .

s/call/reference/ ?

>  		              "defined in the kernel\n";
> -- 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
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