From: Dave Young <dyoung@redhat.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-efi@vger.kernel.org, x86@kernel.org, tytso@mit.edu,
bp@alien8.de, mingo@kernel.org, kexec@lists.infradead.org
Subject: Re: [PATCH] efi/x86: Revert struct layout change to fix kexec boot regression
Date: Fri, 10 Apr 2020 21:56:44 +0800 [thread overview]
Message-ID: <20200410135644.GB6772@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <20200410074320.16589-1-ardb@kernel.org>
On 04/10/20 at 09:43am, Ard Biesheuvel wrote:
> Commit
>
> 0a67361dcdaa29 ("efi/x86: Remove runtime table address from kexec EFI setup data")
>
> removed the code that retrieves the non-remapped UEFI runtime services
> pointer from the data structure provided by kexec, as it was never really
> needed on the kexec boot path: mapping the runtime services table at its
> non-remapped address is only needed when calling SetVirtualAddressMap(),
> which never happens during a kexec boot in the first place.
>
> However, dropping the 'runtime' member from struct efi_setup_data was a
> mistake. That struct is shared ABI between the kernel and the kexec tooling
> for x86, and so we cannot simply change its layout. So let's put back the
> removed field, but call it 'unused' to reflect the fact that we never look
> at its contents. While at it, add a comment to remind our future selves
> that the layout is external ABI.
>
> Reported-by: Theodore Ts'o <tytso@mit.edu>
> Tested-by: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> ---
>
> Ingo, Thomas, Boris: I sent out my efi-urgent pull request just yesterday,
> so please take this directly into tip:efi/urgent - no need to wait for the
> next batch.
>
> arch/x86/include/asm/efi.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
> index 781170d36f50..96044c8d8600 100644
> --- a/arch/x86/include/asm/efi.h
> +++ b/arch/x86/include/asm/efi.h
> @@ -178,8 +178,10 @@ extern void efi_free_boot_services(void);
> extern pgd_t * __init efi_uv1_memmap_phys_prolog(void);
> extern void __init efi_uv1_memmap_phys_epilog(pgd_t *save_pgd);
>
> +/* kexec external ABI */
> struct efi_setup_data {
> u64 fw_vendor;
> + u64 unused;
> u64 tables;
> u64 smbios;
> u64 reserved[8];
> --
> 2.17.1
>
Ah, replied too quick in another mail. I just cced kexec list again.
Thanks for the fix:
Reviewed-by: Dave Young <dyoung@redhat.com>
Thanks
Dave
next prev parent reply other threads:[~2020-04-10 13:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-10 7:43 [PATCH] efi/x86: Revert struct layout change to fix kexec boot regression Ard Biesheuvel
2020-04-10 13:56 ` Dave Young [this message]
2020-04-10 14:01 ` Dave Young
2020-04-10 14:22 ` Ard Biesheuvel
2020-04-10 14:33 ` Borislav Petkov
2020-04-10 14:37 ` Ard Biesheuvel
2020-04-14 6:27 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200410135644.GB6772@dhcp-128-65.nay.redhat.com \
--to=dyoung@redhat.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=kexec@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tytso@mit.edu \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).