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]
Date:	Wed, 14 Mar 2012 12:32:47 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	"Zou, Yi" <yi.zou@...el.com>
Cc:	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>
Subject: Re: [net 2/2] net: fix a bug of dropping FCoE frames when disabling
 tx ip checksum

On Wed, 14 Mar 2012 18:54:32 +0000
"Zou, Yi" <yi.zou@...el.com> wrote:

> > 
> > On Wed, 14 Mar 2012 00:01:58 -0700
> > Jeff Kirsher <jeffrey.t.kirsher@...el.com> wrote:
> > 
> > > From: Yi Zou <yi.zou@...el.com>
> > >
> > > Fix a bug when using 'ethtool -K ethx tx off' to turn off tx ip
> > checksum,
> > > FCoE CRC offload should not be impacte. The skb_checksum_help() is
> > needed
> > > only if it's not FCoE traffic for ip checksum, regardless of ethtool
> > toggling
> > > the tx ip checksum on or off.
> > >
> > > Signed-off-by: Yi Zou <yi.zou@...el.com>
> > > Tested-by: Ross Brattain <ross.b.brattain@...el.com>
> > > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> > > ---
> > >  net/core/dev.c |    3 +++
> > >  1 files changed, 3 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/net/core/dev.c b/net/core/dev.c
> > > index 6ca32f6..9e378009 100644
> > > --- a/net/core/dev.c
> > > +++ b/net/core/dev.c
> > > @@ -1913,6 +1913,9 @@ int skb_checksum_help(struct sk_buff *skb)
> > >  	__wsum csum;
> > >  	int ret = 0, offset;
> > >
> > > +	if (skb->protocol == htons(ETH_P_FCOE))
> > > +		goto out;
> > > +
> > >  	if (skb->ip_summed == CHECKSUM_COMPLETE)
> > >  		goto out_set_summed;
> > >
> > 
> > Shouldn't this be done in the offending driver rather than the core?
> Well, yes and no, the driver is already using NETIF_F_FCOE_CRC to indicate
> the FCoE CRC offload capability, and can_checksum_protocol() indicates that.
> The fcoe protocol stack then uses CHECKSUM_PARTIAL and NETIF_F_FCOE_CRC to
> pass through netdev w/o doing skb_checksum(), which is not captured here
> in dev_hard_start_xmit() as it looks at NETIF_F_ALL_CSUM only before calling
> skb_checksum_help().

But your change would break any code (if there is any) generating this
kind of packet and going through firewall, etc. For example a bridge or
router for FCOE packets.
--
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