From: "Petr Tesařík" <petr@tesarici.cz>
To: Stephen Brennan <stephen.s.brennan@oracle.com>
Cc: linux-debuggers@vger.kernel.org
Subject: Re: [PATCH kdumpid 0/3] Prevent segfault on missing disassembler
Date: Thu, 29 Jun 2023 08:26:41 +0200 [thread overview]
Message-ID: <20230629082641.5f8c4fac@meshulam.tesarici.cz> (raw)
In-Reply-To: <20230628210344.357073-1-stephen.s.brennan@oracle.com>
On Wed, 28 Jun 2023 14:03:41 -0700
Stephen Brennan <stephen.s.brennan@oracle.com> wrote:
> Hi Petr,
>
> I didn't know quite where to send patches for kdumpid, so I elected to
> send direct to you, and CC the linux-debuggers list. Hope that's ok!
Yes, absolutely! Thank you for the fixes, they are much appreciated.
I should move this project to a better place. In my defense I should
say that the code predates GitHub, and there weren't many options back
then. ;-)
Petr T
> I encountered a segmentation fault of kdumpid (master branch):
>
> #0 0x0000000000000000 in ?? ()
> #1 0x0000000000406aa9 in disas_at (dd=0x7fffffffde70, info=0x7fffffffdc80, pc=0) at ppc64.c:112
> #2 0x0000000000406d42 in looks_like_kcode_ppc64 (dd=0x7fffffffde70, addr=0) at ppc64.c:174
> #3 0x0000000000405616 in explore_kernel (dd=0x7fffffffde70, fn=0x405880 <explore_utsname>) at util.c:269
> #4 0x0000000000405d3f in explore_raw_data (dd=0x7fffffffde70) at util.c:465
> #5 0x0000000000404c98 in main (argc=2, argv=0x7fffffffe168) at main.c:248
>
> The print_insn function pointer was NULL and calling it resulted in the
> segfault. So I've included a patch to check the return value of
> disassembler() and avoid calling print_insn in those cases.
>
> I also added some fixes to build issues I encountered - hopefully to
> help you avoid autotools for even longer :P
>
> Thanks,
> Stephen
>
> Stephen Brennan (3):
> cdefs.sh: require bash
> Use -lz unconditionally
> Gracefully handle missing dissasembler function
>
> Makefile | 2 +-
> cdefs.sh | 2 +-
> libs.sh | 3 ---
> ppc.c | 2 ++
> ppc64.c | 2 ++
> s390.c | 2 ++
> x86.c | 2 ++
> 7 files changed, 10 insertions(+), 5 deletions(-)
>
prev parent reply other threads:[~2023-06-29 6:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 21:03 [PATCH kdumpid 0/3] Prevent segfault on missing disassembler Stephen Brennan
2023-06-28 21:03 ` [PATCH kdumpid 1/3] cdefs.sh: require bash Stephen Brennan
2023-06-28 21:03 ` [PATCH kdumpid 2/3] Use -lz unconditionally Stephen Brennan
2023-06-28 21:03 ` [PATCH kdumpid 3/3] Gracefully handle missing dissasembler function Stephen Brennan
2023-06-28 22:12 ` [PATCH kdumpid 0/3] Prevent segfault on missing disassembler Stephen Brennan
2023-06-29 6:26 ` Petr Tesařík [this message]
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=20230629082641.5f8c4fac@meshulam.tesarici.cz \
--to=petr@tesarici.cz \
--cc=linux-debuggers@vger.kernel.org \
--cc=stephen.s.brennan@oracle.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).