[tip: x86/misc] x86/msr: Do not allow writes to MSR_IA32_ENERGY_PERF_BIAS
From: tip-bot2 for Borislav Petkov
Date: Mon Nov 16 2020 - 15:08:37 EST
The following commit has been merged into the x86/misc branch of tip:
Commit-ID: 18741a5251d018094536a2dffe284d269ebb07fe
Gitweb: https://git.kernel.org/tip/18741a5251d018094536a2dffe284d269ebb07fe
Author: Borislav Petkov <bp@xxxxxxx>
AuthorDate: Thu, 15 Oct 2020 15:00:31 +02:00
Committer: Borislav Petkov <bp@xxxxxxx>
CommitterDate: Mon, 16 Nov 2020 17:44:04 +01:00
x86/msr: Do not allow writes to MSR_IA32_ENERGY_PERF_BIAS
Now that all in-kernel-tree users are converted to using the sysfs file,
remove the MSR from the "allowlist".
Signed-off-by: Borislav Petkov <bp@xxxxxxx>
Reviewed-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
Link: https://lkml.kernel.org/r/20201029190259.3476-5-bp@xxxxxxxxx
---
arch/x86/kernel/msr.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index c0d4098..b114786 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -99,9 +99,6 @@ static int filter_write(u32 reg)
if (!__ratelimit(&fw_rs))
return 0;
- if (reg == MSR_IA32_ENERGY_PERF_BIAS)
- return 0;
-
pr_err("Write to unrecognized MSR 0x%x by %s (pid: %d). Please report to x86@xxxxxxxxxx.\n",
reg, current->comm, current->pid);