blob: bae807eb2933f9391d42c3d0dd73d98928b91a98 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sam Ravnborg273b2812009-10-18 00:52:28 +02002#include <generated/utsrelease.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
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
Paolo 'Blaisorblade' Giarrusso5ac90c92006-04-10 22:54:28 -070015#ifdef CONFIG_MODULE_UNLOAD
16#define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload "
17#else
18#define MODULE_VERMAGIC_MODULE_UNLOAD ""
19#endif
Rusty Russell6c2545e2008-05-09 16:23:17 +100020#ifdef CONFIG_MODVERSIONS
21#define MODULE_VERMAGIC_MODVERSIONS "modversions "
22#else
23#define MODULE_VERMAGIC_MODVERSIONS ""
24#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#ifndef MODULE_ARCH_VERMAGIC
26#define MODULE_ARCH_VERMAGIC ""
27#endif
Kees Cook313dd1b2017-05-05 23:37:45 -070028#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
Linus Torvalds1da177e2005-04-16 15:20:36 -070034
35#define VERMAGIC_STRING \
36 UTS_RELEASE " " \
37 MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
Rusty Russell6c2545e2008-05-09 16:23:17 +100038 MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
Kees Cook313dd1b2017-05-05 23:37:45 -070039 MODULE_ARCH_VERMAGIC \
Greg Kroah-Hartman5cc765d2018-01-24 15:28:17 +010040 MODULE_RANDSTRUCT_PLUGIN
Andi Kleen1bb49962006-09-26 10:52:37 +020041