Re: [PATCH net-next 30/33] xdp: clear grow memory in bpf_xdp_adjust_tail()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 26 Apr 2020 22:26:54 -0700
John Fastabend <john.fastabend@xxxxxxxxx> 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@xxxxxxxxxx>
> > ---  
> 
> 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux