Re: [PATCH v3 2/2] ARM : change fixmap mapping region to support 32 CPUs

From: Nicolas Pitre
Date: Wed Aug 06 2014 - 13:21:25 EST


On Wed, 6 Aug 2014, Kees Cook wrote:

> With the original code, there is (I think) a page table entry for the
> fixmap range. For the latter, there isn't. I see a NULL pgd entry
> fault when trying to use it, and noticed that this only exists under
> highmem:
>
> static void __init kmap_init(void)
> {
> #ifdef CONFIG_HIGHMEM
> pkmap_page_table = early_pte_alloc(pmd_off_k(PKMAP_BASE),
> PKMAP_BASE, _PAGE_KERNEL_TABLE);
>
> fixmap_page_table = early_pte_alloc(pmd_off_k(FIXADDR_START),
> FIXADDR_START, _PAGE_KERNEL_TABLE);
> #endif
> }

The above is wrong. The fixmap PTEs must be allocated unconditionally
irrespective of highmem. So the #endif should be moved up by 3 lines.


Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/