From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Andrii Nakryiko <andriin@fb.com>
Cc: bpf <bpf@vger.kernel.org>, Networking <netdev@vger.kernel.org>,
Alexei Starovoitov <ast@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Kernel Team <kernel-team@fb.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: [RESEND][PATCH v3 bpf-next] btf: expose BTF info through sysfs
Date: Mon, 19 Aug 2019 17:56:21 +0200 [thread overview]
Message-ID: <3F6DFBAE-ECA5-4E06-B9A0-4D6868FD0B13@linux.ibm.com> (raw)
In-Reply-To: <20190812183947.130889-1-andriin@fb.com>
> Am 12.08.2019 um 20:39 schrieb Andrii Nakryiko <andriin@fb.com>:
>
> @@ -92,23 +92,34 @@ vmlinux_link()
> }
>
> # generate .BTF typeinfo from DWARF debuginfo
> +# ${1} - vmlinux image
> +# ${2} - file to dump raw BTF data into
> gen_btf()
> {
> - local pahole_ver;
> + local pahole_ver
> + local bin_arch
>
> if ! [ -x "$(command -v ${PAHOLE})" ]; then
> info "BTF" "${1}: pahole (${PAHOLE}) is not available"
> - return 0
> + return 1
> fi
>
> pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/')
> if [ "${pahole_ver}" -lt "113" ]; then
> info "BTF" "${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13"
> - return 0
> + return 1
> fi
>
> - info "BTF" ${1}
> + info "BTF" ${2}
> + vmlinux_link ${1}
> LLVM_OBJCOPY=${OBJCOPY} ${PAHOLE} -J ${1}
> +
> + # dump .BTF section into raw binary file to link with final vmlinux
> + bin_arch=$(${OBJDUMP} -f ${1} | grep architecture | \
> + cut -d, -f1 | cut -d' ' -f2)
> + ${OBJCOPY} --dump-section .BTF=.btf.kernel.bin ${1} 2>/dev/null
> + ${OBJCOPY} -I binary -O ${CONFIG_OUTPUT_FORMAT} -B ${bin_arch} \
> + --rename-section .data=.BTF .btf.kernel.bin ${2}
> }
CONFIG_OUTPUT_FORMAT appears to be x86-only; enabling
CONFIG_DEBUG_INFO_BTF on s390 caused a build failure. I now have a quick
and dirty local patch, which adds CONFIG_OUTPUT_FORMAT to s390 and fixes
the issue for me, but I suspect that CONFIG_DEBUG_INFO_BTF might be
broken on other arches as well.
prev parent reply other threads:[~2019-08-19 15:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 18:39 [RESEND][PATCH v3 bpf-next] btf: expose BTF info through sysfs Andrii Nakryiko
2019-08-13 14:20 ` Daniel Borkmann
2019-08-13 18:08 ` Andrii Nakryiko
2019-08-13 18:45 ` Arnaldo Carvalho de Melo
2019-08-19 15:56 ` Ilya Leoshkevich [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=3F6DFBAE-ECA5-4E06-B9A0-4D6868FD0B13@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kernel-team@fb.com \
--cc=netdev@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