1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <generated/utsrelease.h>
3 
4 /* Simply sanity version stamp for modules. */
5 #ifdef CONFIG_SMP
6 #define MODULE_VERMAGIC_SMP "SMP "
7 #else
8 #define MODULE_VERMAGIC_SMP ""
9 #endif
10 #ifdef CONFIG_PREEMPT
11 #define MODULE_VERMAGIC_PREEMPT "preempt "
12 #else
13 #define MODULE_VERMAGIC_PREEMPT ""
14 #endif
15 #ifdef CONFIG_MODULE_UNLOAD
16 #define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload "
17 #else
18 #define MODULE_VERMAGIC_MODULE_UNLOAD ""
19 #endif
20 #ifdef CONFIG_MODVERSIONS
21 #define MODULE_VERMAGIC_MODVERSIONS "modversions "
22 #else
23 #define MODULE_VERMAGIC_MODVERSIONS ""
24 #endif
25 #ifndef MODULE_ARCH_VERMAGIC
26 #define MODULE_ARCH_VERMAGIC ""
27 #endif
28 #ifdef RANDSTRUCT_PLUGIN
29 #include <generated/randomize_layout_hash.h>
30 #define MODULE_RANDSTRUCT_PLUGIN "RANDSTRUCT_PLUGIN_" RANDSTRUCT_HASHED_SEED
31 #else
32 #define MODULE_RANDSTRUCT_PLUGIN
33 #endif
34 
35 #define VERMAGIC_STRING 						\
36 	UTS_RELEASE " "							\
37 	MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT 			\
38 	MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS	\
39 	MODULE_ARCH_VERMAGIC						\
40 	MODULE_RANDSTRUCT_PLUGIN
41 
42