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: <YOXGAHExKlDHjAvG@krava>
Date:   Wed, 7 Jul 2021 17:19:28 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Jiri Olsa <jolsa@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andriin@...com>,
        "Steven Rostedt (VMware)" <rostedt@...dmis.org>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...omium.org>, Daniel Xu <dxu@...uu.xyz>,
        Viktor Malik <vmalik@...hat.com>
Subject: Re: [RFCv3 00/19] x86/ftrace/bpf: Add batch support for
 direct/tracing attach

On Tue, Jul 06, 2021 at 01:26:46PM -0700, Andrii Nakryiko wrote:

SNIP

> > > >
> > > > It's a 10x speed up. And a good chunk of those 2.7 seconds is in some
> > > > preparatory steps not related to fentry/fexit stuff.
> > > >
> > > > It's not exactly apples-to-apples, though, because the limitations you
> > > > have right now prevents attaching both fentry and fexit programs to
> > > > the same set of kernel functions. This makes it pretty useless for a
> > >
> > > hum, you could do link_update with fexit program on the link fd,
> > > like in the selftest, right?
> >
> > Hm... I didn't realize we can attach two different prog FDs to the
> > same link, honestly (and was too lazy to look through selftests
> > again). I can try that later. But it's actually quite a
> > counter-intuitive API (I honestly assumed that link_update can be used
> > to add more BTF IDs, but not change prog_fd). Previously bpf_link was
> > always associated with single BPF prog FD. It would be good to keep
> > that property in the final version, but we can get back to that later.
> 
> Ok, I'm back from PTO and as a warm-up did a two-line change to make
> retsnoop work end-to-end using this bpf_link_update() approach. See
> [0]. I still think it's a completely confusing API to do
> bpf_link_update() to have both fexit and fentry, but it worked for
> this experiment.

we need the same set of functions, and we have 'fd' representing
that ;-) but that could hopefully go away with the new approach

> 
> BTW, adding ~900 fexit attachments is barely noticeable, which is
> great, means that attachment is instantaneous.

right I see similar not noticable time in bpftrace as well
thanks for testing that,

jirka

> 
> real    0m2.739s
> user    0m0.351s
> sys     0m2.370s
> 
>   [0] https://github.com/anakryiko/retsnoop/commit/c915d729d6e98f83601e432e61cb1bdf476ceefb
> 

SNIP

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ