* [PATCH v2] ARM: Implement ARCH_HAS_CC_CAN_LINK
@ 2026-02-06 13:02 Thomas Weißschuh
2026-02-06 13:29 ` Russell King (Oracle)
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Weißschuh @ 2026-02-06 13:02 UTC (permalink / raw)
To: Russell King
Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann,
Thomas Weißschuh
The generic CC_CAN_LINK detection does not handle different byte orders.
This may lead to userprogs which are not actually runnable on the target
kernel.
Use architecture-specific logic supporting byte orders instead.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Changes in v2:
- Handle BE8 vs BE32 platforms
- Link to v1: https://lore.kernel.org/r/20260109-cc-can-link-arm-v1-1-b748e2aaa6a6@linutronix.de
---
arch/arm/Kconfig | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fa83c040ee2d..d5cb85d82dad 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -6,6 +6,7 @@ config ARM
select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE if HAVE_KRETPROBES && FRAME_POINTER && !ARM_UNWIND
select ARCH_HAS_BINFMT_FLAT
select ARCH_HAS_CACHE_LINE_SIZE if OF
+ select ARCH_HAS_CC_CAN_LINK
select ARCH_HAS_CPU_CACHE_ALIASING
select ARCH_HAS_CPU_FINALIZE_INIT if MMU
select ARCH_HAS_CURRENT_STACK_POINTER
@@ -1715,6 +1716,18 @@ config KERNEL_MODE_NEON
endmenu
+config ARCH_CC_CAN_LINK
+ bool
+ default $(cc_can_link_user,-mlittle-endian) if CPU_LITTLE_ENDIAN
+ default $(cc_can_link_user,-mbig-endian -mbe8) if CPU_ENDIAN_BE8
+ default $(cc_can_link_user,-mbig-endian -mbe32) if CPU_ENDIAN_BE32
+
+config ARCH_USERFLAGS
+ string
+ default "-mlittle-endian" if CPU_LITTLE_ENDIAN
+ default "-mbig-endian -mbe8" if CPU_ENDIAN_BE8
+ default "-mbig-endian -mbe32" if CPU_ENDIAN_BE32
+
menu "Power management options"
source "kernel/power/Kconfig"
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20260102-cc-can-link-arm-4eecfad2a0e4
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: Implement ARCH_HAS_CC_CAN_LINK
2026-02-06 13:02 [PATCH v2] ARM: Implement ARCH_HAS_CC_CAN_LINK Thomas Weißschuh
@ 2026-02-06 13:29 ` Russell King (Oracle)
2026-02-06 13:32 ` Thomas Weißschuh
0 siblings, 1 reply; 4+ messages in thread
From: Russell King (Oracle) @ 2026-02-06 13:29 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann
On Fri, Feb 06, 2026 at 02:02:38PM +0100, Thomas Weißschuh wrote:
> The generic CC_CAN_LINK detection does not handle different byte orders.
> This may lead to userprogs which are not actually runnable on the target
> kernel.
>
> Use architecture-specific logic supporting byte orders instead.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Damn, I've recently merged your v1 patch. Can you send a follow-up
patch to my patch system please?
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: Implement ARCH_HAS_CC_CAN_LINK
2026-02-06 13:29 ` Russell King (Oracle)
@ 2026-02-06 13:32 ` Thomas Weißschuh
2026-02-06 13:52 ` Russell King (Oracle)
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Weißschuh @ 2026-02-06 13:32 UTC (permalink / raw)
To: Russell King (Oracle); +Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann
On Fri, Feb 06, 2026 at 01:29:31PM +0000, Russell King (Oracle) wrote:
> On Fri, Feb 06, 2026 at 02:02:38PM +0100, Thomas Weißschuh wrote:
> > The generic CC_CAN_LINK detection does not handle different byte orders.
> > This may lead to userprogs which are not actually runnable on the target
> > kernel.
> >
> > Use architecture-specific logic supporting byte orders instead.
> >
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>
> Damn, I've recently merged your v1 patch. Can you send a follow-up
> patch to my patch system please?
Oh, sorry. That was a fast application.
Do you want an incremental patch on top or the full v2?
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: Implement ARCH_HAS_CC_CAN_LINK
2026-02-06 13:32 ` Thomas Weißschuh
@ 2026-02-06 13:52 ` Russell King (Oracle)
0 siblings, 0 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2026-02-06 13:52 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: linux-arm-kernel, linux-kernel, Arnd Bergmann
On Fri, Feb 06, 2026 at 02:32:42PM +0100, Thomas Weißschuh wrote:
> On Fri, Feb 06, 2026 at 01:29:31PM +0000, Russell King (Oracle) wrote:
> > On Fri, Feb 06, 2026 at 02:02:38PM +0100, Thomas Weißschuh wrote:
> > > The generic CC_CAN_LINK detection does not handle different byte orders.
> > > This may lead to userprogs which are not actually runnable on the target
> > > kernel.
> > >
> > > Use architecture-specific logic supporting byte orders instead.
> > >
> > > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> >
> > Damn, I've recently merged your v1 patch. Can you send a follow-up
> > patch to my patch system please?
>
> Oh, sorry. That was a fast application.
>
> Do you want an incremental patch on top or the full v2?
Incremental please.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-06 13:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 13:02 [PATCH v2] ARM: Implement ARCH_HAS_CC_CAN_LINK Thomas Weißschuh
2026-02-06 13:29 ` Russell King (Oracle)
2026-02-06 13:32 ` Thomas Weißschuh
2026-02-06 13:52 ` Russell King (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox