diff --git a/criu/cr-dump.c b/criu/cr-dump.c index 2a5595c973..0e297acb73 100644 --- a/criu/cr-dump.c +++ b/criu/cr-dump.c @@ -515,6 +515,9 @@ static int dump_task_mm(pid_t pid, const struct proc_pid_stat *stat, mme.dumpable = misc->dumpable; mme.has_dumpable = true; + mme.thp_disabled = misc->thp_disabled; + mme.has_thp_disabled = true; + mme.n_mm_saved_auxv = AT_VECTOR_SIZE; mme.mm_saved_auxv = xmalloc(pb_repeated_size(&mme, mm_saved_auxv)); if (!mme.mm_saved_auxv) diff --git a/criu/include/parasite.h b/criu/include/parasite.h index cd6d793f8b..115891f3b6 100644 --- a/criu/include/parasite.h +++ b/criu/include/parasite.h @@ -124,6 +124,7 @@ struct parasite_dump_misc { u32 umask; int dumpable; + int thp_disabled; }; /* diff --git a/criu/pie/parasite.c b/criu/pie/parasite.c index fe08e7252e..78bbe9e3b6 100644 --- a/criu/pie/parasite.c +++ b/criu/pie/parasite.c @@ -177,6 +177,7 @@ static int dump_misc(struct parasite_dump_misc *args) args->umask = sys_umask(0); sys_umask(args->umask); /* never fails */ args->dumpable = sys_prctl(PR_GET_DUMPABLE, 0, 0, 0, 0); + args->thp_disabled = sys_prctl(PR_GET_THP_DISABLE, 0, 0, 0, 0); return 0; } diff --git a/images/mm.proto b/images/mm.proto index b372f45ff3..e0f14c62f6 100644 --- a/images/mm.proto +++ b/images/mm.proto @@ -29,4 +29,5 @@ message mm_entry { optional int32 dumpable = 15; repeated aio_ring_entry aios = 16; + optional bool thp_disabled = 17; }