Re: [RFC v4][PATCH 5/9] Memory managemnet (restore)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oren Laadan
Date: Tuesday, September 9, 2008 - 4:35 pm

Serge E. Hallyn wrote:

[...]


As I replied to Dave, I don't see why this would be a security problem.

This handles private memory only. In particular, the uncommon case of a
read-only VMA tha has modified contents. This _cannot_ affect the file
from which this VMA may have been mapped.

Shared memory (not file-mapped) will be handled differently: since it is
always backed up by an inode in shmfs, the restart will populate the
relevant pages directly. Besides, non-file-mapped shared memory is again
not a security concern.

Finally, shared memory that maps to a file is simply _not saved_ at all;
it is part of the file system, and belongs to the (future) file system
snapshot capability. Since the contents are always available in the file
system, we don't need to save it (like we don't save shared libraries).

That said, it is necessary that the code ensures that the vm_flags that
belong to a VMA of a private type, e.g. CR_VMA_ANON/CR_VMA_FILE, indeed
match it (ie, don't have VM_MAY_SHARE/VM_SHARED). I'll add that.


[...]

Oren.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC v4][PATCH 0/9] Kernel based checkpoint/restart`, Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 3/9] x86 support for checkpoint/restart, Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 4/9] Memory management (dump), Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 7/9] Infrastructure for shared objects, Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 9/9] File descriprtors (restore), Oren Laadan, (Tue Sep 9, 12:42 am)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), Vegard Nossum, (Tue Sep 9, 1:06 am)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), Vegard Nossum, (Tue Sep 9, 1:23 am)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Vegard Nossum, (Tue Sep 9, 2:22 am)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Serge E. Hallyn, (Tue Sep 9, 9:07 am)
Re: [RFC v4][PATCH 9/9] File descriprtors (restore), Dave Hansen, (Tue Sep 9, 9:26 am)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Tue Sep 9, 4:35 pm)
Re: [RFC v4][PATCH 9/9] File descriprtors (restore), Oren Laadan, (Tue Sep 9, 6:49 pm)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Tue Sep 9, 7:01 pm)
Re: [RFC v4][PATCH 4/9] Memory management (dump), MinChan Kim, (Wed Sep 10, 12:51 am)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Serge E. Hallyn, (Wed Sep 10, 8:00 am)
Re: [RFC v4][PATCH 9/9] File descriprtors (restore), Dave Hansen, (Wed Sep 10, 9:09 am)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Dave Hansen, (Wed Sep 10, 9:55 am)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Dave Hansen, (Wed Sep 10, 10:45 am)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Oren Laadan, (Wed Sep 10, 11:28 am)
Re: [RFC v4][PATCH 9/9] File descriprtors (restore), Oren Laadan, (Wed Sep 10, 11:55 am)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Wed Sep 10, 12:31 pm)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Wed Sep 10, 12:48 pm)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Wed Sep 10, 1:49 pm)
Cleanups for [PATCH 4/9] Memory management (dump), Dave Hansen, (Wed Sep 10, 2:03 pm)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Dave Hansen, (Wed Sep 10, 2:38 pm)
Re: [RFC v4][PATCH 4/9] Memory management (dump), MinChan Kim, (Wed Sep 10, 4:49 pm)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), MinChan Kim, (Wed Sep 10, 10:02 pm)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Wed Sep 10, 11:37 pm)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Wed Sep 10, 11:59 pm)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Dave Hansen, (Fri Sep 12, 9:57 am)