linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] efi/libstub/x86: fix an EFI server boot failure
@ 2020-01-22 19:14 Qian Cai
  2020-01-22 19:17 ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Qian Cai @ 2020-01-22 19:14 UTC (permalink / raw)
  To: mingo; +Cc: ardb, tglx, linux-efi, linux-kernel, Qian Cai

x86_64 EFI systems are unable to boot due to a typo in the recent commit.

EFI config tables not found.
 -- System halted

Fixes: 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()")
Signed-off-by: Qian Cai <cai@lca.pw>
---
 arch/x86/boot/compressed/eboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 82e26d0ff075..287393d725f0 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void)
 {
 	if (IS_ENABLED(CONFIG_EFI_MIXED))
 		return efi_is64;
-	return IS_ENABLED(CONFIG_X64_64);
+	return IS_ENABLED(CONFIG_X86_64);
 }
 
 static efi_status_t
-- 
2.21.0 (Apple Git-122.2)


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

* Re: [PATCH -next] efi/libstub/x86: fix an EFI server boot failure
  2020-01-22 19:14 [PATCH -next] efi/libstub/x86: fix an EFI server boot failure Qian Cai
@ 2020-01-22 19:17 ` Ard Biesheuvel
  2020-01-22 19:22   ` Ard Biesheuvel
  2020-01-23 19:49   ` Qian Cai
  0 siblings, 2 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2020-01-22 19:17 UTC (permalink / raw)
  To: Qian Cai, Ingo Molnar
  Cc: Ard Biesheuvel, Thomas Gleixner, linux-efi, Linux Kernel Mailing List

On Wed, 22 Jan 2020 at 20:15, Qian Cai <cai@lca.pw> wrote:
>
> x86_64 EFI systems are unable to boot due to a typo in the recent commit.
>
> EFI config tables not found.
>  -- System halted
>
> Fixes: 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()")
> Signed-off-by: Qian Cai <cai@lca.pw>
> ---
>  arch/x86/boot/compressed/eboot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
> index 82e26d0ff075..287393d725f0 100644
> --- a/arch/x86/boot/compressed/eboot.c
> +++ b/arch/x86/boot/compressed/eboot.c
> @@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void)
>  {
>         if (IS_ENABLED(CONFIG_EFI_MIXED))
>                 return efi_is64;
> -       return IS_ENABLED(CONFIG_X64_64);
> +       return IS_ENABLED(CONFIG_X86_64);
>  }
>
>  static efi_status_t

Apologies for the breakage - your fix is obviously correct. But I did
test this code, so I am curious why I didn't see this problem. Are you
booting via GRUB or from the UEFI shell? Can you share your .config
please?

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

* Re: [PATCH -next] efi/libstub/x86: fix an EFI server boot failure
  2020-01-22 19:17 ` Ard Biesheuvel
@ 2020-01-22 19:22   ` Ard Biesheuvel
  2020-01-25  9:12     ` Ingo Molnar
  2020-01-23 19:49   ` Qian Cai
  1 sibling, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2020-01-22 19:22 UTC (permalink / raw)
  To: Qian Cai, Ingo Molnar
  Cc: Ard Biesheuvel, Thomas Gleixner, linux-efi, Linux Kernel Mailing List

On Wed, 22 Jan 2020 at 20:17, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> On Wed, 22 Jan 2020 at 20:15, Qian Cai <cai@lca.pw> wrote:
> >
> > x86_64 EFI systems are unable to boot due to a typo in the recent commit.
> >
> > EFI config tables not found.
> >  -- System halted
> >
> > Fixes: 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()")
> > Signed-off-by: Qian Cai <cai@lca.pw>
> > ---
> >  arch/x86/boot/compressed/eboot.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
> > index 82e26d0ff075..287393d725f0 100644
> > --- a/arch/x86/boot/compressed/eboot.c
> > +++ b/arch/x86/boot/compressed/eboot.c
> > @@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void)
> >  {
> >         if (IS_ENABLED(CONFIG_EFI_MIXED))
> >                 return efi_is64;
> > -       return IS_ENABLED(CONFIG_X64_64);
> > +       return IS_ENABLED(CONFIG_X86_64);
> >  }
> >
> >  static efi_status_t
>
> Apologies for the breakage - your fix is obviously correct. But I did
> test this code, so I am curious why I didn't see this problem. Are you
> booting via GRUB or from the UEFI shell? Can you share your .config
> please?

Hmm, I guess it is simply the absence of CONFIG_EFI_MIXED=y ...

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

Ingo, Thomas, could you drop this into efi/core directly please? Thanks.

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

* Re: [PATCH -next] efi/libstub/x86: fix an EFI server boot failure
  2020-01-22 19:17 ` Ard Biesheuvel
  2020-01-22 19:22   ` Ard Biesheuvel
@ 2020-01-23 19:49   ` Qian Cai
  1 sibling, 0 replies; 5+ messages in thread
From: Qian Cai @ 2020-01-23 19:49 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Ingo Molnar, Ard Biesheuvel, Thomas Gleixner, linux-efi,
	Linux Kernel Mailing List



> On Jan 22, 2020, at 2:17 PM, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> 
> On Wed, 22 Jan 2020 at 20:15, Qian Cai <cai@lca.pw> wrote:
>> 
>> x86_64 EFI systems are unable to boot due to a typo in the recent commit.
>> 
>> EFI config tables not found.
>> -- System halted
>> 
>> Fixes: 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()")
>> Signed-off-by: Qian Cai <cai@lca.pw>
>> ---
>> arch/x86/boot/compressed/eboot.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
>> index 82e26d0ff075..287393d725f0 100644
>> --- a/arch/x86/boot/compressed/eboot.c
>> +++ b/arch/x86/boot/compressed/eboot.c
>> @@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void)
>> {
>>        if (IS_ENABLED(CONFIG_EFI_MIXED))
>>                return efi_is64;
>> -       return IS_ENABLED(CONFIG_X64_64);
>> +       return IS_ENABLED(CONFIG_X86_64);
>> }
>> 
>> static efi_status_t
> 
> Apologies for the breakage - your fix is obviously correct. But I did
> test this code, so I am curious why I didn't see this problem. Are you
> booting via GRUB or from the UEFI shell? Can you share your .config
> please?

https://raw.githubusercontent.com/cailca/linux-mm/master/x86.config

BTW, this will also trigger a compilation breakage,

ld: arch/x86/platform/efi/efi_64.o: in function `efi_set_virtual_address_map':
efi_64.c:(.init.text+0x1419): undefined reference to `__efi64_thunk'
ld: efi_64.c:(.init.text+0x1530): undefined reference to `efi_uv1_memmap_phys_prolog'
ld: efi_64.c:(.init.text+0x1706): undefined reference to `efi_uv1_memmap_phys_epilog’

Likely due to the commit “efi/x86: avoid KASAN false positives when accessing the 1:1 mapping”

Looks like you are in process fixing that one as well.

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

* Re: [PATCH -next] efi/libstub/x86: fix an EFI server boot failure
  2020-01-22 19:22   ` Ard Biesheuvel
@ 2020-01-25  9:12     ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2020-01-25  9:12 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Qian Cai, Ingo Molnar, Ard Biesheuvel, Thomas Gleixner,
	linux-efi, Linux Kernel Mailing List


* Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:

> On Wed, 22 Jan 2020 at 20:17, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> >
> > On Wed, 22 Jan 2020 at 20:15, Qian Cai <cai@lca.pw> wrote:
> > >
> > > x86_64 EFI systems are unable to boot due to a typo in the recent commit.
> > >
> > > EFI config tables not found.
> > >  -- System halted
> > >
> > > Fixes: 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()")
> > > Signed-off-by: Qian Cai <cai@lca.pw>
> > > ---
> > >  arch/x86/boot/compressed/eboot.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
> > > index 82e26d0ff075..287393d725f0 100644
> > > --- a/arch/x86/boot/compressed/eboot.c
> > > +++ b/arch/x86/boot/compressed/eboot.c
> > > @@ -32,7 +32,7 @@ __attribute_const__ bool efi_is_64bit(void)
> > >  {
> > >         if (IS_ENABLED(CONFIG_EFI_MIXED))
> > >                 return efi_is64;
> > > -       return IS_ENABLED(CONFIG_X64_64);
> > > +       return IS_ENABLED(CONFIG_X86_64);
> > >  }
> > >
> > >  static efi_status_t
> >
> > Apologies for the breakage - your fix is obviously correct. But I did
> > test this code, so I am curious why I didn't see this problem. Are you
> > booting via GRUB or from the UEFI shell? Can you share your .config
> > please?
> 
> Hmm, I guess it is simply the absence of CONFIG_EFI_MIXED=y ...
> 
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
> 
> Ingo, Thomas, could you drop this into efi/core directly please? Thanks.

Sure, done!

Thanks,

	Ingo

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

end of thread, other threads:[~2020-01-25  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 19:14 [PATCH -next] efi/libstub/x86: fix an EFI server boot failure Qian Cai
2020-01-22 19:17 ` Ard Biesheuvel
2020-01-22 19:22   ` Ard Biesheuvel
2020-01-25  9:12     ` Ingo Molnar
2020-01-23 19:49   ` Qian Cai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).