From: <gregkh@linuxfoundation.org>
To: macro@imgtec.com, gregkh@linuxfoundation.org, ralf@linux-mips.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "MIPS: ptrace: Fix FP context restoration FCSR regression" has been added to the 4.5-stable tree
Date: Sat, 04 Jun 2016 11:41:12 -0700 [thread overview]
Message-ID: <1465065672214253@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
MIPS: ptrace: Fix FP context restoration FCSR regression
to the 4.5-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-ptrace-fix-fp-context-restoration-fcsr-regression.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 4249548454f7ba4581aeee26bd83f42b48a14d15 Mon Sep 17 00:00:00 2001
From: "Maciej W. Rozycki" <macro@imgtec.com>
Date: Thu, 12 May 2016 10:18:27 +0100
Subject: MIPS: ptrace: Fix FP context restoration FCSR regression
From: Maciej W. Rozycki <macro@imgtec.com>
commit 4249548454f7ba4581aeee26bd83f42b48a14d15 upstream.
Fix a floating-point context restoration regression introduced with
commit 9b26616c8d9d ("MIPS: Respect the ISA level in FCSR handling")
that causes a Floating Point exception and consequently a kernel oops
with hard float configurations when one or more FCSR Enable and their
corresponding Cause bits are set both at a time via a ptrace(2) call.
To do so reinstate Cause bit masking originally introduced with commit
b1442d39fac2 ("MIPS: Prevent user from setting FCSR cause bits") to
address this exact problem and then inadvertently removed from the
PTRACE_SETFPREGS request with the commit referred above.
Signed-off-by: Maciej W. Rozycki <macro@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13238/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/kernel/ptrace.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -176,6 +176,7 @@ int ptrace_setfpregs(struct task_struct
}
__get_user(value, data + 64);
+ value &= ~FPU_CSR_ALL_X;
fcr31 = child->thread.fpu.fcr31;
mask = boot_cpu_data.fpu_msk31;
child->thread.fpu.fcr31 = (value & ~mask) | (fcr31 & mask);
Patches currently in stable-queue which might be from macro@imgtec.com are
queue-4.5/mips-disable-preemption-during-prctl-pr_set_fp_mode.patch
queue-4.5/mips-ptrace-prevent-writes-to-read-only-fcsr-bits.patch
queue-4.5/mips-msa-fix-a-link-error-on-_init_msa_upper-with-older-gcc.patch
queue-4.5/mips-ptrace-fix-fp-context-restoration-fcsr-regression.patch
queue-4.5/mips-vdso-build-with-fno-strict-aliasing.patch
queue-4.5/mips-math-emu-fix-jalr-emulation-when-rd-0.patch
reply other threads:[~2016-06-04 18:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465065672214253@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=macro@imgtec.com \
--cc=ralf@linux-mips.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).