[CRIU] [PATCH 4/7] criu/dump: Fix size of personality buffer
Dmitry Safonov
dima at arista.com
Mon Mar 26 16:06:59 MSK 2018
Personality value is printed in kernel like this:
static int proc_pid_personality(/* .. */)
{
int err = lock_trace(task);
if (!err) {
seq_printf(m, "%08x\n", task->personality);
unlock_trace(task);
}
return err;
}
So, we don't need a whole page to read the value.
Signed-off-by: Dmitry Safonov <dima at arista.com>
---
criu/cr-dump.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index 094d016489ea..d16d8c8920bb 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -98,7 +98,8 @@ int __attribute__((weak)) arch_set_thread_regs(struct pstree_item *item,
return 0;
}
-static char loc_buf[PAGE_SIZE];
+#define PERSONALITY_LENGTH 9
+static char loc_buf[PERSONALITY_LENGTH];
void free_mappings(struct vm_area_list *vma_area_list)
{
--
2.13.6
More information about the CRIU
mailing list