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]
Date:	Mon, 28 Jan 2013 15:36:01 +0800
From:	Cong Wang <amwang@...hat.com>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch net-next] pktgen: support net namespace

On Sun, 2013-01-27 at 22:52 -0800, Eric W. Biederman wrote:
> Cong Wang <amwang@...hat.com> writes:
> 
> > From: Cong Wang <amwang@...hat.com>
> >
> > This patch add net namespace to pktgen, so that
> > we can use pktgen in different namespaces.
> 
> Skimming through this looks like a reasonable patch.
> 
> I am not a fan of the number of threads, but that has nothing to do with
> correctness, and would certainly require a large change in logic to keep
> the number of threads down, which might not be a good idea.

Yeah, I noticed we would have nr_ns*nr_cpu threads after this patch,
unfortunately this is not easy to solve due to the interface of pktgen
by design.

> 
> 
> One small nit below.
...
> >  
> > -	pg_proc_dir = proc_mkdir(PG_PROC_DIR, init_net.proc_net);
> > -	if (!pg_proc_dir)
> > -		return -ENODEV;
> > +	pn->net = net;
> > +	if (!pn->proc_dir) {
>         ^^^^^^^^^^^^^^^^^^^^
> 
> This test is pointless.  pn->proc_dir is allocated with kzalloc so it
> will be initially NULL and pg_net_init will be called exactly once
> per network namespace so pn->proc_dir will always be NULL here. 
> 

Alright... will remove it.

Thanks!


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