lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 1 Oct 2008 18:42:04 +0200
From:	"Vegard Nossum" <vegard.nossum@...il.com>
To:	"Jiri Slaby" <jirislaby@...il.com>
Cc:	"Vegard Nossum" <vegardno@....uio.no>,
	"Ingo Molnar" <mingo@...e.hu>, "Andi Kleen" <andi@...stfloor.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: fix virt_addr_valid() with CONFIG_DEBUG_VIRTUAL=y

On Wed, Oct 1, 2008 at 1:26 PM, Jiri Slaby <jirislaby@...il.com> wrote:
> On 10/01/2008 01:15 PM, Vegard Nossum wrote:
>> On Wed, Oct 1, 2008 at 1:06 PM, Jiri Slaby <jirislaby@...il.com> wrote:
>>> x86_64 is screwed in the same way, isn't it?
>>
>> Hm. I didn't see any #ifdef CONFIG_DEBUG_VIRTUAL in the x86_64 code,
>> so I assumed it wasn't. But it seems that you are right (because the
>> checks, or at least some kind of checks, are _always_ performed on
>> x86_64 regardless of the CONFIG_DEBUG_VIRTUAL setting). Why doesn't
>> the checking in x86_64 code depend on DEBUG_VIRTUAL?
>
> Yeah, it does: VIRTUAL_BUG_ON depends on it...
>
> x86_64 just distinguish pointer to kernel image addresses (which are mapped only
> up to kernel image size from phys_base physical address) and whole physical
> memory map at another virtual address.

You are right.

But it seems that the current virt_addr_valid() doesn't take this into
account. Should virt_addr_valid() be modified (on both x86_32 and
x86_64) to take into account the same checks as __phys_addr() does
when DEBUG_VIRTUAL=y? Or is it enough to use pfn_valid()?


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ