public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Miroslav Benes <mbenes@suse.cz>
Subject: Re: [PATCH v2] scripts: Create objdump-func helper script
Date: Tue, 19 Apr 2022 21:50:01 +0200	[thread overview]
Message-ID: <Yl8SaZbqXPJQyoXB@zn.tnic> (raw)
In-Reply-To: <fe61d8835ba60ef20920d2d0e6493748c80e4d7e.1650384661.git.jpoimboe@redhat.com>

On Tue, Apr 19, 2022 at 09:12:23AM -0700, Josh Poimboeuf wrote:
> Add a simple script which disassembles a single function from an object
> file.  Comes in handy for objtool warnings and kernel stack traces.
> 
> Originally-by: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
> v2:
> - require gawk
> 
>  scripts/objdump-func | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>  create mode 100755 scripts/objdump-func

Was that supposed to be user-friendly too?

$ ./scripts/objdump-func -h
./scripts/objdump-func: line 16: $1: unbound variable

:-)


It works tho:

$ ./scripts/objdump-func vmlinux rewind_stack_and_make_dead
0000 ffffffff81001c00 <rewind_stack_and_make_dead>:
0000 ffffffff81001c00:  31 ed                   xor    %ebp,%ebp
0000 ffffffff81001c02:  65 48 8b 04 25 d0 ec 01 00      mov    %gs:0x1ecd0,%rax
0000 ffffffff81001c0b:  48 8d a0 58 ff ff ff    lea    -0xa8(%rax),%rsp
0000 ffffffff81001c12:  e8 39 24 07 00          call   ffffffff81074050 <make_task_dead>
^^^^

I guess those zeros at the beginning are supposed to mean something...

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2022-04-19 19:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 16:12 [PATCH v2] scripts: Create objdump-func helper script Josh Poimboeuf
2022-04-19 19:50 ` Borislav Petkov [this message]
2022-04-19 20:14   ` Peter Zijlstra
2022-04-19 21:41     ` Josh Poimboeuf

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=Yl8SaZbqXPJQyoXB@zn.tnic \
    --to=bp@alien8.de \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=peterz@infradead.org \
    --cc=x86@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