Skip to content
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

Allow specifying explicit kernel release and version for falco-driver-loader #2658

Closed
johananl opened this issue Jun 26, 2023 · 0 comments · Fixed by #2728
Closed

Allow specifying explicit kernel release and version for falco-driver-loader #2658

johananl opened this issue Jun 26, 2023 · 0 comments · Fixed by #2728

Comments

@johananl
Copy link
Contributor

johananl commented Jun 26, 2023

Motivation

I'm installing Falco using Ansible as part of a Packer build which results in a VM image. As part of the build process I'm updating the kernel to a newer version. When running falco-driver-loader --compile module, the module is compiled and installed for the running kernel:

KERNEL_RELEASE=$(uname -r)

KERNEL_VERSION=$(uname -v | sed 's/#\([[:digit:]]\+\).*/\1/')

However, since the kernel version was updated but the VM hadn't been rebooted since the update, the result is that the kmod isn't compiled for the kernel version that is used in practice when creating VMs from the image.

One way to solve the problem is to explicitly specify the kernel release and kernel version when running falco-driver-loader. However, the script doesn't currently support this.

Feature

Maybe it makes sense to add the following two argument to falco-driver-loader and default to the current behavior if either of the vars isn't specified:

  • KERNEL_RELEASE
  • KERNEL_VERSION

I'm happy to open PR if this sounds like a good idea.

Alternatives

I could try to insert a reboot to my image building process, however this would be suboptimal. In addition, I imagine many Falco users rely on automation for installing Falco and therefore may benefit from being able to explicitly specify the kernel for which to compile the driver. As my use case demonstrates, the assumption that Falco is used with the currently-running kernel isn't always true.

Additional context

Whatever gets decided, we should ensure the functionality works for both kmod and BPF modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant