blob: af6c03f7f986290b7efd01f27bdb1b81eae4e7bd [file] [log] [blame]
Sam Ravnborg273b2812009-10-18 00:52:28 +02001#include <generated/utsrelease.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07002
3/* Simply sanity version stamp for modules. */
4#ifdef CONFIG_SMP
5#define MODULE_VERMAGIC_SMP "SMP "
6#else
7#define MODULE_VERMAGIC_SMP ""
8#endif
9#ifdef CONFIG_PREEMPT
10#define MODULE_VERMAGIC_PREEMPT "preempt "
11#else
12#define MODULE_VERMAGIC_PREEMPT ""
13#endif
Paolo 'Blaisorblade' Giarrusso5ac90c92006-04-10 22:54:28 -070014#ifdef CONFIG_MODULE_UNLOAD
15#define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload "
16#else
17#define MODULE_VERMAGIC_MODULE_UNLOAD ""
18#endif
Rusty Russell6c2545e2008-05-09 16:23:17 +100019#ifdef CONFIG_MODVERSIONS
20#define MODULE_VERMAGIC_MODVERSIONS "modversions "
21#else
22#define MODULE_VERMAGIC_MODVERSIONS ""
23#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070024#ifndef MODULE_ARCH_VERMAGIC
25#define MODULE_ARCH_VERMAGIC ""
26#endif
Kees Cook313dd1b62017-05-05 23:37:45 -070027#ifdef RANDSTRUCT_PLUGIN
28#include <generated/randomize_layout_hash.h>
29#define MODULE_RANDSTRUCT_PLUGIN "RANDSTRUCT_PLUGIN_" RANDSTRUCT_HASHED_SEED
30#else
31#define MODULE_RANDSTRUCT_PLUGIN
32#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070033
34#define VERMAGIC_STRING \
35 UTS_RELEASE " " \
36 MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
Rusty Russell6c2545e2008-05-09 16:23:17 +100037 MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
Kees Cook313dd1b62017-05-05 23:37:45 -070038 MODULE_ARCH_VERMAGIC \
39 MODULE_RANDSTRUCT_PLUGIN
Andi Kleen1bb49962006-09-26 10:52:37 +020040