public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* rseq, membarrier and seccomp
@ 2021-12-16 21:12 Mathieu Desnoyers
  2021-12-16 21:17 ` Florian Weimer
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Desnoyers @ 2021-12-16 21:12 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

Hi Florian,

I recall that the important projects using seccomp were modified to whitelist
rseq some time ago.

If we plan on requiring co-availability of membarrier MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
(not sure how you plan the programming model exposed by glibc wrt rseq vs membarrier availability),
we may then want those projects to whitelist membarrier as well.

Perhaps this is something to bring to their attention ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

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

* Re: rseq, membarrier and seccomp
  2021-12-16 21:12 rseq, membarrier and seccomp Mathieu Desnoyers
@ 2021-12-16 21:17 ` Florian Weimer
  2021-12-16 21:21   ` Mathieu Desnoyers
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2021-12-16 21:17 UTC (permalink / raw)
  To: Mathieu Desnoyers via Libc-alpha; +Cc: Mathieu Desnoyers

* Mathieu Desnoyers via Libc-alpha:

> If we plan on requiring co-availability of membarrier
> MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ (not sure how you plan the
> programming model exposed by glibc wrt rseq vs membarrier
> availability), we may then want those projects to whitelist membarrier
> as well.

I don't think we can get MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
integration done in time for the glibc 2.35 release.  The kernel version
gap between rseq and this is also fairly large, so I expect there will
be users interested in the rump rseq we have today.

Thanks,
Florian


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

* Re: rseq, membarrier and seccomp
  2021-12-16 21:17 ` Florian Weimer
@ 2021-12-16 21:21   ` Mathieu Desnoyers
  2021-12-16 21:25     ` Florian Weimer
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Desnoyers @ 2021-12-16 21:21 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

----- On Dec 16, 2021, at 4:17 PM, Florian Weimer fweimer@redhat.com wrote:

> * Mathieu Desnoyers via Libc-alpha:
> 
>> If we plan on requiring co-availability of membarrier
>> MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ (not sure how you plan the
>> programming model exposed by glibc wrt rseq vs membarrier
>> availability), we may then want those projects to whitelist membarrier
>> as well.
> 
> I don't think we can get MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
> integration done in time for the glibc 2.35 release.  The kernel version
> gap between rseq and this is also fairly large, so I expect there will
> be users interested in the rump rseq we have today.

I agree with your assessment. This just means that users will have to
individually query glibc for rseq and membarrier-private-expedited-rseq
availability.

The query for rseq availability is done by checking that __rseq_size != 0,
and the query for membarrier availability still has to be designed/implemented
as future work.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

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

* Re: rseq, membarrier and seccomp
  2021-12-16 21:21   ` Mathieu Desnoyers
@ 2021-12-16 21:25     ` Florian Weimer
  2021-12-16 21:28       ` Mathieu Desnoyers
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2021-12-16 21:25 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: libc-alpha

* Mathieu Desnoyers:

> The query for rseq availability is done by checking that __rseq_size != 0,
> and the query for membarrier availability still has to be designed/implemented
> as future work.

MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ should be much easier, though,
given that it's a process-wide resource.  I don't see why interested
applications can't make the system call directly today.  Apart from the
hypothetical negative performance impact on the scheduler, it should not
be observable at all whether some other library in the process also has
made the registration.

rseq is so different because there can be at most one area per thread.
There are very few kernel interfaces with this property, with good
reason.

Thanks,
Florian


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

* Re: rseq, membarrier and seccomp
  2021-12-16 21:25     ` Florian Weimer
@ 2021-12-16 21:28       ` Mathieu Desnoyers
  0 siblings, 0 replies; 5+ messages in thread
From: Mathieu Desnoyers @ 2021-12-16 21:28 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

----- On Dec 16, 2021, at 4:25 PM, Florian Weimer fweimer@redhat.com wrote:

> * Mathieu Desnoyers:
> 
>> The query for rseq availability is done by checking that __rseq_size != 0,
>> and the query for membarrier availability still has to be designed/implemented
>> as future work.
> 
> MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ should be much easier, though,
> given that it's a process-wide resource.  I don't see why interested
> applications can't make the system call directly today.  Apart from the
> hypothetical negative performance impact on the scheduler, it should not
> be observable at all whether some other library in the process also has
> made the registration.
> 
> rseq is so different because there can be at most one area per thread.
> There are very few kernel interfaces with this property, with good
> reason.

Agreed, unlike rseq, there is no need for having a single membarrier
registration "resource owner".

Thanks,

Mathieu


-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

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

end of thread, other threads:[~2021-12-16 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 21:12 rseq, membarrier and seccomp Mathieu Desnoyers
2021-12-16 21:17 ` Florian Weimer
2021-12-16 21:21   ` Mathieu Desnoyers
2021-12-16 21:25     ` Florian Weimer
2021-12-16 21:28       ` 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).