[PATCH 0/2] Map larger kernels at early init

Ard Biesheuvel ard.biesheuvel at linaro.org
Fri Nov 17 04:06:11 PST 2017


On 17 November 2017 at 11:41, Steve Capper <steve.capper at arm.com> wrote:
> The early pagetable creation code assumes that a single pgd, pud, pmd
> and pte are sufficient to map the kernel text for MMU bringup. For 16KB
> granules this is, unfortunately, rarely the case. Some kernels may be too
> big even for a 64KB granule employing this scheme.
>
> This patch series addresses the problem in two steps: 1) re-order the
> reserved_ttbr0 to allow its address computation to be independent of
> swapper_pg_dir size, 2) re-write the early pgtable code to allow for
> multiple page table entries at each level.
>
> Steve Capper (2):
>   arm64: Re-order reserved_ttbr0 in linker script
>   arm64: Extend early page table code to allow for larger kernels
>
>  arch/arm64/include/asm/asm-uaccess.h    |   6 +-
>  arch/arm64/include/asm/kernel-pgtable.h |  20 ++++-
>  arch/arm64/include/asm/pgtable.h        |   2 +-
>  arch/arm64/include/asm/uaccess.h        |   2 +-
>  arch/arm64/kernel/head.S                | 148 +++++++++++++++++++++++---------
>  arch/arm64/kernel/vmlinux.lds.S         |   6 +-
>  arch/arm64/mm/mmu.c                     |   3 +-
>  7 files changed, 137 insertions(+), 50 deletions(-)
>

Excellent!

This means we can also remove the workaround from the KASLR init code
that takes care not to put the kernel image across a PMD/PUD boundary.



More information about the linux-arm-kernel mailing list