[CRIU] [PATCH] vdso: When put vdso mark don't forget to make area writable

Cyrill Gorcunov gorcunov at openvz.org
Mon May 27 04:41:58 EDT 2013


Otherwise kernel is not happy with attempt to write rx only
memory, causing dumpee to fail on restore.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 arch/x86/vdso-pie.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/vdso-pie.c b/arch/x86/vdso-pie.c
index 6ec2247..778e84a 100644
--- a/arch/x86/vdso-pie.c
+++ b/arch/x86/vdso-pie.c
@@ -300,6 +300,8 @@ int vdso_proxify(char *who, struct vdso_symtable *sym_rt, VmaEntry *vma, unsigne
 	 * routine we could detect this vdso and do not dump it, since
 	 * it's auto-generated every new session if proxy required.
 	 */
+	sys_mprotect((void *)vdso_rt_parked_at,  vdso_vma_size(sym_rt), PROT_WRITE);
 	vdso_put_mark((void *)vdso_rt_parked_at, vma->start);
+	sys_mprotect((void *)vdso_rt_parked_at,  vdso_vma_size(sym_rt), VDSO_PROT);
 	return 0;
 }
-- 
1.8.1.4



More information about the CRIU mailing list