Re: ptrace question ...

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Tue, 1 Jun 1999 16:01:25 +0200


Ralf Baechle wrote:
> Is there any reason why we don't attempt to handle requests for addresses
> with MAP_NR(page) >= MAP_NR(high_memory) correctly? I've got a pending
> bug report for the MIPS port where somebody complains that the respective
> code for MIPS prevents accessing the hardware directly from GDB.

Yes: if you remove the test, accessing the hardware still doesn't work!

> *(unsigned long *) (page + (addr & ~PAGE_MASK)) = data;

This line only works for pages where MAP_NR(page) < MAP_NR(high_memory).
To access other hardware addresses from kernel space requires a call
to ioremap() first.

Well ok, _some_ addresses will still work if the phase of your moon is
right, but not reliably.

However I don't know why the test isn't simply `page < high_memory'.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/