From: Florian Weimer <fweimer@redhat.com>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "André Almeida" <andrealmeid@igalia.com>,
linux-kernel@vger.kernel.org,
"Carlos O'Donell" <carlos@redhat.com>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Peter Zijlstra" <peterz@infradead.org>,
"Rich Felker" <dalias@aerifal.cx>,
"Torvald Riegel" <triegel@redhat.com>,
"Darren Hart" <dvhart@infradead.org>,
"Thomas Gleixner" <tglx@kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"Arnd Bergmann" <arnd@arndb.de>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>
Subject: Re: [RFC PATCH] futex: Introduce __vdso_robust_futex_unlock
Date: Thu, 12 Mar 2026 15:12:05 +0100 [thread overview]
Message-ID: <lhuzf4dnnm2.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <3c41d2d6-ccaa-4c09-83fe-f4c5ba898dbf@efficios.com> (Mathieu Desnoyers's message of "Thu, 12 Mar 2026 09:13:47 -0400")
* Mathieu Desnoyers:
> On 2026-03-12 04:49, Florian Weimer wrote:
>> * Mathieu Desnoyers:
>>
>>> + * This vDSO unlocks the robust futex by exchanging the content of
>>> + * *uaddr with 0 with a store-release semantic. If the futex has
>>> + * waiters, it sets bit 1 of *op_pending_addr, else it clears
>>> + * *op_pending_addr. Those operations are within a code region
>>> + * known by the kernel, making them safe with respect to asynchronous
>>> + * program termination either from thread context or from a nested
>>> + * signal handler.
>>> + *
>>> + * Expected use of this vDSO:
>>> + *
>>> + * if ((__vdso_robust_futex_unlock((u32 *) &mutex->__data.__lock, &pd->robust_head.list_op_pending)
>>> + * & FUTEX_WAITERS) != 0)
>>> + * futex_wake((u32 *) &mutex->__data.__lock, 1, private);
>>> + * WRITE_ONCE(pd->robust_head.list_op_pending, 0);
>> The comment could perhaps say that pd->robust_head is the
>> thread-specific robust list that has been registered with
>> set_robust_list.
> Good point. Considering that "robust_head" is the thread-specific
> robust list registered with set_robust_list, I wonder if passing
> &robust_head->list_op_pending is the right ABI choice there,
> or if we should rather pass the robust_head pointer and offset it
> within the vDSO.
I think set_robust_list has pointer and size arguments, so we should
pass those two at least.
Thanks,
Florian
next prev parent reply other threads:[~2026-03-12 14:12 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 18:54 [RFC PATCH] futex: Introduce __vdso_robust_futex_unlock Mathieu Desnoyers
2026-03-11 20:11 ` Mathieu Desnoyers
2026-03-12 8:49 ` Florian Weimer
2026-03-12 13:13 ` Mathieu Desnoyers
2026-03-12 14:12 ` Florian Weimer [this message]
2026-03-12 14:14 ` André Almeida
2026-03-12 16:09 ` Mathieu Desnoyers
2026-03-12 13:46 ` André Almeida
2026-03-12 14:04 ` Mathieu Desnoyers
2026-03-12 18:40 ` Mathieu Desnoyers
2026-03-12 18:58 ` André Almeida
2026-03-12 19:10 ` Thomas Gleixner
2026-03-12 19:16 ` Mathieu Desnoyers
2026-03-13 8:20 ` Florian Weimer
2026-03-12 20:19 ` Thomas Gleixner
2026-03-12 21:28 ` Mathieu Desnoyers
2026-03-12 22:23 ` Thomas Gleixner
2026-03-12 22:52 ` Mathieu Desnoyers
2026-03-13 12:12 ` Sebastian Andrzej Siewior
2026-03-13 12:17 ` Mathieu Desnoyers
2026-03-13 13:29 ` Sebastian Andrzej Siewior
2026-03-13 13:35 ` Mathieu Desnoyers
2026-03-16 17:12 ` Thomas Gleixner
2026-03-16 19:36 ` Mathieu Desnoyers
2026-03-16 20:27 ` Thomas Gleixner
2026-03-16 21:01 ` Mathieu Desnoyers
2026-03-16 22:19 ` Thomas Gleixner
2026-03-16 22:30 ` Mathieu Desnoyers
2026-03-16 23:29 ` Thomas Gleixner
2026-03-20 18:13 ` Mathieu Desnoyers
2026-03-24 21:35 ` Thomas Gleixner
2026-03-25 14:12 ` Mathieu Desnoyers
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=lhuzf4dnnm2.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=andrealmeid@igalia.com \
--cc=arnd@arndb.de \
--cc=bigeasy@linutronix.de \
--cc=carlos@redhat.com \
--cc=dalias@aerifal.cx \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@kernel.org \
--cc=triegel@redhat.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.