Thread (46 messages) 46 messages, 4 authors, 2025-03-20

Re: [PATCH RFC v2 16/29] mm: asi: Map kernel text and static data as nonsensitive

From: Brendan Jackman <jackmanb@google.com>
Date: 2025-01-17 11:23:42
Also in: kvm, linux-alpha, linux-arch, linux-efi, linux-m68k, linux-mips, linux-mm, linux-perf-users, linux-riscv, linux-s390, linux-sh, linux-trace-kernel, linux-um, lkml, loongarch, sparclinux

On Fri, 10 Jan 2025 at 19:41, Brendan Jackman [off-list ref] wrote:
+       asi_clone_pgd(asi_global_nonsensitive_pgd, init_mm.pgd, VMEMMAP_START);
+       asi_clone_pgd(asi_global_nonsensitive_pgd, init_mm.pgd,
+                     VMEMMAP_START + (1UL << PGDIR_SHIFT));
There's a bug here that Yosry has fixed in our internal version, I
neglected to incorporate that here.

Under KASLR, vmemmap is not necessarily exactly 2 PGDs like this is
assuming. In fact it can share a PGD entry with the vmalloc area. So
to be correct this cloning logic needs to actually look at the
alignment and then navigate the page table hierarchy appropriately.

To be fixed for the next version.

As Yosry noted internally we also need to think about vmmemap getting
updated under memory hotplug.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help