Skip to contentSkip to conversation

x86/umip: Print UMIP line only once

PATCH In review Borislav Petkov 3 participants 3 messages Nov 27, 2018 – Dec 3, 2018 x86

lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH 1/1 x86/umip: Print UMIP line only once

From: Borislav Petkov <[email protected]>

... instead of issuing it per CPU and flooding dmesg unnecessarily.

Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Ricardo Neri <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 arch/x86/kernel/cpu/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/common.c +1 -1
index ffb181f959d2..2c56b8066280 100644
@@ -353,7 +353,7 @@ static __always_inline void setup_umip(struct cpuinfo_x86 *c)
 
 	cr4_set_bits(X86_CR4_UMIP);
 
-	pr_info("x86/cpu: Activated the Intel User Mode Instruction Prevention (UMIP) CPU feature\n");
+	pr_info_once("x86/cpu: Intel User Mode Instruction Prevention (UMIP) activated\n");
 
 	return;
 
Signature · 1 line
2.19.1
#1 lore raw
Quoted 9 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

... instead of issuing it per CPU and flooding dmesg unnecessarily.

Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Ricardo Neri <[email protected]>
Cc Thomas Gleixner <[email protected]>

This make sense to me. I also noticed that this message was being printed when CPUs were put offline and the back online. There was no need for it.

Thanks and BR,
Ricardo

#2 lore raw
In reply to Borislav Petkov
x86/umip: Print UMIP line only once
Commit-ID:  0abbbc63d0251a25d3df6c8a56ab3d3c20af082c
Gitweb:     https://git.kernel.org/tip/0abbbc63d0251a25d3df6c8a56ab3d3c20af082c
Author:     Borislav Petkov <[email protected]>
AuthorDate: Tue, 27 Nov 2018 21:54:18 +0100
Committer:  Borislav Petkov <[email protected]>
CommitDate: Mon, 3 Dec 2018 16:59:10 +0100

x86/umip: Print UMIP line only once

... instead of issuing it per CPU and flooding dmesg unnecessarily. Streamline the formulation, while at it.

---
 arch/x86/kernel/cpu/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/common.c +1 -1
index ffb181f959d2..2c56b8066280 100644
@@ -353,7 +353,7 @@ static __always_inline void setup_umip(struct cpuinfo_x86 *c)
 
 	cr4_set_bits(X86_CR4_UMIP);
 
-	pr_info("x86/cpu: Activated the Intel User Mode Instruction Prevention (UMIP) CPU feature\n");
+	pr_info_once("x86/cpu: Intel User Mode Instruction Prevention (UMIP) activated\n");
 
 	return;