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
| ||
|
Date: Fri, 05 Oct 2012 07:39:56 +0100 From: "Jan Beulich" <JBeulich@...e.com> To: "H. Peter Anvin" <hpa@...or.com> Cc: <matt@...sole-pimps.org>, <matt.fleming@...el.com>, <mingo@...nel.org>, <x86@...nel.org>, <mjg@...hat.com>, <linux-efi@...r.kernel.org>, <linux-kernel@...r.kernel.org> Subject: Re: [PATCH 1/3] x86, mm: Include the entire kernel memory map in trampoline_pgd >>> On 04.10.12 at 23:08, "H. Peter Anvin" <hpa@...or.com> wrote: > On 10/03/2012 06:31 AM, Jan Beulich wrote: >>>>> Matt Fleming <matt@...sole-pimps.org> 10/03/12 2:59 PM >>> >>> +static int insert_identity_mapping(resource_size_t paddr, unsigned long > vaddr, >>> + unsigned long size) >>> +{ >>> + unsigned long end = vaddr + size; >>> + unsigned long next; >>> + pgd_t *vpgd, *ppgd; >>> + >>> +#ifdef CONFIG_X86_32 >>> + ppgd = initial_page_table + pgd_index(paddr); >>> + >>> + if (paddr >= PAGE_OFFSET || paddr + size > PAGE_OFFSET) >>> + return 1; >>> +#else >>> + ppgd = __va(real_mode_header->trampoline_pgd) + pgd_index(paddr); >> >> Missing equivalent code (to the 32-bit one above) here - after all, you're > trying >> to potentially insert a 52-bit physical address into 48-bit virtual space. >> > > We should have the check, but at least for Linux support we require > P <= V-2. Not really imo - P <= V - 1 should be sufficient here, as all that is necessary is that the result represents a 1:1 mapping. Specifically, there's no constraint to the virtual space limitation of the direct mapping of RAM. Jan -- 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