Thread (49 messages) 49 messages, 6 authors, 2024-01-24

Re: [PATCH v1 01/11] arm/pgtable: define PFN_PTE_SHIFT on arm and arm64

From: Matthew Wilcox <willy@infradead.org>
Date: 2024-01-23 15:01:41
Also in: linux-mm, linux-riscv, linux-s390, linuxppc-dev, lkml, sparclinux

On Tue, Jan 23, 2024 at 10:34:21AM +0000, Ryan Roberts wrote:
quoted
+#define PFN_PTE_SHIFT		PAGE_SHIFT
I think this is buggy. And so is the arm64 implementation of set_ptes(). It
works fine for 48-bit output address, but for 52-bit OAs, the high bits are not
kept contigously, so if you happen to be setting a mapping for which the
physical memory block straddles bit 48, this won't work.
I'd like to see the folio allocation that can straddle bit 48 ...

agreed, it's not workable _in general_, but specifically for a memory
allocation from a power-of-two allocator, you'd have to do a 49-bit
allocation (half a petabyte) to care.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help