Re: [PATCH -tip] x86: fix virt_addr_valid() withCONFIG_DEBUG_VIRTUAL=y (try 2)

From: Vegard Nossum
Date: Fri Oct 03 2008 - 11:54:36 EST


On Fri, Oct 3, 2008 at 4:23 PM, Jiri Slaby <jirislaby@xxxxxxxxx> wrote:
> Vegard Nossum napsal(a):
>> How about this? It would apply to tip/x86/mm-debug. Untested.
>
> It is wrong in my eyes -- it's workarounding of the real problem rather than
> fixing. virt_addr_valid() should be fixed/augmented to the full virtual
> address domain instead or not used for the purpose you need in kmemcheck.
>
> As it is now, it should be used only on direct mapping addresses (more
> concrete: kernel image space and physical mapping) and it returns
> semi-random values on the rest -- with CONFIG_DEBUG_VIRTUAL=y it screams
> instead of returning a bogus value.
>

Is this what you had in mind? If not, then I don't know how to do it :-)

It seems that it might be structured in a better way -- but that better way
eludes my imagination. Thanks for commenting!


Vegard