All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Christoph Hellwig <hch@infradead.org>
Subject: [patch] s390: Remove self ptrace IEEE_IP hack.
Date: Wed, 30 Apr 2008 11:14:56 +0200	[thread overview]
Message-ID: <1209546896.10954.28.camel@localhost> (raw)

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

The self referential PT_IEEE_IP ptrace peek & poke calls have been
broken for that last 6 years. For peek the code always returns 0
instead of the last ieee fault and for poke the code does nothing.
Since nobody noticed the code seems to be superfluous. So lets
remove it.

Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 arch/s390/kernel/ptrace.c |   20 --------------------
 1 file changed, 20 deletions(-)

diff -urpN linux-2.6/arch/s390/kernel/ptrace.c linux-2.6-patched/arch/s390/kernel/ptrace.c
--- linux-2.6/arch/s390/kernel/ptrace.c	2008-04-30 11:10:46.000000000 +0200
+++ linux-2.6-patched/arch/s390/kernel/ptrace.c	2008-04-30 11:11:02.000000000 +0200
@@ -607,8 +607,6 @@ do_ptrace_emu31(struct task_struct *chil
 }
 #endif
 
-#define PT32_IEEE_IP 0x13c
-
 static int
 do_ptrace(struct task_struct *child, long request, long addr, long data)
 {
@@ -617,24 +615,6 @@ do_ptrace(struct task_struct *child, lon
 	if (request == PTRACE_ATTACH)
 		return ptrace_attach(child);
 
-	/*
-	 * Special cases to get/store the ieee instructions pointer.
-	 */
-	if (child == current) {
-		if (request == PTRACE_PEEKUSR && addr == PT_IEEE_IP)
-			return peek_user(child, addr, data);
-		if (request == PTRACE_POKEUSR && addr == PT_IEEE_IP)
-			return poke_user(child, addr, data);
-#ifdef CONFIG_COMPAT
-		if (request == PTRACE_PEEKUSR &&
-		    addr == PT32_IEEE_IP && test_thread_flag(TIF_31BIT))
-			return peek_user_emu31(child, addr, data);
-		if (request == PTRACE_POKEUSR &&
-		    addr == PT32_IEEE_IP && test_thread_flag(TIF_31BIT))
-			return poke_user_emu31(child, addr, data);
-#endif
-	}
-
 	ret = ptrace_check_attach(child, request == PTRACE_KILL);
 	if (ret < 0)
 		return ret;

             reply	other threads:[~2008-04-30  9:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  9:14 Martin Schwidefsky [this message]
2008-04-30  9:19 ` [patch] s390: Remove self ptrace IEEE_IP hack Christoph Hellwig
2008-04-30  9:33   ` Martin Schwidefsky
2008-04-30 11:36   ` Martin Schwidefsky
2008-04-30 12:04     ` Christoph Hellwig
2008-04-30 12:15     ` Christoph Hellwig

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=1209546896.10954.28.camel@localhost \
    --to=schwidefsky@de.ibm.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.