From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Chi-Thanh Hoang <chithanh.hoang@gmail.com>
Subject: Re: Issue using faddr2line on kernel modules
Date: Wed, 19 Jan 2022 13:21:26 -0800 [thread overview]
Message-ID: <20220119212126.aydgx62abbngumwy@treble> (raw)
In-Reply-To: <CAPDLWs_mirot76g==TPRZDsB6Qn99kxw2N5V=PaDYqBLf=ZSCQ@mail.gmail.com>
On Wed, Jan 19, 2022 at 09:27:18AM +0530, Kaiwan N Billimoria wrote:
> On Tue, Jan 18, 2022 at 11:22 PM Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> >
> > On Tue, Jan 18, 2022 at 08:10:28AM +0530, Kaiwan N Billimoria wrote:
> > > Hi Josh,
> > >
> > > Actually your first patch - the one you mentioned had other issues -
> > > worked perfectly when applied:
> > >
> > > scripts/faddr2line ./oops_tryv2.ko do_the_work+0x16f/0x194
> > > do_the_work+0x16f/0x0000000000000194:
> > > do_the_work at <...>/oops_tryv2/oops_tryv2.c:62
> > >
> > > The second one still failed in the same manner:
> > >
> > > scripts/faddr2line ./oops_tryv2.ko do_the_work+0x16f/0x194
> > > bad symbol size: base: 0x0000000000000000 end: 0x0000000000000000
> > >
> > > So, is it possible to fixup issues with the first version?
> > > What are these issues?
> >
> > The first patch basically reverts the fix in commit efdb4167e676
> > ("scripts/faddr2line: Fix "size mismatch" error"). That would be nice
> > as it's simpler and more robust, but unfortunately it would cause a lot
> > of "size mismatch" errors with vmlinux symbols.
>
> I see... if it comes to it, could there be a workaround where the
> script detects a vmlinux image and works in a given manner,
> else in this manner for other images - in effect, for modules?
I think I misspoke about the vmlinux behavior being different, so I
don't think that would work.
> > Can you give the output of 'nm -n ./oops_tryv2.ko'? There must be some
> > text symbol immediately after the do_the_work() symbol which is either
> > out of order, or part of another section.
> >
> > Is do_the_work() in the .text section?
> Yes...
> Here's the output I get:
>
> $ nm -n ./oops_tryv2.ko |grep -C5 do_the_work
> 0000000000000000 r __func__.24215
> 0000000000000000 r __param_bug_in_workq
> 0000000000000000 D __this_module
> 0000000000000000 r _note_7
> 0000000000000000 T cleanup_module
> 0000000000000000 t do_the_work
> 0000000000000000 t do_the_work.cold
> 0000000000000000 b gctx
> 0000000000000000 T init_module
> 0000000000000000 t try_oops_exit
> 0000000000000000 t try_oops_init
> 0000000000000008 b t1
> $
>
> BTW, here's the code:
> https://github.com/PacktPublishing/Linux-Kernel-Debugging/tree/main/ch7/oops_tryv2
Ok, it looks like the symbols aren't sorted like the code expects. I
need to do a more robust fix.
--
Josh
next prev parent reply other threads:[~2022-01-19 21:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 4:57 Kaiwan N Billimoria
2022-01-17 19:48 ` Josh Poimboeuf
2022-01-17 20:27 ` Josh Poimboeuf
2022-01-18 2:40 ` Kaiwan N Billimoria
2022-01-18 17:52 ` Josh Poimboeuf
2022-01-19 3:57 ` Kaiwan N Billimoria
2022-01-19 21:21 ` Josh Poimboeuf [this message]
2022-01-19 23:43 ` Josh Poimboeuf
2022-01-20 5:14 ` Kaiwan N Billimoria
2022-01-20 17:17 ` Josh Poimboeuf
2022-01-20 20:05 ` Kaiwan N Billimoria
2022-01-27 11:24 ` Kaiwan N Billimoria
2022-02-06 20:28 ` Josh Poimboeuf
2022-02-07 2:23 ` Kaiwan N Billimoria
2022-02-11 3:31 ` Kaiwan N Billimoria
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=20220119212126.aydgx62abbngumwy@treble \
--to=jpoimboe@redhat.com \
--cc=chithanh.hoang@gmail.com \
--cc=kaiwan.billimoria@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®