Re: [PATCH] efi: don't iterate over EFI vars pointlessly if no SSDT override was specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Sep 2019 at 20:35, Scott Talbert <swt@xxxxxxxxxx> wrote:
>
> On Thu, 12 Sep 2019, Ard Biesheuvel wrote:
>
> > The kernel command line option efivar_ssdt= allows a EFI variable name
> > to be specified which contains an ACPI SSDT table that will be loaded
> > into memory by the OS.
> >
> > Currently, that code will always iterate over the EFI variables and
> > compare each name with the provided name, even if the command line
> > option wasn't set to begin with.
> >
> > So bail early when no variable name was provided.
> >
> > Cc: Scott Talbert <swt@xxxxxxxxxx>
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
> > ---
> > drivers/firmware/efi/efi.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> > index ad3b1f4866b3..8f020827cdd3 100644
> > --- a/drivers/firmware/efi/efi.c
> > +++ b/drivers/firmware/efi/efi.c
> > @@ -282,6 +282,9 @@ static __init int efivar_ssdt_load(void)
> >       void *data;
> >       int ret;
> >
> > +     if (!efivar_ssdt[0])
> > +             return 0;
> > +
> >       ret = efivar_init(efivar_ssdt_iter, &entries, true, &entries);
> >
> >       list_for_each_entry_safe(entry, aux, &entries, list) {
>
> Thanks for the quick fix!
>
> I can confirm this fixes booting on my Mac Pro 2012 system when applied to
> 5.3-rc7.
>
> Whenever this makes it in, if it could be targeted for the stable kernels
> as well, that would be appreciated.
>

I'll send it out as a fix with a cc to -stable.

Thanks,
Ard.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux