Re: [PATCH 1/2] kexec: fix KEXEC_FILE dependencies

2023-11-30 Thread Eric DeVolder
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

Re: [PATCH v2] kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP

2023-11-28 Thread Eric DeVolder
_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

Re: [PATCH v2] drivers/base/cpu: crash data showing should depends on KEXEC_CORE

2023-11-28 Thread Eric DeVolder
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

Re: [PATCH 0/3] kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP

2023-11-25 Thread Eric DeVolder
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:

Re: [PATCH v3 0/6] crashdump: Kernel handling of CPU and memory hot un/plug

2023-10-04 Thread Eric DeVolder
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

[PATCH v3 6/6] crashdump/x86: set the elfcorehdr segment size for hotplug

2023-09-27 Thread Eric DeVolder
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

[PATCH v3 4/6] crashdump: exclude elfcorehdr segment from digest for hotplug

2023-09-27 Thread Eric DeVolder
, 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

[PATCH v3 3/6] crashdump: setup general hotplug support

2023-09-27 Thread Eric DeVolder
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

[PATCH v3 5/6] crashdump/x86: identify elfcorehdr segment for hotplug

2023-09-27 Thread Eric DeVolder
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

[PATCH v3 0/6] crashdump: Kernel handling of CPU and memory hot un/plug

2023-09-27 Thread Eric DeVolder
. 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

[PATCH v3 2/6] crashdump: introduce the hotplug command line options

2023-09-27 Thread Eric DeVolder
. 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

[PATCH v3 1/6] kexec: define KEXEC_UPDATE_ELFCOREHDR

2023-09-27 Thread Eric DeVolder
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

Re: [PATCH v3] Crash: add lock to serialize crash hotplug handling

2023-09-26 Thread Eric DeVolder
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.

Re: [PATCH v3] Crash: add lock to serialize crash hotplug handling

2023-09-26 Thread Eric DeVolder
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

Re: [PATCH v2] Crash: add lock to serialize crash hotplug handling

2023-09-25 Thread Eric DeVolder
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 [

Re: [PATCH] Crash: add lock to serialize crash hotplug handling

2023-09-23 Thread Eric DeVolder
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 [

Re: [PATCH] kexec: change locking mechanism to a mutex

2023-09-22 Thread Eric DeVolder
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

Re: [PATCH] kexec: change locking mechanism to a mutex

2023-09-22 Thread Eric DeVolder
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

Re: [PATCH] kexec: change locking mechanism to a mutex

2023-09-21 Thread Eric DeVolder
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

Re: [PATCH] kexec: change locking mechanism to a mutex

2023-09-21 Thread Eric DeVolder
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

[PATCH] kexec: change locking mechanism to a mutex

2023-09-21 Thread Eric DeVolder
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

Re: [PATCH v28 0/8] crash: Kernel handling of CPU and memory hot un/plug

2023-08-20 Thread Eric DeVolder
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

Re: [PATCH v27 2/8] crash: add generic infrastructure for crash hotplug support

2023-08-15 Thread Eric DeVolder
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

[PATCH v28 6/8] crash: hotplug support for kexec_load()

2023-08-14 Thread Eric DeVolder
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 ++

[PATCH v28 5/8] x86/crash: add x86 crash hotplug support

2023-08-14 Thread 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

[PATCH v28 0/8] crash: Kernel handling of CPU and memory hot un/plug

2023-08-14 Thread Eric DeVolder
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

[PATCH v28 1/8] crash: move a few code bits to setup support of crash hotplug

2023-08-14 Thread Eric DeVolder
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

[PATCH v28 8/8] x86/crash: optimize CPU changes

2023-08-14 Thread 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/

[PATCH v28 3/8] kexec: exclude elfcorehdr from the segment digest

2023-08-14 Thread Eric DeVolder
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

[PATCH v28 4/8] crash: memory and CPU hotplug sysfs attributes

2023-08-14 Thread Eric DeVolder
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

[PATCH v28 7/8] crash: change crash_prepare_elf64_headers() to for_each_possible_cpu()

2023-08-14 Thread Eric DeVolder
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

[PATCH v28 2/8] crash: add generic infrastructure for crash hotplug support

2023-08-14 Thread 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

[PATCH v27 2/8] crash: add generic infrastructure for crash hotplug support

2023-08-11 Thread 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

[PATCH v27 0/8] crash: Kernel handling of CPU and memory hot un/plug

2023-08-11 Thread Eric DeVolder
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

[PATCH v27 8/8] x86/crash: optimize CPU changes

2023-08-11 Thread 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/

[PATCH v27 7/8] crash: change crash_prepare_elf64_headers() to for_each_possible_cpu()

2023-08-11 Thread Eric DeVolder
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

[PATCH v27 5/8] x86/crash: add x86 crash hotplug support

2023-08-11 Thread 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

[PATCH v27 3/8] kexec: exclude elfcorehdr from the segment digest

2023-08-11 Thread Eric DeVolder
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

[PATCH v27 4/8] crash: memory and CPU hotplug sysfs attributes

2023-08-11 Thread Eric DeVolder
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

[PATCH v27 1/8] crash: move a few code bits to setup support of crash hotplug

2023-08-11 Thread 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

[PATCH v27 6/8] crash: hotplug support for kexec_load()

2023-08-11 Thread Eric DeVolder
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 ++

[PATCH v26 7/8] crash: change crash_prepare_elf64_headers() to for_each_possible_cpu()

2023-08-04 Thread Eric DeVolder
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

[PATCH v26 8/8] x86/crash: optimize CPU changes

2023-08-04 Thread 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/

[PATCH v26 3/8] kexec: exclude elfcorehdr from the segment digest

2023-08-04 Thread Eric DeVolder
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

[PATCH v26 1/8] crash: move a few code bits to setup support of crash hotplug

2023-08-04 Thread 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

[PATCH v26 0/8] crash: Kernel handling of CPU and memory hot un/plug

2023-08-04 Thread Eric DeVolder
/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

[PATCH v26 6/8] crash: hotplug support for kexec_load()

2023-08-04 Thread Eric DeVolder
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 ++

[PATCH v26 2/8] crash: add generic infrastructure for crash hotplug support

2023-08-04 Thread 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

[PATCH v26 5/8] x86/crash: add x86 crash hotplug support

2023-08-04 Thread 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

[PATCH v26 4/8] crash: memory and CPU hotplug sysfs attributes

2023-08-04 Thread Eric DeVolder
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

Re: [PATCH v25 01/10] drivers/base: refactor cpu.c to use .is_visible()

2023-08-03 Thread Eric DeVolder
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

Re: [PATCH v25 01/10] drivers/base: refactor cpu.c to use .is_visible()

2023-07-21 Thread Eric DeVolder
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

Re: [PATCH v25 06/10] crash: memory and CPU hotplug sysfs attributes

2023-07-03 Thread Eric DeVolder
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

Re: [PATCH v25 01/10] drivers/base: refactor cpu.c to use .is_visible()

2023-07-03 Thread Eric DeVolder
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

Re: [PATCH v25 06/10] crash: memory and CPU hotplug sysfs attributes

2023-06-29 Thread Eric DeVolder
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

[PATCH v25 08/10] crash: hotplug support for kexec_load()

2023-06-29 Thread Eric DeVolder
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 ++

[PATCH v25 06/10] crash: memory and CPU hotplug sysfs attributes

2023-06-29 Thread Eric DeVolder
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

[PATCH v25 01/10] drivers/base: refactor cpu.c to use .is_visible()

2023-06-29 Thread Eric DeVolder
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

[PATCH v25 07/10] x86/crash: add x86 crash hotplug support

2023-06-29 Thread 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

[PATCH v25 02/10] drivers/base: refactor memory.c to use .is_visible()

2023-06-29 Thread Eric DeVolder
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

[PATCH v25 00/10] crash: Kernel handling of CPU and memory hot un/plug

2023-06-29 Thread Eric DeVolder
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

[PATCH v25 04/10] crash: add generic infrastructure for crash hotplug support

2023-06-29 Thread 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

[PATCH v25 09/10] crash: change crash_prepare_elf64_headers() to for_each_possible_cpu()

2023-06-29 Thread Eric DeVolder
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

[PATCH v25 03/10] crash: move a few code bits to setup support of crash hotplug

2023-06-29 Thread 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

[PATCH v25 05/10] kexec: exclude elfcorehdr from the segment digest

2023-06-29 Thread Eric DeVolder
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

[PATCH v25 10/10] x86/crash: optimize CPU changes

2023-06-29 Thread 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/

Re: [PATCH v24 01/10] drivers/base: refactor cpu.c to use .is_visible()

2023-06-29 Thread Eric DeVolder
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

Re: [PATCH v24 02/10] drivers/base: refactor memory.c to use .is_visible()

2023-06-29 Thread Eric DeVolder
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

[PATCH v24 00/10] crash: Kernel handling of CPU and memory hot un/plug

2023-06-28 Thread Eric DeVolder
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

[PATCH v24 01/10] drivers/base: refactor cpu.c to use .is_visible()

2023-06-28 Thread Eric DeVolder
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

[PATCH v24 09/10] crash: change crash_prepare_elf64_headers() to for_each_possible_cpu()

2023-06-28 Thread Eric DeVolder
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

[PATCH v24 07/10] x86/crash: add x86 crash hotplug support

2023-06-28 Thread 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

[PATCH v24 10/10] x86/crash: optimize CPU changes

2023-06-28 Thread 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/

[PATCH v24 08/10] crash: hotplug support for kexec_load()

2023-06-28 Thread Eric DeVolder
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 ++

[PATCH v24 06/10] crash: memory and CPU hotplug sysfs attributes

2023-06-28 Thread Eric DeVolder
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

[PATCH v24 04/10] crash: add generic infrastructure for crash hotplug support

2023-06-28 Thread 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

[PATCH v24 03/10] crash: move a few code bits to setup support of crash hotplug

2023-06-28 Thread 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

[PATCH v24 05/10] kexec: exclude elfcorehdr from the segment digest

2023-06-28 Thread Eric DeVolder
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

[PATCH v24 02/10] drivers/base: refactor memory.c to use .is_visible()

2023-06-28 Thread Eric DeVolder
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

Re: [PATCH v23 4/8] crash: memory and CPU hotplug sysfs attributes

2023-06-16 Thread Eric DeVolder
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

Re: [PATCH v23 4/8] crash: memory and CPU hotplug sysfs attributes

2023-06-13 Thread Eric DeVolder
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

Re: [PATCH v23 4/8] crash: memory and CPU hotplug sysfs attributes

2023-06-13 Thread Eric DeVolder
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

[PATCH v23 5/8] x86/crash: add x86 crash hotplug support

2023-06-12 Thread 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

[PATCH v23 8/8] x86/crash: optimize CPU changes

2023-06-12 Thread 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/

[PATCH v23 1/8] crash: move a few code bits to setup support of crash hotplug

2023-06-12 Thread 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

[PATCH v23 7/8] crash: change crash_prepare_elf64_headers() to for_each_possible_cpu()

2023-06-12 Thread Eric DeVolder
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

[PATCH v23 2/8] crash: add generic infrastructure for crash hotplug support

2023-06-12 Thread 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

[PATCH v23 3/8] kexec: exclude elfcorehdr from the segment digest

2023-06-12 Thread Eric DeVolder
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

[PATCH v23 6/8] crash: hotplug support for kexec_load()

2023-06-12 Thread Eric DeVolder
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 ++

[PATCH v23 0/8] crash: Kernel handling of CPU and memory hot un/plug

2023-06-12 Thread Eric DeVolder
.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

[PATCH v23 4/8] crash: memory and CPU hotplug sysfs attributes

2023-06-12 Thread Eric DeVolder
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

Re: [PATCH v22 6/8] crash: hotplug support for kexec_load()

2023-05-10 Thread Eric DeVolder
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

Re: [PATCH v22 5/8] x86/crash: add x86 crash hotplug support

2023-05-10 Thread Eric DeVolder
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

Re: [PATCH v22 8/8] x86/crash: optimize CPU changes

2023-05-10 Thread Eric DeVolder
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

Re: [PATCH v22 6/8] crash: hotplug support for kexec_load()

2023-05-09 Thread Eric DeVolder
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

[PATCH v22 6/8] crash: hotplug support for kexec_load()

2023-05-03 Thread Eric DeVolder
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

[PATCH v22 4/8] crash: memory and CPU hotplug sysfs attributes

2023-05-03 Thread Eric DeVolder
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

[PATCH v22 1/8] crash: move a few code bits to setup support of crash hotplug

2023-05-03 Thread Eric DeVolder
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

[PATCH v22 3/8] kexec: exclude elfcorehdr from the segment digest

2023-05-03 Thread Eric DeVolder
, 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

[PATCH v22 7/8] crash: change crash_prepare_elf64_headers() to for_each_possible_cpu()

2023-05-03 Thread 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   2   3   4   5   6   >