[PATCH v3 2/5] kdump: implement reserve_crashkernel_cma

2025-03-12 Thread Jiri Bohac
reserve_crashkernel_cma() reserves CMA ranges for the crash kernel. If allocating the requested size fails, try to reserve in smaller blocks. Store the reserved ranges in the crashk_cma_ranges array and the number of ranges in crashk_cma_cnt. Signed-off-by: Jiri Bohac --- include/linux/crash_re

[PATCH v3 1/5] Add a new optional ",cma" suffix to the crashkernel= command line option

2025-03-12 Thread Jiri Bohac
Add a new cma_size parameter to parse_crashkernel(). When not NULL, call __parse_crashkernel to parse the CMA reservation size from "crashkernel=size,cma" and store it in cma_size. Set cma_size to NULL in all calls to parse_crashkernel(). Signed-off-by: Jiri Bohac --- arch/arm/kernel/setup.c

[PATCH v3 5/5] x86: implement crashkernel cma reservation

2025-03-12 Thread Jiri Bohac
Implement the crashkernel CMA reservation for x86: - enable parsing of the cma suffix by parse_crashkernel() - reserve memory with reserve_crashkernel_cma() - add the CMA-reserved ranges to the e820 map for the crash kernel - exclude the CMA-reserved ranges from vmcore Signed-off-by: Jiri Bohac -

[PATCH v3 4/5] kdump: wait for DMA to finish when using CMA

2025-03-12 Thread Jiri Bohac
When re-using the CMA area for kdump there is a risk of pending DMA into pinned user pages in the CMA area. Pages that are pinned long-term are migrated away from CMA, so these are not a concern. Pages pinned without FOLL_LONGTERM remain in the CMA and may possibly be the source or destination of

[PATCH v3 3/5] kdump, documentation: describe craskernel CMA reservation

2025-03-12 Thread Jiri Bohac
Describe the new crashkernel ",cma" suffix in Documentation/ Signed-off-by: Jiri Bohac --- Documentation/admin-guide/kdump/kdump.rst | 24 +-- .../admin-guide/kernel-parameters.txt | 22 + 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a

[PATCH v3 0/5] kdump: crashkernel reservation from CMA

2025-03-12 Thread Jiri Bohac
Hi, this series implements a way to reserve additional crash kernel memory using CMA. Link to the v1 discussion: https://lore.kernel.org/lkml/zwd_fapqewkfl...@dwarf.suse.cz/ See below for the changes since v1 and how concerns from the discussion have been addressed. Currently, all the memory fo

Re: [PATCH v2 0/1] Accept unaccepted kexec segments' destination addresses

2025-03-12 Thread Dave Hansen
On 3/4/25 11:16, Dave Hansen wrote: > On 3/4/25 10:49, Eric W. Biederman wrote: >> How goes the work to fix this horrifically slow firmware interface? > The firmware interface isn't actually all that slow. Hey Eric, I've noticed a trend on this series. It seems like every time there's some forwar

[PATCH v7 4/8] x86/kexec: Add 8250 serial port output

2025-03-12 Thread David Woodhouse
From: David Woodhouse If a serial port was configured for early_printk, use it for debug output from the relocate_kernel exception handler too. Signed-off-by: David Woodhouse --- arch/x86/include/asm/kexec.h | 1 + arch/x86/kernel/early_printk.c | 6 + arch/x86/kernel/reloc

[PATCH v7 8/8] [DO NOT MERGE] x86/kexec: Add CFI type information to relocate_kernel()

2025-03-12 Thread David Woodhouse
From: David Woodhouse A previous commit added __nocfi to machine_kexec() because it makes an indirect call to relocate_kernel() which lacked CFI type information, and caused the system to crash. Use SYM_TYPED_FUNC_START() to ensure that the type information is present, and remove the __nocfi tag

[PATCH v7 1/8] x86/kexec: Debugging support: load a GDT

2025-03-12 Thread David Woodhouse
From: David Woodhouse There are some failure modes which lead to triple-faults in the relocate_kernel function, which is fairly much undebuggable for normal mortals. Adding a GDT in the relocate_kernel environment is step 1 towards being able to catch faults and do something more useful. Signed

[PATCH v7 0/8] x86/kexec: Add exception handling for relocate_kernel

2025-03-12 Thread David Woodhouse
Debugging kexec failures is painful, as anything going wrong in execution of the critical relocate_kernel() function tends to just lead to a triple fault. Thus leading to *weeks* of my life that I won't get back. Having hacked something up for my own use, I figured I should share it... Add a trivi

[PATCH v7 3/8] x86/kexec: Debugging support: Dump registers on exception

2025-03-12 Thread David Woodhouse
From: David Woodhouse The actual serial output function is a no-op for now. Signed-off-by: David Woodhouse --- arch/x86/kernel/relocate_kernel_64.S | 101 ++- 1 file changed, 98 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86

[PATCH v7 6/8] x86/kexec: Invalidate GDT/IDT from relocate_kernel() instead of earlier

2025-03-12 Thread David Woodhouse
From: David Woodhouse Commit 2114796ca041 ("x86/kexec: Mark machine_kexec() with __nocfi") marked the machine_kexec() function with __nocfi because I failed to make objtool happy when actually *providing* CFI information for the relocate_kernel() function that it calls, and __nocfi was the easy w

[PATCH v7 7/8] [DO NOT MERGE] x86/kexec: Add int3 in kexec path for testing

2025-03-12 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- arch/x86/kernel/relocate_kernel_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S index 17d41e6e1a4b..2b7fc59af373 100644 --- a/arch/x86/k

Re: [PATCH v2 0/5] kdump: crashkernel reservation from CMA

2025-03-12 Thread Jiri Bohac
On Mon, Mar 03, 2025 at 09:25:30AM +0100, David Hildenbrand wrote: > On 20.02.25 17:48, Jiri Bohac wrote: > > > > By reserving additional crashkernel memory from CMA, the main > > crashkernel reservation can be just large enough to fit the > > kernel and initrd image, minimizing the memory taken a

[PATCH v7 5/8] x86/kexec: Add 8250 MMIO serial port output

2025-03-12 Thread David Woodhouse
From: David Woodhouse This supports the same 32-bit MMIO-mapped 8250 as the early_printk code. It's not clear why the early_printk code supports this form and only this form; the actual runtime 8250_pci doesn't seem to support it. But having hacked up QEMU to expose such a device, early_printk d

[PATCH v7 2/8] x86/kexec: Debugging support: Load an IDT and basic exception entry points

2025-03-12 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- arch/x86/include/asm/kexec.h | 5 ++ arch/x86/kernel/machine_kexec_64.c | 21 arch/x86/kernel/relocate_kernel_64.S | 74 3 files changed, 100 insertions(+) diff --git a/arch/x86/include/as

Re: [PATCH v9 4/7] ima: kexec: define functions to copy IMA log at soft boot

2025-03-12 Thread kernel test robot
nux/kernel/git/zohar/linux-integrity.git next-integrity patch link: https://lore.kernel.org/r/20250304190351.96975-5-chenste%40linux.microsoft.com patch subject: [PATCH v9 4/7] ima: kexec: define functions to copy IMA log at soft boot config: powerpc64-randconfig-r133-20250312 (https://downl

Message from production

2025-03-12 Thread Vincenc Turek
Hello, We specialize in manufacturing packaging for the food industry, such as those for ketchup, mustard, and sauces. We also offer solutions for household and construction chemicals – packaging in various sizes and shapes to meet your requirements. Our products are durable and resistant to d