From: Mike Kazantsev <mk.fraggod@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: Documentation for kernel requirements doesn't mention CONFIG_UNUSED_SYMBOLS
Date: Thu, 9 Nov 2017 21:48:29 +0500 [thread overview]
Message-ID: <20171109214829.7205e821@malediction> (raw)
Hi,
Have tried to build wireguard module (using dkms) on mainline 4.9.58
from kernel.org, and had following warnings on MODPOST:
MODPOST 1 modules
WARNING: "inet_confirm_addr" [/var/lib/dkms/wireguard/0.0.20171101/build/wireguard.ko] undefined!
WARNING: "skb_checksum_setup" [/var/lib/dkms/wireguard/0.0.20171101/build/wireguard.ko] undefined!
WARNING: "add_random_ready_callback" [/var/lib/dkms/wireguard/0.0.20171101/build/wireguard.ko] undefined!
WARNING: "del_random_ready_callback" [/var/lib/dkms/wireguard/0.0.20171101/build/wireguard.ko] undefined!
These symbols did exist in /proc/kallsyms:
ffffffff9385a100 T add_random_ready_callback
ffffffff9385a1b0 T del_random_ready_callback
ffffffff93991c20 T skb_checksum_setup
ffffffff93a22ab0 T inet_confirm_addr
But not in Module.symvers file, hence the warnings.
Loading module also failed with following dmesg output:
[20139.879546] wireguard: Unknown symbol del_random_ready_callback (err 0)
[20139.879568] wireguard: Unknown symbol add_random_ready_callback (err 0)
[20139.879611] wireguard: Unknown symbol skb_checksum_setup (err 0)
[20139.879627] wireguard: Unknown symbol inet_confirm_addr (err 0)
All symbols in question have e.g. "EXPORT_SYMBOL(inet_confirm_addr);"
in the kernel code.
Reason seem to be missing CONFIG_UNUSED_SYMBOLS=y kernel option, which
wireguard effectively requires to be enabled, but which is missing from
"Kernel Requirements" section of the documentation (as of today, at least):
https://www.wireguard.com/install/#kernel-requirements
While docs might not mention some other common sense options which are
enabled in most kernels, I wanted to suggest considering including this
one, in case it wasn't considered already.
As description above suggests, it might be not obvious why these
particular symbols get stripped during build, unlike with other options
that are already documented, where one can easily trace missing symbol
to a disabled module.
It'd have saved me a bunch of time spent looking into the issue.
Thanks!
--
Mike Kazantsev // fraggod.net
next reply other threads:[~2017-11-09 16:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 16:48 Mike Kazantsev [this message]
2017-11-10 4:38 ` Jason A. Donenfeld
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=20171109214829.7205e821@malediction \
--to=mk.fraggod@gmail.com \
--cc=wireguard@lists.zx2c4.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;
as well as URLs for NNTP newsgroup(s).