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: <OF554BAA9F.77CBC8B6-ONC1257991.00272C08-C1257991.0027CE20@bdpnet.dk>
Date:	Thu, 26 Jan 2012 08:14:46 +0100
From:	Rune Magnussen <rum@...kdata.dk>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [BISECTED] Linux 3.2: Networking out of LAN does not work

Eric Dumazet <eric.dumazet@...il.com> 
Sendt af: netdev-owner@...r.kernel.org
25-01-2012 12:06
58efa841-5316-9749-1633-85629e363385

Til
Rune Magnussen <rum@...kdata.dk>, David Miller <davem@...emloft.net>
cc
netdev@...r.kernel.org, Mihai Maruseac <mihai.maruseac@...il.com>
Emne
Re: [BISECTED] Linux 3.2: Networking out of LAN does not work







> OK please test the following patch.

> [PATCH] net: use index hash for /proc/net/dev

> Commit f04565ddf52e (dev: use name hash for dev_seq_ops) added a
> regression for legacy apps expecting to find devices in a particular
> order.

> Instead of using name hash, we can use dev_index_head hash, based on
> device index, to not change device ordering.

> Name hash order is not particularly useful, while index ordering is
> meaningful on machines where no more than 256 devices are ever created.

> "cat /proc/net/dev" and "ip link" will output devices in same order.

> Reported-by: Rune Magnussen <rum@...kdata.dk>
> Bisected-by: Rune Magnussen <rum@...kdata.dk>
> Cc: Mihai Maruseac <mihai.maruseac@...il.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
> ---
> net/core/dev.c |    4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 115dee1..c58dba3 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -4052,9 +4052,9 @@ static inline struct net_device 
*dev_from_same_bucket(struct seq_file *seq)
> 
>                bucket = get_bucket(state->pos);
>                offset = get_offset(state->pos);
> -              h = &net->dev_name_head[bucket];
> +              h = dev_index_hash(net, bucket);
>                count = 0;
> -              hlist_for_each_entry_rcu(dev, p, h, name_hlist) {
> +              hlist_for_each_entry_rcu(dev, p, h, index_hlist) {
>                                if (count++ == offset) {
>                                                state->pos = 
set_bucket_offset(bucket, count);
>                                                return dev;
>

The patch works for me. I applied it on top of v3.2.1 and it fixed my 
problem.
I have not tested it on other computers yet.

Greetings Rune


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