From: Randy Dunlap <randy.dunlap@oracle.com>
To: Alexander Shishkin <virtuoso@slind.org>
Cc: linux-kernel@vger.kernel.org,
Stephen Hemminger <shemminger@vyatta.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Marek <mmarek@suse.cz>, WANG Cong <amwang@redhat.com>
Subject: Re: [PATCH] headers_check: better search for functions in headers
Date: Tue, 30 Nov 2010 08:36:07 -0800 [thread overview]
Message-ID: <20101130083607.3e1e6ec5.randy.dunlap@oracle.com> (raw)
In-Reply-To: <1291134119-12903-1-git-send-email-virtuoso@slind.org>
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@slind.org>
> CC: Stephen Hemminger <shemminger@vyatta.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: Michal Marek <mmarek@suse.cz>
> CC: WANG Cong <amwang@redhat.com>
> CC: linux-kernel@vger.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 ***
next prev parent reply other threads:[~2010-11-30 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 16:21 Alexander Shishkin
2010-11-30 16:36 ` Randy Dunlap [this message]
2010-11-30 16:42 ` Alexander Shishkin
2010-12-14 16:07 ` Michal Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101130083607.3e1e6ec5.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=amwang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=shemminger@vyatta.com \
--cc=virtuoso@slind.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome