[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y9lchEgyNGLKu/4R@zx2c4.com>
Date: Tue, 31 Jan 2023 19:23:00 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Justin He <Justin.He@....com>
Cc: Ard Biesheuvel <ardb@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Alexandru Elisei <Alexandru.Elisei@....com>
Subject: Re: [PATCH 0/2] Fix boot hang issue on Ampere Emag server
On Tue, Jan 31, 2023 at 03:21:39PM +0000, Justin He wrote:
> Hi Ard,
>
> > -----Original Message-----
> > From: Ard Biesheuvel <ardb@...nel.org>
> > Sent: Tuesday, January 31, 2023 3:19 PM
> > To: Justin He <Justin.He@....com>; Jason A. Donenfeld <Jason@...c4.com>
> > Cc: Huacai Chen <chenhuacai@...nel.org>; linux-efi@...r.kernel.org;
> > linux-kernel@...r.kernel.org; Alexandru Elisei <Alexandru.Elisei@....com>
> > Subject: Re: [PATCH 0/2] Fix boot hang issue on Ampere Emag server
> >
> > (cc Jason for awareness)
> >
> > On Tue, 31 Jan 2023 at 05:04, Jia He <justin.he@....com> wrote:
> > >
> > > I met a hung task warning and then kernel was hung forever with latest
> > > kernel on an Ampere Emag server.
> > >
> > > The root cause is kernel was hung when invoking an efi rts call to
> > > set the RandomSeed variable during the booting stage. The
> > > arch_efi_call_virt call (set_variable) was never returned and then caused the
> > hung task error.
> > >
> >
> > Given that EFI variables work on this platform (as far as I know), the problem
> > may be that we are calling SetVariable() too early.
> >
> > Could you double check whether setting variables works as expected?
> > You can use efibootmgr -t 10 as root (for example) to set the boot timeout, and
> > check whether the new value is retained after a reboot (efibootmgr will print
> > the current value for you)
> >
> > Could you also please share the kernel log up until the point where it hangs?
> >
> The set_variable seems to be ok in 5.19+:
> root@:~# efibootmgr -t 10
> BootCurrent: 0000
> Timeout: 10 seconds
I think what we want to learn is whether efibootmgr -t 10 works in the
latest RC. If not, it would suggest the issue isn't with the seed
setting, but with some other unrelated change.
Can you run efibootmgr -t 10 (or whatever) again on a kernel where
you've commented out these lines in efi.c inside of efisubsys_init():
if (efi_rt_services_supported(EFI_RT_SUPPORTED_SET_VARIABLE))
execute_with_initialized_rng(&refresh_nv_rng_seed_nb);
-->
// if (efi_rt_services_supported(EFI_RT_SUPPORTED_SET_VARIABLE))
// execute_with_initialized_rng(&refresh_nv_rng_seed_nb);
Or something like that.
Jason
Powered by blists - more mailing lists