Development discussion of WireGuard
 help / color / mirror / Atom feed
* Documentation for kernel requirements doesn't mention CONFIG_UNUSED_SYMBOLS
@ 2017-11-09 16:48 Mike Kazantsev
  2017-11-10  4:38 ` Jason A. Donenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Kazantsev @ 2017-11-09 16:48 UTC (permalink / raw)
  To: wireguard

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Documentation for kernel requirements doesn't mention CONFIG_UNUSED_SYMBOLS
  2017-11-09 16:48 Documentation for kernel requirements doesn't mention CONFIG_UNUSED_SYMBOLS Mike Kazantsev
@ 2017-11-10  4:38 ` Jason A. Donenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Jason A. Donenfeld @ 2017-11-10  4:38 UTC (permalink / raw)
  To: Mike Kazantsev; +Cc: WireGuard mailing list

Hi Mike,

Thanks for tracking this down. I've added note of this to the /install page.

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-10  4:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 16:48 Documentation for kernel requirements doesn't mention CONFIG_UNUSED_SYMBOLS Mike Kazantsev
2017-11-10  4:38 ` Jason A. Donenfeld

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).