All of lore.kernel.org
 help / color / mirror / Atom feed
From: paul@codesourcery.com (Paul Brook)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: ptrace: fix ptrace_read_user for !CONFIG_MMU platforms
Date: Tue, 21 Feb 2012 01:24:22 +0000	[thread overview]
Message-ID: <201202210124.23028.paul@codesourcery.com> (raw)
In-Reply-To: <20120220194634.GK26840@n2100.arm.linux.org.uk>

> On Mon, Feb 20, 2012 at 06:37:09PM +0000, Will Deacon wrote:
> > Commit 68b7f715 ("nommu: ptrace support") added definitions for
> > PT_TEXT_ADDR and friends, as well as adding ptrace support for reading
> > from these magic offsets.
> > 
> > Unfortunately, this has probably never worked, since ptrace_read_user
> > predicates reading on off < sizeof(struct user), returning -EOI
> > otherwise.
> > 
> > This patch moves the offset size check until after we have tried to
> > match it against either a magic value or an offset into pt_regs.
> 
> Does this actually get used?  The fact that it's been broken from day one
> and no one's raised the issue in 2.5 years suggests that it's dead code.

I suspect I submitted the original patch.  I don't remember the details, but 
it definitely worked at the time.   IIRC some other targets (m68k?) used an 
even less palatable hack.

This (or equivalent) is necessary to do any debugging on an mmu-less (i.e. 
uclinux) system.

Paul

  reply	other threads:[~2012-02-21  1:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 18:37 [PATCH] ARM: ptrace: fix ptrace_read_user for !CONFIG_MMU platforms Will Deacon
2012-02-20 19:46 ` Russell King - ARM Linux
2012-02-21  1:24   ` Paul Brook [this message]
2012-02-21  8:36     ` Russell King - ARM Linux
2012-02-21 10:00       ` Will Deacon
2012-02-21 10:10         ` Russell King - ARM Linux
2012-02-21 10:52           ` Will Deacon
2012-02-21 11:35             ` Russell King - ARM Linux
2012-02-21 13:22               ` Will Deacon
2012-02-24 14:36                 ` Will Deacon
2012-02-24 18:16                   ` Russell King - ARM Linux
2012-02-29 18:52                     ` Will Deacon
2012-03-26 12:43                       ` Will Deacon
2012-02-22  1:33           ` Greg Ungerer

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=201202210124.23028.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=linux-arm-kernel@lists.infradead.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.