lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da9b637a-962a-4a9f-a4bf-b79e6119b29c@linux.ibm.com>
Date: Fri, 14 Feb 2025 12:15:31 +0530
From: Sourabh Jain <sourabhjain@...ux.ibm.com>
To: Hari Bathini <hbathini@...ux.ibm.com>,
        Venkat Rao Bagalkote <venkat88@...ux.vnet.ibm.com>,
        linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [linux-next-20250212] syscall kexec_file_load not available

Hello Hari,


On 14/02/25 12:02, Hari Bathini wrote:
>
>
> On 13/02/25 8:34 pm, Venkat Rao Bagalkote wrote:
>> Greetings!!!
>>
>>  From kernel next-20250210, I am observing syscall kexec_file_load 
>> not available, there by kdump service is failing to start.
>>
>>
>> Logs:
>>
>> [root@...-zzci-1 ~]# kexec -p --initrd=/boot/initramfs-6.14.0-rc2- 
>> next-20250212kdump.img /boot/vmlinuz-6.14.0-rc2-next-20250212 -c
>> Warning: append= option is not passed. Using the first kernel root 
>> partition
>> Modified cmdline: elfcorehdr=311424K root=UUID=b5b1f89c- 
>> d479-48b3-90e2-744a2fd05667
>> [root@...-zzci-1 ~]# kexec -p --initrd=/boot/initramfs-6.14.0-rc2- 
>> next-20250212kdump.img /boot/vmlinuz-6.14.0-rc2-next-20250212 -s
>> syscall kexec_file_load not available.
>> [root@...-zzci-1 ~]# kexec -v
>> kexec-tools 2.0.27
>> [root@...-zzci-1 ~]# uname -r
>> 6.14.0-rc2-next-20250212
>>
>
> Is the kernel built with CONFIG_KEXEC_FILE ?

I am able to reproduce it with CONFIG_KEXEC_FILE enabled.

Seems like there is something went wrong in next-20250210 and next-20250212.

kexec -p --initrd=/boot/initramfs-6.14.0-rc2-next-20250210kdump.img 
/boot/vmlinuz-6.14.0-rc2-next-20250210 -d -s

Try gzip decompression.
Try LZMA decompression.
[ 3375.712319] kexec_file: kernel: 00000000e539303c kernel_size: 0x2cdacf0
[ 3375.717022] ima: kexec measurement buffer for the loaded kernel at 0x0.
[ 3375.717076] kexec_elf: Loaded the kernel at 0x0
[ 3375.717094] kexec_elf: Loaded purgatory at 0x0
[ 3375.717104] Loaded the backup region at 0x0
[ 3375.717130] crash_core: Crash PT_LOAD ELF header. 
phdr=000000004720e656 vaddr=0xc000000000000000, paddr=0x0, sz=0x10000 
e_phnum=18 p_offset=0x0
[ 3375.717156] crash_core: Crash PT_LOAD ELF header. 
phdr=0000000005eb3f14 vaddr=0xc000000000010000, paddr=0x10000, 
sz=0xfff0000 e_phnum=19 p_offset=0x10000
[ 3375.717174] crash_core: Crash PT_LOAD ELF header. 
phdr=000000000ec70071 vaddr=0xc00000001ec20000, paddr=0x1ec20000, 
sz=0x13e0000 e_phnum=20 p_offset=0x1ec20000
[ 3375.717192] crash_core: Crash PT_LOAD ELF header. 
phdr=00000000b66c9c25 vaddr=0xc000000050000000, paddr=0x50000000, 
sz=0x3b0000000 e_phnum=21 p_offset=0x50000000
[ 3375.717215] Loaded elf core header at 0x0, bufsz=0x1000 memsz=0x80000
[ 3375.717229] kexec_elf: Loaded initrd at 0x0
[ 3375.718043] Memory node path: /memory@0
[ 3375.722854] kexec_elf: Loaded device tree at 0x0
syscall kexec_file_load not available.

Kernel is reporting that all kexec segments are getting loaded at 0x0.

Running kexec with strace shows that kexec_file_load system return -1 
EINVAL.

kexec_file_load(3, 4, 1, "\0", KEXEC_FILE_ON_CRASH) = -1 EINVAL (Invalid 
argument)

Based on the logs printed on the console and kexec_file_load return 
value. I am suspecting
kexec_file_load returned early form sanity_check_segment_list() because 
the segment is 0x0.

I am investigating further to find how segment.mem for all segment is 0x0.

Thanks,
Sourabh Jain




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ