All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@uni-koblenz.de>
To: "Vladimir A. Roganov" <roganov@niisi.msk.ru>
Cc: linux@cthulhu.engr.sgi.com, linux-mips@fnet.fr,
	linux-mips@vger.rutgers.edu
Subject: Re: Platform-independent hack in ptrace.c
Date: Thu, 27 May 1999 21:26:54 +0200	[thread overview]
Message-ID: <19990527212654.A4058@uni-koblenz.de> (raw)
In-Reply-To: <374D37E6.59A6A9F3@niisi.msk.ru>; from Vladimir A. Roganov on Thu, May 27, 1999 at 04:17:42PM +0400

On Thu, May 27, 1999 at 04:17:42PM +0400, Vladimir A. Roganov wrote:

> Does anybody know which kind of protection is encoded in ptrace.c:69:
> (function get_long)
> 
> 	/* This is a hack for non-kernel-mapped video buffers and similar */
> 	if (MAP_NR(page) >= MAP_NR(high_memory))
> 		return 0;
> 
> By this reason gdb shows all user-mapped io as zeros.
> 
> Same time, put_long enable to write to such memory !
> So when You enter something like 'set *p = 0xff' gdb'ing program 
> which has p->video_memory, You will see appearing pixels, but 'p *p' 
> prints only zeros.
> 
> Elimination of this check does not destroy something: gdb shows right
> values.
> 
> It looks clean that above problem is not very important, but just
> imagine programmer debugging some application for Linux used to control
> some device on MIPS embedded computer, which mmap'ed to device registers
> and don't understand why they are all clean :-)

Basically I think you're right.  However a correct patch is slightly more
complex and will acount for the fact that KSEG0 through which we route
the access is only 512mb large.  Therefore we might have to install a
temporary mapping and access memory through it, if outside of the 512mb.
The other bug is that memory accesses via ptrace for virtual addresses
which are uncached would be executed cached, trouble ahead.  Further
complexity is added by handling write buffers for the R3000 and
virtual coherency for R4000.

  Ralf

       reply	other threads:[~1999-05-27 20:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <374D37E6.59A6A9F3@niisi.msk.ru>
1999-05-27 19:26 ` Ralf Baechle [this message]
     [not found]   ` <374E5FB1.D3860089@niisi.msk.ru>
1999-05-29 14:51     ` Platform-independent hack in ptrace.c Ralf Baechle

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=19990527212654.A4058@uni-koblenz.de \
    --to=ralf@uni-koblenz.de \
    --cc=linux-mips@fnet.fr \
    --cc=linux-mips@vger.rutgers.edu \
    --cc=linux@cthulhu.engr.sgi.com \
    --cc=roganov@niisi.msk.ru \
    /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.