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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200428165032.2c2dca47@carbon>
Date:   Tue, 28 Apr 2020 16:50:32 +0200
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     John Fastabend <john.fastabend@...il.com>
Cc:     sameehj@...zon.com, netdev@...r.kernel.org, bpf@...r.kernel.org,
        zorik@...zon.com, akiyano@...zon.com, gtzalik@...zon.com,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Alexander Duyck <alexander.duyck@...il.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        David Ahern <dsahern@...il.com>,
        Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        Ilias Apalodimas <ilias.apalodimas@...aro.org>,
        Lorenzo Bianconi <lorenzo@...nel.org>,
        Saeed Mahameed <saeedm@...lanox.com>,
        steffen.klassert@...unet.com, brouer@...hat.com
Subject: Re: [PATCH net-next 30/33] xdp: clear grow memory in
 bpf_xdp_adjust_tail()

On Sun, 26 Apr 2020 22:26:54 -0700
John Fastabend <john.fastabend@...il.com> wrote:

> Jesper Dangaard Brouer wrote:
> > Clearing memory of tail when grow happens, because it is too easy
> > to write a XDP_PASS program that extend the tail, which expose
> > this memory to users that can run tcpdump.
> > 
> > Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> > ---  
> 
> Hi Jesper, Thanks for the series any idea what the cost of doing
> this is? If you have some data I would be curious to know a
> baseline measurment, a grow with memset, then a grow with memset.
> I'm guess this can be relatively expensive?

I have a "time_bench" memset kernel module[1] that I use to understand
that is the best-case/minimum overhead with a hot-cache.  But in this
case, the memory will be in L3-cache (at least on Intel with DDIO).

For legitimate use-cases, the BPF-programmer will write her tail data
into this memory area anyhow.  Thus, I'm not convinced this will be a
performance issue for real use-cases.  When we have a real use-case that
need this tail extend and does XDP_TX, I say we can revisit this.


[1] https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/lib/time_bench_memset.c
-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ