From: "Oscar Salvador (SUSE)" <osalvador@kernel.org>
To: Zhengchuan Liang <zcliangcn@gmail.com>
Cc: Muchun Song <muchun.song@linux.dev>,
Oscar Salvador <osalvador@suse.de>,
David Hildenbrand <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Davidlohr Bueso <davidlohr@hp.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/hugetlb: stop hashing address_space pointers for fault mutexes
Date: Mon, 30 Nov 2026 20:08:39 +0100 [thread overview]
Message-ID: <aw3Jt8z4Ohkqo5En@localhost.localdomain> (raw)
In-Reply-To: <9a97a64f7e7aabc668499c426a2417a77d13a2f4.1795587203.git.zcliangcn@gmail.com>
On Tue, Nov 24, 2026 at 10:15:21PM -0800, Zhengchuan Liang wrote:
> hugetlb_fault_mutex_hash() uses the address_space pointer and page index
> to select an entry in a global mutex table. An unprivileged user can
> create a no-reserve HugeTLB memfd with an empty huge page pool, build
> contention on one index, and time SIGBUS faults at chosen indices.
> Pointer-dependent mutex collisions expose equations that recover the
> exact address_space address.
>
> Give each hugetlbfs inode a dedicated random hash seed instead, and hash
> the page index with that value. Operations on the same mapping continue
> to select the same mutex, while separate mappings retain independent
> bucket distributions without encoding an address. The seed is not
> relied upon as a secret and is not reused by another hash table.
>
> Fixes: 8382d914ebf7 ("mm, hugetlb: improve page-fault scalability")
> Cc: stable@vger.kernel.org
> Signed-off-by: Zhengchuan Liang <zcliangcn@gmail.com>
With the "const" fix, you can add:
Acked-by: Oscar Salvador (SUSE) <osalvador@kernel.org
--
Oscar Salvador
SUSE Labs
prev parent reply other threads:[~2026-11-30 19:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 6:15 [PATCH] mm/hugetlb: stop hashing address_space pointers for fault mutexes Zhengchuan Liang
2026-11-25 11:58 ` David Hildenbrand (Arm)
2026-11-25 18:59 ` Zhengchuan Liang
2026-11-26 11:17 ` David Hildenbrand (Arm)
2026-11-27 0:13 ` Zhengchuan Liang
2026-11-26 11:20 ` David Hildenbrand (Arm)
2026-11-29 10:35 ` David Hildenbrand (Arm)
2026-11-30 10:19 ` Oscar Salvador (SUSE)
2026-11-30 10:42 ` David Hildenbrand (Arm)
2026-11-30 19:08 ` Oscar Salvador (SUSE) [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=aw3Jt8z4Ohkqo5En@localhost.localdomain \
--to=osalvador@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=davidlohr@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=zcliangcn@gmail.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