ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
PATCH 1/1 ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
Loading Thumb-2 modules into an ARM kernel or vice-versa isn't guaranteed to work safely, since the kernel is not interworking- aware everywhere.
This patch adds "thumb2" to the module vermagic when CONFIG_THUMB2_KERNEL is enabled, to help avoid accidental loading of modules into the wrong kernel.
--- arch/arm/include/asm/module.h | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
arch/arm/include/asm/module.h +9 -2
@@ -25,8 +25,15 @@ struct mod_arch_specific { };/* -* Include the ARM architecture version. +* Include the ARM architecture version and instruction set architecture. */ -#define MODULE_ARCH_VERMAGIC "ARMv" __stringify(__LINUX_ARM_ARCH__) " " +#ifdef CONFIG_THUMB2_KERNEL +#define ARM_ARCH_VERMAGIC_ISAFAMILY " thumb2" +#else +#define ARM_ARCH_VERMAGIC_ISAFAMILY "" +#endif + +#define MODULE_ARCH_VERMAGIC "ARMv" __stringify(__LINUX_ARM_ARCH__) \ + ARM_ARCH_VERMAGIC_ISAFAMILY " "#endif /* _ASM_ARM_MODULE_H */
Signature · 1 line
1.7.1
PATCH 1/1 ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
Quoted 3 lines · Dave Martin
Loading Thumb-2 modules into an ARM kernel or vice-versa isn't guaranteed to work safely, since the kernel is not interworking- aware everywhere.
Too bad.
Quoted 5 lines
This patch adds "thumb2" to the module vermagic when
CONFIG_THUMB2_KERNELis enabled, to help avoid accidental loading of modules into the wrong kernel.Signed-off-by Dave Martin <[email protected]>
Quoted 35 lines
--- arch/arm/include/asm/module.h | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)arch/arm/include/asm/module.h +9
-2@@ -25,8 +25,15 @@ struct mod_arch_specific { };/* -* Include the ARM architecture version. +* Include the ARM architecture version and instruction set architecture. */ -#define MODULE_ARCH_VERMAGIC "ARMv" __stringify(__LINUX_ARM_ARCH__) " " +#ifdef CONFIG_THUMB2_KERNEL +#define ARM_ARCH_VERMAGIC_ISAFAMILY " thumb2" +#else +#define ARM_ARCH_VERMAGIC_ISAFAMILY "" +#endif + +#define MODULE_ARCH_VERMAGIC "ARMv" __stringify(__LINUX_ARM_ARCH__) \ + ARM_ARCH_VERMAGIC_ISAFAMILY " "#endif /* _ASM_ARM_MODULE_H */ Signature · 7 lines
1.7.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
Quoted 8 lines · Nicolas Pitre
Quoted 3 lines · Dave Martin
Loading Thumb-2 modules into an ARM kernel or vice-versa isn't guaranteed to work safely, since the kernel is not interworking- aware everywhere.
Too bad.
Quoted 7 lines
Quoted 5 lines
This patch adds "thumb2" to the module vermagic when
CONFIG_THUMB2_KERNELis enabled, to help avoid accidental loading of modules into the wrong kernel.Signed-off-by Dave Martin <[email protected]>Acked-by Nicolas Pitre <[email protected]>
Lets wait until after the next merge window has gone, or let's have a patch which takes account of stuff already merged. Either way, there little point acking it as it needs an effective rewrite to fit around the P2V changes to this file.
PATCH 1/1 ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
Quoted 13 lines · Russell King - ARM Linux
Quoted 12 lines · Nicolas Pitre
Quoted 3 lines · Dave Martin
Loading Thumb-2 modules into an ARM kernel or vice-versa isn't guaranteed to work safely, since the kernel is not interworking- aware everywhere.
Too bad.
Quoted 4 lines
This patch adds "thumb2" to the module vermagic when
CONFIG_THUMB2_KERNELis enabled, to help avoid accidental loading of modules into the wrong kernel.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Dave Martin <[email protected]>Acked-by Nicolas Pitre <[email protected]>Lets wait until after the next merge window has gone, or let's have a patch which takes account of stuff already merged. Either way, there little point acking it as it needs an effective rewrite to fit around the P2V changes to this file.
It certainly can be made to apply on top of your p2v-stable branch.
Nicolas