2017-12-09 15:53:12

by Vincent Legoll

[permalink] [raw]
Subject: [PATCH] efi: make EFI a menuconfig to ease disabling it all

No need to get into the submenu to disable all related
config entries.

This makes it easier to disable all EFI config options
without entering the submenu. It will also enable one
to see that en/dis-abled state from the outside menu.

This is only intended to change menuconfig UI, not change
the config dependencies.

Signed-off-by: Vincent Legoll <[email protected]>
---
drivers/firmware/efi/Kconfig | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 2b4c39fdfa91..8727b1aa8ef6 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -1,6 +1,9 @@
-menu "EFI (Extensible Firmware Interface) Support"
+menuconfig EFI_MENU
+ bool "EFI (Extensible Firmware Interface) Support"
depends on EFI

+if EFI_MENU
+
config EFI_VARS
tristate "EFI Variable Support via sysfs"
depends on EFI
@@ -81,9 +84,6 @@ config EFI_PARAMS_FROM_FDT
the EFI runtime support gets system table address, memory
map address, and other parameters from the device tree.

-config EFI_RUNTIME_WRAPPERS
- bool
-
config EFI_ARMSTUB
bool

@@ -161,7 +161,10 @@ config RESET_ATTACK_MITIGATION
still contains secrets in RAM, booting another OS and extracting the
secrets.

-endmenu
+endif # EFI_MENU
+
+config EFI_RUNTIME_WRAPPERS
+ bool

config UEFI_CPER
bool
--
2.14.1


2017-12-15 15:19:16

by Matt Fleming

[permalink] [raw]
Subject: Re: [PATCH] efi: make EFI a menuconfig to ease disabling it all

On Sat, 09 Dec, at 04:52:52PM, Vincent Legoll wrote:
> No need to get into the submenu to disable all related
> config entries.
>
> This makes it easier to disable all EFI config options
> without entering the submenu. It will also enable one
> to see that en/dis-abled state from the outside menu.
>
> This is only intended to change menuconfig UI, not change
> the config dependencies.
>
> Signed-off-by: Vincent Legoll <[email protected]>
> ---
> drivers/firmware/efi/Kconfig | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)

This looks fine to me. Ard?

2017-12-15 16:50:54

by Ard Biesheuvel

[permalink] [raw]
Subject: Re: [PATCH] efi: make EFI a menuconfig to ease disabling it all

On 15 December 2017 at 16:19, Matt Fleming <[email protected]> wrote:
> On Sat, 09 Dec, at 04:52:52PM, Vincent Legoll wrote:
>> No need to get into the submenu to disable all related
>> config entries.
>>
>> This makes it easier to disable all EFI config options
>> without entering the submenu. It will also enable one
>> to see that en/dis-abled state from the outside menu.
>>
>> This is only intended to change menuconfig UI, not change
>> the config dependencies.
>>
>> Signed-off-by: Vincent Legoll <[email protected]>
>> ---
>> drivers/firmware/efi/Kconfig | 13 ++++++++-----
>> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> This looks fine to me. Ard?

Doesn't this break existing configs?

2017-12-15 17:25:04

by Vincent Legoll

[permalink] [raw]
Subject: Re: [PATCH] efi: make EFI a menuconfig to ease disabling it all

Hello,

>> This looks fine to me. Ard?
>
> Doesn't this break existing configs?

Would adding a "default yes" on the new menuconfig be OK.

If yes, I'd respin it for a v2

--
Vincent Legoll

2017-12-15 18:23:51

by Austin S Hemmelgarn

[permalink] [raw]
Subject: Re: [PATCH] efi: make EFI a menuconfig to ease disabling it all

On 2017-12-15 12:24, Vincent Legoll wrote:
> Hello,
>
>>> This looks fine to me. Ard?
>>
>> Doesn't this break existing configs?
>
> Would adding a "default yes" on the new menuconfig be OK.
>
> If yes, I'd respin it for a v2
>
Alternatively, would it not make some degree of sense to just turn the
CONFIG_EFI symbol into the menuconfig? It already controls all the EFI
related stuff except GPT support (which should not be dependent on EFI
support), so anyone who wants EFI support already has it enabled, and it
would be a bit nicer to work with when actually configuring a kernel (It
is rather annoying to have to effectively enable something twice).

The same (in theory) goes for pretty much any other patch like this
where there's already a config option controlling it all that just isn't
a menuconfig.

2017-12-16 10:47:26

by Vincent Legoll

[permalink] [raw]
Subject: [PATCH,v2] efi: make EFI a menuconfig to ease disabling it all


The following v2 patch adds the "default y" to avoid breaking existing
configs.

I don't know if using the CONFIG_EFI symbol would be better, it is spread
in multiple arch/*/Kconfig files, and would make the changes more invasive.

Please advise the way forward

Thanks

2017-12-16 10:47:34

by Vincent Legoll

[permalink] [raw]
Subject: [PATCH] efi: make EFI a menuconfig to ease disabling it all

No need to get into the submenu to disable all related
config entries.

This makes it easier to disable all EFI config options
without entering the submenu. It will also enable one
to see that en/dis-abled state from the outside menu.

This is only intended to change menuconfig UI, not change
the config dependencies.

v2: added "default y" to menuconfig to avoid breaking existing
configs.

Signed-off-by: Vincent Legoll <[email protected]>
---
drivers/firmware/efi/Kconfig | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig
index 2b4c39fdfa91..2ad237b24afb 100644
--- a/drivers/firmware/efi/Kconfig
+++ b/drivers/firmware/efi/Kconfig
@@ -1,5 +1,9 @@
-menu "EFI (Extensible Firmware Interface) Support"
+menuconfig EFI_MENU
+ bool "EFI (Extensible Firmware Interface) Support"
depends on EFI
+ default y
+
+if EFI_MENU

config EFI_VARS
tristate "EFI Variable Support via sysfs"
@@ -81,9 +85,6 @@ config EFI_PARAMS_FROM_FDT
the EFI runtime support gets system table address, memory
map address, and other parameters from the device tree.

-config EFI_RUNTIME_WRAPPERS
- bool
-
config EFI_ARMSTUB
bool

@@ -161,7 +162,10 @@ config RESET_ATTACK_MITIGATION
still contains secrets in RAM, booting another OS and extracting the
secrets.

-endmenu
+endif # EFI_MENU
+
+config EFI_RUNTIME_WRAPPERS
+ bool

config UEFI_CPER
bool
--
2.14.1