Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/images
diff options
context:
space:
mode:
authorAlexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>2022-04-08 23:03:37 +0300
committerAndrei Vagin <avagin@gmail.com>2022-04-29 03:53:52 +0300
commitf81e3062ca6a4a0376b63b31749773f8f0c09949 (patch)
tree4ec68be654f515c544e1b476269c2ccd56ece042 /images
parentbd9ee325540c5dc2db96582ef6d5cb5c0b78d065 (diff)
rseq: initial support
Support basic rseq C/R scenario. Assume that: - there are no processes with IP inside the rseq critical section (CS) - kernel has ptrace(PTRACE_GET_RSEQ_CONFIGURATION) support On dump: 1. use ptrace(PTRACE_GET_RSEQ_CONFIGURATION) to get struct rseq pointer, rseq size and signature from the kernel. 2. save to the image On restore: 1. get rseq ptr, size, signature from the image 2. register it back using rseq() from the restorer parasite Fixes: #1696 Reported-by: Radostin Stoyanov <radostin@redhat.com> Suggested-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
Diffstat (limited to 'images')
-rw-r--r--images/Makefile1
-rw-r--r--images/core.proto2
-rw-r--r--images/rseq.proto9
3 files changed, 12 insertions, 0 deletions
diff --git a/images/Makefile b/images/Makefile
index 2eaeb7cad..004e22ec3 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -71,6 +71,7 @@ proto-obj-y += img-streamer.o
proto-obj-y += bpfmap-file.o
proto-obj-y += bpfmap-data.o
proto-obj-y += apparmor.o
+proto-obj-y += rseq.o
CFLAGS += -iquote $(obj)/
diff --git a/images/core.proto b/images/core.proto
index b713119f2..35079f366 100644
--- a/images/core.proto
+++ b/images/core.proto
@@ -14,6 +14,7 @@ import "timer.proto";
import "creds.proto";
import "sa.proto";
import "siginfo.proto";
+import "rseq.proto";
import "opts.proto";
@@ -101,6 +102,7 @@ message thread_core_entry {
optional string comm = 13;
optional uint64 blk_sigset_extended = 14;
+ optional rseq_entry rseq_entry = 15;
}
message task_rlimits_entry {
diff --git a/images/rseq.proto b/images/rseq.proto
new file mode 100644
index 000000000..be2800468
--- /dev/null
+++ b/images/rseq.proto
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: MIT
+
+syntax = "proto2";
+
+message rseq_entry {
+ required uint64 rseq_abi_pointer = 1;
+ required uint32 rseq_abi_size = 2;
+ required uint32 signature = 3;
+}