* [PATCH] ARM: disable broken eBPF JIT on the Risc PC
@ 2026-05-18 1:49 Ethan Nelson-Moore
2026-05-25 8:18 ` Linus Walleij
2026-06-14 11:58 ` David Laight
0 siblings, 2 replies; 4+ messages in thread
From: Ethan Nelson-Moore @ 2026-05-18 1:49 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel
Cc: Ethan Nelson-Moore, stable, Russell King, Russell King (Oracle),
Arnd Bergmann, Linus Walleij, Kees Cook, Nathan Chancellor,
Thomas Weissschuh, Peter Zijlstra, Shubham Bansal,
David S. Miller
The eBPF JIT unconditionally generates ldrh/strh instructions, which do
not function correctly on the Risc PC because its bus is unable to
signal half-word accesses. Work around this issue by disabling the eBPF
JIT when building for ARMv3 (the Risc PC is the only currently
supported ARMv3 machine).
Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler")
Cc: stable@vger.kernel.org
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1155c78bb6aa..8185d013e5d1 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -98,7 +98,7 @@ config ARM
select HAVE_ARCH_TRACEHOOK
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARM_LPAE
select HAVE_ARM_SMCCC if CPU_V7
- select HAVE_EBPF_JIT if !CPU_ENDIAN_BE32
+ select HAVE_EBPF_JIT if !CPU_ENDIAN_BE32 && !CPU_32v3
select HAVE_CONTEXT_TRACKING_USER
select HAVE_C_RECORDMCOUNT
select HAVE_BUILDTIME_MCOUNT_SORT
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: disable broken eBPF JIT on the Risc PC
2026-05-18 1:49 [PATCH] ARM: disable broken eBPF JIT on the Risc PC Ethan Nelson-Moore
@ 2026-05-25 8:18 ` Linus Walleij
2026-06-14 1:50 ` Ethan Nelson-Moore
2026-06-14 11:58 ` David Laight
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2026-05-25 8:18 UTC (permalink / raw)
To: Ethan Nelson-Moore
Cc: linux-arm-kernel, linux-kernel, stable, Russell King,
Russell King (Oracle), Arnd Bergmann, Kees Cook,
Nathan Chancellor, Thomas Weissschuh, Peter Zijlstra,
Shubham Bansal, David S. Miller
On Mon, May 18, 2026 at 3:49 AM Ethan Nelson-Moore
<enelsonmoore@gmail.com> wrote:
> The eBPF JIT unconditionally generates ldrh/strh instructions, which do
> not function correctly on the Risc PC because its bus is unable to
> signal half-word accesses. Work around this issue by disabling the eBPF
> JIT when building for ARMv3 (the Risc PC is the only currently
> supported ARMv3 machine).
>
> Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Looks correct to me.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Please put this into Russell's patch tracker!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: disable broken eBPF JIT on the Risc PC
2026-05-25 8:18 ` Linus Walleij
@ 2026-06-14 1:50 ` Ethan Nelson-Moore
0 siblings, 0 replies; 4+ messages in thread
From: Ethan Nelson-Moore @ 2026-06-14 1:50 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-arm-kernel, linux-kernel, stable, Russell King,
Russell King (Oracle), Arnd Bergmann, Kees Cook,
Nathan Chancellor, Thomas Weissschuh, Peter Zijlstra,
Shubham Bansal, David S. Miller
On Mon, May 25, 2026 at 1:18 AM Linus Walleij <linusw@kernel.org> wrote:
> Looks correct to me.
> Reviewed-by: Linus Walleij <linusw@kernel.org>
>
> Please put this into Russell's patch tracker!
Done!
https://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=9477/1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: disable broken eBPF JIT on the Risc PC
2026-05-18 1:49 [PATCH] ARM: disable broken eBPF JIT on the Risc PC Ethan Nelson-Moore
2026-05-25 8:18 ` Linus Walleij
@ 2026-06-14 11:58 ` David Laight
1 sibling, 0 replies; 4+ messages in thread
From: David Laight @ 2026-06-14 11:58 UTC (permalink / raw)
To: Ethan Nelson-Moore
Cc: linux-arm-kernel, linux-kernel, stable, Russell King,
Russell King (Oracle), Arnd Bergmann, Linus Walleij, Kees Cook,
Nathan Chancellor, Thomas Weissschuh, Peter Zijlstra,
Shubham Bansal, David S. Miller
On Sun, 17 May 2026 18:49:17 -0700
Ethan Nelson-Moore <enelsonmoore@gmail.com> wrote:
> The eBPF JIT unconditionally generates ldrh/strh instructions, which do
> not function correctly on the Risc PC because its bus is unable to
> signal half-word accesses. Work around this issue by disabling the eBPF
> JIT when building for ARMv3 (the Risc PC is the only currently
> supported ARMv3 machine).
Isn't it more the case that the ldrh/strh instructions were added for armv4.
Whether the bus supports 16bit accesses is entirely different.
I'm guessing that WRITE_ONCE() gets implemented as two 8-bit writes and
the code 'just hopes' than an ISR won't care and won't do an update.
David
>
> Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> ---
> arch/arm/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 1155c78bb6aa..8185d013e5d1 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -98,7 +98,7 @@ config ARM
> select HAVE_ARCH_TRACEHOOK
> select HAVE_ARCH_TRANSPARENT_HUGEPAGE if ARM_LPAE
> select HAVE_ARM_SMCCC if CPU_V7
> - select HAVE_EBPF_JIT if !CPU_ENDIAN_BE32
> + select HAVE_EBPF_JIT if !CPU_ENDIAN_BE32 && !CPU_32v3
> select HAVE_CONTEXT_TRACKING_USER
> select HAVE_C_RECORDMCOUNT
> select HAVE_BUILDTIME_MCOUNT_SORT
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-14 11:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-18 1:49 [PATCH] ARM: disable broken eBPF JIT on the Risc PC Ethan Nelson-Moore
2026-05-25 8:18 ` Linus Walleij
2026-06-14 1:50 ` Ethan Nelson-Moore
2026-06-14 11:58 ` David Laight
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox