From f4c8833a0e5290ce5b29d6136c4f2b075e4f6274 Mon Sep 17 00:00:00 2001 From: Johanan Liebermann Date: Mon, 14 Aug 2023 16:36:04 +0300 Subject: [PATCH] Relocate tools on Flatcar in BPF mode In https://github.com/falcosecurity/falco/pull/2043 we've added logic for relocating tools on Flatcar when running falco-driver-loader in kmod mode. This logic is relevant for BPF mode, too, which is currently broken on Flatcar. Call flatcar_relocate_tools in BPF mode, too. Signed-off-by: Johanan Liebermann --- scripts/falco-driver-loader | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/falco-driver-loader b/scripts/falco-driver-loader index 194449c7..a6c18963 100755 --- a/scripts/falco-driver-loader +++ b/scripts/falco-driver-loader @@ -486,6 +486,12 @@ load_bpf_probe_compile() { make modules_prepare > /dev/null } + if [ "${TARGET_ID}" == "flatcar" ]; then + KERNEL_RELEASE=${DRIVER_KERNEL_RELEASE} + echo "* Flatcar detected (version ${VERSION_ID}); relocating kernel tools" + flatcar_relocate_tools + fi + if [ "${TARGET_ID}" == "cos" ]; then echo "* COS detected (build ${BUILD_ID}), using COS kernel headers"