From: Johannes Berg <johannes@sipsolutions.net>
To: linux-kernel@vger.kernel.org, linux-um@lists.infradead.org,
Denis Efremov <efremov@linux.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Emil Velikov <emil.l.velikov@gmail.com>
Cc: linux-kbuild@vger.kernel.org
Subject: static EXPORT_SYMBOL checker causes false positives on ARCH=um
Date: Tue, 24 Sep 2019 10:17:40 +0200 [thread overview]
Message-ID: <c8cbee753dc0306fd7597f43a45e05d99d404b29.camel@sipsolutions.net> (raw)
Hi,
With the new commit 15bfc2348d54 ("modpost: check for static
EXPORT_SYMBOL* functions") we get a lot of warnings on ARCH=um builds:
WARNING: "rename" [vmlinux] is a static EXPORT_SYMBOL
WARNING: "lseek" [vmlinux] is a static EXPORT_SYMBOL
WARNING: "ftruncate64" [vmlinux] is a static EXPORT_SYMBOL
[...]
see https://p.sipsolutions.net/7232995f34907b9d.txt
This hack fixes *most* of them:
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 820eed87fb43..3e443563ebea 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1931,12 +1931,18 @@ static void check_sec_ref(struct module *mod, const char *modname,
static char *remove_dot(char *s)
{
size_t n = strcspn(s, ".");
+ char *at;
if (n && s[n]) {
size_t m = strspn(s + n + 1, "0123456789");
if (m && (s[n + m] == '.' || s[n + m] == 0))
s[n] = 0;
}
+
+ at = strchr(s, '@');
+ if (at)
+ *at = 0;
+
return s;
}
(but obviously just serves to give you an idea of what's going on).
With that, only two remain for me:
WARNING: "__guard" [vmlinux] is a static EXPORT_SYMBOL
WARNING: "__stack_smash_handler" [vmlinux] is a static EXPORT_SYMBOL
and I think that's because they don't even exist at all, so arguably the
code shouldn't export them, but I didn't find a way to detect at build
time if -fstack-protector was enabled or not?
Any thoughts?
Thanks,
johannes
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
next reply other threads:[~2019-09-24 8:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 8:17 Johannes Berg [this message]
2019-09-24 12:09 ` static EXPORT_SYMBOL checker causes false positives on ARCH=um Masahiro Yamada
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=c8cbee753dc0306fd7597f43a45e05d99d404b29.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=efremov@linux.com \
--cc=emil.l.velikov@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=yamada.masahiro@socionext.com \
/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