From 73e56799fe86dce851c6cf07a768e81597e204d9 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 16 May 2023 12:38:53 +0800 Subject: [PATCH] kernel: allow loading modules with non-matching BTF type info by default Signed-off-by: Tianling Shen --- config/Config-kernel.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index df63cdd15d..322f68724f 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -374,6 +374,17 @@ config KERNEL_DEBUG_INFO_BTF Required to run BPF CO-RE applications. +config KERNEL_MODULE_ALLOW_BTF_MISMATCH + bool "Allow loading modules with non-matching BTF type info" + depends on KERNEL_DEBUG_INFO_BTF + default y + help + For modules whose split BTF does not match vmlinux, load without + BTF rather than refusing to load. The default behavior with + module BTF enabled is to reject modules with such mismatches; + this option will still load module BTF where possible but ignore + it when a mismatch is found. + config KERNEL_DEBUG_INFO_REDUCED bool "Reduce debugging information" default y if !(TARGET_bcm27xx || TARGET_ipq807x || TARGET_mediatek_filogic || TARGET_mvebu_cortexa53 || TARGET_mvebu_cortexa72 || TARGET_rockchip || TARGET_sunxi || TARGET_x86)