Skip to content

Commit b971880

Browse files
babumogersuryasaimadhu
authored andcommitted
x86/Kconfig: Rename UMIP config parameter
AMD 2nd generation EPYC processors support the UMIP (User-Mode Instruction Prevention) feature. So, rename X86_INTEL_UMIP to generic X86_UMIP and modify the text to cover both Intel and AMD. [ bp: take of the disabled-features.h copy in tools/ too. ] Signed-off-by: Babu Moger <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Ricardo Neri <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: "[email protected]" <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 1edae1a commit b971880

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

arch/x86/Kconfig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,16 +1880,16 @@ config X86_SMAP
18801880

18811881
If unsure, say Y.
18821882

1883-
config X86_INTEL_UMIP
1883+
config X86_UMIP
18841884
def_bool y
1885-
depends on CPU_SUP_INTEL
1886-
prompt "Intel User Mode Instruction Prevention" if EXPERT
1885+
depends on CPU_SUP_INTEL || CPU_SUP_AMD
1886+
prompt "User Mode Instruction Prevention" if EXPERT
18871887
---help---
1888-
The User Mode Instruction Prevention (UMIP) is a security
1889-
feature in newer Intel processors. If enabled, a general
1890-
protection fault is issued if the SGDT, SLDT, SIDT, SMSW
1891-
or STR instructions are executed in user mode. These instructions
1892-
unnecessarily expose information about the hardware state.
1888+
User Mode Instruction Prevention (UMIP) is a security feature in
1889+
some x86 processors. If enabled, a general protection fault is
1890+
issued if the SGDT, SLDT, SIDT, SMSW or STR instructions are
1891+
executed in user mode. These instructions unnecessarily expose
1892+
information about the hardware state.
18931893

18941894
The vast majority of applications do not use these instructions.
18951895
For the very few that do, software emulation is provided in

arch/x86/include/asm/disabled-features.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# define DISABLE_SMAP (1<<(X86_FEATURE_SMAP & 31))
2323
#endif
2424

25-
#ifdef CONFIG_X86_INTEL_UMIP
25+
#ifdef CONFIG_X86_UMIP
2626
# define DISABLE_UMIP 0
2727
#else
2828
# define DISABLE_UMIP (1<<(X86_FEATURE_UMIP & 31))

arch/x86/include/asm/umip.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#include <linux/types.h>
55
#include <asm/ptrace.h>
66

7-
#ifdef CONFIG_X86_INTEL_UMIP
7+
#ifdef CONFIG_X86_UMIP
88
bool fixup_umip_exception(struct pt_regs *regs);
99
#else
1010
static inline bool fixup_umip_exception(struct pt_regs *regs) { return false; }
11-
#endif /* CONFIG_X86_INTEL_UMIP */
11+
#endif /* CONFIG_X86_UMIP */
1212
#endif /* _ASM_X86_UMIP_H */

arch/x86/kernel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ obj-$(CONFIG_EFI) += sysfb_efi.o
134134
obj-$(CONFIG_PERF_EVENTS) += perf_regs.o
135135
obj-$(CONFIG_TRACING) += tracepoint.o
136136
obj-$(CONFIG_SCHED_MC_PRIO) += itmt.o
137-
obj-$(CONFIG_X86_INTEL_UMIP) += umip.o
137+
obj-$(CONFIG_X86_UMIP) += umip.o
138138

139139
obj-$(CONFIG_UNWINDER_ORC) += unwind_orc.o
140140
obj-$(CONFIG_UNWINDER_FRAME_POINTER) += unwind_frame.o

tools/arch/x86/include/asm/disabled-features.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# define DISABLE_SMAP (1<<(X86_FEATURE_SMAP & 31))
2323
#endif
2424

25-
#ifdef CONFIG_X86_INTEL_UMIP
25+
#ifdef CONFIG_X86_UMIP
2626
# define DISABLE_UMIP 0
2727
#else
2828
# define DISABLE_UMIP (1<<(X86_FEATURE_UMIP & 31))

0 commit comments

Comments
 (0)