Skip to contentSkip to conversation

powerpc: ptrace shouldn't touch FP exec mode

PATCH In review Benjamin Herrenschmidt 1 participant 1 message May 30, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 powerpc: ptrace shouldn't touch FP exec mode

One of the gratuituous difference between 32 and 64 bits ptrace is wether you can whack the MSR:FE0 and FE1 bits from ptrace. This patch forbids it unconditionally. In addition, 64 bits kernels used to return the exec mode in the MSR on reads but not 32 bits. This patch makes it return those bits on both.

Finally, since ptrace-ppc32.h and ptrace-ppc64.h are mostly empty now, and since the previous patch made ptrace32.c no longer need the MSR_DEBUGCHANGE definition, we just remove those 2 files and move back the remaining bits to ptrace.c (they were short lived heh ?)

---

 arch/powerpc/kernel/ptrace-ppc32.h |   35 -------------------------
 arch/powerpc/kernel/ptrace-ppc64.h |   51 -------------------------------------
 arch/powerpc/kernel/ptrace.c       |   45 ++++++++++++++++++++++++++++----
 arch/powerpc/kernel/ptrace32.c     |    2 -
 4 files changed, 39 insertions(+), 94 deletions(-)
arch/powerpc/kernel/ptrace-ppc32.h deleted +0 -35
Index: linux-cell/arch/powerpc/kernel/ptrace-ppc32.h
===================================================================
@@ -1,35 +0,0 @@
-/*
- *    Copyright (c) 2007 Benjamin Herrenschmidt, IBM Coproration
- *    Extracted from ptrace.c and ptrace32.c
- *
- * This file is subject to the terms and conditions of the GNU General
- * Public License.  See the file README.legal in the main directory of
- * this archive for more details.
- */
-
-#ifndef _POWERPC_PTRACE_PPC32_H
-#define _POWERPC_PTRACE_PPC32_H
-
-/*
- * Set of msr bits that gdb can change on behalf of a process.
- */
-#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
-#define MSR_DEBUGCHANGE	0
-#else
-#define MSR_DEBUGCHANGE	(MSR_SE | MSR_BE)
-#endif
-
-/*
- * Max register writeable via put_reg
- */
-#define PT_MAX_PUT_REG	PT_MQ
-
-/*
- * Munging of MSR on return from get_regs
- *
- * Nothing to do on ppc32
- */
-#define PT_MUNGE_MSR(msr, task)	(msr)
-
-
-#endif /* _POWERPC_PTRACE_PPC32_H */
arch/powerpc/kernel/ptrace-ppc64.h deleted +0 -51

51 lines not on this page · raw message

arch/powerpc/kernel/ptrace.c +39 -6

68 lines not on this page · raw message

arch/powerpc/kernel/ptrace32.c +0 -2
Index: linux-cell/arch/powerpc/kernel/ptrace32.c
===================================================================
@@ -33,8 +33,6 @@
 #include <asm/pgtable.h>
 #include <asm/system.h>
 
-#include "ptrace-ppc64.h"
-
 /*
  * does not yet catch signals sent when the child dies.
  * in exit.c or in signal.c.