Re: [PATCH v10 6/8] ima: kexec: move IMA log copy from kexec load to execute

2025-03-26 Thread Mimi Zohar
> > Hmm, it's easier, while maybe not good. We should not repeatedly > > introduce similar things into codes. Here, it's similar as > > what kexec_apply_relocations() and arch_kexec_apply_relocations() are > > doing. > > > > int machine_kexec_post_load(struct kimage *image) (As discussed) just

Re: [PATCH v10 6/8] ima: kexec: move IMA log copy from kexec load to execute

2025-03-26 Thread steven chen
On 3/25/2025 7:27 PM, Baoquan He wrote: On 03/25/25 at 03:27pm, steven chen wrote: On 3/24/2025 4:00 AM, Baoquan He wrote: On 03/21/25 at 09:23am, steven chen wrote: On 3/19/2025 7:06 PM, Baoquan He wrote: On 03/17/25 at 06:04pm, steven chen wrote: ...snip... --- kernel/kexec_file.c

Re: [RFC PATCH 1/5] misc: introduce FDBox

2025-03-26 Thread Pratyush Yadav
On Thu, Mar 20 2025, Jason Gunthorpe wrote: > On Wed, Mar 19, 2025 at 01:35:31PM +, Pratyush Yadav wrote: >> On Tue, Mar 18 2025, Jason Gunthorpe wrote: >> >> > On Tue, Mar 18, 2025 at 11:02:31PM +, Pratyush Yadav wrote: >> > >> >> I suppose we can serialize all FDs when the box is sealed

[PATCH v9 4/4] selftests/kexec: Add x86_64 selftest for kexec-jump and exception handling

2025-03-26 Thread David Woodhouse
From: David Woodhouse Add a self test which exercises both the kexec-jump facility, and the kexec exception handling. Invoke a trivial payload which just does an int3 and returns, flip-flopping its entry point for the next invocation between two implementations of the same thing. Signed-off-by:

Re: [Hypervisor Live Update] Notes from March 10, 2025

2025-03-26 Thread Pratyush Yadav
On Thu, Mar 20 2025, Jason Gunthorpe wrote: >> I didn't mean the exact flags value, but the ability to have >> per-folio flags. The exact bits and their meaning would of course >> need to be part of the ABI. Shmem uses the dirty and uptodate flags >> to track some state on the folios, and the flag

[PATCH v9 2/4] x86/kexec: Add 8250 MMIO serial port output

2025-03-26 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 v9 3/4] x86/kexec: Invalidate GDT/IDT from relocate_kernel() instead of earlier

2025-03-26 Thread David Woodhouse
From: David Woodhouse Reduce the window during which exceptions are unhandled, by leaving the GDT/IDT in place all the way into the relocate_kernel() function, until the moment that %cr3 gets replaced. Signed-off-by: David Woodhouse --- arch/x86/kernel/machine_kexec_64.c | 10 ++ arc

[PATCH v9 1/4] x86/kexec: Add 8250 serial port output

2025-03-26 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 v9 0/4] x86/kexec: Add exception handling for relocate_kernel

2025-03-26 Thread David Woodhouse
Continuing the drip-feed of the exception handling support, on top of the current tip/x86/asm branch. This adds output to the serial port configured by earlyprintk, reduces the window during which exceptions can't be handled during the transition from kernel to relocate_kernel environment, and adds