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 <rsuntk@yukiprjkt.my.id>
This commit is contained in:
rsuntk
2025-10-04 15:06:22 +07:00
committed by ShirkNeko
parent 13c7912320
commit c89a3dbcd9

View File

@@ -15,6 +15,14 @@
#define DONT_GET_SMART() barrier() #define DONT_GET_SMART() barrier()
#endif #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 * list_count_nodes - count the number of nodes in a list
* @head: the head of the list * @head: the head of the list