[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48E3D6FC.7070709@gmail.com>
Date: Wed, 01 Oct 2008 22:01:00 +0200
From: Jiri Slaby <jirislaby@...il.com>
To: Andi Kleen <andi@...stfloor.org>
CC: Vegard Nossum <vegard.nossum@...il.com>,
Vegard Nossum <vegardno@....uio.no>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: fix virt_addr_valid() with CONFIG_DEBUG_VIRTUAL=y
On 10/01/2008 09:46 PM, Andi Kleen wrote:
>> Anyway virt_addr_valid() is IMHO wrong. E.g. first modules VM address
>> 0xffffffffa0000000 is after __pa() 200M which is valid pfn after the shift even
>> on the flatmem model with enough memory.
>>
>> Am I missing something? What's the exact purpose of the virt_addr_valid()?
>
> I think it's supposed to be only used on direct mapping anyways (judging
> from a quick look a the users)
Then kmemcheck assumes something else. Citing:
* We need to be extremely careful not to follow any invalid pointers,
* because this function can be called for *any* possible address.
and the very first check is !virt_addr_valid(address).
> So not handling text mapping is ok, but don't panic on it.
It doesn't handle properly anything but text and direct mapping. Now it
oopses/causes BUG on that wrong cases.
I think we should set it down there that it was intended to be used only on
text/direct mapping and only for checking if there is a physical memory page
behind this kind of virtual address.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists