Skip to contentSkip to conversation

Patch "MIPS: math-emu: Remove pr_err() calls from fpu_emu()" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Oct 15, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

MIPS: math-emu: Remove pr_err() calls from fpu_emu()

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mips-math-emu-remove-pr_err-calls-from-fpu_emu.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From ca8eb05b5f332a9e1ab3e2ece498d49f4d683470 Mon Sep 17 00:00:00 2001

From: Paul Burton <[email protected]>
Date: Fri, 8 Sep 2017 15:12:21 -0700
Subject: MIPS: math-emu: Remove pr_err() calls from fpu_emu()

From: Paul Burton <[email protected]>

commit ca8eb05b5f332a9e1ab3e2ece498d49f4d683470 upstream.

The FPU emulator includes 2 calls to pr_err() which are triggered by invalid instruction encodings for MIPSr6 cmp.cond.fmt instructions. These cases are not kernel errors, merely invalid instructions which are already handled by delivering a SIGILL which will provide notification that something failed in cases where that makes sense.

In cases where that SIGILL is somewhat expected & being handled, for example when crashme happens to generate one of the affected bad encodings, the message is printed with no useful context about what triggered it & spams the kernel log for no good reason.

Remove the pr_err() calls to make crashme run silently & treat the bad encodings the same way we do others, with a SIGILL & no further kernel log output.

Fixes f8c3c6717a71 ("MIPS: math-emu: Add support for the CMP.condn.fmt R6 instruction")

Patchwork: https://patchwork.linux-mips.org/patch/17253/

---
 arch/mips/math-emu/cp1emu.c |    2 --
 1 file changed, 2 deletions(-)
arch/mips/math-emu/cp1emu.c +0 -2
@@ -2386,7 +2386,6 @@ dcopuop:
 					break;
 				default:
 					/* Reserved R6 ops */
-					pr_err("Reserved MIPS R6 CMP.condn.S operation\n");
 					return SIGILL;
 				}
 			}
@@ -2460,7 +2459,6 @@ dcopuop:
 					break;
 				default:
 					/* Reserved R6 ops */
-					pr_err("Reserved MIPS R6 CMP.condn.D operation\n");
 					return SIGILL;
 				}
 			}

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/mips-math-emu-remove-pr_err-calls-from-fpu_emu.patch