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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFUWxkbBjgSgwE3t@krava>
Date:   Fri, 19 Mar 2021 22:25:26 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andrii Nakryiko <andrii@...nel.org>
Cc:     bpf@...r.kernel.org, netdev@...r.kernel.org, ast@...com,
        daniel@...earbox.net, kernel-team@...com
Subject: Re: [PATCH bpf-next 2/3] libbpf: skip BTF fixup if object file has
 no BTF

On Fri, Mar 19, 2021 at 01:59:08PM -0700, Andrii Nakryiko wrote:
> Skip BTF fixup step when input object file is missing BTF altogether.
> 
> Reported-by: Jiri Olsa <jolsa@...hat.com>
> Fixes: 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext support")
> Signed-off-by: Andrii Nakryiko <andrii@...nel.org>

Tested-by: Jiri Olsa <jolsa@...hat.com>

thanks for the quick fix,
jirka

> ---
>  tools/lib/bpf/linker.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
> index b4fff912dce2..5e0aa2f2c0ca 100644
> --- a/tools/lib/bpf/linker.c
> +++ b/tools/lib/bpf/linker.c
> @@ -1313,6 +1313,9 @@ static int linker_fixup_btf(struct src_obj *obj)
>  	struct src_sec *sec;
>  	int i, j, n, m;
>  
> +	if (!obj->btf)
> +		return 0;
> +
>  	n = btf__get_nr_types(obj->btf);
>  	for (i = 1; i <= n; i++) {
>  		struct btf_var_secinfo *vi;
> -- 
> 2.30.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ