Blob Blame Raw
From 14c0abb1da33176f47939eee04846e8cf3e6992f Mon Sep 17 00:00:00 2001
From: Dmitry Safonov <dima@arista.com>
Date: Thu, 10 May 2018 19:14:45 +0100
Subject: [PATCH 5/8] criu/dump: Fix size of personality buffer

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@arista.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.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 b48a38b8b..208bd5060 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.17.0