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:	Fri, 16 May 2014 16:20:35 +0100
From:	Thomas Graf <tgraf@...g.ch>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Ben Greear <greearb@...delatech.com>, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] pktgen: Add NOINIT option to leave packet data
 uninitialized

On 05/16/14 at 08:08am, Eric Dumazet wrote:
> On Fri, 2014-05-16 at 15:50 +0100, Thomas Graf wrote:
> > On 05/16/14 at 07:23am, Eric Dumazet wrote:
> > > pktgen has already a way to send fragments which are not memset for
> > > every packet. We share a 'zero' page for that.
> > > 
> > > So only headers need to be really built for each packet.
> > 
> > Right, F_NOINIT is exclusively for cases where a linear buffer is
> > desired. I don't fully understand the argument of exposing kernel
> > memory as root considering the presence of /dev/mem though.
> > 
> > That said, I understand that this is a special case and that the
> > objective is reachable with non linear skbs already so I'm fine
> > with ignoring this patch and have it linger outside of the tree for
> > whoever has use for it.
> 
> Note that if you really want to save cpu cycles, you might simply avoid
> kfree_skb()/alloc_skb() pair, and reuse the previous skb.
> 
> Yes, pktgen can vary the skb->len, but this doesn't mean we can
> allocate/reserve a big skb->head. Then the cost of initial memset() for
> this skb is peanuts.
> 
> Synch with Jesper because he is trying to save the atomic on skb->users.

I'm aware of the work and I agree. That is perfectly fine if the
produced skbs do not get enqueued and modified. Otherwise the clone
and COW will undo the gain again. I need pktgen to produce large,
linear skbs with a unique flow for each individual packet. Hence this
optimization ;-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ