From: Nathan Chancellor <nathan@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
will@kernel.org, catalin.marinas@arm.com,
Mark Rutland <mark.rutland@arm.com>, Lee Jones <lee@kernel.org>,
llvm@lists.linux.dev
Subject: Re: [PATCH v3 2/2] arm64: efi: Account for the EFI runtime stack in stack unwinder
Date: Wed, 11 Jan 2023 14:18:24 -0700 [thread overview]
Message-ID: <Y78noHxkLQbM6bIK@dev-arch.thelio-3990X> (raw)
In-Reply-To: <CAMj1kXGFa=Zriyp_mS7bbQr0wiwikt0ObjOKUSNGpJtFvLmnkg@mail.gmail.com>
Hi Ard,
On Wed, Jan 11, 2023 at 09:45:32AM +0100, Ard Biesheuvel wrote:
> On Tue, 10 Jan 2023 at 21:48, Nathan Chancellor <nathan@kernel.org> wrote:
> > 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@arm.com>
> > > Signed-off-by: Ard Biesheuvel <ardb@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)
Thank you for the quick response! That issue appears to be fixed.
Unfortunately, I am still seeing a hang while booting via EFI on either
bare metal or KVM when CONFIG_DEBUG_PREEMPT is enabled (Fedora's rawhide
config appears to enable several debugging options), so it appears I was
seeing two distinct issues :/ defconfig + CONFIG_DEBUG_PREEMPT=y is
enough for me to reproduce this problem.
I see
[ 0.015382] Remapping and enabling EFI services.
as the last line in the console (via earlycon) with the bad kernel and
nothing after it (I assume we deadlock somewhere or hit a BUG_ON()?), vs
[ 0.015191] Remapping and enabling EFI services.
[ 0.016725] smp: Bringing up secondary CPUs ...
on the good kernel, followed by a normal boot.
Sorry for not noticing this sooner! It should be pretty easy to
reproduce but if there is any other information I can provide, I am more
than happy to do so.
Cheers,
Nathan
next prev parent reply other threads:[~2023-01-11 21:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 17:47 [PATCH v3 0/2] efi: Follow-up fixes for EFI runtime stack Ard Biesheuvel
2023-01-06 17:47 ` [PATCH v3 1/2] arm64: efi: Avoid workqueue to check whether EFI runtime is live Ard Biesheuvel
2023-01-09 13:26 ` Mark Rutland
2023-01-06 17:47 ` [PATCH v3 2/2] arm64: efi: Account for the EFI runtime stack in stack unwinder Ard Biesheuvel
2023-01-10 20:48 ` Nathan Chancellor
2023-01-11 8:45 ` Ard Biesheuvel
2023-01-11 21:18 ` Nathan Chancellor [this message]
2023-01-11 22:53 ` Ard Biesheuvel
2023-01-09 10:38 ` [PATCH v3 0/2] efi: Follow-up fixes for EFI runtime stack Lee Jones
2023-01-09 13:46 ` Ard Biesheuvel
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=Y78noHxkLQbM6bIK@dev-arch.thelio-3990X \
--to=nathan@kernel.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mark.rutland@arm.com \
--cc=will@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox