55 lines
1.9 KiB
Diff
55 lines
1.9 KiB
Diff
From 4731ebf085fe6322ba8c7ca14918d3cab2186cf0 Mon Sep 17 00:00:00 2001
|
|
From: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
|
|
Date: Fri, 25 Feb 2022 04:45:37 -0500
|
|
Subject: [PATCH 1/8] coredump: use MEMBER_{OFFSET, SIZE} instead of
|
|
GCORE_{OFFSET, SIZE}
|
|
|
|
fill_auxv_note() and compat_fill_auxv_note() is called just once each
|
|
time gcore command is invoked because each process has just one
|
|
NT_AUXV. This means using MEMBER_{OFFSET, SIZE} is enough; using
|
|
GCORE_{OFFSET, SIZE} is overkill.
|
|
|
|
Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
|
|
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
|
|
---
|
|
src/libgcore/gcore_coredump.c | 12 ++++++------
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/src/libgcore/gcore_coredump.c b/src/libgcore/gcore_coredump.c
|
|
index 3d0c0fcce61e..6f57b21b62b6 100644
|
|
--- a/src/libgcore/gcore_coredump.c
|
|
+++ b/src/libgcore/gcore_coredump.c
|
|
@@ -930,11 +930,11 @@ fill_auxv_note(struct elf_note_info *info, struct task_context *tc,
|
|
ulong *auxv;
|
|
int i;
|
|
|
|
- auxv = (ulong *)GETBUF(GCORE_SIZE(mm_struct_saved_auxv));
|
|
+ auxv = (ulong *)GETBUF(MEMBER_SIZE("mm_struct", "saved_auxv"));
|
|
|
|
readmem(task_mm(tc->task, FALSE) +
|
|
- GCORE_OFFSET(mm_struct_saved_auxv), KVADDR, auxv,
|
|
- GCORE_SIZE(mm_struct_saved_auxv), "fill_auxv_note",
|
|
+ MEMBER_OFFSET("mm_struct", "saved_auxv"), KVADDR, auxv,
|
|
+ MEMBER_SIZE("mm_struct", "saved_auxv"), "fill_auxv_note",
|
|
gcore_verbose_error_handle());
|
|
|
|
i = 0;
|
|
@@ -956,11 +956,11 @@ compat_fill_auxv_note(struct elf_note_info *info,
|
|
uint32_t *auxv;
|
|
int i;
|
|
|
|
- auxv = (uint32_t *)GETBUF(GCORE_SIZE(mm_struct_saved_auxv));
|
|
+ auxv = (uint32_t *)GETBUF(MEMBER_SIZE("mm_struct", "saved_auxv"));
|
|
|
|
readmem(task_mm(tc->task, FALSE) +
|
|
- GCORE_OFFSET(mm_struct_saved_auxv), KVADDR, auxv,
|
|
- GCORE_SIZE(mm_struct_saved_auxv), "fill_auxv_note32",
|
|
+ MEMBER_OFFSET("mm_struct", "saved_auxv"), KVADDR, auxv,
|
|
+ MEMBER_SIZE("mm_struct", "saved_auxv"), "fill_auxv_note32",
|
|
gcore_verbose_error_handle());
|
|
|
|
i = 0;
|
|
--
|
|
2.37.1
|
|
|