From: James Houghton <jthoughton@google.com>
To: Piotr Jaroszynski <pjaroszynski@nvidia.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>,
Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
Alistair Popple <apopple@nvidia.com>,
Jason Gunthorpe <jgg@nvidia.com>,
John Hubbard <jhubbard@nvidia.com>, Zi Yan <ziy@nvidia.com>,
Breno Leitao <leitao@debian.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] arm64: contpte: fix set_access_flags() no-op check for SMMU/ATS faults
Date: Wed, 4 Mar 2026 20:31:20 -0800 [thread overview]
Message-ID: <CADrL8HUHQDta2mv4TG=f3nYPx5-S5nrywGxQwx78KSe67yjYVw@mail.gmail.com> (raw)
In-Reply-To: <aadTuvCBxiVimDZA@box>
On Tue, Mar 3, 2026 at 1:40 PM Piotr Jaroszynski
<pjaroszynski@nvidia.com> wrote:
>
> On Mon, Mar 02, 2026 at 11:19:46PM -0800, James Houghton wrote:
> > This is similar (sort of) to a HugeTLB page fault loop I stumbled upon
> > a while ago[1]. (I wonder if there have been more cases like this.)
>
> I see that your commit 3c0696076aad ("arm64: mm: Always make sw-dirty
> PTEs hw-dirty in pte_modify") from that discussion was picked up and
> it's very relevant for the hugetlb exposure question. With your patch,
> do we have a guarantee that sw-dirty implies hw-dirty in all cases? If
> yes, then there should be no exposure for that path. But it still makes
> sense to make it more explicit.
At the time, I was unsure that the patch made it *impossible* for
Linux to ever write sw-dirty hw-clean PTEs, but, after that patch,
such a write would have to somehow avoid pte_modify(). That seems
unlikely; that was satisfactory for me at the time.
I thought (and still think) that explicitly fixing the HugeTLB path
would be a good idea. I think that patch wasn't taken because it
wasn't necessary to fix the bug I was staring at.
So if you want to take the patch to the HugeTLB path[2] or improve it
in a v2 here, please do!
Thanks!
[2] https://lore.kernel.org/all/20231204172646.2541916-2-jthoughton@google.com/
> > [1] https://lore.kernel.org/all/20231204172646.2541916-1-jthoughton@google.com
next prev parent reply other threads:[~2026-03-05 4:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 6:37 Piotr Jaroszynski
2026-03-03 7:19 ` James Houghton
2026-03-03 12:45 ` Jason Gunthorpe
2026-03-03 21:40 ` Piotr Jaroszynski
2026-03-05 4:31 ` James Houghton [this message]
2026-03-03 8:38 ` Ryan Roberts
2026-03-03 18:40 ` Piotr Jaroszynski
2026-03-03 19:12 ` Jason Gunthorpe
2026-03-04 12:20 ` Ryan Roberts
2026-03-04 13:44 ` Jason Gunthorpe
2026-03-04 11:17 ` Catalin Marinas
2026-03-04 13:43 ` Jason Gunthorpe
2026-03-04 15:01 ` Catalin Marinas
2026-03-04 15:39 ` Jason Gunthorpe
2026-03-04 17:16 ` Piotr Jaroszynski
2026-03-04 17:25 ` Catalin Marinas
2026-03-04 17:37 ` Breno Leitao
2026-03-05 17:33 ` 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='CADrL8HUHQDta2mv4TG=f3nYPx5-S5nrywGxQwx78KSe67yjYVw@mail.gmail.com' \
--to=jthoughton@google.com \
--cc=apopple@nvidia.com \
--cc=catalin.marinas@arm.com \
--cc=jgg@nvidia.com \
--cc=jhubbard@nvidia.com \
--cc=leitao@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=pjaroszynski@nvidia.com \
--cc=ryan.roberts@arm.com \
--cc=stable@vger.kernel.org \
--cc=will@kernel.org \
--cc=ziy@nvidia.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