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]
Date:   Mon, 2 Mar 2020 20:59:24 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc:     Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Wenbo Zhang <ethercflow@...il.com>,
        Kernel Team <kernel-team@...com>
Subject: Re: [PATCH bpf-next 0/3] Improve raw tracepoint BTF types preservation

On Mon, Mar 2, 2020 at 8:10 PM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Mon, Mar 2, 2020 at 4:59 PM Alexei Starovoitov
> <alexei.starovoitov@...il.com> wrote:
> >
> > On Sun, Mar 01, 2020 at 12:10:42AM -0800, Andrii Nakryiko wrote:
> > > Fix issue with not preserving btf_trace_##call structs when compiled under
> > > Clang. Additionally, capture raw tracepoint arguments in raw_tp_##call
> > > structs, directly usable from BPF programs. Convert runqslower to use those
> > > for proof of concept and to simplify code further.
> >
> > Not only folks compile kernel with clang they use the latest BPF/BTF features
> > with it. This is very nice to see!
> > I've applied 1st patch to make clang compiled kernel emit proper BTF.
> >
> > As far as patch 2 I'm not sure about 'raw_tp_' prefix. tp_btf type of progs can
> > use the same structs. So I think there could be a better name. Also bpftool can
> > generate them as well while emitting vmlinux.h. I think that will avoid adding
> > few kilobytes to vmlinux BTF that kernel isn't going to use atm.
>
> Fair enough, I'll follow up with bpftool changes to generate such
> structs. I'm thinking to use tp_args_xxx name pattern, unless someone
> has a better idea :)

Bad news. BTF_KIND_FUNC_PROTOs don't capture argument names and having
something like:

struct tp_args_sched_switch {
    bool arg1;
    struct task_struct *arg2;
    struct task_struct *arg3;
};

doesn't seem like a good solution...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ