kexec on arm fails, possibly due to memdup_user
Amr Bekhit
amr at helmpcb.com
Thu Jul 6 09:47:00 PDT 2023
> > Any pointers as to what could be wrong at this point?
>
> Try without --dtb
No luck unfortunately:
~ # kexec -d -l /data/zImage-yocto
Try gzip decompression.
Try LZMA decompression.
lzma_decompress_file: read on /data/zImage-yocto of 65536 bytes failed
kernel: 0xb6c10090 kernel_size: 0x300e78
MEMORY RANGES
0000000080000000-0000000087dfffff (0)
0000000088000000-000000009fffffff (0)
zImage header: 0x016f2818 0x00000000 0x00300e78
zImage size 0x300e78, file size 0x300e78
offset 0x00006490 tag 0x5a534c4b size 24
zImage requires 0x00311e78 bytes
Decompressed kernel sizes:
text+data 0x00b90a80 bss 0x0003b93c total 0x00bcc3bc
Resulting kernel space: 0x00ea28f8
Kernel: address=0x80008000 size=0x00ea28f8
DT : address=0x80eac000 size=0x00007c0d
kexec_load: entry = 0x80008000 flags = 0x280000
nr_segments = 2
segment[0].buf = 0xb6c10090
segment[0].bufsz = 0x300e78
segment[0].mem = 0x80008000
segment[0].memsz = 0x301000
segment[1].buf = 0xb6c080b0
segment[1].bufsz = 0x7c0d
segment[1].mem = 0x80eac000
segment[1].memsz = 0x8000
~ # kexec -d -e
[ 33.703708] kexec_core: Starting new kernel
[ 33.703753] Bye!
I also tried setting the command-line parameter, just in case the
kernel is actually booting but for some reason maybe the console is
not working:
~ # kexec -d -l /data/zImage-yocto --command-line="rootfstype=ubifs
ubi.mtd=12 root=ubi0:rootfs1 console=ttyMSM0,115200"
Try gzip decompression.
Try LZMA decompression.
lzma_decompress_file: read on /data/zImage-yocto of 65536 bytes failed
kernel: 0xb6b4c090 kernel_size: 0x300e78
MEMORY RANGES
0000000080000000-0000000087dfffff (0)
0000000088000000-000000009fffffff (0)
zImage header: 0x016f2818 0x00000000 0x00300e78
zImage size 0x300e78, file size 0x300e78
offset 0x00006490 tag 0x5a534c4b size 24
zImage requires 0x00311e78 bytes
Decompressed kernel sizes:
text+data 0x00b90a80 bss 0x0003b93c total 0x00bcc3bc
Resulting kernel space: 0x00ea28f8
Kernel: address=0x80008000 size=0x00ea28f8
DT : address=0x80eac000 size=0x00007c49
kexec_load: entry = 0x80008000 flags = 0x280000
nr_segments = 2
segment[0].buf = 0xb6b4c090
segment[0].bufsz = 0x300e78
segment[0].mem = 0x80008000
segment[0].memsz = 0x301000
segment[1].buf = 0xb6b440b0
segment[1].bufsz = 0x7c49
segment[1].mem = 0x80eac000
segment[1].memsz = 0x8000
~ # kexec -d -e
[ 92.123415] kexec_core: Starting new kernel
[ 92.123461] Bye!
Finally, I also tried adding the "reset_devices" kernel parameter.
~ # kexec -d -l /data/zImage-yocto --command-line="rootfstype=ubifs
ubi.mtd=12 root=ubi0:rootfs1 console=ttyMSM0,115200 reset_devices"
Try gzip decompression.
Try LZMA decompression.
lzma_decompress_file: read on /data/zImage-yocto of 65536 bytes failed
kernel: 0xb6bfd090 kernel_size: 0x300e78
MEMORY RANGES
0000000080000000-0000000087dfffff (0)
0000000088000000-000000009fffffff (0)
zImage header: 0x016f2818 0x00000000 0x00300e78
zImage size 0x300e78, file size 0x300e78
offset 0x00006490 tag 0x5a534c4b size 24
zImage requires 0x00311e78 bytes
Decompressed kernel sizes:
text+data 0x00b90a80 bss 0x0003b93c total 0x00bcc3bc
Resulting kernel space: 0x00ea28f8
Kernel: address=0x80008000 size=0x00ea28f8
DT : address=0x80eac000 size=0x00007c59
kexec_load: entry = 0x80008000 flags = 0x280000
nr_segments = 2
segment[0].buf = 0xb6bfd090
segment[0].bufsz = 0x300e78
segment[0].mem = 0x80008000
segment[0].memsz = 0x301000
segment[1].buf = 0xb6bf50b0
segment[1].bufsz = 0x7c59
segment[1].mem = 0x80eac000
segment[1].memsz = 0x8000
~ # kexec -d -e
[ 96.913783] kexec_core: Starting new kernel
[ 96.913829] Bye!
More information about the linux-arm-kernel
mailing list