[PATCH v3 1/3] kexec_load: Use new kexec flag for hotplug support

Baoquan He bhe at redhat.com
Sun Jul 7 18:39:11 PDT 2024


Hi Sourabh,

On 07/07/24 at 08:54pm, Sourabh Jain wrote:
> Kernel commit 79365026f869 (crash: add a new kexec flag for hotplug
> support) has introduced a new kexec flag to generalize hotplug support.
> The newly introduced kexec flags for hotplug allow architectures to
> exclude all the required kexec segments from SHA calculation so that
> the kernel can update them on hotplug events. This was not possible
> earlier with the KEXEC_UPDATE_ELFCOREHDR kexec flags since it was added
> only for the elfcorehdr segment.
> 
> To enable architectures to control the list of kexec segments to exclude
> when hotplug support is enabled, add a new architecture-specific
> function named arch_do_exclude_segment. During the SHA calculation, this
> function gets called to let the architecture decide whether a specific
> kexec segment should be considered for SHA calculation or not.
> 
> Note: To avoid breaking backward compatibility, the new kexec flag
> KEXEC_CRASH_HOTPLUG_SUPPORT is not used for x86 for now.

For x86, both KEXEC_UPDATE_ELFCOREHDR and KEXEC_CRASH_HOTPLUG_SUPPORT
should be OK for kexec_file_load. Your change will make a difference
between kexec_load and kexec_file_load. But I agree with you on the
backward cmpatibility with KEXEC_CRASH_HOTPLUG_SUPPORT flag.

Anyway, if it's in a hurry to catch up with Simon's new release, this is
fine, we can change it later. Otherwise, we may be better to remove the
difference, namely, not making x86 only be able to accept
KEXEC_UPDATE_ELFCOREHDR flag on kexec_load. My personal opinion.




More information about the kexec mailing list