Re: [PATCH] x86/Kconfig: make X86_UMIP to cover any X86 CPU

From: Borislav Petkov
Date: Mon Mar 09 2020 - 16:36:39 EST


On Mon, Mar 09, 2020 at 02:06:30PM +0800, Tony W Wang-oc wrote:
> While the UMIP (User-Mode Instruction Prevention) is a generic X86 CPU
> feature, there is no need to tie X86_UMIP only to Intel and AMD.

It is not generic - it just lost the "INTEL" in its name.

> So remove that dependency from the Kconfig rules.
>
> Signed-off-by: Tony W Wang-oc <TonyWWang-oc@xxxxxxxxxxx>
> ---
> arch/x86/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5ad3957..ca16b762 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1871,7 +1871,6 @@ config X86_SMAP
>
> config X86_UMIP
> def_bool y
> - depends on CPU_SUP_INTEL || CPU_SUP_AMD
> prompt "User Mode Instruction Prevention" if EXPERT
> ---help---
> User Mode Instruction Prevention (UMIP) is a security feature in
> --

If you're going to do that, is there even any use for that config option
at all?

AFAICT, it adds ~1K to kernel text so we might just as well remove the
ifdeffery completely. The code ends up built in in 99% of the cases
anyway...

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette