falco: "BPF doesn't have JIT enabled" reported incorrectly when using docker
Describe the bug
Even if JIT is enabled for BPF, both falcosecurity/falco and facosecurity/falco-driver-loader are reporting the following message when run with -e FALCO_BPF_PROBE="":
******************************************************************
** BPF doesn't have JIT enabled, performance might be degraded. **
** Please ensure to run on a kernel with CONFIG_BPF_JIT on. **
******************************************************************
How to reproduce it
In a system with a kernel >= 4.15 with CONFIG_BPF_JIT on and docker installed, run:
docker run --rm -i -t \
--privileged \
-v /dev:/host/dev \
-v /proc:/host/proc:ro \
-v /boot:/host/boot:ro \
-v /lib/modules:/host/lib/modules:ro \
-v /usr:/host/usr:ro \
-v /etc:/host/etc:ro \
-e FALCO_BPF_PROBE="" \
falcosecurity/falco:0.23.0
Expected behaviour
No “BPF doesn’t have JIT enabled, performance might be degraded” banner.
Screenshots
Environment
- Falco version:
0.23.0 - System info:
- Cloud provider or hardware configuration:
- OS:
- Kernel:
Linux ubuntu-xenial 4.15.0-101-generic #102~16.04.1-Ubuntu SMP Mon May 11 11:38:16 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux - Installation method:
docker
Additional context
Because the view of /proc inside the container is different, this check is not working as expected when it runs inside a container. Note that prefixing the path with ${HOST} will not solve the issue anyway.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 34 (20 by maintainers)
Uhm so if this is the situation probably I would simply close the issue, keeping in mind that we have a solution in the case. WDYT @leogr ?
Please note that this log is no more present, this is a quite old issue
Thank you for the research!
first of all, thank you for the investigation! Just some random thoughts:
/remove-lifecycle rotten
IIRC, we suppressed the banner. https://github.com/falcosecurity/falco/pull/1811 attempted to re-introduce it, but I had some concern 👇 https://github.com/falcosecurity/falco/pull/1811#pullrequestreview-837474605
cc @LucaGuerra @FedeDP