[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALu+AoTnrPPFkRZpYDpYxt1gAoQuo_O7YZeLvTZO4qztxgSXHw@mail.gmail.com>
Date: Fri, 22 Nov 2024 21:03:49 +0800
From: Dave Young <dyoung@...hat.com>
To: Nicolas Saenz Julienne <nsaenz@...zon.com>
Cc: Ard Biesheuvel <ardb@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>, Matt Fleming <matt@...eblueprint.co.uk>, linux-efi@...r.kernel.org,
linux-kernel@...r.kernel.org, stanspas@...zon.de, nh-open-source@...zon.com,
stable@...r.kernel.org, kexec@...ts.infradead.org
Subject: Re: [PATCH v2 2/2] x86/efi: Apply EFI Memory Attributes after kexec
Hi,
On Wed, 13 Nov 2024 at 02:53, Nicolas Saenz Julienne <nsaenz@...zon.com> wrote:
>
> Kexec bypasses EFI's switch to virtual mode. In exchange, it has its own
> routine, kexec_enter_virtual_mode(), which replays the mappings made by
> the original kernel. Unfortunately, that function fails to reinstate
> EFI's memory attributes, which would've otherwise been set after
> entering virtual mode. Remediate this by calling
> efi_runtime_update_mappings() within kexec's routine.
In the function __map_region(), there are playing with the flags
similar to the efi_runtime_update_mappings though it looks a little
different. Is this extra callback really necessary?
Have you seen a real bug happened?
>
> Cc: stable@...r.kernel.org
> Fixes: 18141e89a76c ("x86/efi: Add support for EFI_MEMORY_ATTRIBUTES_TABLE")
> Signed-off-by: Nicolas Saenz Julienne <nsaenz@...zon.com>
>
> ---
>
> Notes:
> - Tested with QEMU/OVMF.
>
> arch/x86/platform/efi/efi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 375ebd78296a..a7ff189421c3 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -765,6 +765,7 @@ static void __init kexec_enter_virtual_mode(void)
>
> efi_sync_low_kernel_mappings();
> efi_native_runtime_setup();
> + efi_runtime_update_mappings();
> #endif
> }
>
> --
> 2.40.1
>
>
Thanks
Dave
Powered by blists - more mailing lists