[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#996852: "Error: failed to load BTF from ./fat: Invalid argument"



Package: bpftool
Version: 5.14.12-1
Severity: minor
X-Debbugs-Cc: philipp@marek.priv.at

Using an absolute path, I get output:

    [/sys/kernel/btf]$ bpftool btf dump file $PWD/fat | head -2
    [85705] STRUCT 'fat_mount_options' size=48 vlen=27
            'fs_uid' type_id=506 bits_offset=0
    [/sys/kernel/btf]$ bpftool btf dump file $PWD/fat | wc
        685    2274   25834

Using a relative path, "bpftool btf dump" doesn't work:

    [/sys/kernel/btf]$ bpftool btf dump file ./fat
    Error: failed to load BTF from ./fat: Invalid argument


"strace" shows that with a full path "bpftool" reads
"/sys/kernel/btf/vmlinux", but doesn't even try to find that in the
second case.

Dumping "vmlinux" works with a relative path,
I guess because it's self-contained.


Copying "fat" and "vmlinux" to /tmp/ and using a relative or absolute
path works for "vmlinux", but not "fat".

I think it would be great if a relative path would just be translated
to absolute when needed, or that required files would be searched via
some path list (configurable via environment, like $PATH or
$LD_LIBRARY_PATH etc.?).


Thanks a lot!


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.14.0-2-amd64 (SMP w/8 CPU threads)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8), LANGUAGE=de_AT:de
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages bpftool depends on:
ii  libc6    2.32-4
ii  libcap2  1:2.44-1
ii  libelf1  0.185-2
ii  zlib1g   1:1.2.11.dfsg-2

bpftool recommends no packages.

bpftool suggests no packages.

-- no debconf information


Reply to: