From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87E74C433DB for ; Tue, 12 Jan 2021 06:05:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B1D49222F9 for ; Tue, 12 Jan 2021 06:05:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1D49222F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzCni-0006gh-Lk for qemu-devel@archiver.kernel.org; Tue, 12 Jan 2021 01:05:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzBvk-0000tv-BP for qemu-devel@nongnu.org; Tue, 12 Jan 2021 00:09:20 -0500 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]:46411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzBvf-0007nq-Kd for qemu-devel@nongnu.org; Tue, 12 Jan 2021 00:09:20 -0500 Received: by mail-io1-xd35.google.com with SMTP id 81so1464209ioc.13 for ; Mon, 11 Jan 2021 21:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=hZvGw8+SK8Eg5VtMCKAJI7bdqdHom8U8ljdR9vtnkEc=; b=rV0SAC0pWeNvauvQq4c6fkm/nFSSXAx6rf0Z+kFB+bdmOAnXNfFfgsXV2YYJZ4EW87 +GkqKf7oycXOXN8pjsMjkkqDohbdSGGKHYG07ZwnnenZ81AtW0905f/ERRCfEzChck4v uIMg7tDUjrmT9a8ErmvkgH6391ec1f3D4iMtHfh9WdxPCWG3740JUUytgV30GYtkD8YV RNkVo0asqXOiBcNSvX2wLq8SKKG7H3QnAJkUMF8VaIWeJOgyPIRyXsF2P0tU+D437iD3 D8gGgHZm71NrVrewDTSgwEidpPSEa6TxIrgapB3CRJU3SJB3OT7lNj244o87XhXg5Pzi +EnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=hZvGw8+SK8Eg5VtMCKAJI7bdqdHom8U8ljdR9vtnkEc=; b=fuZMcd1St+BQUkgCnXqRJ6tCXBca6b2U5FyAqzUMlCDCZb0z+uQIlxA92llM/uC1vn 7z1zc1kz420NjZhtn4vKYt13xzEjuZXJ+XwzzguCdob/ynXE5zJqCQKI5mEqqYmvLyGG cWT2whsZ+1wc1ju0AeA7Va7oZeaW524dY6aEqNZ6rM3qlxIJL8zjchIynvLVtcL3a4Hl GpRzUD+lkxnpW07D92+0KUOz0VcSfqMZPXOWXuXDQpfigbT0hwZUOn1L+WQPVl/SjzmP 5JENkmLxtNFlCT+T8cwDkEALH6MT/b7gntTnSqC1KDu3IfXs2q1u9X8bXs5UGuh3bu0M Q3cw== X-Gm-Message-State: AOAM531MIRxUz20J/frWhsiQiTWyKs6ezjc5/AxHJxUJX8IG1bmmBCBY 7HRZDn+LDdUVzTlR0HwCctTue90vQeHF4tqumhZRIgYBSbo= X-Google-Smtp-Source: ABdhPJx0DZKxEfmwpO9uy36+6BUELF3p9G96dMJ+0Rv30mhh17GB6RSK0RxUtAXptQUKRv6qEm90Cs/CIRqzPi1VtEQ= X-Received: by 2002:a92:cec3:: with SMTP id z3mr2318260ilq.256.1610428153951; Mon, 11 Jan 2021 21:09:13 -0800 (PST) MIME-Version: 1.0 From: Kyle Zeng Date: Mon, 11 Jan 2021 22:09:03 -0700 Message-ID: Subject: [PATCH] Dump NT_FILE note when generate coredump To: qemu-devel@nongnu.org Content-Type: multipart/alternative; boundary="0000000000000d784505b8ad0697" Received-SPF: pass client-ip=2607:f8b0:4864:20::d35; envelope-from=jkjh1jkjh1@gmail.com; helo=mail-io1-xd35.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 12 Jan 2021 01:02:18 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.henderson@linaro.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000000d784505b8ad0697 Content-Type: text/plain; charset="UTF-8" This patch adds support for adding NT_FILE note in the ELF coredump. It follows what's defined in readelf. Let me know if there is any issue with the patch. The patch is attached in plaintext below Thanks, Kyle --------- >From 3c42074f9e99e6b5ca840b9ee9e965fb69122ef1 Mon Sep 17 00:00:00 2001 From: Kyle ZENG Date: Mon, 11 Jan 2021 21:54:09 -0700 Subject: [PATCH] add NT_FILE note for ELF core dump Signed-off-by: Kyle ZENG --- include/elf.h | 1 + linux-user/elfload.c | 92 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 90 insertions(+), 3 deletions(-) diff --git a/include/elf.h b/include/elf.h index 7a418ee..f701fd9 100644 --- a/include/elf.h +++ b/include/elf.h @@ -1645,6 +1645,7 @@ typedef struct elf64_shdr { #define NT_TASKSTRUCT 4 #define NT_AUXV 6 #define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */ +#define NT_FILE 0x46494c45 /* copied from gdb/include/elf/common.h */ #define NT_S390_GS_CB 0x30b /* s390 guarded storage registers */ #define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31 */ #define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 (lower half) */ diff --git a/linux-user/elfload.c b/linux-user/elfload.c index a640507..c095c0c 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -3317,6 +3317,13 @@ struct target_elf_prpsinfo { char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ }; +struct target_ntfile_entry { + abi_ulong vm_start; + abi_ulong vm_end; + abi_ulong page_offset; + char *path; +}; + /* Here is the structure in which status of each thread is captured. */ struct elf_thread_status { QTAILQ_ENTRY(elf_thread_status) ets_link; @@ -3677,6 +3684,84 @@ static void fill_auxv_note(struct memelfnote *note, const TaskState *ts) } } +static void fill_ntfile_note(struct memelfnote *note, TaskState *ts) +{ + GSList *map_info = read_self_maps(); + GSList *s; + int count = 0; + int data_size = sizeof(abi_long)*2; // reserve space for num_map_entry and page_size + struct target_ntfile_entry *entries = NULL; + + // grab memory mapping first + for (s = map_info; s; s = g_slist_next(s)) { + MapInfo *e = (MapInfo *) s->data; + + if (h2g_valid(e->start)) { + unsigned long min = e->start; + unsigned long max = e->end; + int flags = page_get_flags(h2g(min)); + const char *path; + + max = h2g_valid(max - 1) ? + max : (uintptr_t) g2h(GUEST_ADDR_MAX) + 1; + + if (page_check_range(h2g(min), max - min, flags) == -1) { + continue; + } + + if (h2g(min) == ts->info->stack_limit) { + path = "[stack]"; + } else { + path = e->path; + } + + count++; + entries = realloc(entries, sizeof(struct target_ntfile_entry)*count); + struct target_ntfile_entry *entry = &entries[count-1]; + memset(entry, 0, sizeof(*entry)); + + data_size += sizeof(abi_long)*3 + strlen(path) + 1; + entry->vm_start = h2g(min); + entry->vm_end = h2g(max - 1) + 1; + entry->page_offset = e->offset; + entry->path = strdup(path); + } + } + + // prepare the memory mapping in NT_FILE format + char *ptr; + int idx = 0; + ptr = (char *)g_malloc0(data_size); + abi_long *long_ptr = (abi_long *)ptr; + + // memory mappings + long_ptr[idx++] = count; // number of map entries + long_ptr[idx++] = TARGET_PAGE_SIZE; // target page size + for(int i=0; ivm_start; + long_ptr[idx++] = entry->vm_end; + long_ptr[idx++] = entry->page_offset; + } + + // path names + idx *= sizeof(abi_long); + for(int i=0; ipath); + strcpy(&ptr[idx], entry->path); + idx += path_size + 1; + free(entry->path); + } + + // write it out + fill_note(note, "CORE", NT_FILE, data_size, ptr); + + // cleanup + free(entries); + free_self_maps(map_info); +} + /* * Constructs name of coredump file. We have following convention * for the name: @@ -3807,7 +3892,7 @@ static void init_note_info(struct elf_note_info *info) static int fill_note_info(struct elf_note_info *info, long signr, const CPUArchState *env) { -#define NUMNOTES 3 +#define NUMNOTES 4 CPUState *cpu = env_cpu((CPUArchState *)env); TaskState *ts = (TaskState *)cpu->opaque; int i; @@ -3824,7 +3909,7 @@ static int fill_note_info(struct elf_note_info *info, /* * First fill in status (and registers) of current thread - * including process info & aux vector. + * including process info, aux vector & memory mapping. */ fill_prstatus(info->prstatus, ts, signr); elf_core_copy_regs(&info->prstatus->pr_reg, env); @@ -3834,7 +3919,8 @@ static int fill_note_info(struct elf_note_info *info, fill_note(&info->notes[1], "CORE", NT_PRPSINFO, sizeof (*info->psinfo), info->psinfo); fill_auxv_note(&info->notes[2], ts); - info->numnote = 3; + fill_ntfile_note(&info->notes[3], ts); + info->numnote = NUMNOTES; info->notes_size = 0; for (i = 0; i < info->numnote; i++) -- 2.17.1 --0000000000000d784505b8ad0697 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This patch adds support for adding NT_FILE note in the ELF= coredump.
It follows what's defined in readelf.
Let me k= now if there is any issue with the patch.
The patch is attached i= n plaintext below

Thanks,
Kyle
---------

From 3c42074f9e99e6b5ca840b9ee9e965fb69= 122ef1 Mon Sep 17 00:00:00 2001
From: Kyle ZENG <jkjh1jkjh1@gmail.com>
Date: Mon, 11 Jan 2021 = 21:54:09 -0700
Subject: [PATCH] add NT_FILE note for ELF core dump
Signed-off-by: Kyle ZENG <jkjh= 1jkjh1@gmail.com>
---
=C2=A0include/elf.h =C2=A0 =C2=A0 =C2=A0= =C2=A0| =C2=A01 +
=C2=A0linux-user/elfload.c | 92 +++++++++++++++++++++= +++++++++++++++++++++--
=C2=A02 files changed, 90 insertions(+), 3 delet= ions(-)

diff --git a/include/elf.h b/include/elf.h
index 7a418ee.= .f701fd9 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -1645,6= +1645,7 @@ typedef struct elf64_shdr {
=C2=A0#define NT_TASKSTRUCT 4=C2=A0#define NT_AUXV 6
=C2=A0#define NT_PRXFPREG =C2=A0 =C2=A0 0x46e6= 2b7f =C2=A0 =C2=A0 =C2=A0/* copied from gdb5.1/include/elf/common.h */
+= #define NT_FILE =C2=A0 =C2=A0 0x46494c45 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= /* copied from gdb/include/elf/common.h */
=C2=A0#define NT_S390_GS_CB = =C2=A0 0x30b =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* s390 guarded storage reg= isters */
=C2=A0#define NT_S390_VXRS_HIGH 0x30a =C2=A0 =C2=A0 =C2=A0 =C2= =A0 /* s390 vector registers 16-31 */
=C2=A0#define NT_S390_VXRS_LOW =C2= =A00x309 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* s390 vector registers 0-15 (lower h= alf) */
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
inde= x a640507..c095c0c 100644
--- a/linux-user/elfload.c
+++ b/linux-user= /elfload.c
@@ -3317,6 +3317,13 @@ struct target_elf_prpsinfo {
=C2=A0= =C2=A0 =C2=A0char =C2=A0 =C2=A0pr_psargs[ELF_PRARGSZ]; /* initial part of = arg list */
=C2=A0};
=C2=A0
+struct target_ntfile_entry {
+ =C2= =A0 =C2=A0abi_ulong =C2=A0 vm_start;
+ =C2=A0 =C2=A0abi_ulong =C2=A0 vm_= end;
+ =C2=A0 =C2=A0abi_ulong =C2=A0 page_offset;
+ =C2=A0 =C2=A0char= =C2=A0 =C2=A0 =C2=A0 =C2=A0*path;
+};
+
=C2=A0/* Here is the stru= cture in which status of each thread is captured. */
=C2=A0struct elf_th= read_status {
=C2=A0 =C2=A0 =C2=A0QTAILQ_ENTRY(elf_thread_status) =C2=A0= ets_link;
@@ -3677,6 +3684,84 @@ static void fill_auxv_note(struct memel= fnote *note, const TaskState *ts)
=C2=A0 =C2=A0 =C2=A0}
=C2=A0}
= =C2=A0
+static void fill_ntfile_note(struct memelfnote *note, TaskState = *ts)
+{
+ =C2=A0 =C2=A0GSList *map_info =3D read_self_maps();
+ = =C2=A0 =C2=A0GSList *s;
+ =C2=A0 =C2=A0int count =3D 0;
+ =C2=A0 =C2= =A0int data_size =3D sizeof(abi_long)*2; // reserve space for num_map_entry= and page_size
+ =C2=A0 =C2=A0struct target_ntfile_entry *entries =3D NU= LL;
+
+ =C2=A0 =C2=A0// grab memory mapping first
+ =C2=A0 =C2=A0f= or (s =3D map_info; s; s =3D g_slist_next(s)) {
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0MapInfo *e =3D (MapInfo *) s->data;
+
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0if (h2g_valid(e->start)) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0unsigned long min =3D e->start;
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0unsigned long max =3D e->end;
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0int flags =3D page_get_flags(h2g(min));
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0const char *path;
+
+ =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0max =3D h2g_valid(max - 1) ?
+ =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0max : (uintptr_t) g2h(GUEST_ADDR_= MAX) + 1;
+
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (page_check= _range(h2g(min), max - min, flags) =3D=3D -1) {
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0continue;
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0}
+
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (h= 2g(min) =3D=3D ts->info->stack_limit) {
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0path =3D "[stack]";
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0path =3D e->path;
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0}
+
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0co= unt++;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0entries =3D realloc(en= tries, sizeof(struct target_ntfile_entry)*count);
+ =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0struct target_ntfile_entry *entry =3D &entries[cou= nt-1];
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0memset(entry, 0, sizeo= f(*entry));
+
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0data_size += =3D sizeof(abi_long)*3 + strlen(path) + 1;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0entry->vm_start =3D h2g(min);
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0entry->vm_end =3D h2g(max - 1) + 1;
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0entry->page_offset =3D e->offset;
+= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0entry->path =3D strdup(path);<= br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+ =C2=A0 =C2=A0}
+
+ =C2=A0 =C2= =A0// prepare the memory mapping in NT_FILE format
+ =C2=A0 =C2=A0char *= ptr;
+ =C2=A0 =C2=A0int idx =3D 0;
+ =C2=A0 =C2=A0ptr =3D (char *)g_m= alloc0(data_size);
+ =C2=A0 =C2=A0abi_long *long_ptr =3D (abi_long *)ptr= ;
+
+ =C2=A0 =C2=A0// memory mappings
+ =C2=A0 =C2=A0long_ptr[idx+= +] =3D count; =C2=A0 =C2=A0// number of map entries
+ =C2=A0 =C2=A0long_= ptr[idx++] =3D TARGET_PAGE_SIZE; =C2=A0 // target page size
+ =C2=A0 =C2= =A0for(int i=3D0; i<count; i++) {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0struct= target_ntfile_entry *entry =3D &entries[i];
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0long_ptr[idx++] =3D entry->vm_start;
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0long_ptr[idx++] =3D entry->vm_end;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0lo= ng_ptr[idx++] =3D entry->page_offset;
+ =C2=A0 =C2=A0}
+
+ =C2= =A0 =C2=A0// path names
+ =C2=A0 =C2=A0idx *=3D sizeof(abi_long);
+ = =C2=A0 =C2=A0for(int i=3D0; i<count; i++) {
+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0struct target_ntfile_entry *entry =3D &entries[i];
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0int path_size =3D strlen(entry->path);
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0strcpy(&ptr[idx], entry->path);
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0idx +=3D path_size + 1;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0fr= ee(entry->path);
+ =C2=A0 =C2=A0}
+
+ =C2=A0 =C2=A0// write it = out
+ =C2=A0 =C2=A0fill_note(note, "CORE", NT_FILE, data_size,= ptr);
+
+ =C2=A0 =C2=A0// cleanup
+ =C2=A0 =C2=A0free(entries);+ =C2=A0 =C2=A0free_self_maps(map_info);
+}
+
=C2=A0/*
=C2=A0= * Constructs name of coredump file.=C2=A0 We have following convention
= =C2=A0 * for the name:
@@ -3807,7 +3892,7 @@ static void init_note_info(= struct elf_note_info *info)
=C2=A0static int fill_note_info(struct elf_n= ote_info *info,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0long signr, const CPUArchState *en= v)
=C2=A0{
-#define NUMNOTES 3
+#define NUMNOTES 4
=C2=A0 =C2= =A0 =C2=A0CPUState *cpu =3D env_cpu((CPUArchState *)env);
=C2=A0 =C2=A0 = =C2=A0TaskState *ts =3D (TaskState *)cpu->opaque;
=C2=A0 =C2=A0 =C2= =A0int i;
@@ -3824,7 +3909,7 @@ static int fill_note_info(struct elf_not= e_info *info,
=C2=A0
=C2=A0 =C2=A0 =C2=A0/*
=C2=A0 =C2=A0 =C2=A0 *= First fill in status (and registers) of current thread
- =C2=A0 =C2=A0 = * including process info & aux vector.
+ =C2=A0 =C2=A0 * including p= rocess info, aux vector & memory mapping.
=C2=A0 =C2=A0 =C2=A0 */=C2=A0 =C2=A0 =C2=A0fill_prstatus(info->prstatus, ts, signr);
=C2=A0= =C2=A0 =C2=A0elf_core_copy_regs(&info->prstatus->pr_reg, env);@@ -3834,7 +3919,8 @@ static int fill_note_info(struct elf_note_info *inf= o,
=C2=A0 =C2=A0 =C2=A0fill_note(&info->notes[1], "CORE"= ;, NT_PRPSINFO,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s= izeof (*info->psinfo), info->psinfo);
=C2=A0 =C2=A0 =C2=A0fill_aux= v_note(&info->notes[2], ts);
- =C2=A0 =C2=A0info->numnote =3D = 3;
+ =C2=A0 =C2=A0fill_ntfile_note(&info->notes[3], ts);
+ =C2= =A0 =C2=A0info->numnote =3D NUMNOTES;
=C2=A0
=C2=A0 =C2=A0 =C2=A0i= nfo->notes_size =3D 0;
=C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < info-= >numnote; i++)
--
2.17.1

--0000000000000d784505b8ad0697--