Skip to content

Commit f3f07ae

Browse files
committed
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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Ricardo Neri <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 0507503 commit f3f07ae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/x86/kernel/umip.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ static const char * const umip_insns[5] = {
9292

9393
#define umip_pr_err(regs, fmt, ...) \
9494
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__)
9797

9898
/**
9999
* umip_printk() - Print a rate-limited message
@@ -361,10 +361,10 @@ bool fixup_umip_exception(struct pt_regs *regs)
361361
if (umip_inst < 0)
362362
return false;
363363

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",
365365
umip_insns[umip_inst]);
366366

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");
368368

369369
if (emulate_umip_insn(&insn, umip_inst, dummy_data, &dummy_data_size,
370370
user_64bit_mode(regs)))

0 commit comments

Comments
 (0)