[CRIU] [PATCHv4 5/8] criu/dump: Fix size of personality buffer
Dmitry Safonov
dima at arista.com
Thu May 10 21:14:45 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 b48a38b8b260..208bd5060b48 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