Re: Re: [PATCH v2 2/5] crash_dump: save the dm crypt key temporarily

2024-01-16 Thread Coiby Xu
On Tue, Jan 16, 2024 at 11:40:53AM +0100, Ondrej Kozina wrote: On 10/01/2024 08:15, Coiby Xu wrote: User space is supposed to write the key description to /sys/kernel/crash_dm_crypt_key so the kernel will read the key and save a temporary copy for later user. User space has 2 minutes at maximum

Re: Re: [PATCH v2 0/5] Support kdump with LUKS encryption by reusing LUKS volume key

2024-01-16 Thread Coiby Xu
On Tue, Jan 16, 2024 at 11:37:10AM +0100, Ondrej Kozina wrote: Hi Coiby, Hi Ondrej, I've started working on a patchset for systemd utility. I have one question/suggestion: On 10/01/2024 08:15, Coiby Xu wrote: LUKS is the standard for Linux disk encryption. Many users choose LUKS and in

Re: [PATCH] crash_core: export vmemmap when CONFIG_SPARSEMEM_VMEMMAP is enabled

2024-01-16 Thread Shijie Huang
Hi Andrew, 在 2023/12/21 12:12, Baoquan He 写道: On 11/27/23 at 10:07am, Huang Shijie wrote: In memory_model.h, if CONFIG_SPARSEMEM_VMEMMAP is configed, kernel will use vmemmap to do the __pfn_to_page/page_to_pfn, and kernel will not use the "classic sparse" to do the __pfn_to_page/page_to_pfn.

[PATCH] kexec: don't use kexec_file_load on XEN

2024-01-16 Thread Jiri Bohac
Since commit 29fe5067ed07 ("kexec: make -a the default") kexec tries the kexec_file_load syscall first and only falls back to kexec_load on selected error codes. This effectively breaks kexec on XEN, unless -c is pecified to force the kexec_load syscall. The XEN-specific functions

Re: [PATCHv5 10/16] x86/tdx: Convert shared memory back to private on kexec

2024-01-16 Thread Kirill A. Shutemov
On Tue, Jan 16, 2024 at 10:28:22AM +0300, Kirill A. Shutemov wrote: > > > @@ -809,12 +823,25 @@ static bool tdx_enc_status_changed(unsigned long > > > vaddr, int numpages, bool enc) > > > static int tdx_enc_status_change_prepare(unsigned long vaddr, int > > > numpages, > > >

Re: [PATCHv5 10/16] x86/tdx: Convert shared memory back to private on kexec

2024-01-16 Thread Kirill A. Shutemov
On Tue, Jan 16, 2024 at 10:01:47AM +0200, Nikolay Borisov wrote: > > > On 16.01.24 г. 9:28 ч., Kirill A. Shutemov wrote: > > > > > > > @@ -41,6 +44,9 @@ > > > >static atomic_long_t nr_shared; > > > > +static atomic_t conversions_in_progress; > > > > +static bool conversion_allowed = true;

Re: [PATCH v2 2/5] crash_dump: save the dm crypt key temporarily

2024-01-16 Thread Ondrej Kozina
On 10/01/2024 08:15, Coiby Xu wrote: User space is supposed to write the key description to /sys/kernel/crash_dm_crypt_key so the kernel will read the key and save a temporary copy for later user. User space has 2 minutes at maximum to load the kdump initrd before the key gets wiped. And after

Re: [PATCH v2 0/5] Support kdump with LUKS encryption by reusing LUKS volume key

2024-01-16 Thread Ondrej Kozina
Hi Coiby, I've started working on a patchset for systemd utility. I have one question/suggestion: On 10/01/2024 08:15, Coiby Xu wrote: LUKS is the standard for Linux disk encryption. Many users choose LUKS and in some use cases like Confidential VM it's mandated. With kdump enabled, when the

Re: [PATCH] Documentation: kdump: Clarify the default size of memory reserved by crashkernel low

2024-01-16 Thread Baoquan He
Hi Jonathan, Andrew, On 12/18/23 at 11:40am, Pingfan Liu wrote: > From: Pingfan Liu > > The default size reserved for crashkernel=,low is decided by the macro > DEFAULT_CRASH_KERNEL_LOW_SIZE, which is based on arch. > > Signed-off-by: Pingfan Liu > Cc: Baoquan He > Cc: Dave Young > To:

Re: [PATCHv5 10/16] x86/tdx: Convert shared memory back to private on kexec

2024-01-16 Thread Nikolay Borisov
On 16.01.24 г. 9:28 ч., Kirill A. Shutemov wrote: @@ -41,6 +44,9 @@ static atomic_long_t nr_shared; +static atomic_t conversions_in_progress; +static bool conversion_allowed = true; Given the usage model of this variable, shouldn't it be simply accessed via READ/WRITE_ONCE macros?