All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Bradford, Robert" <robert.bradford@intel.com>
Cc: "linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>
Subject: Re: [PATCH v2] efi: Check the number of EFI configuration tables entries
Date: Fri, 24 May 2019 13:20:08 +0200	[thread overview]
Message-ID: <CAKv+Gu9v8he2Kq9AXFQuWe2i3+C5nQPVij4CU8S0Lu+Q4ZKgow@mail.gmail.com> (raw)
In-Reply-To: <145f1fac860402629bc8a9c67cc23be39f201e80.camel@intel.com>

On Tue, 21 May 2019 at 14:20, Bradford, Robert
<robert.bradford@intel.com> wrote:
>
> On Tue, 2019-04-16 at 10:59 +0100, Rob Bradford wrote:
> > Only try and access the EFI configuration tables if there there are
> > any
> > reported. This allows EFI to be continued to used on systems where
> > there
> > are no configuration table entries.
> >
> > v2: Move return on nr_tables==0 earlier
> >
> > Signed-off-by: Rob Bradford <robert.bradford@intel.com>
> > ---
> >  arch/x86/platform/efi/quirks.c | 3 +++
> >  drivers/firmware/efi/efi.c     | 3 +++
> >  2 files changed, 6 insertions(+)
> >
> > diff --git a/arch/x86/platform/efi/quirks.c
> > b/arch/x86/platform/efi/quirks.c
> > index 95e77a667ba5..6b9a4792242b 100644
> > --- a/arch/x86/platform/efi/quirks.c
> > +++ b/arch/x86/platform/efi/quirks.c
> > @@ -471,6 +471,9 @@ int __init efi_reuse_config(u64 tables, int
> > nr_tables)
> >       void *p, *tablep;
> >       struct efi_setup_data *data;
> >
> > +     if (nr_tables == 0)
> > +             return 0;
> > +
> >       if (!efi_setup)
> >               return 0;
> >
> > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> > index 415849bab233..185424a8b879 100644
> > --- a/drivers/firmware/efi/efi.c
> > +++ b/drivers/firmware/efi/efi.c
> > @@ -628,6 +628,9 @@ int __init
> > efi_config_init(efi_config_table_type_t *arch_tables)
> >       void *config_tables;
> >       int sz, ret;
> >
> > +     if (efi.systab->nr_tables == 0)
> > +             return 0;
> > +
> >       if (efi_enabled(EFI_64BIT))
> >               sz = sizeof(efi_config_table_64_t);
> >       else
>
> Any chance of getting this into the tree? Without this we can't boot
> the kernel in EFI mode on our KVM based hypervisor[1] & firmware[2] as
> it does not provide any tables, nor does it need to.
>

Apologies for the delay. I will pick it up today.

      reply	other threads:[~2019-05-24 11:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16  9:59 [PATCH v2] efi: Check the number of EFI configuration tables entries Rob Bradford
2019-05-21 12:20 ` Bradford, Robert
2019-05-24 11:20   ` Ard Biesheuvel [this message]

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=CAKv+Gu9v8he2Kq9AXFQuWe2i3+C5nQPVij4CU8S0Lu+Q4ZKgow@mail.gmail.com \
    --to=ard.biesheuvel@linaro.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=robert.bradford@intel.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.