Score:3

Enabling wireguard log messages with secure boot / kernel lockdown enabled

us flag

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?

Score:4
by flag

To temporary enable wireguard kernel log messages, execute:

sudo modprobe -r wireguard && sudo modprobe wireguard dyndbg

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 content options wireguard dyndbg and execute sudo modprobe -r wireguard && sudo modprobe wireguard

us flag
This results in `wireguard: unknown parameter 'debug' ignored` in dmesg.
Saxtheowl avatar
by flag
Im kinda lost then, maybe disable secure boot or build a costum kernel or request the wireguard dev to provide a module for your demand
us flag
It works with `options wireguard dyndbg` :) Reference: https://www.kernel.org/doc/html/v5.0/admin-guide/dynamic-debug-howto.html#debug-messages-at-module-initialization-time If you update your answer, I'll accept it :-)
us flag
To temporary enable wireguard debugging: `sudo modprobe -r wireguard && sudo modprobe wireguard dyndbg`
Saxtheowl avatar
by flag
great, done :))
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.