Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/umip: Downgrade warning messages to debug loglevel

After four years in the wild, those have not fullfilled their
initial purpose of pushing people to fix their software to not use
UMIP-emulated instructions, and to warn users about the degraded
emulation performance.

Yet, the only thing that "degrades" performance is overflowing dmesg
with those:

[Di Sep 7 00:24:05 2021] umip_printk: 1345 callbacks suppressed
[Di Sep 7 00:24:05 2021] umip: someapp.exe[29231] ip:14064cdba sp:11b7c0: SIDT instruction cannot be used by applications.
[Di Sep 7 00:24:05 2021] umip: someapp.exe[29231] ip:14064cdba sp:11b7c0: For now, expensive software emulation returns the result.
...
[Di Sep 7 00:26:06 2021] umip_printk: 2227 callbacks suppressed
[Di Sep 7 00:26:06 2021] umip: someapp.exe[29231] ip:14064cdba sp:11b940: SIDT instruction cannot be used by applications.

and users don't really care about that - they just want to play their
games in wine.

So convert those to debug loglevel - in case someone is still interested
in them, someone can boot with "debug" on the kernel cmdline.

Reported-by: Marcus Rückert <mrueckert@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Link: https://lkml.kernel.org/r/20210907200454.30458-1-bp@alien8.de

+4 -4
+4 -4
arch/x86/kernel/umip.c
··· 92 92 93 93 #define umip_pr_err(regs, fmt, ...) \ 94 94 umip_printk(regs, KERN_ERR, fmt, ##__VA_ARGS__) 95 - #define umip_pr_warn(regs, fmt, ...) \ 96 - umip_printk(regs, KERN_WARNING, fmt, ##__VA_ARGS__) 95 + #define umip_pr_debug(regs, fmt, ...) \ 96 + umip_printk(regs, KERN_DEBUG, fmt, ##__VA_ARGS__) 97 97 98 98 /** 99 99 * umip_printk() - Print a rate-limited message ··· 361 361 if (umip_inst < 0) 362 362 return false; 363 363 364 - umip_pr_warn(regs, "%s instruction cannot be used by applications.\n", 364 + umip_pr_debug(regs, "%s instruction cannot be used by applications.\n", 365 365 umip_insns[umip_inst]); 366 366 367 - umip_pr_warn(regs, "For now, expensive software emulation returns the result.\n"); 367 + umip_pr_debug(regs, "For now, expensive software emulation returns the result.\n"); 368 368 369 369 if (emulate_umip_insn(&insn, umip_inst, dummy_data, &dummy_data_size, 370 370 user_64bit_mode(regs)))