rockchip binary firmware use undeclared memory
Because of that, we can get asynchronous external abort oops on rockpro64
To reproduce the bug you can run this command and wain 30 minutes
while 'true'; do hexdump /dev/mmcblkX; done
where mmcblkX can be any existing bloc device (eMMC or sdcard)
An another way to get the oops is to use pine's PCIe to SATA card and to attach one SATA disk. I then launch syncthing and let it scan my files. I get the oops in 5 minutes. You can also create a 4GB file using dd command.
This issue is discussed here: https://www.spinics.net/lists/arm-kernel/msg759563.html and here: https://forum.pine64.org/showthread.php?tid=8372&pid=55862#pid55862
To solve this issue I tried the latest u-boot which can boot the rockpro64 without any blobs from rockchip. And this seem to fix the issue. See patstew's message for more information. I did my test on manjaro arm 19.12
Here is the oops
[root@rock ~]# [ 2394.791155] SError Interrupt on CPU5, code 0xbf000000 -- SError
[ 2394.791157] CPU: 5 PID: 786 Comm: dd Tainted: G C 5.4.2-2-MANJARO-ARM #1
[ 2394.791158] Hardware name: Pine64 RockPro64 (DT)
[ 2394.791159] pstate: 20000005 (nzCv daif -PAN -UAO)
[ 2394.791160] pc : __arch_copy_from_user+0x1b4/0x240
[ 2394.791160] lr : copyin+0x60/0x70
[ 2394.791161] sp : ffff800012d6bb00
[ 2394.791162] x29: ffff800012d6bb00 x28: 0000000000000000
[ 2394.791164] x27: 0000000000001000 x26: ffff80001200fe90
[ 2394.791165] x25: 0000000000000000 x24: ffff800012d6bd30
[ 2394.791167] x23: ffff800012d6bd20 x22: 0000000000000000
[ 2394.791169] x21: 0000000000001000 x20: ffff000009c01000
[ 2394.791170] x19: 0000000000001000 x18: 0000000000000014
[ 2394.791171] x17: 000000009e14f215 x16: 00000000d5ea6887
[ 2394.791173] x15: 0000000019dcb38c x14: 0000000000000000
[ 2394.791174] x13: 0000000000000000 x12: 0000000000000000
[ 2394.791176] x11: 0000000000000000 x10: 0000000000000000
[ 2394.791177] x9 : 0000000000000000 x8 : 0000000000000000
[ 2394.791179] x7 : 0000000000000000 x6 : ffff000009c00190
[ 2394.791180] x5 : ffff000009c01000 x4 : 0000000000000000
[ 2394.791182] x3 : 0000ffffffffffff x2 : 0000000000000e00
[ 2394.791183] x1 : 0000ffffac84e1c0 x0 : ffff000009c00000
[ 2394.791185] Kernel panic - not syncing: Asynchronous SError Interrupt
[ 2394.791186] CPU: 5 PID: 786 Comm: dd Tainted: G C 5.4.2-2-MANJARO-ARM #1
[ 2394.791187] Hardware name: Pine64 RockPro64 (DT)
[ 2394.791187] Call trace:
[ 2394.791188] dump_backtrace+0x0/0x170
[ 2394.791189] show_stack+0x24/0x30
[ 2394.791190] dump_stack+0xac/0xd0
[ 2394.791190] panic+0x144/0x334
[ 2394.791191] __stack_chk_fail+0x0/0x28
[ 2394.791192] arm64_serror_panic+0x84/0x90
[ 2394.791192] do_serror+0x11c/0x120
[ 2394.791193] el1_error+0x84/0xf8
[ 2394.791194] __arch_copy_from_user+0x1b4/0x240
[ 2394.791194] iov_iter_copy_from_user_atomic+0xec/0x370
[ 2394.791195] generic_perform_write+0xf0/0x1d0
[ 2394.791196] __generic_file_write_iter+0x134/0x1b8
[ 2394.791197] ext4_file_write_iter+0xd0/0x338
[ 2394.791197] new_sync_write+0xf8/0x190
[ 2394.791198] __vfs_write+0x74/0x90
[ 2394.791199] vfs_write+0xd4/0x1b8
[ 2394.791199] ksys_write+0x78/0x100
[ 2394.791200] __arm64_sys_write+0x24/0x30
[ 2394.791201] el0_svc_common.constprop.0+0x74/0x168
[ 2394.791201] el0_svc_handler+0x34/0xa0
[ 2394.791202] el0_svc+0x8/0xc
[ 2394.791221] SMP: stopping secondary CPUs
[ 2394.791222] Kernel Offset: disabled
[ 2394.791222] CPU features: 0x0002,2000600c
[ 2394.791223] Memory Limit: none