public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox•net>
To: David Daney <david.daney@cavium•com>,
	Alexei Starovoitov <ast@kernel•org>,
	netdev@vger•kernel.org, "David S. Miller" <davem@davemloft•net>
Cc: linux-kernel@vger•kernel.org
Subject: Re: [PATCH] tools: bpf_jit_disasm: Add option to dump JIT image to a file.
Date: Tue, 11 Apr 2017 23:54:19 +0200	[thread overview]
Message-ID: <58ED508B.9010005@iogearbox.net> (raw)
In-Reply-To: <20170411213052.7337-1-david.daney@cavium.com>

On 04/11/2017 11:30 PM, David Daney wrote:
> When debugging the JIT on an embedded platform or cross build
> environment, libbfd may not be available, making it impossible to run
> bpf_jit_disasm natively.
>
> Add an option to emit a binary image of the JIT code to a file.  This
> file can then be disassembled off line.  Typical usage in this case
> might be (pasting mips64 dmesg output to cat command):
>
>     $ cat > jit.raw
>     $ bpf_jit_disasm -f jit.raw -O jit.bin
>     $ mips64-linux-gnu-objdump -D -b binary -m mips:isa64r2 -EB jit.bin
>
> Signed-off-by: David Daney <david.daney@cavium•com>

Seems good, we could at some point also add an -I jit.bin option
if needed for offline analysis/comparison instead of using -f
plain text.

Thanks!

Acked-by: Daniel Borkmann <daniel@iogearbox•net>

  reply	other threads:[~2017-04-11 21:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 21:30 [PATCH] tools: bpf_jit_disasm: Add option to dump JIT image to a file David Daney
2017-04-11 21:54 ` Daniel Borkmann [this message]
2017-04-11 23:11   ` David Daney
2017-04-13 17:04 ` David Miller

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=58ED508B.9010005@iogearbox.net \
    --to=daniel@iogearbox$(echo .)net \
    --cc=ast@kernel$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=david.daney@cavium$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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