summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Li2025-12-10 01:36:42 +0000
committerChristian Marangi2025-12-10 18:10:30 +0000
commit9e9206427fba3ca301e9328c3d37f8ce1f14b2e7 (patch)
tree3a842f544577f97e3eaa3ba396777c3b6b77bc5f
parentf3e4620f592be9413a5c71fbc4b664c50a158faa (diff)
downloadopenwrt-9e9206427fba3ca301e9328c3d37f8ce1f14b2e7.tar.gz
loongarch64: Disable strict alignment to fix BPF program failures
CONFIG_ARCH_STRICT_ALIGN=y (default in config-6.12) causes BPF programs (XDP, TC, tracing, etc.) to fail verification with misaligned packet and memory access errors, breaking essential kernel functionality. Hardware support status: - Supported (modern CPUs): 2K2000, 2K3000, 3A5000, 3A6000, 3C5000, 3C6000, 3D5000 - Unsupported (legacy): 2K500, 2K1000 The current default prioritizes legacy compatibility over: 1. BPF program functionality across multiple subsystems 2. Performance on widely deployed modern hardware 3. Modern kernel features relying on unaligned accesses Since BPF programs require unaligned access capabilities and most LoongArch deployments use modern CPUs with hardware support, disable CONFIG_ARCH_STRICT_ALIGN. Legacy system users can manually enable it if needed. Link: https://github.com/vincentmli/BPFire/issues/69 Reference: https://elixir.bootlin.com/linux/v6.12/source/arch/loongarch/Kconfig#L534 Signed-off-by: Vincent Li <vincent.mc.li@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21121 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-rw-r--r--target/linux/loongarch64/config-6.122
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/loongarch64/config-6.12 b/target/linux/loongarch64/config-6.12
index 99a587e6a7..c4fc987b6d 100644
--- a/target/linux/loongarch64/config-6.12
+++ b/target/linux/loongarch64/config-6.12
@@ -52,7 +52,7 @@ CONFIG_ARCH_MMAP_RND_BITS_MIN=12
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_STACKWALK=y
-CONFIG_ARCH_STRICT_ALIGN=y
+# CONFIG_ARCH_STRICT_ALIGN is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANTS_NO_INSTR=y
CONFIG_ARCH_WANTS_THP_SWAP=y