lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 24 Aug 2022 22:05:07 +0800
From:   "chentao.ct" <chentao.kernel@...ux.alibaba.com>
To:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>
Cc:     KP Singh <kpsingh@...nel.org>, netdev@...r.kernel.org,
        bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
        "chentao.ct" <chentao.kernel@...ux.alibaba.com>
Subject: [PATCH] libbpf: Support raw btf placed in the default path

Now only elf btf can be placed in the default path, raw btf should
also can be there.

Signed-off-by: chentao.ct <chentao.kernel@...ux.alibaba.com>
---
 tools/lib/bpf/btf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index bb1e06e..b22b5b3 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -4661,7 +4661,7 @@ struct btf *btf__load_vmlinux_btf(void)
 	} locations[] = {
 		/* try canonical vmlinux BTF through sysfs first */
 		{ "/sys/kernel/btf/vmlinux", true /* raw BTF */ },
-		/* fall back to trying to find vmlinux ELF on disk otherwise */
+		/* fall back to trying to find vmlinux RAW/ELF on disk otherwise */
 		{ "/boot/vmlinux-%1$s" },
 		{ "/lib/modules/%1$s/vmlinux-%1$s" },
 		{ "/lib/modules/%1$s/build/vmlinux" },
@@ -4686,7 +4686,7 @@ struct btf *btf__load_vmlinux_btf(void)
 		if (locations[i].raw_btf)
 			btf = btf__parse_raw(path);
 		else
-			btf = btf__parse_elf(path, NULL);
+			btf = btf__parse(path, NULL);
 		err = libbpf_get_error(btf);
 		pr_debug("loading kernel BTF '%s': %d\n", path, err);
 		if (err)
-- 
2.2.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ