[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230116173005.21bd7b67@meshulam.tesarici.cz>
Date: Mon, 16 Jan 2023 17:30:05 +0100
From: Petr Tesařík <petr@...arici.cz>
To: Eric DeVolder <eric.devolder@...cle.com>
Cc: Sourabh Jain <sourabhjain@...ux.ibm.com>,
linux-kernel@...r.kernel.org, x86@...nel.org,
kexec@...ts.infradead.org, ebiederm@...ssion.com,
dyoung@...hat.com, bhe@...hat.com, vgoyal@...hat.com,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com,
nramas@...ux.microsoft.com, thomas.lendacky@....com,
robh@...nel.org, efault@....de, rppt@...nel.org, david@...hat.com,
konrad.wilk@...cle.com, boris.ostrovsky@...cle.com
Subject: Re: [PATCH v15 1/7] crash: move crash_prepare_elf64_headers()
Hi Eric,
On Thu, 12 Jan 2023 11:23:18 -0600
Eric DeVolder <eric.devolder@...cle.com> wrote:
>[...]
> After looking into this for a bit, to allow hotplug without kexec_file would require quite a bit of
> code movement. Why? Because hotplug is basically built on top of (part of) the infrastructure that
> was needed for kexec_file.
>
> I'd be inclined to suggest that KEXEC_FILE be a required dependency for CRASH_HOTPLUG, ie:
>
> config CRASH_HOTPLUG
> bool "Update the crash elfcorehdr on system configuration changes"
> default n
> - depends on CRASH_DUMP && (HOTPLUG_CPU || MEMORY_HOTPLUG)
> + depends on CRASH_DUMP && KEXEC_FILE && (HOTPLUG_CPU || MEMORY_HOTPLUG)
>
>
> If that isn't feasible, then it would appear quite a bit of surgery is needed to properly separate
> out the items hotplug needs from kexec_file.
>
> Thoughts?
I would have thought that CPU hotplug can be handled in the kernel only
if the crash image was loaded by the kernel with kexec_file_load(2).
When the image is loaded with kexec_load(2), then all data structures
are prepared by the user-space utility kexec(8), and the kernel
generally has no idea how to handle them.
In short, I believe that by definition there must be this dependency of
CRASH_HOTPLUG on KEXEC_FILE.
Petr T
Powered by blists - more mailing lists