diff options
author | Chris Down <chris@chrisdown.name> | 2020-08-21 15:10:35 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-08-22 12:40:38 +0300 |
commit | c31feed8461fb8648075ba9b53d9e527d530972f (patch) | |
tree | 9d2deeba379baf108560d110eb344fffed42922f /arch/x86/kernel/msr.c | |
parent | 1f35c9c0ce3888405fc813afedaff79de433cf27 (diff) | |
download | linux-c31feed8461fb8648075ba9b53d9e527d530972f.tar.xz |
x86/msr: Make source of unrecognised MSR writes unambiguous
In many cases, task_struct.comm isn't enough to distinguish the
offender, since for interpreted languages it's likely just going to be
"python3" or whatever. Add the pid to make it unambiguous.
[ bp: Make the printk string a single line for easier grepping. ]
Signed-off-by: Chris Down <chris@chrisdown.name>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/6f6fbd0ee6c99bc5e47910db700a6642159db01b.1598011595.git.chris@chrisdown.name
Diffstat (limited to 'arch/x86/kernel/msr.c')
-rw-r--r-- | arch/x86/kernel/msr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index b03001dfc613..c0d409810658 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c @@ -102,8 +102,8 @@ static int filter_write(u32 reg) if (reg == MSR_IA32_ENERGY_PERF_BIAS) return 0; - pr_err("Write to unrecognized MSR 0x%x by %s\n" - "Please report to x86@kernel.org\n", reg, current->comm); + pr_err("Write to unrecognized MSR 0x%x by %s (pid: %d). Please report to x86@kernel.org.\n", + reg, current->comm, current->pid); return 0; } |