public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: ptrace: Make FPU context layout comments match reality
@ 2018-05-15 22:03 Maciej W. Rozycki
  2018-05-31 21:34 ` James Hogan
  0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2018-05-15 22:03 UTC (permalink / raw)
  To: James Hogan; +Cc: Ralf Baechle, linux-mips, linux-kernel

Correct comments across ptrace(2) handlers about an FPU register context
layout discrepancy between MIPS I and later ISAs, which was fixed with
`linux-mips.org' (LMO) commit 42533948caac ("Major pile of FP emulator
changes."), the fix corrected with LMO commit 849fa7a50dff ("R3k FPU
ptrace() handling fixes."), and then broken and fixed over and over
again, until last time fixed with commit 80cbfad79096 ("MIPS: Correct
MIPS I FP context layout").

NB running the GDB test suite for the relevant ABI/ISA and watching out 
for regressions is advisable when poking around ptrace(2).

Signed-off-by: Maciej W. Rozycki <macro@mips.com>
---
 arch/mips/kernel/ptrace.c   |    4 ++--
 arch/mips/kernel/ptrace32.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

linux-mips-ptrace-r2300-switch-comment.diff
Index: linux/arch/mips/kernel/ptrace.c
===================================================================
--- linux.orig/arch/mips/kernel/ptrace.c	2018-05-10 21:24:39.000000000 +0100
+++ linux/arch/mips/kernel/ptrace.c	2018-05-12 13:28:01.156433000 +0100
@@ -1063,7 +1063,7 @@ long arch_ptrace(struct task_struct *chi
 				/*
 				 * The odd registers are actually the high
 				 * order bits of the values stored in the even
-				 * registers - unless we're using r2k_switch.S.
+				 * registers.
 				 */
 				tmp = get_fpr32(&fregs[(addr & ~1) - FPR_BASE],
 						addr & 1);
@@ -1158,7 +1158,7 @@ long arch_ptrace(struct task_struct *chi
 				/*
 				 * The odd registers are actually the high
 				 * order bits of the values stored in the even
-				 * registers - unless we're using r2k_switch.S.
+				 * registers.
 				 */
 				set_fpr32(&fregs[(addr & ~1) - FPR_BASE],
 					  addr & 1, data);
Index: linux-mipsswbrd038/arch/mips/kernel/ptrace32.c
===================================================================
--- linux-mipsswbrd038.orig/arch/mips/kernel/ptrace32.c	2018-05-10 20:52:25.000000000 +0100
+++ linux-mipsswbrd038/arch/mips/kernel/ptrace32.c	2018-05-12 13:28:18.503568000 +0100
@@ -103,7 +103,7 @@ long compat_arch_ptrace(struct task_stru
 				/*
 				 * The odd registers are actually the high
 				 * order bits of the values stored in the even
-				 * registers - unless we're using r2k_switch.S.
+				 * registers.
 				 */
 				tmp = get_fpr32(&fregs[(addr & ~1) - FPR_BASE],
 						addr & 1);
@@ -216,7 +216,7 @@ long compat_arch_ptrace(struct task_stru
 				/*
 				 * The odd registers are actually the high
 				 * order bits of the values stored in the even
-				 * registers - unless we're using r2k_switch.S.
+				 * registers.
 				 */
 				set_fpr32(&fregs[(addr & ~1) - FPR_BASE],
 					  addr & 1, data);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: ptrace: Make FPU context layout comments match reality
  2018-05-15 22:03 [PATCH] MIPS: ptrace: Make FPU context layout comments match reality Maciej W. Rozycki
@ 2018-05-31 21:34 ` James Hogan
  0 siblings, 0 replies; 2+ messages in thread
From: James Hogan @ 2018-05-31 21:34 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Ralf Baechle, linux-mips, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 784 bytes --]

On Tue, May 15, 2018 at 11:03:09PM +0100, Maciej W. Rozycki wrote:
> Correct comments across ptrace(2) handlers about an FPU register context
> layout discrepancy between MIPS I and later ISAs, which was fixed with
> `linux-mips.org' (LMO) commit 42533948caac ("Major pile of FP emulator
> changes."), the fix corrected with LMO commit 849fa7a50dff ("R3k FPU
> ptrace() handling fixes."), and then broken and fixed over and over
> again, until last time fixed with commit 80cbfad79096 ("MIPS: Correct
> MIPS I FP context layout").
> 
> NB running the GDB test suite for the relevant ABI/ISA and watching out 
> for regressions is advisable when poking around ptrace(2).
> 
> Signed-off-by: Maciej W. Rozycki <macro@mips.com>

Thanks, applied for 4.18.

Cheers
James

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-31 21:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-15 22:03 [PATCH] MIPS: ptrace: Make FPU context layout comments match reality Maciej W. Rozycki
2018-05-31 21:34 ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox