Blame SOURCES/0001-coredump-use-MEMBER_-OFFSET-SIZE-instead-of-GCORE_-O.patch

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