at these changes, and I am in
favor of these changes.
Furthermore, I ran the following thru the Kconfig regression script, and
did not find anything!
I believe the following patch represents the current discussion threads
around Kconfig and KEXEC/CRASH.
Reviewed-by: Eric DeVolder
Tested-by: Eric
_CORE
- select KEXEC
help
Generate crash dump after being started by kexec.
This should be normally only set in special crash dump kernels
I have run this change against the kconfig regression script, and it did
not find any differences!
Review
sysfs attributes")
Signed-off-by: Baoquan He
Reviewed-by: Eric DeVolder
---
drivers/base/cpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 9ea22e165acd..548491de818e 100644
--- a/drivers/base/cpu.c
+++ b/drive
On 11/23/23 01:36, Baoquan He wrote:
Ignat reported a potential config regression was introduced by
commit 89cde455915f ("kexec: consolidate kexec and crash options
into kernel/Kconfig.kexec"). Please click below link for more details:
On 10/4/23 07:08, Simon Horman wrote:
On Wed, Sep 27, 2023 at 02:11:30PM -0400, Eric DeVolder wrote:
When the kdump service is loaded, if a CPU or memory is hot
un/plugged, the crash elfcorehdr, which describes the CPUs and memory
in the system, must also be updated, else the resulting
For hotplug, the elfcorehdr segment must be sized appropriately
to allow a growing number of CPUs or memory regions. Use the size
reported by the kernel via /sys/kernel/crash_elfcorehdr_sz.
Signed-off-by: Eric DeVolder
---
kexec/arch/i386/crashdump-x86.c | 8
1 file changed, 8
,
then at panic time, the checksum/digest check fails (due to the
elfcorehdr having been modified), and the kdump capture kernel does
not start.
Signed-off-by: Eric DeVolder
---
kexec/kexec.c | 8
kexec/kexec.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/kexec/kexec.c b/kexec
Signed-off-by: Eric DeVolder
---
kexec/kexec.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/kexec/kexec.c b/kexec/kexec.c
index d790748..0207608 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -1631,6 +1631,24 @@ int main(int argc, char *argv[])
die(&q
Identify the segment containing the elfcorehdr buffer so that
it can be excluded from the purgatory checksum/digest, if hotplug
support is in effect.
Signed-off-by: Eric DeVolder
---
kexec/arch/i386/crashdump-x86.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kexec/arch/i386/crashdump
.
v1: 20oct2022
http://lists.infradead.org/pipermail/kexec/2022-October/026032.html
- Initial patch series
RFC:
https://lore.kernel.org/lkml/b04ed259-dc5f-7f30-6661-c26f92d90...@oracle.com/
s/vmcoreinfo/elfcorehdr/g
---
Eric DeVolder (6):
kexec: define KEXEC_UPDATE_ELFCOREHDR
crashdump
. For the
kexec_file_load() syscall, this option is a no-op as the kernel
handles all aspects of loading the kdump image.
This is the command line processing and documentation.
Signed-off-by: Eric DeVolder
---
kexec/kexec.8 | 6 ++
kexec/kexec.c | 6 ++
kexec/kexec.h | 7 ++-
3 files
the kernel flag.
Signed-off-by: Eric DeVolder
---
kexec/kexec-syscall.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
index 1e2d12f..2559bff 100644
--- a/kexec/kexec-syscall.h
+++ b/kexec/kexec-syscall.h
@@ -112,6 +112,7 @@ static inline long
On 9/26/23 15:50, Andrew Morton wrote:
On Tue, 26 Sep 2023 20:09:05 +0800 Baoquan He wrote:
Eric reported that handling corresponding crash hotplug event can be
failed easily when many memory hotplug event are notified in a short
period. They failed because failing to take __kexec_lock.
the "size of the swarm". Both with kexec_load and kexec_file_load.
Tested-by: Eric DeVolder
Reviewed-by: Eric DeVolder
---
v2->v3:
- crash_check_update_elfcorehdr() need take __crash_hotplug_lock
too because there's tiny racing window when kexec_load interface
is taken. Eri
On 9/24/23 22:07, Baoquan He wrote:
Eric reported that handling corresponding crash hotplug event can be
failed easily when many memory hotplug event are notified in a short
period. They failed because failing to take __kexec_lock.
===
[ 78.714569] Fallback order for Node 0: 0
[
On 9/22/23 18:54, Baoquan He wrote:
Eric reported that handling corresponding crash hotplug event can be
failed easily when many momery hotplug event are notified in a short period.
They failed because failing to take __kexec_lock.
===
[ 78.714569] Fallback order for Node 0: 0
[
On 9/22/23 11:28, Valentin Schneider wrote:
On 21/09/23 17:59, Eric DeVolder wrote:
The design decision to use the atomic lock is described in the comment
from kexec_internal.h, cited above. However, examining the code of
__crash_kexec():
if (kexec_trylock
On 9/22/23 03:06, Baoquan He wrote:
On 09/22/23 at 11:36am, Dave Young wrote:
[Cced Valentin Schneider as he added the trylocks]
On Fri, 22 Sept 2023 at 06:04, Eric DeVolder wrote:
Scaled up testing has revealed that the kexec_trylock()
implementation leads to failures within the crash
On 9/21/23 19:26, Andrew Morton wrote:
On Thu, 21 Sep 2023 17:59:38 -0400 Eric DeVolder
wrote:
Scaled up testing has revealed that the kexec_trylock()
implementation leads to failures within the crash hotplug
infrastructure due to the inability to acquire the lock,
specifically
On 9/21/23 19:22, Andrew Morton wrote:
On Thu, 21 Sep 2023 17:59:38 -0400 Eric DeVolder
wrote:
Scaled up testing has revealed that the kexec_trylock()
implementation leads to failures within the crash hotplug
infrastructure due to the inability to acquire the lock,
specifically
ing, and utilize
mutex_trylock() as the "best effort" in __crash_kexec(). The use of a
mutex then avoids all the lock acquisition problems that were revealed
by the crash hotplug activity.
Convert the atomic lock to a mutex.
Signed-off-by: Eric DeVolder
---
kernel/crash_core.c | 10
On 8/14/23 17:33, Andrew Morton wrote:
On Mon, 14 Aug 2023 17:44:38 -0400 Eric DeVolder
wrote:
This series is dependent upon "refactor Kconfig to consolidate
KEXEC and CRASH options".
https://lore.kernel.org/lkml/20230712161545.87870-1-eric.devol...@oracle.com/
Once the kdu
On 8/12/23 05:47, Sourabh Jain wrote:
Hello Eric,
On 11/08/23 22:36, Eric DeVolder wrote:
To support crash hotplug, a mechanism is needed to update the crash
elfcorehdr upon CPU or memory changes (eg. hot un/plug or off/
onlining). The crash elfcorehdr describes the CPUs and memory
of these pieces does not matter; kexec_load()'d kdump
images still function for hotplug as-is.
Suggested-by: Hari Bathini
Signed-off-by: Eric DeVolder
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/include/asm/kexec.h | 11 +++
arch/x86/kernel/crash.c | 27 ++
kexec_load() syscall in the absence of
kexec_file_load() syscall support, prepare_elf_headers() and
dependents are moved outside of CONFIG_KEXEC_FILE.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/Kconfig | 3 +
arch/x86
RFC: 14dec2020
https://lkml.org/lkml/2020/12/14/532
https://lore.kernel.org/lkml/b04ed259-dc5f-7f30-6661-c26f92d90...@oracle.com/
NOTE: s/vmcoreinfo/elfcorehdr/g
- proposed concept of allowing kernel to handle hotplug update
of elfcorehdr
---
Eric DeVolder (8):
crash: move a few code
crash_mem and crash_notes were moved to new
locales so that PROC_KCORE, which sets CRASH_CORE alone, builds
correctly.
No functionality change intended.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
include/linux/crash_core.h | 20
update other information besides the
elfcorehdr, on CPU changes.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/kernel/crash.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/
from the purgatory digest, enabling updates to
the elfcorehdr while also avoiding the need to recompute the hash
digest and reload purgatory.
Suggested-by: Baoquan He
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
kernel/kexec_file.c | 6
separated in accordance with
CONFIG_HOTPLUG_CPU and CONFIG_MEMORY_HOTPLUG kernel config options.
If an architecture supports, for example, memory hotplug but not
CPU hotplug, then the /sys/devices/system/memory/crash_hotplug
attribute file is present, but the /sys/devices/system/cpu/crash_hotplug
att
userspace-supplied elfcorehdr. In this situation,
one memory or CPU change will rewrite the elfcorehdr via the
crash_prepare_elf64_headers() function and now all possible CPUs will
be described, just as with kexec_file_load() syscall.
Suggested-by: Sourabh Jain
Signed-off-by: Eric DeVolder
needed tasks and then dispatches the event to the
architecture specific arch_crash_handle_hotplug_event() to update the
elfcorehdr with the current state of CPUs and memory. During the
process, the kexec_lock is held.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
needed tasks and then dispatches the event to the
architecture specific arch_crash_handle_hotplug_event() to update the
elfcorehdr with the current state of CPUs and memory. During the
process, the kexec_lock is held.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
om/
- working patchset demonstrating kernel handling of hotplug
updates to x86 elfcorehdr for kexec_file_load
RFC: 14dec2020
https://lkml.org/lkml/2020/12/14/532
https://lore.kernel.org/lkml/b04ed259-dc5f-7f30-6661-c26f92d90...@oracle.com/
NOTE: s/vmcoreinfo/elfcorehdr/g
- proposed concept
update other information besides the
elfcorehdr, on CPU changes.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/kernel/crash.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/
userspace-supplied elfcorehdr. In this situation,
one memory or CPU change will rewrite the elfcorehdr via the
crash_prepare_elf64_headers() function and now all possible CPUs will
be described, just as with kexec_file_load() syscall.
Suggested-by: Sourabh Jain
Signed-off-by: Eric DeVolder
kexec_load() syscall in the absence of
kexec_file_load() syscall support, prepare_elf_headers() and
dependents are moved outside of CONFIG_KEXEC_FILE.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/Kconfig | 3 +
arch/x86
from the purgatory digest, enabling updates to
the elfcorehdr while also avoiding the need to recompute the hash
digest and reload purgatory.
Suggested-by: Baoquan He
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
kernel/kexec_file.c | 6
separated in accordance with
CONFIG_HOTPLUG_CPU and CONFIG_MEMORY_HOTPLUG kernel config options.
If an architecture supports, for example, memory hotplug but not
CPU hotplug, then the /sys/devices/system/memory/crash_hotplug
attribute file is present, but the /sys/devices/system/cpu/crash_hotplug
att
change intended.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
include/linux/kexec.h | 30 +++
kernel/crash_core.c | 182 ++
kernel/kexec_file.c | 181
of these pieces does not matter; kexec_load()'d kdump
images still function for hotplug as-is.
Suggested-by: Hari Bathini
Signed-off-by: Eric DeVolder
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/include/asm/kexec.h | 11 +++
arch/x86/kernel/crash.c | 27 ++
userspace-supplied elfcorehdr. In this situation,
one memory or CPU change will rewrite the elfcorehdr via the
crash_prepare_elf64_headers() function and now all possible CPUs will
be described, just as with kexec_file_load() syscall.
Suggested-by: Sourabh Jain
Signed-off-by: Eric DeVolder
update other information besides the
elfcorehdr, on CPU changes.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/kernel/crash.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/
from the purgatory digest, enabling updates to
the elfcorehdr while also avoiding the need to recompute the hash
digest and reload purgatory.
Suggested-by: Baoquan He
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
kernel/kexec_file.c | 6
change intended.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
include/linux/kexec.h | 30 +++
kernel/crash_core.c | 182 ++
kernel/kexec_file.c | 181
/lkml.org/lkml/2020/12/14/532
https://lore.kernel.org/lkml/b04ed259-dc5f-7f30-6661-c26f92d90...@oracle.com/
NOTE: s/vmcoreinfo/elfcorehdr/g
- proposed concept of allowing kernel to handle hotplug update
of elfcorehdr
---
Eric DeVolder (8):
crash: move a few code bits to setup support of
of these pieces does not matter; kexec_load()'d kdump
images still function for hotplug as-is.
Suggested-by: Hari Bathini
Signed-off-by: Eric DeVolder
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/include/asm/kexec.h | 11 +++
arch/x86/kernel/crash.c | 27 ++
needed tasks and then dispatches the event to the
architecture specific arch_crash_handle_hotplug_event() to update the
elfcorehdr with the current state of CPUs and memory. During the
process, the kexec_lock is held.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
kexec_load() syscall in the absence of
kexec_file_load() syscall support, prepare_elf_headers() and
dependents are moved outside of CONFIG_KEXEC_FILE.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/Kconfig | 3 +
arch/x86
separated in accordance with
CONFIG_HOTPLUG_CPU and CONFIG_MEMORY_HOTPLUG kernel config options.
If an architecture supports, for example, memory hotplug but not
CPU hotplug, then the /sys/devices/system/memory/crash_hotplug
attribute file is present, but the /sys/devices/system/cpu/crash_hotplug
att
On 7/21/23 11:32, Eric DeVolder wrote:
On 7/3/23 11:53, Eric DeVolder wrote:
On 7/3/23 08:05, Greg KH wrote:
On Thu, Jun 29, 2023 at 03:21:10PM -0400, Eric DeVolder wrote:
- the function body of the callback functions are now wrapped with
IS_ENABLED(); as the callback function
On 7/3/23 11:53, Eric DeVolder wrote:
On 7/3/23 08:05, Greg KH wrote:
On Thu, Jun 29, 2023 at 03:21:10PM -0400, Eric DeVolder wrote:
- the function body of the callback functions are now wrapped with
IS_ENABLED(); as the callback function must exist now that the
attribute
On 7/3/23 08:07, Greg KH wrote:
On Thu, Jun 29, 2023 at 03:21:15PM -0400, Eric DeVolder wrote:
+What: /sys/devices/system/cpu/crash_hotplug
+Date: Jun 2023
It's not "Jun" anymore :(
+Contact: Linux kernel mailing list
Why are you not going t
On 7/3/23 08:05, Greg KH wrote:
On Thu, Jun 29, 2023 at 03:21:10PM -0400, Eric DeVolder wrote:
- the function body of the callback functions are now wrapped with
IS_ENABLED(); as the callback function must exist now that the
attribute is always compiled-in (though not necessarily
Randy,
Thanks for looking at this! Inline comments below.
eric
On 6/29/23 15:59, Randy Dunlap wrote:
Hi--
On 6/29/23 12:21, Eric DeVolder wrote:
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
Documentation/ABI/testing/sysfs
of these pieces does not matter; kexec_load()'d kdump
images still function for hotplug as-is.
Suggested-by: Hari Bathini
Signed-off-by: Eric DeVolder
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/include/asm/kexec.h | 11 +++
arch/x86/kernel/crash.c | 27 ++
separated in accordance with
CONFIG_HOTPLUG_CPU and CONFIG_MEMORY_HOTPLUG kernel config options.
If an architecture supports, for example, memory hotplug but not
CPU hotplug, then the /sys/devices/system/memory/crash_hotplug
attribute file is present, but the /sys/devices/system/cpu/crash_hotplug
att
wrapped with
IS_ENABLED(); as the callback function must exist now that the
attribute is always compiled-in (though not necessarily visible).
No functionality change intended.
Signed-off-by: Eric DeVolder
---
drivers/base/cpu.c | 125 +++
include
kexec_load() syscall in the absence of
kexec_file_load() syscall support, prepare_elf_headers() and
dependents are moved outside of CONFIG_KEXEC_FILE.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/Kconfig | 3 +
arch/x86
visible).
No functionality change intended.
Signed-off-by: Eric DeVolder
---
drivers/base/memory.c | 229 ++
1 file changed, 140 insertions(+), 89 deletions(-)
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index b456ac213610..7294112fe646 100644
RFC: 14dec2020
https://lkml.org/lkml/2020/12/14/532
https://lore.kernel.org/lkml/b04ed259-dc5f-7f30-6661-c26f92d90...@oracle.com/
- proposed concept of allowing kernel to handle hotplug update
of elfcorehdr
---
Eric DeVolder (10):
drivers/base: refactor cpu.c to use .is_visible()
driver
needed tasks and then dispatches the event to the
architecture specific arch_crash_handle_hotplug_event() to update the
elfcorehdr with the current state of CPUs and memory. During the
process, the kexec_lock is held.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
userspace-supplied elfcorehdr. In this situation,
one memory or CPU change will rewrite the elfcorehdr via the
crash_prepare_elf64_headers() function and now all possible CPUs will
be described, just as with kexec_file_load() syscall.
Suggested-by: Sourabh Jain
Signed-off-by: Eric DeVolder
change intended.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
include/linux/kexec.h | 30 +++
kernel/crash_core.c | 182 ++
kernel/kexec_file.c | 181
from the purgatory digest, enabling updates to
the elfcorehdr while also avoiding the need to recompute the hash
digest and reload purgatory.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
kernel/kexec_file.c | 6 ++
1 file changed, 6
update other information besides the
elfcorehdr, on CPU changes.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/kernel/crash.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/
I still need to convert the ifdefs within the functions to IS_ENABLED(), my
apologies.
eric
On 6/28/23 13:52, Eric DeVolder wrote:
Greg Kroah-Hartman requested that this file use the .is_visible()
method instead of #ifdefs for the attributes in cpu.c.
static struct attribute *cpu_root_attrs
I still need to convert the ifdefs within the functions to IS_ENABLED(), my
apologies.
eric
On 6/28/23 13:52, Eric DeVolder wrote:
Greg Kroah-Hartman requested that this file use the .is_visible()
method instead of #ifdefs for the attributes in memory.c.
static struct attribute
0
https://lkml.org/lkml/2020/12/14/532
https://lore.kernel.org/lkml/b04ed259-dc5f-7f30-6661-c26f92d90...@oracle.com/
- proposed concept of allowing kernel to handle hotplug update
of elfcorehdr
---
Eric DeVolder (10):
drivers/base: refactor cpu.c to use .is_visible()
drivers/base: refactor
in the cpu_root_attrs[] are moved
to the corresponding callback function; as the callback function must
exist now that the attribute is always compiled-in (though not
necessarily visible).
No functionality change intended.
Signed-off-by: Eric DeVolder
---
drivers/base/cpu.c | 67
userspace-supplied elfcorehdr. In this situation,
one memory or CPU change will rewrite the elfcorehdr via the
crash_prepare_elf64_headers() function and now all possible CPUs will
be described, just as with kexec_file_load() syscall.
Suggested-by: Sourabh Jain
Signed-off-by: Eric DeVolder
kexec_load() syscall in the absence of
kexec_file_load() syscall support, prepare_elf_headers() and
dependents are moved outside of CONFIG_KEXEC_FILE.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/Kconfig | 3 +
arch/x86
update other information besides the
elfcorehdr, on CPU changes.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/kernel/crash.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/
of these pieces does not matter; kexec_load()'d kdump
images still function for hotplug as-is.
Suggested-by: Hari Bathini
Signed-off-by: Eric DeVolder
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/include/asm/kexec.h | 11 +++
arch/x86/kernel/crash.c | 27 ++
separated in accordance with
CONFIG_HOTPLUG_CPU and CONFIG_MEMORY_HOTPLUG kernel config options.
If an architecture supports, for example, memory hotplug but not
CPU hotplug, then the /sys/devices/system/memory/crash_hotplug
attribute file is present, but the /sys/devices/system/cpu/crash_hotplug
att
needed tasks and then dispatches the event to the
architecture specific arch_crash_handle_hotplug_event() to update the
elfcorehdr with the current state of CPUs and memory. During the
process, the kexec_lock is held.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
change intended.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
include/linux/kexec.h | 30 +++
kernel/crash_core.c | 182 ++
kernel/kexec_file.c | 181
from the purgatory digest, enabling updates to
the elfcorehdr while also avoiding the need to recompute the hash
digest and reload purgatory.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
kernel/kexec_file.c | 6 ++
1 file changed, 6
that the attribute is always
compiled-in (though not necessarily visible).
No functionality change intended.
Signed-off-by: Eric DeVolder
---
drivers/base/memory.c | 78 +++
1 file changed, 65 insertions(+), 13 deletions(-)
diff --git a/drivers/base/memory.c b
On 6/13/23 03:03, Greg KH wrote:
On Mon, Jun 12, 2023 at 05:07:08PM -0400, Eric DeVolder wrote:
Introduce the crash_hotplug attribute for memory and CPUs for
use by userspace. These attributes directly facilitate the udev
rule for managing userspace re-loading of the crash kernel upon
hot
On 6/13/23 10:24, Eric DeVolder wrote:
On 6/13/23 03:03, Greg KH wrote:
On Mon, Jun 12, 2023 at 05:07:08PM -0400, Eric DeVolder wrote:
Introduce the crash_hotplug attribute for memory and CPUs for
use by userspace. These attributes directly facilitate the udev
rule for managing userspace
On 6/13/23 03:03, Greg KH wrote:
On Mon, Jun 12, 2023 at 05:07:08PM -0400, Eric DeVolder wrote:
Introduce the crash_hotplug attribute for memory and CPUs for
use by userspace. These attributes directly facilitate the udev
rule for managing userspace re-loading of the crash kernel upon
hot
kexec_load() syscall in the absence of
kexec_file_load() syscall support, prepare_elf_headers() and
dependents are moved outside of CONFIG_KEXEC_FILE.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/Kconfig | 3 +
arch/x86
update other information besides the
elfcorehdr, on CPU changes.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/kernel/crash.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/
change intended.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
include/linux/kexec.h | 30 +++
kernel/crash_core.c | 182 ++
kernel/kexec_file.c | 181
userspace-supplied elfcorehdr. In this situation,
one memory or CPU change will rewrite the elfcorehdr via the
crash_prepare_elf64_headers() function and now all possible CPUs will
be described, just as with kexec_file_load() syscall.
Suggested-by: Sourabh Jain
Signed-off-by: Eric DeVolder
needed tasks and then dispatches the event to the
architecture specific arch_crash_handle_hotplug_event() to update the
elfcorehdr with the current state of CPUs and memory. During the
process, the kexec_lock is held.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
from the purgatory digest, enabling updates to
the elfcorehdr while also avoiding the need to recompute the hash
digest and reload purgatory.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
kernel/kexec_file.c | 6 ++
1 file changed, 6
of these pieces does not matter; kexec_load()'d kdump
images still function for hotplug as-is.
Suggested-by: Hari Bathini
Signed-off-by: Eric DeVolder
Acked-by: Hari Bathini
Acked-by: Baoquan He
---
arch/x86/include/asm/kexec.h | 11 +++
arch/x86/kernel/crash.c | 27 ++
.devol...@oracle.com/
- working patchset demonstrating kernel handling of hotplug
updates to x86 elfcorehdr for kexec_file_load
RFC: 14dec2020
https://lkml.org/lkml/2020/12/14/532
https://lore.kernel.org/lkml/b04ed259-dc5f-7f30-6661-c26f92d90...@oracle.com/
- proposed concept of allowing kerne
separated in accordance with
CONFIG_HOTPLUG_CPU and CONFIG_MEMORY_HOTPLUG kernel config options.
If an architecture supports, for example, memory hotplug but not
CPU hotplug, then the /sys/devices/system/memory/crash_hotplug
attribute file is present, but the /sys/devices/system/cpu/crash_hotplug
att
On 5/9/23 01:15, Sourabh Jain wrote:
On 04/05/23 04:11, Eric DeVolder wrote:
The hotplug support for kexec_load() requires coordination with
userspace, and therefore a little extra help from the kernel to
facilitate the coordination.
In the absence of the solution contained within
On 5/9/23 17:52, Thomas Gleixner wrote:
On Wed, May 03 2023 at 18:41, Eric DeVolder wrote:
In the patch 'kexec: exclude elfcorehdr from the segment digest'
See reply to 8/8
yep
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 53bab123a8ee..80538524c494 100644
--- a/arch/x86
On 5/9/23 17:39, Thomas Gleixner wrote:
On Wed, May 03 2023 at 18:41, Eric DeVolder wrote:
This patch is dependent upon the patch 'crash: change
Seriously? You send a patch series which is ordered in itself and then
tell in the changelog of patch 8/8 that it depends on patch 7/8
On 5/9/23 01:56, Sourabh Jain wrote:
>
> On 04/05/23 04:11, Eric DeVolder wrote:
>> The hotplug support for kexec_load() requires coordination with
>> userspace, and therefore a little extra help from the kernel to
>> facilitate the coordination.
>>
>> In t
d-by: Hari Bathini
Signed-off-by: Eric DeVolder
---
arch/x86/include/asm/kexec.h | 11 +++
arch/x86/kernel/crash.c | 27 +++
include/linux/kexec.h| 14 --
include/uapi/linux/kexec.h | 1 +
kernel/crash_core.c
crash kernel.
CPU and memory checks are separated in accordance with
CONFIG_HOTPLUG_CPU and CONFIG_MEMORY_HOTPLUG kernel config options.
If an architecture supports, for example, memory hotplug but not
CPU hotplug, then the /sys/devices/system/memory/crash_hotplug
attribute file is present, but the /sys/d
change intended.
Signed-off-by: Eric DeVolder
Reviewed-by: Sourabh Jain
Acked-by: Baoquan He
---
include/linux/kexec.h | 30 +++
kernel/crash_core.c | 182 ++
kernel/kexec_file.c | 181 -
3 files changed, 197
, this patch explicitly excludes the elfcorehdr segment
from the list of segments used to create the digest. By doing so,
this permits updates to the elfcorehdr in response to CPU or memory
changes, and avoids the need to also recompute the hash digest and
reload purgatory.
Signed-off-by: Eric DeVolder
generate the userspace-supplied elfcorehdr. In this situation,
one memory or CPU change will rewrite the elfcorehdr via the
crash_prepare_elf64_headers() function and now all possible CPUs will
be described, just as with kexec_file_load() syscall.
Suggested-by: Sourabh Jain
Signed-off-by: Eric DeVolder
1 - 100 of 557 matches
Mail list logo