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 <jliebermann@microsoft.com>
This commit is contained in:
Johanan Liebermann 2023-08-14 16:36:04 +03:00 committed by poiana
parent a2b21fa264
commit f4c8833a0e

View File

@ -486,6 +486,12 @@ load_bpf_probe_compile() {
make modules_prepare > /dev/null 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 if [ "${TARGET_ID}" == "cos" ]; then
echo "* COS detected (build ${BUILD_ID}), using COS kernel headers" echo "* COS detected (build ${BUILD_ID}), using COS kernel headers"