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: <20180419110845.4da4769a@redhat.com>
Date:   Thu, 19 Apr 2018 11:08:45 +0200
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     Sebastiano Miano <sebastiano.miano@...ito.it>
Cc:     netdev@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
        mingo@...hat.com, rostedt@...dmis.org, fulvio.risso@...ito.it,
        brouer@...hat.com
Subject: Re: [bpf-next PATCH 1/3] bpf: add id to map tracepoint

On Wed, 18 Apr 2018 17:30:48 +0200
Sebastiano Miano <sebastiano.miano@...ito.it> wrote:

> This patch adds the map id to the bpf tracepoints
> that can be used when monitoring or inspecting map
> related functions.
> 
> Signed-off-by: Sebastiano Miano <sebastiano.miano@...ito.it>
> Suggested-by: Jesper Dangaard Brouer <brouer@...hat.com>

Acked-by: Jesper Dangaard Brouer <brouer@...hat.com>

Thanks you for doing this.  I've needed this before when
troubleshooting my XDP programs (specifically xdp_ddos01_blacklist[1]).

E.g. when I want to verify that my tools are doing the right thing, I
can now find the XDP prog id via 'ip link' or bpftool, and list the map
IDs used by the prog tool (via bpftool), and now use perf to record map
changes, which now have the needed IDs I can filter on.  Before, I
could not tell the difference if the program was updating the correct
map (which were a mistake I ran into).

Perf record even support supplying filters on the cmdline, like:

 perf record -e bpf:bpf_map_* -a --filter 'id == 2 || id == 1' sleep 100

And yes, doing filtering this way is slow, compared to doing it via a
bpf_prog inside the kernel, which Sebastiano already provide a sample
on howto do.  But I just needed a way to find the bug in my program,
not any high speed usage.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

[1] https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/samples/bpf/xdp_ddos01_blacklist_cmdline.c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ