public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* rseq + membarrier programming model
@ 2021-12-13 18:47 Florian Weimer
  2021-12-13 19:19 ` Mathieu Desnoyers
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Florian Weimer @ 2021-12-13 18:47 UTC (permalink / raw)
  To: linux-api, Mathieu Desnoyers; +Cc: Jann Horn, libc-alpha, linux-kernel

I've been studying Jann Horn's biased locking example:

  Re: [PATCH 0/4 POC] Allow executing code and syscalls in another address space
  <https://lore.kernel.org/linux-api/CAG48ez02UDn_yeLuLF4c=kX0=h2Qq8Fdb0cer1yN8atbXSNjkQ@mail.gmail.com/>

It uses MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ as part of the biased lock
revocation.

How does the this code know that the process has called
MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ?  Could it fall back to
MEMBARRIER_CMD_GLOBAL instead?  Why is it that MEMBARRIER_CMD_GLOBAL
does not require registration (the broader/more expensive barrier), but
the more restricted versions do?

Or put differently, why wouldn't we request
MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ unconditionally at
process start in glibc, once we start biased locking in a few places?

Thanks,
Florian


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-14 20:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 18:47 rseq + membarrier programming model Florian Weimer
2021-12-13 19:19 ` Mathieu Desnoyers
2021-12-13 19:29   ` Florian Weimer
2021-12-13 19:56     ` Mathieu Desnoyers
2021-12-13 20:12       ` Florian Weimer
2021-12-14 20:25         ` Mathieu Desnoyers
2021-12-13 19:27 ` Jann Horn
2021-12-13 19:31 ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).