From: Thomas Gleixner <tglx@kernel.org>
To: Kyle Zeng <kylebot@openai.com>, linux-kernel@vger.kernel.org
Cc: mingo@redhat.com, lukas.maar@tugraz.at,
outbounddisclosures@openai.com, Kyle Zeng <kylebot@openai.com>
Subject: Re: [PATCH v2] futex: Use a keyed hash for global futex buckets
Date: Thu, 22 Oct 2026 23:37:42 +0200 [thread overview]
Message-ID: <87a4o51knt.ffs@fw13> (raw)
In-Reply-To: <20261019183334.29433-1-kylebot@openai.com>
On Mon, Oct 19 2026 at 11:33, Kyle Zeng wrote:
> The global futex hash is a public jhash2 of the key, which for private
> and shared-anonymous futexes includes an mm_struct pointer. A task can
> populate a bucket with futex_waitv() and time nonmatching wakes to learn
> which chosen user addresses collide. Shared-file keys have predictable
> inode sequence numbers, so the task can also identify the bucket and
> turn those timings into constraints on current->mm.
>
> Lukas Maar, Jonas Juffinger, Thomas Steinbauer, Daniel Gruss, and Stefan
> Mangard described this futex mm_struct disclosure in KernelSnitch at
> NDSS 2025. Section VI-B recovers the pointer by observing futex hash
> collisions and evaluating jhash2 offline.
>
> The per-mm private hash does not prevent this: a task can disable it
> through PR_FUTEX_HASH. NUMA-routed private futexes and shared-anonymous
> keys also use the global hash.
>
> Use SipHash-2-4 with a boot-time random key for global bucket selection.
> Hash the three identity fields individually, without padding or the
> separately handled NUMA node. Keep the original futex keys and equality
> checks, and leave the per-mm hash, which only hashes userspace addresses
> and offsets, unchanged. Initialize the secret before the global tables
> are made available and keep it fixed for their lifetime.
Fine. Did you evaluate the performance impact of this change?
next prev parent reply other threads:[~2026-10-22 21:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 22:24 [PATCH] futex: Use a keyed hash for global futex buckets Kyle Zeng
2026-10-19 18:33 ` [PATCH v2] " Kyle Zeng
2026-10-22 21:37 ` Thomas Gleixner [this message]
2026-11-05 1:04 ` kernel test robot
2026-11-06 18:19 ` Kyle Zeng
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=87a4o51knt.ffs@fw13 \
--to=tglx@kernel.org \
--cc=kylebot@openai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.maar@tugraz.at \
--cc=mingo@redhat.com \
--cc=outbounddisclosures@openai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.