[CRIU] [PATCH 12/12] x86: cpu -- Require compatibility on instruction level by default

Cyrill Gorcunov gorcunov at gmail.com
Thu Aug 30 14:00:27 MSK 2018


For a long time we've been demanding from cpus to be compatible
on fpu frame level, but growing list of cpu features triggers
inability for restored programs to proceed after restore due
to specific intructions execution (such as avx2). Note the
fpu frame may carry same size but not on instruction level
where SIGILL may happen after the restore.

Thus lets require instruction mode to be set and verified by default.
Still one can drop this option via command line or rpc request.

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 Documentation/criu.txt    | 2 +-
 criu/include/cr_options.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/criu.txt b/Documentation/criu.txt
index 4fc623b2097d..003d748ce410 100644
--- a/Documentation/criu.txt
+++ b/Documentation/criu.txt
@@ -322,7 +322,7 @@ exists as a built-in one: *criu* can either *merge* or *replace* such.
     - *all* for all above set.
 
 +
-By default the option is set to the combination of *fpu* and *cpu*.
+By default the option is set to *fpu* and *ins*.
 
 *--cgroup-root* ['controller':]/'newroot'::
     Change the root for the controller that will be dumped. By default, *criu*
diff --git a/criu/include/cr_options.h b/criu/include/cr_options.h
index 187f58c67a91..d4d5071bf7cd 100644
--- a/criu/include/cr_options.h
+++ b/criu/include/cr_options.h
@@ -30,7 +30,7 @@
 #define CPU_CAP_INS		(1u << 2)	/* Instructions CPU capability */
 #define CPU_CAP_IMAGE		(1u << 3)	/* Write capability on dump and read on restore*/
 #define CPU_CAP_ALL		(CPU_CAP_FPU | CPU_CAP_CPU | CPU_CAP_INS)
-#define CPU_CAP_DEFAULT		(CPU_CAP_FPU | CPU_CAP_CPU)
+#define CPU_CAP_DEFAULT		(CPU_CAP_FPU | CPU_CAP_INS)
 
 struct cg_root_opt {
 	struct list_head node;
-- 
2.17.1



More information about the CRIU mailing list