linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: permit KASLR in linear region even VArange == PArange
@ 2021-12-15 14:52 Ard Biesheuvel
  2021-12-15 14:52 ` [PATCH 1/2] arm64: simplify rules for defining ARM64_MEMSTART_ALIGN Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2021-12-15 14:52 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: catalin.marinas, will, mark.rutland, Ard Biesheuvel, Kefeng Wang

Kefeng reports in [0] that using PArange to size the randomized linear
region offset leads to cases where randomization is no longer possible
even if the actual placement of DRAM in memory would otherwise have
permitted it.

Instead of using CONFIG_MEMORY_HOTPLUG to choose at build time between
to different behaviors in this regard, let's try addressing this by
reducing the minimum relative aligment between VA and PA in the linear
region, and taking advantage of the space at the base of physical memory
below the first memblock to permit some randomization of the placement
of physical DRAM in the virtual address map.

Cc: Kefeng Wang <wangkefeng.wang@huawei.com>

[0] https://lore.kernel.org/linux-arm-kernel/20211104062747.55206-1-wangkefeng.wang@huawei.com/

Ard Biesheuvel (2):
  arm64: simplify rules for defining ARM64_MEMSTART_ALIGN
  arm64: kaslr: take free space at start of DRAM into account

 arch/arm64/include/asm/kernel-pgtable.h | 27 +++-----------------
 arch/arm64/mm/init.c                    |  3 ++-
 2 files changed, 6 insertions(+), 24 deletions(-)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-15  2:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-15 14:52 [PATCH 0/2] arm64: permit KASLR in linear region even VArange == PArange Ard Biesheuvel
2021-12-15 14:52 ` [PATCH 1/2] arm64: simplify rules for defining ARM64_MEMSTART_ALIGN Ard Biesheuvel
2021-12-15 14:52 ` [PATCH 2/2] arm64: kaslr: take free space at start of DRAM into account Ard Biesheuvel
2021-12-16  7:37 ` [PATCH 0/2] arm64: permit KASLR in linear region even VArange == PArange Kefeng Wang
2021-12-16  8:56   ` Ard Biesheuvel
2021-12-16 11:32     ` Kefeng Wang
2022-02-15  2:09     ` Kefeng Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).