-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel module isn't installed to module dir when using falco-driver-loader --download
#2574
Comments
|
AFAICT - no, as long as the dependencies for local compilation exist. But |
Actually, both options are enabled by default:
The expected behavior is that the script first tries with Moreover, in the case of the falco/scripts/debian/postinst.in Lines 80 to 84 in 79b9d0f
That being said, I believe the root cause of the problem is as follows: Since you used If it's confirmed, we should either:
|
That's right, I meant that To elaborate, my use case is a scripted installation of Falco, therefore I can't rely on manually interacting with a graphical prompt. I used
@leogr you're saying that installing the DEB package should be enough because the kmod gets compiled in postinstall? I'm pretty sure I didn't have the kernel module in place after installing the DEB package, which is what prompted me to run |
I've just reproduced the problem on my end. After installing the DEB package, |
Looking at the postinstall script, I can see we're compiling the kmod only when falco/scripts/debian/postinst.in Line 19 in 9a4205c
falco/scripts/debian/postinst.in Line 48 in 9a4205c
falco/scripts/debian/postinst.in Lines 79 to 83 in 9a4205c
So, unless I'm missing something we aren't building the kmod in DEB postinstall when dialog isn't present. This means that one has to build the kmod by running Lastly, would it make sense to compile the kmod by default, and just not insert it when using eBPF mode? Is there any harm in doing so other than a couple more dependencies during installation? I'm trying to figure out how the UX can become simpler and more straightforward by default: Right now it feels like you need internal knowledge of how Falco works just to get it running, at least in my case. |
Now I see that this is a potential duplicate of #2431. |
These are all good points, our actual setup is not so intuitive for the end user. Before refactoring another time our systemd units I think we need 2 key points: These 2 points should allow us to have a great intuitive design and maybe just a single configurable systemd unit! Thanks @johananl for pointing this and other UX issues! |
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
/remove-lifecycle stale |
we are working on that |
I see 2 fixes for this:
|
For the latter one, we need to make sure that the driver is always copied to |
I agree 👍 |
FALCO_DRIVER_CHOICE and the new falcoctl based driver-loader are now on Falco master. |
@FedeDP: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Describe the bug
When using
falco-driver-loader --download
, the kernel module is downloaded and loaded usinginsmod
with an absolute path. However, the module isn't installed/symlinked in/lib/modules/$(uname -r)
. As a result,modprobe falco
fails which in turn causesfalco-kmod-inject.service
to fail which is a dependency offalco-kmod.service
.Interestingly, when running
falco-driver-loader --compile
(or when the download fails and the script falls back to local compilation), the module is symlinked becausedkms
is used in this case and does the linking automatically.How to reproduce it
Root cause:
$ sudo modprobe falco modprobe: FATAL: Module falco not found in directory /lib/modules/5.15.0-72-generic
Workaround:
sudo ln -s /root/.falco/4.0.0+driver/x86_64/falco_ubuntu-generic_5.15.0-72-generic_79.ko /lib/modules/$(uname -r)/falco.ko sudo depmod
Now
systemctl start falco-kmod
works.Expected behaviour
I expected to get a consistent behavior, regardless of whether the kernel module was downloaded or compiled locally.
Screenshots
Environment
n/a
Linux snappy-ewe 5.15.0-72-generic #79-Ubuntu SMP Wed Apr 19 08:22:18 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Deb package
Additional context
The text was updated successfully, but these errors were encountered: