criu/compel
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
..
arch compel: keep ELF metadata for ld.lld 2026-07-20 11:23:01 +02:00
include compel: avoid rseq critical sections when executing parasite code 2026-07-20 11:23:01 +02:00
plugins compel: infect: prepare parasite_service() for addition of CET support 2024-09-11 16:02:11 -07:00
src compel: avoid rseq critical sections when executing parasite code 2026-07-20 11:23:01 +02:00
test compel: avoid rseq critical sections when executing parasite code 2026-07-20 11:23:01 +02:00
.gitignore compel: fix gitignore and remove autogenerated code 2025-03-21 12:40:31 -07:00
compel-host compel cli: show includes 2017-03-15 00:09:55 +03:00
Makefile compel: add riscv64 support 2025-03-21 12:40:31 -07:00