[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1610272243220.31859@tp.orcam.me.uk>
Date: Fri, 28 Oct 2016 08:20:09 +0100
From: "Maciej W. Rozycki" <macro@...tec.com>
To: Ralf Baechle <ralf@...ux-mips.org>
CC: Paul Burton <paul.burton@...tec.com>,
James Hogan <james.hogan@...tec.com>,
<linux-mips@...ux-mips.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/2] MIPS: ptrace: Also initialize the FP context on individual
FCSR writes
Complement commit ac9ad83bc318 ("MIPS: prevent FP context set via ptrace
being discarded") and also initialize the FP context whenever FCSR alone
is written with a PTRACE_POKEUSR request addressing FPC_CSR, rather than
along with the full FPU register set in the case of the PTRACE_SETFPREGS
request.
Signed-off-by: Maciej W. Rozycki <macro@...tec.com>
---
Hi,
This is tricky to verify with modern user software as these days it all
uses PTRACE_SETFPREGS. I suppose I could tweak and rebuild `gdbserver' to
disable modern code and let it use fallback legacy support still present
there, but frankly I think the change is obviously correct.
Please apply.
Maciej
linux-mips-ptrace-fcsr-init-fp-ctx.diff
Index: linux-sfr-test/arch/mips/kernel/ptrace.c
===================================================================
--- linux-sfr-test.orig/arch/mips/kernel/ptrace.c 2016-10-22 01:29:44.000000000 +0100
+++ linux-sfr-test/arch/mips/kernel/ptrace.c 2016-10-22 01:44:38.740202000 +0100
@@ -817,6 +818,7 @@ long arch_ptrace(struct task_struct *chi
break;
#endif
case FPC_CSR:
+ init_fp_ctx(child);
ptrace_setfcr31(child, data);
break;
case DSP_BASE ... DSP_BASE + 5: {
Powered by blists - more mailing lists