public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] arm64/efi: Don't fail check current_in_efi() if preemptible
@ 2026-01-05 13:58 Ben Horgan
  2026-01-05 14:48 ` Yeoreum Yun
  2026-01-06 14:17 ` Catalin Marinas
  0 siblings, 2 replies; 5+ messages in thread
From: Ben Horgan @ 2026-01-05 13:58 UTC (permalink / raw)
  To: ben.horgan, linux-efi, linux-arm-kernel
  Cc: ardb, catalin.marinas, will, YeoReum.Yun, Mark.Rutland

As EFI runtime services can now be run without disabling preemption remove
the check for non preemptible in current_in_efi(). Without this change,
firmware errors that were previously recovered from by
__efi_runtime_kernel_fixup_exception() will lead to a kernel oops.

Fixes: a5baf582f4c0 ("arm64/efi: Call EFI runtime services without disabling preemption")
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
---
On the partner platform I was testing on this issue caused the boot to fail.
---
 arch/arm64/include/asm/efi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
index aa91165ca140..e8a9783235cb 100644
--- a/arch/arm64/include/asm/efi.h
+++ b/arch/arm64/include/asm/efi.h
@@ -45,7 +45,7 @@ void arch_efi_call_virt_teardown(void);
  * switching to the EFI runtime stack.
  */
 #define current_in_efi()						\
-	(!preemptible() && efi_rt_stack_top != NULL &&			\
+	(efi_rt_stack_top != NULL &&					\
 	 on_task_stack(current, READ_ONCE(efi_rt_stack_top[-1]), 1))
 
 #define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] arm64/efi: Don't fail check current_in_efi() if preemptible
  2026-01-05 13:58 [PATCH v1] arm64/efi: Don't fail check current_in_efi() if preemptible Ben Horgan
@ 2026-01-05 14:48 ` Yeoreum Yun
  2026-01-06  7:58   ` Richard Lyu
  2026-01-06 14:17 ` Catalin Marinas
  1 sibling, 1 reply; 5+ messages in thread
From: Yeoreum Yun @ 2026-01-05 14:48 UTC (permalink / raw)
  To: Ben Horgan
  Cc: linux-efi, linux-arm-kernel, ardb, catalin.marinas, will,
	Mark.Rutland

LGTM. feel free to add:
Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>

> As EFI runtime services can now be run without disabling preemption remove
> the check for non preemptible in current_in_efi(). Without this change,
> firmware errors that were previously recovered from by
> __efi_runtime_kernel_fixup_exception() will lead to a kernel oops.
>
> Fixes: a5baf582f4c0 ("arm64/efi: Call EFI runtime services without disabling preemption")
> Signed-off-by: Ben Horgan <ben.horgan@arm.com>
> ---
> On the partner platform I was testing on this issue caused the boot to fail.
> ---
>  arch/arm64/include/asm/efi.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
> index aa91165ca140..e8a9783235cb 100644
> --- a/arch/arm64/include/asm/efi.h
> +++ b/arch/arm64/include/asm/efi.h
> @@ -45,7 +45,7 @@ void arch_efi_call_virt_teardown(void);
>   * switching to the EFI runtime stack.
>   */
>  #define current_in_efi()						\
> -	(!preemptible() && efi_rt_stack_top != NULL &&			\
> +	(efi_rt_stack_top != NULL &&					\
>  	 on_task_stack(current, READ_ONCE(efi_rt_stack_top[-1]), 1))
>
>  #define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
> --
> 2.43.0
>

--
Sincerely,
Yeoreum Yun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] arm64/efi: Don't fail check current_in_efi() if preemptible
  2026-01-05 14:48 ` Yeoreum Yun
@ 2026-01-06  7:58   ` Richard Lyu
  2026-01-06 10:23     ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Lyu @ 2026-01-06  7:58 UTC (permalink / raw)
  To: Yeoreum Yun
  Cc: Ben Horgan, linux-efi, linux-arm-kernel, ardb, catalin.marinas,
	will, Mark.Rutland

This change is good to me.
Reviewed-by: Richard Lyu <richard.lyu@suse.com>

On 2026/01/05 14:48, Yeoreum Yun wrote:
> LGTM. feel free to add:
> Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
> 
> > As EFI runtime services can now be run without disabling preemption remove
> > the check for non preemptible in current_in_efi(). Without this change,
> > firmware errors that were previously recovered from by
> > __efi_runtime_kernel_fixup_exception() will lead to a kernel oops.
> >
> > Fixes: a5baf582f4c0 ("arm64/efi: Call EFI runtime services without disabling preemption")
> > Signed-off-by: Ben Horgan <ben.horgan@arm.com>
> > ---
> > On the partner platform I was testing on this issue caused the boot to fail.
> > ---
> >  arch/arm64/include/asm/efi.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
> > index aa91165ca140..e8a9783235cb 100644
> > --- a/arch/arm64/include/asm/efi.h
> > +++ b/arch/arm64/include/asm/efi.h
> > @@ -45,7 +45,7 @@ void arch_efi_call_virt_teardown(void);
> >   * switching to the EFI runtime stack.
> >   */
> >  #define current_in_efi()						\
> > -	(!preemptible() && efi_rt_stack_top != NULL &&			\
> > +	(efi_rt_stack_top != NULL &&					\
> >  	 on_task_stack(current, READ_ONCE(efi_rt_stack_top[-1]), 1))
> >
> >  #define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
> > --
> > 2.43.0
> >
> 
> --
> Sincerely,
> Yeoreum Yun
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] arm64/efi: Don't fail check current_in_efi() if preemptible
  2026-01-06  7:58   ` Richard Lyu
@ 2026-01-06 10:23     ` Ard Biesheuvel
  0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2026-01-06 10:23 UTC (permalink / raw)
  To: Richard Lyu
  Cc: Yeoreum Yun, Ben Horgan, linux-efi, linux-arm-kernel,
	catalin.marinas, will, Mark.Rutland

On Tue, 6 Jan 2026 at 08:59, Richard Lyu <richard.lyu@suse.com> wrote:
>
> This change is good to me.
> Reviewed-by: Richard Lyu <richard.lyu@suse.com>
>
> On 2026/01/05 14:48, Yeoreum Yun wrote:
> > LGTM. feel free to add:
> > Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
> >
> > > As EFI runtime services can now be run without disabling preemption remove
> > > the check for non preemptible in current_in_efi(). Without this change,
> > > firmware errors that were previously recovered from by
> > > __efi_runtime_kernel_fixup_exception() will lead to a kernel oops.
> > >
> > > Fixes: a5baf582f4c0 ("arm64/efi: Call EFI runtime services without disabling preemption")
> > > Signed-off-by: Ben Horgan <ben.horgan@arm.com>
> > > ---
> > > On the partner platform I was testing on this issue caused the boot to fail.
> > > ---
> > >  arch/arm64/include/asm/efi.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
> > > index aa91165ca140..e8a9783235cb 100644
> > > --- a/arch/arm64/include/asm/efi.h
> > > +++ b/arch/arm64/include/asm/efi.h
> > > @@ -45,7 +45,7 @@ void arch_efi_call_virt_teardown(void);
> > >   * switching to the EFI runtime stack.
> > >   */
> > >  #define current_in_efi()                                           \
> > > -   (!preemptible() && efi_rt_stack_top != NULL &&                  \
> > > +   (efi_rt_stack_top != NULL &&                                    \
> > >      on_task_stack(current, READ_ONCE(efi_rt_stack_top[-1]), 1))
> > >
> > >  #define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
> > > --
> > > 2.43.0
> > >
> >

Acked-by: Ard Biesheuvel <ardb@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] arm64/efi: Don't fail check current_in_efi() if preemptible
  2026-01-05 13:58 [PATCH v1] arm64/efi: Don't fail check current_in_efi() if preemptible Ben Horgan
  2026-01-05 14:48 ` Yeoreum Yun
@ 2026-01-06 14:17 ` Catalin Marinas
  1 sibling, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2026-01-06 14:17 UTC (permalink / raw)
  To: linux-efi, linux-arm-kernel, Ben Horgan
  Cc: ardb, will, YeoReum.Yun, Mark.Rutland

On Mon, 05 Jan 2026 13:58:47 +0000, Ben Horgan wrote:
> As EFI runtime services can now be run without disabling preemption remove
> the check for non preemptible in current_in_efi(). Without this change,
> firmware errors that were previously recovered from by
> __efi_runtime_kernel_fixup_exception() will lead to a kernel oops.
> 
> 

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64/efi: Don't fail check current_in_efi() if preemptible
      https://git.kernel.org/arm64/c/dd4d71f587f3

-- 
Catalin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-06 14:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-05 13:58 [PATCH v1] arm64/efi: Don't fail check current_in_efi() if preemptible Ben Horgan
2026-01-05 14:48 ` Yeoreum Yun
2026-01-06  7:58   ` Richard Lyu
2026-01-06 10:23     ` Ard Biesheuvel
2026-01-06 14:17 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox