openwrt/target/linux/ramips
Mieczyslaw Nalewaj 22ccb445e6
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
mt7620: workaround jal imm26 and redundant PAGE_ALIGN
On MT7620-class platforms (CONFIG_NET_RALINK_MT7620) we observe sporadic
wrong-jump-targets, kernel oopses, hanging, corrupted backtraces or even
"half-written" instructions when the compiler emits a direct 'jal imm26'
call.
This is triggered in:
  - the small random helpers inside get_random_u32_below(), and
  - the blkcg_maybe_throttle_current() call in resume_user_mode_work().

This patch forces those two call sites to use an indirect call via
a volatile function pointer (load into register + jalr) when building
for MT7620, avoiding embedding a 26-bit immediate jump target.

Additionally, on MT7620 builds the exec path in fs/exec.c is modified:
  - skip arch_align_stack() + PAGE_ALIGN() in setup_arg_pages()
    because the micro-randomization (< PAGE_SIZE) implemented by many
    ports (including MT7620) is negated immediately by PAGE_ALIGN().
    Skipping the redundant PAGE_ALIGN() reduces exposure to the
    problematic code pattern.

These changes are targeted workarounds for MT7620; behavioral logic is unchanged.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/20553
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-02-24 14:40:39 +01:00
..
base-files/etc ramips: remove model name from LED labels 2020-10-02 14:51:57 +02:00
dts treewide: linksys: use nvmem MAC for hw_mac_addr 2026-02-23 10:56:00 +01:00
files/drivers ramips: mtk_eth_soc: handle EPROBE_DEFER for MAC 2026-02-09 09:58:10 +01:00
image ramips: mt7621: enable kmod-usb3 for Mikrotik RBM33G 2026-02-09 16:04:48 +02:00
mt76x8 ramips: add support for TP-Link TL-MR6400 v7 2026-01-30 14:20:34 +01:00
mt7620 ramips: drop 6.6 support 2025-07-07 20:30:26 +02:00
mt7621 treewide: linksys: use nvmem MAC for hw_mac_addr 2026-02-23 10:56:00 +01:00
patches-6.12 mt7620: workaround jal imm26 and redundant PAGE_ALIGN 2026-02-24 14:40:39 +01:00
rt288x ramips: drop 6.6 support 2025-07-07 20:30:26 +02:00
rt305x ramips: drop 6.6 support 2025-07-07 20:30:26 +02:00
rt3883 ramips: drop 6.6 support 2025-07-07 20:30:26 +02:00
Makefile ramips: use kernel 6.12 by default 2025-07-07 20:30:26 +02:00
modules.mk ramips: mtk-sd: backport Host Software Queue support 2025-06-16 19:31:51 +02:00