lkml.org 
[lkml]   [2016]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 6/6] efi: Add EFI_SECURE_BOOT bit [ver #2]
Date
Lukas Wunner <lukas@wunner.de> wrote:

> > +#ifdef CONFIG_EFI
> > + if (boot_params.secure_boot) {
> > + set_bit(EFI_SECURE_BOOT, &efi.flags);
> > + pr_info("Secure boot enabled\n");
> > + }
> > +#endif
> > +
>
> Section 20 of Documentation/CodingStyle recommends IS_ENABLED()
> instead of #ifdef.

The problem is this:

arch/x86/include/asm/bitops.h:75: undefined reference to `efi'

To quote section 20: "... Thus, you still have to use an #ifdef if the code
inside the block references symbols that will not exist if the condition is
not met."

> Also, CONFIG_EFI_STUB might be more apt than CONFIG_EFI.

Other stuff in the same function is contingent on CONFIG_EFI. EFI_STUB is to
do with how the thing can be booted, I think - not whether EFI support is
enabled.

David

\
 
 \ /
  Last update: 2016-11-23 11:10    [W:0.164 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site