* [PATCH v2] ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
@ 2011-02-23 11:53 Dave Martin
2011-02-23 21:24 ` Sergei Shtylyov
0 siblings, 1 reply; 5+ messages in thread
From: Dave Martin @ 2011-02-23 11:53 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
KernelVersion: rmk/p2v
arch/arm/include/asm/module.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/module.h b/arch/arm/include/asm/module.h
index a2b775b..543b449 100644
--- a/arch/arm/include/asm/module.h
+++ b/arch/arm/include/asm/module.h
@@ -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 */
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2] ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
2011-02-23 11:53 [PATCH v2] ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic Dave Martin
@ 2011-02-23 21:24 ` Sergei Shtylyov
2011-02-24 11:06 ` Dave Martin
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-02-23 21:24 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 23-02-2011 14:53, Dave Martin wrote:
> 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.
Patch changelog should follow the -- tearline.
> Signed-off-by: Dave Martin<dave.martin@linaro.org>
> Acked-by: Nicolas Pitre<nicolas.pitre@linaro.org>
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
2011-02-23 21:24 ` Sergei Shtylyov
@ 2011-02-24 11:06 ` Dave Martin
2011-02-25 17:53 ` Sergei Shtylyov
0 siblings, 1 reply; 5+ messages in thread
From: Dave Martin @ 2011-02-24 11:06 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Feb 23, 2011 at 9:24 PM, Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> Hello.
>
> On 23-02-2011 14:53, Dave Martin wrote:
>
>> 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.
>
> ? Patch changelog should follow the -- tearline.
>
>> Signed-off-by: Dave Martin<dave.martin@linaro.org>
>> Acked-by: Nicolas Pitre<nicolas.pitre@linaro.org>
>
> WBR, Sergei
>
Opinions seem to differ... I have no strong opinion on this myself.
Cheers
---Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
2011-02-24 11:06 ` Dave Martin
@ 2011-02-25 17:53 ` Sergei Shtylyov
2011-02-25 18:18 ` Dave Martin
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-02-25 17:53 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
Dave Martin wrote:
>>> 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.
>> Patch changelog should follow the -- tearline.
>>> Signed-off-by: Dave Martin<dave.martin@linaro.org>
>>> Acked-by: Nicolas Pitre<nicolas.pitre@linaro.org>
> 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.
>>
> Cheers
> ---Dave
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic
2011-02-25 17:53 ` Sergei Shtylyov
@ 2011-02-25 18:18 ` Dave Martin
0 siblings, 0 replies; 5+ messages in thread
From: Dave Martin @ 2011-02-25 18:18 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 25, 2011 at 5:53 PM, Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> Hello.
>
> Dave Martin wrote:
>
>>>> 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.
>
>>> ?Patch changelog should follow the -- tearline.
>
>>>> Signed-off-by: Dave Martin<dave.martin@linaro.org>
>>>> Acked-by: Nicolas Pitre<nicolas.pitre@linaro.org>
>
> ?> 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.
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-25 18:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-23 11:53 [PATCH v2] ARM: Thumb-2: Reflect ARM/Thumb-2 configuration in module vermagic Dave Martin
2011-02-23 21:24 ` Sergei Shtylyov
2011-02-24 11:06 ` Dave Martin
2011-02-25 17:53 ` Sergei Shtylyov
2011-02-25 18:18 ` Dave Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox