From bf408f7965df2155809b0605c912ae4da7e945b7 Mon Sep 17 00:00:00 2001 From: rsuntk Date: Sat, 4 Oct 2025 15:06:22 +0700 Subject: [PATCH] kernel: add guard for avoiding LKM being builded on Linux 6.8+ * Due to numerous changes on LSM (Linux Security Module) in Linux 6.8+ * This is temporary guard until a working solution exist. Signed-off-by: rsuntk --- kernel/kernel_compat.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/kernel_compat.h b/kernel/kernel_compat.h index 810a74ed..a3e63c74 100644 --- a/kernel/kernel_compat.h +++ b/kernel/kernel_compat.h @@ -15,6 +15,14 @@ #define DONT_GET_SMART() barrier() #endif +/* + * Linux 6.8+ does not have LKM support, due to numerous changes on LSM. + * Let's fails if MODULE were defined. + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0) && defined(MODULE) +#error "LKM mode is not supported on Linux 6.8+, aborting build." +#endif + /** * list_count_nodes - count the number of nodes in a list * @head: the head of the list