On fedora 37, I am trying to enable kernel log messages for wireguard by executing this command in a root-shell:
echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control
Unfortunately, this results in an error: operation not permitted: /sys/kernel/debug/dynamic_debug/control
.
I can see in dmesg that the reason for this error is: debugfs access is restricted; see man kernel_lockdown.7
.
Kernel lockdown is automatically enabled due to secure boot being enabled.
Is there any other way to enable the wireguard log messages with secure boot / kernel lockdown enabled, e.g. via kernel cmdline or modprobe options?
To temporary enable wireguard kernel log messages, execute:
reference: https://www.kernel.org/doc/html/v5.0/admin-guide/dynamic-debug-howto.html#debug-messages-at-module-initialization-time
You can view the log message with
sudo dmesg -T --follow | grep wireguard
If you want to permanently enable wireguard kernel log messages, create a modprobe configuration
/etc/modprobe.d/wireguard.conf
with contentoptions wireguard dyndbg
and executesudo modprobe -r wireguard && sudo modprobe wireguard