Re: [PATCH] x86/tdx: Fix crash on kexec
From: Borislav Petkov
Date: Sat Jun 29 2024 - 10:00:10 EST
On Sat, Jun 29, 2024 at 04:06:20PM +0300, Kirill A. Shutemov wrote:
> The function tdx_enc_status_changed() was modified to handle vmalloc()
> mappings. It now utilizes slow_virt_to_phys() to determine the physical
> address of the page by walking page tables and looking for the physical
> address in the page table entry.
>
> However, this adjustment conflicted with the enabling of kexec. The
> function tdx_kexec_finish() clears the page table entry before calling
> tdx_enc_status_changed(), causing a BUG_ON() error in
> slow_virt_to_phys().
>
> To address this issue, tdx_enc_status_change() should use __pa() to
> obtain physical addresses whenever possible. The virt_addr_valid() check
> will handle such cases, while any other scenarios, including vmalloc()
> mappings, will resort to slow_virt_to_phys().
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Fixes: e1b8ac3aae58 ("x86/tdx: Support vmalloc() for tdx_enc_status_changed()")
I'm going to zap this one from x86/urgent and give you guys ample time to test
thus stuff better and longer.
Also, what is this e1b8ac3aae58 fixing and why is it urgent?
AFAICT, it can go through the normal merge window...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette