diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-09 16:23:17 +1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-09 07:45:18 -0700 |
commit | 6c2545eefffc452e52302c96c955d9aa26353aa9 (patch) | |
tree | e182a3b98b0d659787780b1c6ae7a22d264b5c5e /include/linux/vermagic.h | |
parent | 28a4acb48586dc21d2d14a75a7aab7be78b7c83b (diff) | |
download | op-kernel-dev-6c2545eefffc452e52302c96c955d9aa26353aa9.zip op-kernel-dev-6c2545eefffc452e52302c96c955d9aa26353aa9.tar.gz |
module: put modversions in vermagic
Don't allow a module built without versions altogether to be inserted
into a kernel which expects modversions.
modprobe --force will strip vermagic as well as modversions, so it
won't be effected, but this will make sure that a
non-CONFIG_MODVERSIONS module won't be accidentally inserted into a
CONFIG_MODVERSIONS kernel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/vermagic.h')
-rw-r--r-- | include/linux/vermagic.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index 4d0909e..79b9837 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h @@ -17,6 +17,11 @@ #else #define MODULE_VERMAGIC_MODULE_UNLOAD "" #endif +#ifdef CONFIG_MODVERSIONS +#define MODULE_VERMAGIC_MODVERSIONS "modversions " +#else +#define MODULE_VERMAGIC_MODVERSIONS "" +#endif #ifndef MODULE_ARCH_VERMAGIC #define MODULE_ARCH_VERMAGIC "" #endif @@ -24,5 +29,6 @@ #define VERMAGIC_STRING \ UTS_RELEASE " " \ MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \ - MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC + MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \ + MODULE_ARCH_VERMAGIC |