openwrt/target/linux/generic
Tony Ambardar 2932b4d05e kernel: mips: fix init crash/bootloop on 64-bit systems
The malta subtargets for mips64 and mips64el fail to start the init process
at boot, resulting in a boot loop. The issue was raised and analyzed within
FS#3277. Investigation suggested code near the [vdso] memory area of the
process was long jumping into a region inaccessible to the process, e.g.

 init: - preinit -
 init: Launched preinit instance, pid=522
 do_page_fault(): sending SIGSEGV to init for invalid read access from 0000000000000360
 epc = 0000000000000360 in init[aaab42b000+4000]
 ra  = 000000fffee385e0 in
 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
 Rebooting in 1 seconds..

Note the low-memory read access and epc are the same. Upstream kernel 5.6
included a relevant patch and discussion:

  * d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in vdso code")

Disassembly of the failing kernel's vdso.so confirmed presence of the
telltale long jumps, e.g.:

00000000000007c0 <__vdso_clock_getres@@LINUX_2.6>:
 [...]
 7dc:   0320f809        jalr    t9
 [...]

Restore booting mips64/mips64el malta by backporting the above commit:
  * 310-v5.6-mips-vdso-fix-jalr-t9-crash-in-vdso-code.patch

Fixes: 54310a3aa0 ("malta: add kernel 5.4 config")
Fixes: FS#3277
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3277

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2020-08-15 00:04:59 +08:00
..
backport-4.14 kernel: Update kernel 4.14 to version 4.14.193 2020-08-10 19:34:37 +02:00
backport-4.19 kernel: Fix cake patch for kernel 4.19.138 2020-08-11 21:11:53 +02:00
backport-5.4 kernel: mips: fix init crash/bootloop on 64-bit systems 2020-08-15 00:04:59 +08:00
files treewide: rename POWER_ON_STRIP register 2020-07-25 21:50:50 +02:00
hack-4.14 kernel: Update kernel 4.14 to version 4.14.193 2020-08-10 19:34:37 +02:00
hack-4.19 kernel: Update kernel 4.19 to version 4.19.138 2020-08-10 19:34:37 +02:00
hack-5.4 kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
image treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
other-files kernel: move initramfs's init script out of base-files 2017-04-04 14:06:40 +02:00
pending-4.14 kernel: Create UBIFS v5 volume 2020-08-11 21:11:53 +02:00
pending-4.19 kernel: Create UBIFS v5 volume 2020-08-11 21:11:53 +02:00
pending-5.4 kernel: Create UBIFS v5 volume 2020-08-11 21:11:53 +02:00
config-4.14 kernel: add CGROUPS and IOSCHED_BFQ back to config 2020-08-12 14:03:17 +02:00
config-4.19 kernel: add CGROUPS and IOSCHED_BFQ back to config 2020-08-12 14:03:17 +02:00
config-5.4 kernel: add CGROUPS and IOSCHED_BFQ back to config 2020-08-12 14:03:17 +02:00
PATCHES kernel: update PATCHES with a stricter policy 2013-07-09 20:52:07 +00:00