1. 04 Apr, 2014 2 commits
    • Jamie Liu's avatar
      zdtm: add maps_file_prot · 13371c6a
      Jamie Liu authored
      Tests for the bugs fixed by "criu: fix filemap open permissions".
      Signed-off-by: 's avatarJamie Liu <jamieliu@google.com>
      Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      13371c6a
    • Jamie Liu's avatar
      criu: fix filemap open permissions · efe594f8
      Jamie Liu authored
      An mmaped file is opened O_RDONLY or O_RDWR depending on the permissions
      on the first vma dump_task_mm() encounters mapping that file. This
      causes two problems:
      
      1. If a file has multiple MAP_SHARED mappings, some of which are
         read-only and some of which are read-write, and the first encountered
         mapping happens to be read-only, the file will be opened O_RDONLY
         during restore, and mmap(PROT_WRITE) will fail with EACCES, causing
         the restore to fail.
      
      2. If a file is opened read-write and mapped read-only, it will be
         opened O_RDONLY during restore, so restore will succeed, but
         mprotect(PROT_WRITE) on the read-only mapping after restore will
         fail.
      
      To fix both of these, record open flags per-vma based on the presence of
      VM_MAYWRITE in smaps.
      Signed-off-by: 's avatarJamie Liu <jamieliu@google.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      efe594f8
  2. 02 Apr, 2014 3 commits
  3. 01 Apr, 2014 2 commits
  4. 25 Mar, 2014 2 commits
  5. 24 Mar, 2014 4 commits
  6. 22 Mar, 2014 2 commits
  7. 21 Mar, 2014 2 commits
  8. 20 Mar, 2014 1 commit
  9. 19 Mar, 2014 6 commits
  10. 18 Mar, 2014 5 commits
  11. 17 Mar, 2014 1 commit
    • Cyrill Gorcunov's avatar
      image: Add O_OPT when trying to open optional image files · 1153f225
      Cyrill Gorcunov authored
      During the time some files become obsolete and might be missing
      in checkpoint image set, but to keep backward compatibility we
      still trying to open them, which might print out error like
      
       | Unable to open 'path-to-file'
      
      and confuse a reader why criu prints error but continue working.
      
      To eliminate this problem O_OPT flag has been introduced in
      commit 16b56920, which suppress error message priting
      if the flag is set.
      
      Now start using O_OPT in the following functions
      
       - open_irmap_cache: irmap cache is relatively new optional feature
      
       - prepare_rlimits, open_signal_image, restore_file_locks,
         prepare_fd_pid, prepare_mm_pid, collect_image: all these
         helpers are trying to open image files which can be missing.
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      1153f225
  12. 14 Mar, 2014 10 commits