From a22bcc36672c32419ed22ba102afb96935ed3228 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 9 Apr 2025 18:35:04 +0000 Subject: [PATCH] linuxkm/linuxkm_wc_port.h: on kernel >=6.8, for CONFIG_FORTIFY_SOURCE, use 5-arg fortify_panic() override macro. --- linuxkm/linuxkm_wc_port.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/linuxkm/linuxkm_wc_port.h b/linuxkm/linuxkm_wc_port.h index 0cf124fb3..a7b328d8e 100644 --- a/linuxkm/linuxkm_wc_port.h +++ b/linuxkm/linuxkm_wc_port.h @@ -137,7 +137,13 @@ * fortify_panic(). */ extern void __my_fortify_panic(const char *name) __noreturn __cold; - #define fortify_panic __my_fortify_panic + #if LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0) + /* see linux 3d965b33e40d9 */ + #define fortify_panic(func, write, avail, size, retfail) \ + __my_fortify_panic(#func) + #else + #define fortify_panic __my_fortify_panic + #endif #endif /* the _FORTIFY_SOURCE macros and implementations for several string