From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB58A224234 for ; Sun, 14 Jun 2026 11:59:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781438342; cv=none; b=HM7Aqv8wiWEBUNb7VH+z+jcB7hKBYP/j+i7IyGRB/O1vnhMDUc9WCl9x/Q/NXWGYiQuB8qusiA9ALejYIbmKEfYn6LozqBIgEKt2ginJ6TZJgLuV3magJ9QoDzHiettyKM+P90bRWKWuBJAjNOdEZ1xVAUSr1LgrgT8d4fs0Ans= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781438342; c=relaxed/simple; bh=zTZl0e0yVWVcYo5BuaNiFPRWvG+d9puULyPrTvQy33A=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WqJulpLGyzjKPmsR6g1crafZvBa66mJTykqPRidmkcjVPDAGuA3dJLPLuPId678qIXzX62JOcv967CDtN1rMQm/bhPq95nSs658lp7VFSivrYa3Sn3wyCsPFHfUHvpRFym5xB3Ig5MRJBBR90wBsWwUTXdKjsTEUetmHO5EXYjk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BKWYqvsn; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BKWYqvsn" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-490b915ded5so22643275e9.3 for ; Sun, 14 Jun 2026 04:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781438339; x=1782043139; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=eSovo2PZqoPUZzCz7TwsyL7/LMkogfDdhMF3mspVec8=; b=BKWYqvsnEBTCMu/EDkWqIDaUHB3lEjnxO01iZG5NQTVYbm6XykZLJlVwjjgqWNDEqC pU40foGahLk+1qi/Qv1H2VuMcKrgAhzCroCPw7ch/Bp+JRHzmXxZ71rDqT6PkEoGQUK1 jSjLxgWWg0a433qSlZNKEYvp64uTk7EvK+VKc+xKwGgEsOwvdf+QgODH1jCmLGnBlVIn /8tOljLOJ9c4y7qORdXoVqzAMn7z7XncLDlqhfz3Oz5xE+aw7bya32blH6/DFRvcICCP 83B/AIVuukEOKVH7mPyj+GEouOC2hNf7nJx7QwS86cMuHrMqd51yHQ2QqDmCZ36Sd+aV J9zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781438339; x=1782043139; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=eSovo2PZqoPUZzCz7TwsyL7/LMkogfDdhMF3mspVec8=; b=nHxFrM3WDYnpdeoSuBBy0nE/l4kZAtu8+z7EnuIIAhc3uzv+soKFG93qU187cQga2W O+j2JWIJqDYFjUwfwQ+UXrjyVOfFg+tEhEiNgy/oW27t7ChT7DrZAcV2lMdZ+BofwjeZ L7tVCGszdpFR4GVtt8mYbOTq6oeVB6JAB/0rRVolqddJG45IGFEUqwtbRGM6GawuXgSa RXdRW1uOcK4cQW1alkv50ElryoyuUefh+gbGCBAohYJHJh6SzPJ8GOwHF3tvGG3wmmn1 pYrk8e2ylhFhiJKyT+Ao2NWjPmjKE9M4luDnc1VQoPiXrRQYzJ78YzWdqfjt4EBZ5MHN jljg== X-Forwarded-Encrypted: i=1; AFNElJ+z7cK8BA8wYaD2kZkyTV0rVFMKGF/WcE5eHNTUlcmdfW6wsh/DMRriJgYaJPDByhcawA1skPxTr4bvrh8=@vger.kernel.org X-Gm-Message-State: AOJu0YxWRvdRKw2HHtTBvk//o0Onbecth460fLwSq3AYPXLopF/+puL0 D4mdR2H7iU5kjvBRy1/F53izODQLxlU6MnrcwNQxvTdUjTGuhgEY6UT+ X-Gm-Gg: Acq92OG38DcCJFAop8zOAegIkNOvmN8LcNrBFji7an15bqm58wODEWl2BLMgzoXNPJC ilDnAvvCLBXzTiGravY9S2TiDVdWTP/urSFZZDxHziwSErCWB9EOM/XkV6I4mOoUqcVJYeDhFtc YQxjBqJYdxJVMX8me4SCcAFPsBRvUTm6TnRfribSftkPYn1yGrTrUhqX633DXqXdjuXwCAo0DhJ AckMMj40d+snQzu0j4Sm+dSiGcjU5v3i2ZPLYSSnLeyTYdkujZACYwdQArMKzVth5g3N8Y7agBs X0XfM1DhFESJeELRv1R5S++lu0BPab5EZ+ZA4ToyAHK9lYbeGpXaCF4RLrig8timBGYXs1jkxbI oSaIJzlODkgPCWP2QVcaVizNtUXO6lT2XJxcLj5yz/gjfjLb7e7d5LwYmU5Pw8ZxOu9KLDxeOVg C6S/xf+uc3OhN68nQN4BZAX04lIqKcSHweJTaBhzd2ZEoLj0u1ckMStuTA+cHI X-Received: by 2002:a05:6000:4912:b0:45e:de0a:1773 with SMTP id ffacd0b85a97d-4606dbf15b7mr14210900f8f.33.1781438339050; Sun, 14 Jun 2026 04:58:59 -0700 (PDT) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4606f2b0c35sm24759410f8f.22.2026.06.14.04.58.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2026 04:58:58 -0700 (PDT) Date: Sun, 14 Jun 2026 12:58:57 +0100 From: David Laight To: Ethan Nelson-Moore Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Russell King , "Russell King (Oracle)" , Arnd Bergmann , Linus Walleij , Kees Cook , Nathan Chancellor , Thomas Weissschuh , Peter Zijlstra , Shubham Bansal , "David S. Miller" Subject: Re: [PATCH] ARM: disable broken eBPF JIT on the Risc PC Message-ID: <20260614125857.398a0e13@pumpkin> In-Reply-To: <20260518014920.135011-1-enelsonmoore@gmail.com> References: <20260518014920.135011-1-enelsonmoore@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 17 May 2026 18:49:17 -0700 Ethan Nelson-Moore 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 > --- > 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