Re: [PATCHv2 5/5] efi/runtime-wrappers: detect FW irq flag corruption

From: Mark Rutland
Date: Thu Apr 21 2016 - 13:18:22 EST


On Thu, Apr 21, 2016 at 07:05:32PM +0200, Ard Biesheuvel wrote:
> On 21 April 2016 at 13:35, Mark Rutland <mark.rutland@xxxxxxx> wrote:
> > @@ -25,8 +27,11 @@
> > #define efi_call_virt(f, args...) \
> > ({ \
> > efi_status_t __s; \
> > + unsigned long flags; \
> > arch_efi_call_virt_setup(); \
> > + local_save_flags(flags); \
> > __s = arch_efi_call_virt(f, args); \
> > + efi_call_virt_check_flags(flags, __stringify(f)); \
> > arch_efi_call_virt_teardown(); \
> > __s; \
> > })
> > @@ -35,12 +40,29 @@
> > #ifndef __efi_call_virt
> > #define __efi_call_virt(f, args...) \
> > ({ \
> > + unsigned long flags; \
> > arch_efi_call_virt_setup(); \
> > + local_irq_save(flags); \
>
> We shouldn't disable interrupts here. I assume this is a typo, and you
> intended to use local_save_flags() as above?

Oh, yes. That's an impressive mistake on my behalf; thanks for spotting
that!

I've been seeing issues with GetVariable and GetNextVariable, which
happen to only exercise the correct macro above.

> Other than that, this series looks fine to me.
>
> With the above fixed:
>
> For the series (except the x86 patch)
>
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>

Cheers!

Mark.