[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200410135442.GA6772@dhcp-128-65.nay.redhat.com>
Date: Fri, 10 Apr 2020 21:54:42 +0800
From: Dave Young <dyoung@...hat.com>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: "Theodore Y. Ts'o" <tytso@....edu>,
linux-efi <linux-efi@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
kexec@...ts.infradead.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Arvind Sankar <nivedita@...m.mit.edu>,
Borislav Petkov <bp@...e.de>,
Colin Ian King <colin.king@...onical.com>,
Gary Lin <glin@...e.com>, Jiri Slaby <jslaby@...e.cz>,
Sergey Shatunov <me@...k.pw>, Takashi Iwai <tiwai@...e.de>
Subject: Re: [GIT PULL 0/9] EFI fixes for v5.7-rc
Cc kexec list.
On 04/10/20 at 09:08am, Ard Biesheuvel wrote:
> On Fri, 10 Apr 2020 at 01:57, Theodore Y. Ts'o <tytso@....edu> wrote:
> >
> > On Thu, Apr 09, 2020 at 11:29:06PM +0200, Ard Biesheuvel wrote:
> > > > What happens is that the kexec'ed kernel immediately crashes, at which
> > > > point we drop back into the BIOS, and then it boots the Debain 4.19.0
> > > > distro kernel instead of the kernel to be tested boot. Since we lose
> > > > the boot command line that was used from the kexec, the gce-xfstests
> > > > image retries the kexec, which fails, and the failing kexec repeats
> > > > until I manually kill the VM.
> > >
> > > Does this help at all?
> > >
> > > diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
> > > index 781170d36f50..52f8138243df 100644
> > > --- a/arch/x86/include/asm/efi.h
> > > +++ b/arch/x86/include/asm/efi.h
> > > @@ -180,6 +180,7 @@ extern void __init
> > > efi_uv1_memmap_phys_epilog(pgd_t *save_pgd);
> > >
> > > struct efi_setup_data {
> > > u64 fw_vendor;
> > > + u64 __unused;
> > > u64 tables;
> > > u64 smbios;
> > > u64 reserved[8];
> >
> >
> > Tested-by: Theodore Ts'o <tytso@....edu>
> >
>
> OK, I'll spin a proper patch
>
> > Yep, that fixed it. Thanks!!
> >
> > I wonder if this structure definition should be moved something like
> > arch/x86/include/uapi/asm/efi.h so it's more obvious that the
> > structure layout is used externally to the kernel?
> >
>
> Well, 95% of the data structures used by EFI are based on the UEFI
> spec, so the base assumption is really that we cannot make changes
> like these to begin with. But I'll add a DON'T TOUCH comment here in
> any case.
>
The runtime cleanup looks a very good one, but I also missed that,
userspace kexec-tools will break with the efi setup_data changes. But
kexec_file_load will just work with the cleanup applied.
Ard, could you add kexec list in cc when you send the fix out?
Thanks
Dave
Powered by blists - more mailing lists