[PATCH v5 15/16] memblock: add KHO support for reserve_mem

2025-04-05 Thread Changyuan Lyu
From: Alexander Graf Linux has recently gained support for "reserve_mem": A mechanism to allocate a region of memory early enough in boot that we can cross our fingers and hope it stays at the same location during most boots, so we can store for example ftrace buffers into it. Thanks to KASLR, w

[PATCH v5 02/16] mm/mm_init: rename init_reserved_page to init_deferred_page

2025-04-05 Thread Changyuan Lyu
From: "Mike Rapoport (Microsoft)" When CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, init_reserved_page() function performs initialization of a struct page that would have been deferred normally. Rename it to init_deferred_page() to better reflect what the function does. Signed-off-by: Mike Rapo

Re: [PATCH v5 11/16] kexec: add config option for KHO

2025-04-05 Thread Dave Young
On Thu, 20 Mar 2025 at 23:05, Changyuan Lyu wrote: > > From: Alexander Graf > > We have all generic code in place now to support Kexec with KHO. This > patch adds a config option that depends on architecture support to > enable KHO support. > > Signed-off-by: Alexander Graf > Co-developed-by: Mi

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

2025-04-05 Thread Pratyush Yadav
Writing this from my phone so apologies in advance if it messes up formatting somewhere. On Mon, Mar 17, 2025, at 9:22 PM, Jason Gunthorpe wrote: > On Sun, Mar 16, 2025 at 08:52:43PM -0700, David Rientjes wrote: [...] >> Pratyush noted there was no way to preserve folio orders in KHO and he >>

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

2025-04-05 Thread Christian Brauner
On Mon, Mar 17, 2025 at 01:59:05PM -0300, Jason Gunthorpe wrote: > On Sun, Mar 09, 2025 at 01:03:31PM +0100, Christian Brauner wrote: > > > So either that work is done right from the start or that stashing files > > goes out the window and instead that KHO part is implemented in a way > > where du

[PATCH v5 14/16] x86: add KHO support

2025-04-05 Thread Changyuan Lyu
From: Alexander Graf We now have all bits in place to support KHO kexecs. This patch adds awareness of KHO in the kexec file as well as boot path for x86 and adds the respective kconfig option to the architecture so that it can use KHO successfully. In addition, it enlightens it decompression co

Re: [PATCH v4 02/14] memblock: add MEMBLOCK_RSRV_KERN flag

2025-04-05 Thread Wei Yang
On Tue, Mar 11, 2025 at 07:27:23AM +0200, Mike Rapoport wrote: >Hi Wei, > >On Mon, Mar 10, 2025 at 09:51:24AM +, Wei Yang wrote: >> On Sun, Feb 23, 2025 at 12:22:29AM +, Wei Yang wrote: >> >On Wed, Feb 19, 2025 at 09:24:31AM +0200, Mike Rapoport wrote: >> >>Hi, >> >> >> >>On Tue, Feb 18, 20

Re: [PATCH v5 07/16] kexec: add Kexec HandOver (KHO) generation helpers

2025-04-05 Thread Changyuan Lyu
Hi Jason, On Mon, Mar 24, 2025 at 13:28:53 -0300, Jason Gunthorpe wrote: > [...] > > > I feel like this patch is premature, it should come later in the > > > project along with a stronger justification for this approach. > > > > > > IHMO keep things simple for this series, just the very basics. >

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

2025-04-05 Thread Jason Gunthorpe
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 and get rid of > >> the struct file. If kexec fails

Re: [PATCH v5 07/16] kexec: add Kexec HandOver (KHO) generation helpers

2025-04-05 Thread Jason Gunthorpe
On Wed, Mar 19, 2025 at 06:55:42PM -0700, Changyuan Lyu wrote: > From: Alexander Graf > > Add the core infrastructure to generate Kexec HandOver metadata. Kexec > HandOver is a mechanism that allows Linux to preserve state - arbitrary > properties as well as memory locations - across kexec. > >

[PATCH v11 7/9] ima: verify if the segment size has changed

2025-04-05 Thread steven chen
kexec 'load' may be called multiple times. Free and realloc the buffer only if the segment_size is changed from the previous kexec 'load' call. Signed-off-by: steven chen --- security/integrity/ima/ima_kexec.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/security/integrity/ima

[PATCH v11 0/9] ima: kexec: measure events between kexec load and execute

2025-04-05 Thread steven chen
The current kernel behavior is IMA measurements snapshot is taken at kexec 'load' and not at kexec 'execute'. IMA log is then carried over to the new kernel after kexec 'execute'. Currently, the kernel behavior during kexec load is to fetch the IMA measurements log from TPM PCRs and store it in a

Re: [PATCH v4 02/14] memblock: add MEMBLOCK_RSRV_KERN flag

2025-04-05 Thread Wei Yang
On Wed, Feb 19, 2025 at 09:24:31AM +0200, Mike Rapoport wrote: >Hi, > >On Tue, Feb 18, 2025 at 03:50:04PM +, Wei Yang wrote: >> On Thu, Feb 06, 2025 at 03:27:42PM +0200, Mike Rapoport wrote: >> >From: "Mike Rapoport (Microsoft)" >> > >> >to denote areas that were reserved for kernel use either

[PATCH v5 13/16] x86/setup: use memblock_reserve_kern for memory used by kernel

2025-04-05 Thread Changyuan Lyu
From: "Mike Rapoport (Microsoft)" memblock_reserve() does not distinguish memory used by firmware from memory used by kernel. The distinction is nice to have for accounting of early memory allocations and reservations, but it is essential for kexec handover (kho) to know how much memory kernel c