[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Electric fence and valgrind
From: |
Marcus Brinkmann |
Subject: |
Re: Electric fence and valgrind |
Date: |
Tue, 05 Oct 2004 18:23:11 +0200 |
User-agent: |
Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Tue, 05 Oct 2004 10:23:38 +0200,
Bas Wijnen <address@hidden> wrote:
> Lately I had given up a little on the annoying bug I wrote about before.
> But now I have a new idea. Since it's probably a buffer overrun
> problem or something, I want to treat it the same as I would with an
> application in GNU/Linux: with electric fence and valgrind.
I think you are out of your mind to even think of that ;)
For what little debugging I have done on L4, I used the internal
kernel debugger. It was good enough to investigate the thread state,
page tables, memory, etc.
Still, your questions are worth addressing, and if just for the reason
to learn more about L4.
> all memory, it is not possible to make pages unreadable. So I have a
> few questions:
>
> If wortel would grant all the pages to physmem and then pagefault, would
> sigma0 remap the page back to wortel?
No. sigma0 only maps any given page once, and then forgets about it.
granting the memory to physmem is what I did first, but this defeats
one of the potential expansions of wortel: to be a manager OS.
Imagine several OSes running in parallel, and you need to shut down
one (foribly even). Then you need to be able to recover the memory of
that subsystem.
> And if physmem had mapped it to
> wortel with no permissions?
Well, mapping a page without any of rwx is bound to raise page access
faults, isn't? I don't think there is anything special about that. As
said before, sigma0 is not involved anymore.
> Can wortel change its pager (to the
> nilthread perhaps) to avoid it (or to report it)?
Nothing to be done :)
But as a matter of fact, you can change the pager thread of wortel
threads.
Thanks,
Marcus