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] [day] [month] [year] [list]
Date:	Wed, 2 Jan 2008 08:16:54 +0200
From:	"Rami Rosen" <ramirose@...il.com>
To:	"David Miller" <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-2.6.25] [BRIDGE] Remove useless code in net/bridge/br_netfilter.c

Hi,
> It's a pointer dereference assignment,
Sorry, I was wrong here !

> What automated tool showed this as useless to you?
> Please correct it's logic so it doesn't mark real side effects like
> this as superfluous.

I am not using any automated tool, only my eyes. And I
missed the intention here. It could be implemnted differently
but since it not marked as superfluous anywhere I suggest
to leave it as it is.

Sorry,

Regards,
Rami Rosen





On Jan 2, 2008 7:20 AM, David Miller <davem@...emloft.net> wrote:
> From: "Rami Rosen" <ramirose@...il.com>
> Date: Tue, 1 Jan 2008 12:48:14 +0200
>
> > These following two commands in br_nf_forward_arp() achieve nothing and
> > should be removed; the d variable is not used later in this method:
> >
> >       ...
> >       struct net_device **d = (struct net_device **)(skb->cb);
> >       ...
> >       *d = (struct net_device *)in;
> >       ...
> >
> > Signed-off-by: Rami Rosen <ramirose@...il.com>
>
> It's a pointer dereference assignment, this last line has a
> side effect, therefore you can't remove it.
>
> The code is equivalent to:
>
> struct skb_bridge_info {
>         struct net_device *dev;
> };
>
>         struct skb_bridge_info *d;
>
>         d = (struct skb_bridge_info *) skb->cb;
>
>         d->dev = in;
>
> What automated tool showed this as useless to you?
>
> Please correct it's logic so it doesn't mark real side effects like
> this as superfluous.
>
> 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