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: <1400252935.7973.176.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Fri, 16 May 2014 08:08:55 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Thomas Graf <tgraf@...g.ch>
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 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.



--
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