Changes

Jump to navigation Jump to search
m
Line 128: Line 128:     
==== Checkpoint ====
 
==== Checkpoint ====
We need to determine where the <code>struct rseq</code> is and dump its address length and signature.
+
CRIU locates the <code>struct rseq</code> instance and records its address, length, and signature using the <code>PTRACE_GET_RSEQ_CONFIGURATION</code> ptrace request (see <code>dump_thread_rseq</code>).
To achieve that we use special ptrace handle <code>PTRACE_GET_RSEQ_CONFIGURATION</code> (refer to the <code>dump_thread_rseq</code> function).
+
In addition, the instruction pointer is explicitly adjusted to point to the RSEQ abort handler.
 
  −
We have to fix up IP to the abort handler.
      
==== Restore ====
 
==== Restore ====
We need to take data about the <code>struct rseq</code> from the image (see images/rseq.proto) and register it from the parasite context using the <code>rseq</code> syscall (take a look on <code>restore_rseq</code> in criu/pie/restorer.c)
+
During restore, CRIU reads data about the <code>struct rseq</code> state from the checkpoint image (<code>images/rseq.proto</code>) and re-register it from the restorer context using the <code>rseq</code> system call (see <code>restore_rseq</code> in <code>criu/pie/restorer.c</code>). No further action is required: the process resumes execution at the abort handler, outside of the RSEQ critical section.
 
  −
No additional actions here. The process will be restored and will continue execution from the abort handler (not within the rseq CS!).
      
=== Executing inside non-abortable critical section ===
 
=== Executing inside non-abortable critical section ===
554

edits

Navigation menu