linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jinjiang Tu <tujinjiang@huawei.com>
Cc: <david@kernel.org>, <catalin.marinas@arm.com>, <will@kernel.org>,
	<zengheng4@huawei.com>, <ryan.roberts@arm.com>,
	<anshuman.khandual@arm.com>, <wangkefeng.wang@huawei.com>,
	<linux-arm-kernel@lists.infradead.org>, <linux-mm@kvack.org>
Subject: Re: [PATCH v2] arm64: mm: fix pass user prot to ioremap_prot in generic_access_phys
Date: Tue, 27 Jan 2026 13:10:11 -0800	[thread overview]
Message-ID: <20260127131011.e33438112280b49a018c758c@linux-foundation.org> (raw)
In-Reply-To: <20260127090129.412084-1-tujinjiang@huawei.com>

On Tue, 27 Jan 2026 17:01:29 +0800 Jinjiang Tu <tujinjiang@huawei.com> 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 <akpm@linux-foundation.org>

Thanks.  I assume the arm maintainers will process this.

> Fixes: 893dea9ccd08 ("arm64: Add HAVE_IOREMAP_PROT support")

huh, three years.


  reply	other threads:[~2026-01-27 21:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27  9:01 Jinjiang Tu
2026-01-27 21:10 ` Andrew Morton [this message]
2026-01-28  7:12 ` Jinjiang Tu
2026-01-29 18:22   ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260127131011.e33438112280b49a018c758c@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=david@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=tujinjiang@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will@kernel.org \
    --cc=zengheng4@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox