Re: [PATCH v2 RESEND] crash: Export PAGE_UNACCEPTED_MAPCOUNT_VALUE to vmcoreinfo

2025-04-02 Thread Baoquan He
Add makedumpfile/Crash utilities maintainers to let them know. On 04/03/25 at 11:08am, Zhiquan Li wrote: > On Intel TDX guest, unaccepted memory is unusable free memory which is > not managed by buddy, until it's accepted by guest. Before that, it > cannot be accessed by the first kernel as well

[PATCH v11 3/9] kexec: define functions to map and unmap segments

2025-04-02 Thread steven chen
Currently, the kernel behavior during kexec load is to fetch the IMA measurements logs and store logs in kernel memory. When a kexec reboot is triggered, these stored logs in the kernel memory are carried over to the second kernel. However, the time gap between kexec load and kexec reboot can be ve

[PATCH v11 1/9] ima: rename variable the set_file "file" to "ima_kexec_file"

2025-04-02 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'. However, the time gap between kexec load and kexec reboot can be very long. During this time window, new events extende

[PATCH v11 5/9] ima: kexec: define functions to copy IMA log at soft boot

2025-04-02 Thread steven chen
The IMA log is currently copied to the new kernel during kexec 'load' using ima_dump_measurement_list(). However, the log copied at kexec 'load' may result in loss of IMA measurements that only occurred after kexec "load'. Therefore, the log needs to be copied during kexec 'execute'. Setup the n

[PATCH v11 8/9] ima: make the kexec extra memory configurable

2025-04-02 Thread steven chen
The extra memory allocated for carrying the IMA measurement list across kexec is hard-coded as half a PAGE. Make it configurable. Define a Kconfig option, IMA_KEXEC_EXTRA_MEMORY_KB, to configure the extra memory (in kb) to be allocated for IMA measurements added during kexec soft reboot. Ensure

[PATCH v11 9/9] ima: measure kexec load and exec events as critical data

2025-04-02 Thread steven chen
The amount of memory allocated at kexec load, even with the extra memory allocated, might not be large enough for the entire measurement list. The indeterminate interval between kexec 'load' and 'execute' could exacerbate this problem. Define two new IMA events, 'kexec_load' and 'kexec_execute',

[PATCH v11 2/9] ima: define and call ima_alloc_kexec_file_buf()

2025-04-02 Thread steven chen
In the current implementation, the ima_dump_measurement_list() API is called during the kexec "load" phase, where a buffer is allocated and the measurement records are copied. Due to this, new events added after kexec load but before kexec execute are not carried over to the new kernel during kex

Re: [PATCH v5 09/16] kexec: enable KHO support for memory preservation

2025-04-02 Thread Pratyush Yadav
Hi, On Wed, Apr 02 2025, Changyuan Lyu wrote: > Hi Pratyush, Thanks for suggestions! > > On Thu, Mar 27, 2025 at 17:28:40 +, Pratyush Yadav > wrote: >> On Thu, Mar 27 2025, Jason Gunthorpe wrote: >> >> > On Thu, Mar 27, 2025 at 10:03:17AM +, Pratyush Yadav wrote: >> > >> >> Of course, w

[PATCH v2 RESEND] crash: Export PAGE_UNACCEPTED_MAPCOUNT_VALUE to vmcoreinfo

2025-04-02 Thread Zhiquan Li
On Intel TDX guest, unaccepted memory is unusable free memory which is not managed by buddy, until it's accepted by guest. Before that, it cannot be accessed by the first kernel as well as the kexec'ed kernel. The kexec'ed kernel will skip these pages and fill in zero data for the reader of vmcore

Re: [RFC PATCH] ima: add a knob to make IMA be able to be disabled

2025-04-02 Thread Baoquan He
On 04/02/25 at 04:43pm, Coiby Xu wrote: > On Tue, Apr 01, 2025 at 11:30:09PM -0400, Mimi Zohar wrote: > > On Wed, 2025-04-02 at 09:47 +0800, RuiRui Yang wrote: > [...] > > > > > that. Please don't make it generic like this. > > > > > > > > > > Please refer to ima_appraise_parse_cmdline(). > > > >

Re: [RFC PATCH] ima: add a knob to make IMA be able to be disabled

2025-04-02 Thread Mimi Zohar
On Wed, 2025-04-02 at 16:43 +0800, Coiby Xu wrote: > > Coiby, would disabling just IMA-measurement, as opposed to IMA-appraisal, > > save > > sufficient memory for kdump? > > For disabling just IMA-measurement, do you mean not enabling any measure > rules?  The more memory reserved for the kdump

Re: [PATCH v5 09/16] kexec: enable KHO support for memory preservation

2025-04-02 Thread Pasha Tatashin
On Wed, Apr 2, 2025 at 12:47 PM Pratyush Yadav wrote: > > Hi, > > On Wed, Apr 02 2025, Changyuan Lyu wrote: > > > Hi Pratyush, Thanks for suggestions! > > > > On Thu, Mar 27, 2025 at 17:28:40 +, Pratyush Yadav > > wrote: > >> On Thu, Mar 27 2025, Jason Gunthorpe wrote: > >> > >> > On Thu, Ma

Re: [PATCH v5 09/16] kexec: enable KHO support for memory preservation

2025-04-02 Thread Pratyush Yadav
On Wed, Apr 02 2025, Pasha Tatashin wrote: > On Wed, Apr 2, 2025 at 12:47 PM Pratyush Yadav wrote: >> >> Hi, >> >> On Wed, Apr 02 2025, Changyuan Lyu wrote: >> >> > Hi Pratyush, Thanks for suggestions! >> > >> > On Thu, Mar 27, 2025 at 17:28:40 +, Pratyush Yadav >> > wrote: [...] >> >> >> >