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 994999c8ce
commit 1d4d23d2c9

View File

@@ -15,6 +15,14 @@
#define kcompat_barrier() barrier() // well, compiler atleast.
#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