mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 05:18:00 +00:00
vdso: dump -- Don't dump contents of vvar zone
vvar zone is mapped by a kernel and must not ever been dumped into image, the data present there is valid on running kernel only. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Andrew Vagin <avagin@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
72ead490e4
commit
0bb002ce69
@ -94,6 +94,11 @@ bool privately_dump_vma(struct vma_area *vma)
|
|||||||
if (vma->e->status & VMA_AREA_SYSVIPC)
|
if (vma->e->status & VMA_AREA_SYSVIPC)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
#ifdef CONFIG_VDSO
|
||||||
|
/* No dumps for vDSO VVAR data */
|
||||||
|
if (vma->e->status & VMA_AREA_VVAR)
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
if (vma_area_is(vma, VMA_ANON_SHARED))
|
if (vma_area_is(vma, VMA_ANON_SHARED))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
15
mem.c
15
mem.c
@ -67,8 +67,23 @@ unsigned int dump_pages_args_size(struct vm_area_list *vmas)
|
|||||||
|
|
||||||
static inline bool should_dump_page(VmaEntry *vmae, u64 pme)
|
static inline bool should_dump_page(VmaEntry *vmae, u64 pme)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_VDSO
|
||||||
|
/*
|
||||||
|
* vDSO area must be always dumped because on restore
|
||||||
|
* we might need to generate a proxy.
|
||||||
|
*/
|
||||||
if (vma_entry_is(vmae, VMA_AREA_VDSO))
|
if (vma_entry_is(vmae, VMA_AREA_VDSO))
|
||||||
return true;
|
return true;
|
||||||
|
/*
|
||||||
|
* In turn VVAR area is special and referenced from
|
||||||
|
* vDSO area by IP addressing (at least on x86) thus
|
||||||
|
* never ever dump its content but always use one provided
|
||||||
|
* by the kernel on restore, ie runtime VVAR area must
|
||||||
|
* be remapped into proper place..
|
||||||
|
*/
|
||||||
|
if (vma_entry_is(vmae, VMA_AREA_VVAR))
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* Optimisation for private mapping pages, that haven't
|
* Optimisation for private mapping pages, that haven't
|
||||||
* yet being COW-ed
|
* yet being COW-ed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user