Skip to content

Map larger kernels at early init

Steve Capper linux-arm-kernel 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 0 repliesNew
  2. v33 patches 0 repliesSuperseded
  3. v22 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches0 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3arm64: Re-order reserved_ttbr0 in linker scriptarch/arm64/include/asm/asm-uaccess.h arch/arm64/include/asm/uaccess.h arch/arm64/kernel/vmlinux.lds.S+8 -90 replies
2/3arm64: entry: Move the trampoline to be before PANarch/arm64/kernel/entry.S arch/arm64/kernel/vmlinux.lds.S+8 -70 replies
3/3arm64: Extend early page table code to allow for larger kernelsarch/arm64/include/asm/kernel-pgtable.h arch/arm64/include/asm/pgtable.h arch/arm64/kernel/head.S +2 more+156 -400 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchArd Biesheuvel
1/3T-b R-b
2/3T-b R-b
3/3T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH V4 0/3] Map larger kernels at early init

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 three steps: 1) re-order the reserved_ttbr0 to allow its address computation to be independent of swapper_pg_dir size, 2) re-order the trampoline in a similar manner, and 3) re-write the early pgtable code to allow for multiple page table entries at each level.

Changes in v4: Reviewed-by's/Tested-by's added, count logic simplified in last patch.

Changes in v3: Series rebased on top of arm64/for-next/core branch. This necessitated changes to accommodate kpti (mainly moving the trampiline page table before the swapper, in patch #2); as well as 52-bit PA (some assembler rebasing).

Changes in v2: Ack added to patch #1, KASLR space calculation redone in patch #2.

Steve Capper (3):
arm64: Re-order reserved_ttbr0 in linker script
arm64: entry: Move the trampoline to be before PAN
arm64: Extend early page table code to allow for larger kernels

 arch/arm64/include/asm/asm-uaccess.h    |   8 +-
 arch/arm64/include/asm/kernel-pgtable.h |  47 ++++++++++-
 arch/arm64/include/asm/pgtable.h        |   1 +
 arch/arm64/include/asm/uaccess.h        |   4 +-
 arch/arm64/kernel/entry.S               |   4 +-
 arch/arm64/kernel/head.S                | 144 +++++++++++++++++++++++---------
 arch/arm64/kernel/vmlinux.lds.S         |  15 ++--
 arch/arm64/mm/mmu.c                     |   3 +-
 8 files changed, 171 insertions(+), 55 deletions(-)
Signature · 1 line
2.11.0