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

Cong Wang <amwang@...hat.com> writes:

> From: Cong Wang <amwang@...hat.com>
>
> v2: remove a useless check
>
> This patch add net namespace to pktgen, so that
> we can use pktgen in different namespaces.
>
> Cc: Eric W. Biederman <ebiederm@...ssion.com>
> Cc: David S. Miller <davem@...emloft.net>
> Signed-off-by: Cong Wang <amwang@...hat.com>
>
> ---
>  net/core/pktgen.c |  123 +++++++++++++++++++++++++++++++++++------------------
>  1 files changed, 81 insertions(+), 42 deletions(-)

Skiming through this again I have spotted what looks like a pretty
major bug.  You are limiting yourself to one network device per network
namespace when the actual limit is one network device per thread.

I think you can just kill the dev member of pktgen_net and the two or
three lines of code that touch it.

> +static int pg_net_id __read_mostly;
> +
> +struct pktgen_net {
> +	struct net		*net;
> +	struct net_device	*dev;
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +	struct proc_dir_entry	*proc_dir;
>  };

Eric

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