Skip to content

Commit a22bcc3

Browse files
committed
linuxkm/linuxkm_wc_port.h: on kernel >=6.8, for CONFIG_FORTIFY_SOURCE, use 5-arg fortify_panic() override macro.
1 parent 099eaf5 commit a22bcc3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

linuxkm/linuxkm_wc_port.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@
137137
* fortify_panic().
138138
*/
139139
extern void __my_fortify_panic(const char *name) __noreturn __cold;
140-
#define fortify_panic __my_fortify_panic
140+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0)
141+
/* see linux 3d965b33e40d9 */
142+
#define fortify_panic(func, write, avail, size, retfail) \
143+
__my_fortify_panic(#func)
144+
#else
145+
#define fortify_panic __my_fortify_panic
146+
#endif
141147
#endif
142148

143149
/* the _FORTIFY_SOURCE macros and implementations for several string

0 commit comments

Comments
 (0)