No description
Find a file
Tony Ambardar 1245008122 libbpf: Fix native endian assumption when parsing BTF
Code in btf__parse_raw() fails to detect raw BTF of non-native endianness
and assumes it must be ELF data, which then fails to parse as ELF and
yields a misleading error message:

  root:/# bpftool btf dump file /sys/kernel/btf/vmlinux
  libbpf: failed to get EHDR from /sys/kernel/btf/vmlinux

For example, this could occur after cross-compiling a BTF-enabled kernel
for a target with non-native endianness, which is currently unsupported.

Check for correct endianness and emit a clearer error message:

  root:/# bpftool btf dump file /sys/kernel/btf/vmlinux
  libbpf: non-native BTF endianness is not supported

Fixes: 94a1fedd63 ("libbpf: Add btf__parse_raw() and generic btf__parse() APIs")
Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/90f81508ecc57bc0da318e0fe0f45cfe49b17ea7.1600417359.git.Tony.Ambardar@gmail.com
2020-09-21 21:50:49 +02:00
arch
block
certs
crypto
Documentation Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2020-09-15 19:26:21 -07:00
drivers net: lantiq: Disable IRQs only if NAPI gets scheduled 2020-09-14 14:53:15 -07:00
fs
include bpf: Prevent .BTF section elimination 2020-09-21 21:50:44 +02:00
init
ipc
kernel bpf: Fix sysfs export of empty BTF section 2020-09-21 21:50:24 +02:00
lib
LICENSES
mm
net xsk: Do not discard packet when NETDEV_TX_BUSY 2020-09-16 23:36:58 +02:00
samples
scripts
security
sound
tools libbpf: Fix native endian assumption when parsing BTF 2020-09-21 21:50:49 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS ibmvnic: update MAINTAINERS 2020-09-15 13:27:28 -07:00
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.