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  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]
Date:   Thu, 18 Jun 2020 13:57:19 -0700
From:   John Fastabend <>
To:     Jiri Olsa <>, Alexei Starovoitov <>,
        Daniel Borkmann <>
        Song Liu <>, Yonghong Song <>,
        Martin KaFai Lau <>,
        David Miller <>,
        John Fastabend <>,
        Wenbo Zhang <>,
        KP Singh <>,
        Andrii Nakryiko <>,
        Brendan Gregg <>,
        Florent Revest <>,
        Al Viro <>
Subject: RE: [PATCHv3 0/9] bpf: Add d_path helper

Jiri Olsa wrote:
> hi,
> adding d_path helper to return full path for 'path' object.
> I originally added and used 'file_path' helper, which did the same,
> but used 'struct file' object. Then realized that file_path is just
> a wrapper for d_path, so we'd cover more calling sites if we add
> d_path helper and allowed resolving BTF object within another object,
> so we could call d_path also with file pointer, like:
>   bpf_d_path(&file->f_path, buf, size);
> This feature is mainly to be able to add dpath (filepath originally)
> function to bpftrace:
>   # bpftrace -e 'kfunc:vfs_open { printf("%s\n", dpath(args->path)); }'
> v3 changes:
>   - changed tests to use seleton and vmlinux.h [Andrii]
>   - refactored to define ID lists in C object [Andrii]
>   - changed btf_struct_access for nested ID check,
>     instead of adding new function for that [Andrii]
>   - fail build with CONFIG_DEBUG_INFO_BTF if libelf is not detected [Andrii]
> Also available at:
>   bpf/d_path
> thanks,
> jirka

Hi Jira, Apologize for waiting until v3 to look at this series, but a
couple general requests as I review this.

In the cover letter can we get some more details. The above is really
terse/cryptic in my opinion. The bpftrace example gives good motiviation,
but nothing above mentions a new .BTF_ids section and the flow to create
and use this section.

Also if we add a BTF_ids  section adding documentation in btf.rst should
happen as well. I would like to see something in the ELF File Format
Interface section and BTF Generation sections.

I'm not going to nitpick if its in this series or a stand-alone patch
but do want to see it. So far the Documentation on BTF is fairly
good and I want to avoid these kind of gaps.


Powered by blists - more mailing lists