bpftrace on ubuntu fails with Kernel lockdown is enabled and set to 'confidentiality'
by clivesa from LinuxQuestions.org on (#5KJJ4)
I am trying to get my feet wet with bpf. I ran following command on an Ubuntu 20.04
sudo bpftrace -e 'tracepoint:syscalls:sys_enter_open { printf("%s %s\n", comm, str(args->filename)); }'
I get this error
Kernel lockdown is enabled and set to 'confidentiality'. Lockdown mode blocks parts of BPF which makes it impossible for bpftrace to function. Please see https://github.com/iovisor/bpftrace/...sable-lockdown for more details on lockdown and how to disable it.
I did disable lockdown
dmesg | grep -i secure
[ 0.000000] secureboot: Secure boot disabled [ 0.027906] secureboot: Secure boot disabled
cat /sys/kernel/security/lockdown
[none] integrity confidentiality
sudo bpftrace -e 'tracepoint:syscalls:sys_enter_open { printf("%s %s\n", comm, str(args->filename)); }'
I get this error
Kernel lockdown is enabled and set to 'confidentiality'. Lockdown mode blocks parts of BPF which makes it impossible for bpftrace to function. Please see https://github.com/iovisor/bpftrace/...sable-lockdown for more details on lockdown and how to disable it.
I did disable lockdown
dmesg | grep -i secure
[ 0.000000] secureboot: Secure boot disabled [ 0.027906] secureboot: Secure boot disabled
cat /sys/kernel/security/lockdown
[none] integrity confidentiality