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: <20210112024545.spoxpownh5dybffa@ast-mbp>
Date:   Mon, 11 Jan 2021 18:45:45 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Alan Maguire <alan.maguire@...cle.com>
Cc:     ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
        kafai@...com, songliubraving@...com, yhs@...com,
        john.fastabend@...il.com, kpsingh@...nel.org, rostedt@...dmis.org,
        mingo@...hat.com, haoluo@...gle.com, jolsa@...nel.org,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        bpf@...r.kernel.org, linux-kselftest@...r.kernel.org,
        shuah@...nel.org
Subject: Re: [RFC PATCH bpf-next 0/2] bpf, libbpf: share BTF data show
 functionality

On Mon, Jan 11, 2021 at 05:32:51PM +0000, Alan Maguire wrote:
> The BPF Type Format (BTF) can be used in conjunction with the helper
> bpf_snprintf_btf() to display kernel data with type information.
> 
> This series generalizes that support and shares it with libbpf so
> that libbpf can display typed data.  BTF display functionality is
> factored out of kernel/bpf/btf.c into kernel/bpf/btf_show_common.c,
> and that file is duplicated in tools/lib/bpf.  Similarly, common
> definitions and inline functions needed for this support are
> extracted into include/linux/btf_common.h and this header is again
> duplicated in tools/lib/bpf.

I think duplication will inevitable cause code to diverge.
Could you keep a single copy?
Take a look at kernel/bpf/disasm.[ch]
It compiled once for the kernel and once for bpftool.
So should be possible to do something similar for this case as well?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ