criu/compel/test/rsys
Andrei Vagin c34355a7c3
compel: avoid rseq critical sections when executing parasite code
A parasite code is injected into a target process and executed it via
ptrace. If the instruction pointer is inside an rseq critical section
when parasite code starts executing, the critical section can be aborted
and IP will be redirected to rseq_cs->abort_ip, which isn't expected.

Here is one more issue is that the kernel zeroes out rseq->rseq_cs in
userspace memory, destroying the rseq state before CRIU can record it.

To avoid critical sections during parasite execution, compel aborts a
critical section when it is required.

Reported-by: Alberto Ventafridda <alberto.ventafridda@gmail.com>
Signed-off-by: Andrei Vagin <avagin@google.com>
Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
2026-07-20 11:23:01 +02:00
..
.gitignore compel: Test for remote syscall execution 2017-03-15 00:06:14 +03:00
Makefile compel/test: Add main makefile 2021-09-03 10:31:00 -07:00
spy.c compel: avoid rseq critical sections when executing parasite code 2026-07-20 11:23:01 +02:00
victim.c compel/test: Fix warn_unused_result 2021-09-03 10:31:00 -07:00