diff --git a/criu/include/mman.h b/criu/include/mman.h index 8ca71fadf..a55356490 100644 --- a/criu/include/mman.h +++ b/criu/include/mman.h @@ -13,5 +13,8 @@ #ifndef MADV_DONTDUMP #define MADV_DONTDUMP 16 #endif +#ifndef MADV_WIPEONFORK +#define MADV_WIPEONFORK 18 +#endif #endif /* __CR_MMAN_H__ */ diff --git a/criu/proc_parse.c b/criu/proc_parse.c index 0fa9b7ba5..bc1339858 100644 --- a/criu/proc_parse.c +++ b/criu/proc_parse.c @@ -160,6 +160,8 @@ static void __parse_vmflags(char *buf, u32 *flags, u64 *madv, int *io_pf, *madv |= (1ul << MADV_HUGEPAGE); else if (_vmflag_match(tok, "nh")) *madv |= (1ul << MADV_NOHUGEPAGE); + else if (_vmflag_match(tok, "wf")) + *madv |= (1ul << MADV_WIPEONFORK); /* vmsplice doesn't work for VM_IO and VM_PFNMAP mappings. */ if (_vmflag_match(tok, "io") || _vmflag_match(tok, "pf"))