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] [day] [month] [year] [list]
Message-ID: <34548935cee31721946bf7c1c772f71720e0683c@linux.dev>
Date: Fri, 16 May 2025 14:24:57 +0000
From: "Jiayuan Chen" <jiayuan.chen@...ux.dev>
To: "Quentin Monnet" <qmo@...nel.org>, bpf@...r.kernel.org
Cc: "Alexei Starovoitov" <ast@...nel.org>, "Daniel Borkmann"
 <daniel@...earbox.net>, "Andrii Nakryiko" <andrii@...nel.org>, "Martin
 KaFai Lau" <martin.lau@...ux.dev>, "Eduard Zingerman"
 <eddyz87@...il.com>, "Song Liu" <song@...nel.org>, "Yonghong Song"
 <yonghong.song@...ux.dev>, "John Fastabend" <john.fastabend@...il.com>,
 "KP Singh" <kpsingh@...nel.org>, "Stanislav Fomichev" <sdf@...ichev.me>,
 "Hao Luo" <haoluo@...gle.com>, "Jiri Olsa" <jolsa@...nel.org>, "Mykyta
 Yatsenko" <yatsenko@...a.com>, "Daniel Xu" <dxu@...uu.xyz>, "Tao Chen"
 <chen.dylane@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next v3] bpftool: Add support for custom BTF path in
 prog load/loadall

May 16, 2025 at 18:18, "Quentin Monnet" <qmo@...nel.org> wrote:

> 
> 2025-05-16 11:23 UTC+0800 ~ Jiayuan Chen <jiayuan.chen@...ux.dev>
> 
> > 
> > This patch exposes the btf_custom_path feature to bpftool, allowing users
> > 
> >  to specify a custom BTF file when loading BPF programs using prog load or
> > 
> >  prog loadall commands.
> > 
> >  
> > 
> >  The argument 'btf_custom_path' in libbpf is used for those kernels that
> > 
> >  don't have CONFIG_DEBUG_INFO_BTF enabled but still want to perform CO-RE
> > 
> >  relocations.
> > 
> >  
> > 
> >  Suggested-by: Quentin Monnet <qmo@...nel.org>
> > 
> >  Signed-off-by: Jiayuan Chen <jiayuan.chen@...ux.dev>
> > 
> >  
> > 
> >  ---
> > 
> >  V2 -> V3: Optimized document grammar and some prompts
> > 
> >  https://lore.kernel.org/bpf/20250515065018.240188-1-jiayuan.chen@linux.dev/
> > 
> >  V1 -> V2: Added bash completion and documentation
> > 
> >  https://lore.kernel.org/bpf/20250513035853.75820-1-jiayuan.chen@linux.dev/
> > 
> >  ---
> > 
> >  tools/bpf/bpftool/Documentation/bpftool-prog.rst | 8 +++++++-
> > 
> >  tools/bpf/bpftool/bash-completion/bpftool | 4 ++--
> > 
> >  tools/bpf/bpftool/prog.c | 12 +++++++++++-
> > 
> >  3 files changed, 20 insertions(+), 4 deletions(-)
> > 
> >  
> > 
> >  diff --git a/tools/bpf/bpftool/Documentation/bpftool-prog.rst b/tools/bpf/bpftool/Documentation/bpftool-prog.rst
> > 
> >  index d6304e01afe0..4dce43e8e8a3 100644
> > 
> >  --- a/tools/bpf/bpftool/Documentation/bpftool-prog.rst
> > 
> >  +++ b/tools/bpf/bpftool/Documentation/bpftool-prog.rst
> > 
> >  @@ -127,7 +127,7 @@ bpftool prog pin *PROG* *FILE*
> > 
> >  Note: *FILE* must be located in *bpffs* mount. It must not contain a dot
> > 
> >  character ('.'), which is reserved for future extensions of *bpffs*.
> > 
> >  
> > 
> >  -bpftool prog { load | loadall } *OBJ* *PATH* [type *TYPE*] [map { idx *IDX* | name *NAME* } *MAP*] [{ offload_dev | xdpmeta_dev } *NAME*] [pinmaps *MAP_DIR*] [autoattach]
> > 
> >  +bpftool prog { load | loadall } *OBJ* *PATH* [type *TYPE*] [map { idx *IDX* | name *NAME* } *MAP*] [{ offload_dev | xdpmeta_dev } *NAME*] [pinmaps *MAP_DIR*] [autoattach] [kernel_btf *BTF_FILE*]
> > 
> 
> Woops, I just realised we also need to add kernel_btf to the command
> 
> summary at the top of the document (line 34), sorry for missing it

It was my mistake to miss that part. I'll prepare an updated version soon. :)

Thanks.
> during the previous pass. Please add it, and mark v4 as:
> 
>  Reviewed-by: Quentin Monnet <qmo@...nel.org>
> 
> Thanks!
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ