ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
PATCH v2 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.
v2: modified to apply consistently on top of rmk's p2v branch.
---
KernelVersion: rmk/p2v
arch/arm/include/asm/module.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
arch/arm/include/asm/module.h +8 -0
@@ -40,8 +40,16 @@ struct mod_arch_specific {#define MODULE_ARCH_VERMAGIC_P2V ""#endif +/* Add instruction set architecture tag to distinguish ARM/Thumb kernels */ +#ifdef CONFIG_THUMB2_KERNEL +#define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 " +#else +#define MODULE_ARCH_VERMAGIC_ARMTHUMB "" +#endif +#define MODULE_ARCH_VERMAGIC \ MODULE_ARCH_VERMAGIC_ARMVSN \ + MODULE_ARCH_VERMAGIC_ARMTHUMB \ MODULE_ARCH_VERMAGIC_P2V#endif /* _ASM_ARM_MODULE_H */
Signature · 1 line
1.7.1
PATCH v2 1/1 ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
Hello.
Quoted 9 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.
This patch adds "thumb2" to the module vermagic when
CONFIG_THUMB2_KERNELis enabled, to help avoid accidental loading of modules into the wrong kernel.v2: modified to apply consistently on top of rmk's p2v branch.
Patch changelog should follow the -- tearline.
Quoted 2 lines
Signed-off-by Dave Martin<[email protected]>Acked-by Nicolas Pitre<[email protected]>
WBR, Sergei
PATCH v2 1/1 ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
Quoted 12 lines · Sergei Shtylyov
Hello.
Quoted 7 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.
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 9 lines
Quoted 1 line
v2: modified to apply consistently on top of rmk's p2v branch.
? Patch changelog should follow the -- tearline.
Quoted 2 lines
Signed-off-by Dave Martin<[email protected]>Acked-by Nicolas Pitre<[email protected]>WBR, Sergei
Opinions seem to differ... I have no strong opinion on this myself.
Cheers
---Dave
PATCH v2 1/1 ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
Hello.
Quoted 8 lines · Dave Martin
Quoted 7 lines
Quoted 7 lines
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 whenCONFIG_THUMB2_KERNELis enabled, to help avoid accidental loading of modules into the wrong kernel.
v2: modified to apply consistently on top of rmk's p2v branch.
Quoted 6 lines
Quoted 4 lines
Patch changelog should follow the -- tearline.
Quoted 2 lines
Signed-off-by Dave Martin<[email protected]>Acked-by Nicolas Pitre<[email protected]>Opinions seem to differ... I have no strong opinion on this myself.
At least that's what Documentation/SubmittingPatches suggests:
<<
One good use for the additional comments after the "---" marker is for a diffstat, to show what files have changed, and the number of inserted and deleted lines per file. A diffstat is especially useful on bigger patches. Other comments relevant only to the moment or the maintainer, not suitable for the permanent changelog, should also go here. A good example of such comments might be "patch changelogs" which describe what has changed between the v1 and v2 version of the patch.
Quoted 4 lines
Quoted 1 line
Cheers
---Dave
WBR, Sergei
PATCH v2 1/1 ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
Quoted 21 lines · Sergei Shtylyov
Hello.
Quoted 8 lines · Dave Martin
Quoted 7 lines
Quoted 7 lines
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 whenCONFIG_THUMB2_KERNELis enabled, to help avoid accidental loading of modules into the wrong kernel.
v2: modified to apply consistently on top of rmk's p2v branch.Quoted 4 lines
Quoted 4 lines
?Patch changelog should follow the -- tearline.
Quoted 2 lines
Signed-off-by Dave Martin<[email protected]>Acked-by Nicolas Pitre<[email protected]>?> Opinions seem to differ... I have no strong opinion on this myself.
? At least that's what
Documentation/SubmittingPatchessuggests:
Quoted 9 lines
<<
One good use for the additional comments after the "---" marker is for a diffstat, to show what files have changed, and the number of inserted and deleted lines per file. ?A diffstat is especially useful on bigger patches. ?Other comments relevant only to the moment or the maintainer, not suitable for the permanent changelog, should also go here. ?A good example of such comments might be "patch changelogs" which describe what has changed between the v1 and v2 version of the patch.
Fair enough. Doesn't sounds like a inflexible rule all the same, but when the history ceases to be relevant when the patch is merged upstream (as in my case) is may be better to do as you suggest. I agree with Grant that it may sometimes be useful to preserve some of this information in the final commit for more complex/subtle cases, though.
I normally tidy up the cruft before sending a patch to Russell's patch system in any case.
Cheers
---Dave