Browse Source

[LibOS] Turn on CPSTORE_DERANDOMIZATION to fix intermittent bugs on fork

Previously, a checkpoint on child's do_migration() was allocated at a
random address and could overlap with parent's VMAs, leading to
intermittent bugs on some apps (including Apache under SGX PAL). This
commit turns on CPSTORE_DERANDOMIZATION so that the child always maps
the checkpoint at the same address as the parent. Note that this is
a temporary solution because of memory fragmentation and security
issues. It also disallows the parent process to have less memory than
the child (relevant in SGX environment, e.g., to GCC regression test).
Dmitrii Kuvaiskii 4 years ago
parent
commit
4b734addcd
4 changed files with 9 additions and 9 deletions
  1. 6 6
      Jenkinsfiles/Linux-SGX
  2. 1 1
      Jenkinsfiles/Linux-SGX-18.04
  3. 1 1
      LibOS/shim/include/shim_defs.h
  4. 1 1
      LibOS/shim/test/apps

+ 6 - 6
Jenkinsfiles/Linux-SGX

@@ -51,20 +51,20 @@ pipeline {
                         timeout(time: 5, unit: 'MINUTES') {
                             sh '''
                                 cd LibOS/shim/test/apps/python
-                                                  make SGX=1
-                                                  make SGX_RUN=1
+                                make SGX=1
+                                make SGX_RUN=1
                                 make SGX_RUN=1 regression
                             '''
-      }
-      timeout(time: 5, unit: 'MINUTES') {
+                        }
+                        timeout(time: 5, unit: 'MINUTES') {
                             sh '''
                                 cd LibOS/shim/test/apps/bash
                                 make SGX=1
                                 make SGX_RUN=1
                                 make SGX_RUN=1 regression
                            '''
-      }
-                        timeout(time: 5, unit: 'MINUTES') {
+                        }
+                        timeout(time: 10, unit: 'MINUTES') {
                             sh '''
                                 cd LibOS/shim/test/apps/gcc
                                 make SGX=1

+ 1 - 1
Jenkinsfiles/Linux-SGX-18.04

@@ -64,7 +64,7 @@ pipeline {
                                 make SGX_RUN=1 regression
                            '''
       }
-                        timeout(time: 5, unit: 'MINUTES') {
+                        timeout(time: 10, unit: 'MINUTES') {
                             sh '''
                                 cd LibOS/shim/test/apps/gcc
                                 make SGX=1

+ 1 - 1
LibOS/shim/include/shim_defs.h

@@ -11,7 +11,7 @@
  * exact address it was created. Currently this option is disabled
  * to prevent internal fragmentation of virtual memory space.
  */
-#define CPSTORE_DERANDOMIZATION     0
+#define CPSTORE_DERANDOMIZATION     1
 
 /* This macro disables current vfork implementation and aliases it to fork.
  *

+ 1 - 1
LibOS/shim/test/apps

@@ -1 +1 @@
-Subproject commit a60b38bad6815032b5d55e86a5b20036bb8a89bb
+Subproject commit c8428cd93ba819f5f613d82d5074fb656ff02215