[PATCH v3 2/2] arm64: efi: Account for the EFI runtime stack in stack unwinder

Ard Biesheuvel ardb at kernel.org
Wed Jan 11 00:45:32 PST 2023


On Tue, 10 Jan 2023 at 21:48, Nathan Chancellor <nathan at kernel.org> wrote:
>
> Hi Ard,
>
> On Fri, Jan 06, 2023 at 06:47:03PM +0100, Ard Biesheuvel wrote:
> > The EFI runtime services run from a dedicated stack now, and so the
> > stack unwinder needs to be informed about this.
> >
> > Acked-by: Mark Rutland <mark.rutland at arm.com>
> > Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
>
> Apologies if this has been reported and/or fixed already, I searched
> lore and did not find anything but I just bisected a QEMU boot hang [1]
> that we see in the ClangBuiltLinux CI with Fedora's configuration [2] to
> this change in next-20220110 as commit a7334dc70496 ("arm64: efi:
> Account for the EFI runtime stack in stack unwinder").
>

Thanks for the report. This is due to an oversight on my part: we
removed a spin_is_locked() check, and the lock in question can only be
in the locked state when EFI runtime services are enabled to begin
with.

Without the lock check, we may end up dereferencing the uninitialized
efi_rt_stack_top on non-EFI boots.

I've fixed this up in the EFI fixes tree, so the issue should
disappear once -next is updated. (We just missed 20230111
unfortunately)



More information about the linux-arm-kernel mailing list