Thread (4 messages) 4 messages, 3 authors, 2026-01-29

Re: [PATCH v2] arm64: mm: fix pass user prot to ioremap_prot in generic_access_phys

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2026-01-27 21:10:16
Also in: linux-mm

On Tue, 27 Jan 2026 17:01:29 +0800 Jinjiang Tu [off-list ref] wrote:
The root cause is that generic_access_phys() passes a user pte to
ioremap_prot(), the user pte sets PTE_USER and PTE_NG bits.  Consequently,
any subsequent kernel-mode access to the remapped address raises a fault.

To fix it, define arch_mk_kernel_prot() to convert user prot to kernel
prot for arm64, and call arch_mk_kernel_prot() in generic_access_phys(),
so that a user prot is passed to ioremap_prot().
MM changes are Reviewed-by: Andrew Morton [off-list ref]

Thanks.  I assume the arm maintainers will process this.
Fixes: 893dea9ccd08 ("arm64: Add HAVE_IOREMAP_PROT support")
huh, three years.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help