Sam Ravnborg | 273b281 | 2009-10-18 00:52:28 +0200 | [diff] [blame] | 1 | #include <generated/utsrelease.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | |
| 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' Giarrusso | 5ac90c9 | 2006-04-10 22:54:28 -0700 | [diff] [blame] | 14 | #ifdef CONFIG_MODULE_UNLOAD |
| 15 | #define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload " |
| 16 | #else |
| 17 | #define MODULE_VERMAGIC_MODULE_UNLOAD "" |
| 18 | #endif |
Rusty Russell | 6c2545e | 2008-05-09 16:23:17 +1000 | [diff] [blame] | 19 | #ifdef CONFIG_MODVERSIONS |
| 20 | #define MODULE_VERMAGIC_MODVERSIONS "modversions " |
| 21 | #else |
| 22 | #define MODULE_VERMAGIC_MODVERSIONS "" |
| 23 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | #ifndef MODULE_ARCH_VERMAGIC |
| 25 | #define MODULE_ARCH_VERMAGIC "" |
| 26 | #endif |
Kees Cook | 313dd1b6 | 2017-05-05 23:37:45 -0700 | [diff] [blame] | 27 | #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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | |
| 34 | #define VERMAGIC_STRING \ |
| 35 | UTS_RELEASE " " \ |
| 36 | MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ |
Rusty Russell | 6c2545e | 2008-05-09 16:23:17 +1000 | [diff] [blame] | 37 | MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \ |
Kees Cook | 313dd1b6 | 2017-05-05 23:37:45 -0700 | [diff] [blame] | 38 | MODULE_ARCH_VERMAGIC \ |
| 39 | MODULE_RANDSTRUCT_PLUGIN |
Andi Kleen | 1bb4996 | 2006-09-26 10:52:37 +0200 | [diff] [blame] | 40 | |