I'd like to run bpftrace under Ubuntu on VirtualBox.
Unfortunately, I get
$ sudo bpftrace -e 'tracepoint:syscalls:sys_enter_open { printf("%s %s\n", comm, str(args->filename)); }'
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/blob/master/INSTALL.md#disable-lockdown
for more details on lockdown and how to disable it.
Which leads me to the following instructions
1. Disable secure boot in UEFI.
As far as I can tell, there's no UEFI with VirtualBox.
2. Disable validation using mokutil, run the following command, reboot and follow the prompt.
$ sudo mokutil --disable-validation
This results in
EFI variables are not supported on this system
And
3. Use the SysRQ+x key combination to temporarily lift lockdown (until next boot)
Can't find how to do this under VirtualBox.
Any tips?
edit Apparently, @Qeole installed the same VM I did and didn't get the issue. Something must have gone wrong in my install. I tried with another VM and it now seems to work.
Leaving the issue open so that people can find this resolution.