We have some new information about what happens on that machine, and the
more I know the stranger it is :-(
When you look at fs/exec.c:setup_arg_pages() there is a call to
put_dirty_pages(). After that call the argv and env data should be found
on the stack, at 0x7fffffda, which can also be looked at when you
generate a kernel mapping with kmap(page) plus an offset of 0xfba. These
both addresses should point to the same piece of physical RAM. I have
printed out the content of the TLBs and they look correct:
...
TLB 7, v = 1, sz = 1, flags = 0x0110, EPN 0x7ffff000, RPN 0x0014a000
...
TLB 63, v = 1, sz = 7, flags = 0x0300, EPN 0xc1000000, RPN 0x01000000
...
Nevertheless, when I set a breakpoint to the location after the
put_dirty_pages() call I see different memory. The kernel mapping
contains correct content:
"init",0,"HOME=/",0,"TERM=linux",0,"/sbin/init"
But the user mapping (0x7fffffda) shows crap. It is a writable piece of
memory, I can place something in it by writing after the
put_dirty_pages(). When I write a "unique" pattern to that place, stop
the processor with the BDI and read out a complete memory dump I don't
find the pattern any more - this looks like a caching problem, but I'm
not entirely sure. I've tried an invalidate_dcache_range() to the user
space mapping addresses without success.
-+-+-
What could happen here? Is the cache handling code bullet proof? I'm
running out of ideas.
Kernel is still 2.4.21-rc2-ppc20030515 plus port to the board in
question.
Robert
-- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Braunschweiger Str. 79, 31134 Hildesheim, Germany Handelsregister: Amtsgericht Hildesheim, HRA 2686 Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/