From: Simon Horman <horms@kernel.org>
To: Pnina Feder <pnina.feder@mobileye.com>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH 01/10] util_lib: add paddr_to_offset function and expose raw vmcoreinfo data
Date: Mon, 20 Jul 2026 10:24:06 +0100 [thread overview]
Message-ID: <20260720092406.GB1736709@horms.kernel.org> (raw)
In-Reply-To: <20260622205550.1087163-2-pnina.feder@mobileye.com>
On Mon, Jun 22, 2026 at 11:54:39PM +0300, Pnina Feder wrote:
> Add paddr_to_offset() to translate physical addresses to file offsets,
> complementing the existing vaddr_to_offset() for virtual addresses.
>
> Store raw vmcoreinfo note data when parsing ELF notes and provide
> elf_get_raw_vmcoreinfo() accessor to retrieve it. This allows callers
> to access the unparsed vmcoreinfo content for external processing.
> and fix compilation warnings.
>
> Change-Id: Icc75c22d6b2d95b6c951ccf647819d7e9cc4e7de
> Signed-off-by: Pnina Feder <pnina.feder@mobileye.com>
Overall this looks good to me.
I have provided some minor feedback inline.
> ---
> util_lib/elf_info.c | 53 ++++++++++++++++++++++++++++++++-----
> util_lib/include/elf_info.h | 11 ++++----
> 2 files changed, 52 insertions(+), 12 deletions(-)
>
> diff --git a/util_lib/elf_info.c b/util_lib/elf_info.c
...
> @@ -776,7 +805,7 @@ static void dump_dmesg_legacy(int fd, void (*handler)(char*, unsigned int))
> * To collect full dmesg including the part before `dmesg -c` is useful
> * for later debugging. Use same logic as what crash utility is using.
> */
> - logged_chars = log_end < log_buf_len ? log_end : log_buf_len;
> + logged_chars = log_end < (unsigned int)log_buf_len ? log_end : (unsigned int)log_buf_len;
Adding this cast seems to be a clean-up which is not strictly related to
this patch. I'm not a huge fan of adding casts, but that aside, it
seems like a cleanup that would be best put in a separate patch.
Likewise for similar updates in this patch.
>
> if (handler)
> handler(buf + (log_buf_len - logged_chars), logged_chars);
...
> diff --git a/util_lib/include/elf_info.h b/util_lib/include/elf_info.h
> index fdf4c3d0..c2873365 100644
> --- a/util_lib/include/elf_info.h
> +++ b/util_lib/include/elf_info.h
> @@ -24,13 +24,14 @@
> #include <ctype.h>
>
> int get_pt_load(int idx,
> - unsigned long long *phys_start,
> - unsigned long long *phys_end,
> - unsigned long long *virt_start,
> - unsigned long long *virt_end);
> + unsigned long long *phys_start,
> + unsigned long long *phys_end,
> + unsigned long long *virt_start,
> + unsigned long long *virt_end);
Similarly, this whitespace change also seems to be a clean-up and if so
doesn't belong in this patch.
> int read_phys_offset_elf_kcore(int fd, long *phys_off);
> int read_elf(int fd);
> void dump_dmesg(int fd, void (*handler)(char*, unsigned int));
> extern void (*arch_scan_vmcoreinfo)(char *pos);
> -
> +uint64_t paddr_to_offset(uint64_t paddr);
> +int elf_get_raw_vmcoreinfo(const char **data, size_t *size);
> #endif /* ELF_INFO_H */
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-07-20 9:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 20:54 [PATCH 00/10] vmcore-tasks: lightweight task and backtrace extractor for vmcore files Pnina Feder
2026-06-22 20:54 ` [PATCH 01/10] util_lib: add paddr_to_offset function and expose raw vmcoreinfo data Pnina Feder
2026-07-20 9:24 ` Simon Horman [this message]
2026-06-22 20:54 ` [PATCH 02/10] util_lib: Add vmcoreinfo parser and memory reader Pnina Feder
2026-07-20 9:24 ` Simon Horman
2026-06-22 20:54 ` [PATCH 03/10] util_lib: Add maple tree walker for VMA enumeration Pnina Feder
2026-06-22 20:54 ` [PATCH 04/10] vmcore_tasks: Add common definitions and project infrastructure Pnina Feder
2026-06-22 20:54 ` [PATCH 05/10] vmcore_tasks: arch: Add RISC-V 64-bit architecture support Pnina Feder
2026-06-22 20:54 ` [PATCH 06/10] vmcore_tasks: arch: Add MIPS64 " Pnina Feder
2026-06-22 20:54 ` [PATCH 07/10] vmcore_tasks: Add generic user-space stack unwinder Pnina Feder
2026-06-22 20:54 ` [PATCH 08/10] vmcore_tasks: Add VMA utilities and task enumeration Pnina Feder
2026-06-22 20:54 ` [PATCH 09/10] vmcore_tasks: Add main entry point and backtrace parser Pnina Feder
2026-06-22 20:54 ` [PATCH 10/10] vmcore_tasks: Add README with project documentation Pnina Feder
2026-06-22 21:41 ` [PATCH] vmcore-tasks: lightweight task and backtrace extractor for vmcore files Pnina Feder
2026-07-08 7:38 ` [PATCH 00/10] " Pnina Feder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260720092406.GB1736709@horms.kernel.org \
--to=horms@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=pnina.feder@mobileye.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox