From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Tal Zussman <tz2294@columbia.edu>, n3rd <18670333770@163.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"ljs@kernel.org" <ljs@kernel.org>,
"kas@kernel.org" <kas@kernel.org>,
"ziy@nvidia.com" <ziy@nvidia.com>,
Mike Rapoport <rppt@kernel.org>,
"peterx@redhat.com" <peterx@redhat.com>,
"security@kernel.org" <security@kernel.org>,
"Jose A. Perez de Azpillaga" <azpijr@gmail.com>
Subject: Re: [SECURITY] mm: khugepaged collapse_file() drops RWP PTE markers
Date: Wed, 11 Nov 2026 08:29:50 +0100 [thread overview]
Message-ID: <856cdf21-7982-475a-b244-a7ceff4eb6aa@kernel.org> (raw)
In-Reply-To: <44abb8ef-7711-4ad0-be9f-ca47206892a3@columbia.edu>
On 11/11/26 04:19, Tal Zussman wrote:
> On 11/10/26 6:55 AM, David Hildenbrand (Arm) wrote:
>> On 11/10/26 12:54, n3rd wrote:
>>>
>>> Hello,
>>>
>>> I am reporting a security bug in the Linux kernel.
>>
>> Stop sending uffd problems as security bugs. STOP IT NOW.
>>
>> Tal has a long list of uffd-related fixes he is about to send out. CCing him.
>>
> So this issue was originally on my list and I had a fix for it... but it was
> REALLY ugly and a band-aid, so I dropped it.
Yeah, RWP is a mess.
>
> I think the real solution is to just add actual markers for RWP and solve
> all of these issues at once... but that should be a separate series from my
> batch of fixes (which I'll be sending shortly). Is there a reason RWP
> markers weren't done in the first place that I'm missing?
Let's ask kiryl: why is it ok to drop RWP PTE bits during swapout, zap, collapse
etc?
https://kernel.org/doc/html/latest/admin-guide/mm/userfaultfd.html?utm_source=chatgpt.com
states "Unlike WP (which persists via PTE_MARKER_UFFD_WP), there is no
persistent RWP marker today. The user needs to re-arm the range with
UFFDIO_RWPROTECT after any operation that explicitly frees PTEs."
But requiring the user to re-arm is rather questionable design if the kernel can
just zap these page table entries.
@Jose, maybe you want to look into marker support for RWP to make RWP a bit less
horrible?
--
Cheers,
David
prev parent reply other threads:[~2026-11-11 7:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <606cae9e.bbec5.1a1c54f4f9f.Coremail.18670333770@163.com>
2026-11-10 11:55 ` David Hildenbrand (Arm)
2026-11-11 3:19 ` Tal Zussman
2026-11-11 7:29 ` David Hildenbrand (Arm) [this message]
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=856cdf21-7982-475a-b244-a7ceff4eb6aa@kernel.org \
--to=david@kernel.org \
--cc=18670333770@163.com \
--cc=akpm@linux-foundation.org \
--cc=azpijr@gmail.com \
--cc=kas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=peterx@redhat.com \
--cc=rppt@kernel.org \
--cc=security@kernel.org \
--cc=tz2294@columbia.edu \
--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
all inboxes | Powered by JetHome®