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

It turns out CRIU doesn't know anything about rseq.  I suspect this can
cause the restore operation to crash when it unmaps the memory region
that contains the rseq area for the main thread.  Restored processes
also won't have function rseq, despite the area being marked as
registered.  CRIU simply doesn't set up rseq in the individual threads.

The required ptrace interface for discovering details of registration
during checkpoint was only added in Linux 5.13 (released in June).  So
it's not like developers have been ignoring this problem for three
years.  But I still don't see any rseq activity in CRIU upstream.

However, I still don't think we should revert rseq support in glibc this
time.  Until CRIU is fixed, people who want to use CRIU will have to use
the tunable to disable rseq registration.

Thanks,
Florian


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

* Re: rseq and CRIU
  2021-12-16 20:45 rseq and CRIU Florian Weimer
@ 2021-12-16 20:55 ` Mathieu Desnoyers
  2021-12-16 21:07   ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Desnoyers @ 2021-12-16 20:55 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

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

> It turns out CRIU doesn't know anything about rseq.  I suspect this can
> cause the restore operation to crash when it unmaps the memory region
> that contains the rseq area for the main thread.  Restored processes
> also won't have function rseq, despite the area being marked as
> registered.  CRIU simply doesn't set up rseq in the individual threads.
> 
> The required ptrace interface for discovering details of registration
> during checkpoint was only added in Linux 5.13 (released in June).  So
> it's not like developers have been ignoring this problem for three
> years.

Yes, I've been involved in reviewing this new PTRACE_GET_RSEQ_CONFIGURATION.

> But I still don't see any rseq activity in CRIU upstream.

It would be important to make upstream CRIU aware of this issue sooner than
later. Having rseq support enabled by default in glibc 2.35 should increase
the priority for solving this on their end.

> 
> However, I still don't think we should revert rseq support in glibc this
> time.  Until CRIU is fixed, people who want to use CRIU will have to use
> the tunable to disable rseq registration.

I agree with this approach.

Thanks,

Mathieu


> 
> Thanks,
> Florian

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

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

* Re: rseq and CRIU
  2021-12-16 20:55 ` Mathieu Desnoyers
@ 2021-12-16 21:07   ` Florian Weimer
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2021-12-16 21:07 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: libc-alpha

* Mathieu Desnoyers:

>> But I still don't see any rseq activity in CRIU upstream.
>
> It would be important to make upstream CRIU aware of this issue sooner than
> later. Having rseq support enabled by default in glibc 2.35 should increase
> the priority for solving this on their end.

Good point, I filed:

  Implement rseq support, as required by glibc 2.35
  <https://github.com/checkpoint-restore/criu/issues/1696>

Thanks,
Florian


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 20:45 rseq and CRIU Florian Weimer
2021-12-16 20:55 ` Mathieu Desnoyers
2021-12-16 21:07   ` Florian Weimer

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).