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: <20070911114644.00e2eeee@gamma.echo-net.net>
Date:	Tue, 11 Sep 2007 11:46:44 +0200
From:	Pierre-Yves Ritschard <pyritschard@...o.fr>
To:	<netdev@...r.kernel.org>
Subject: Re: [PATCH] sky2.c: length mismatch errors with vlan frames

> My bad, I hadn't tested VLAN acceleration code in a while so must
> have broken it when more error checking was added.
> 
I did check without vlans and the messages don't appear so it seems
to be working correctly. When vlans are enabled I do receive a few
frames that have the length difference but not the GMR_FS_VLAN bit
set, since there's high traffic on the interfaces it might be a
firmware bug that is triggered sometimes (running with my patch the
occurences are about 10/hour).

> Your fix looks right. Could you format properly for kernel patch
> inclusion. Also, instead of hard coding 4, please use VLAN_HLEN.

Since the snippet became a patch, here goes:

Signed-off-by: Pierre-Yves Ritschard <pyr@...otnik.org>

--- linux-2.6.22.6/drivers/net/sky2.c.orig	2007-09-10
15:34:15.000000000 +0200 +++ linux-2.6.22.6/drivers/net/sky2.c
2007-09-11 11:38:54.000000000 +0200 @@ -2059,6 +2059,9 @@ static struct
sk_buff *sky2_receive(stru sky2->rx_next = (sky2->rx_next + 1) %
sky2->rx_pending; prefetch(sky2->rx_ring + sky2->rx_next);
 
+	if (status & GMR_FS_VLAN)
+		length += VLAN_HLEN;
+
 	if (status & GMR_FS_ANY_ERR)
 		goto error;
 
@@ -2081,6 +2084,8 @@ len_mismatch:
 	/* Truncation of overlength packets
 	   causes PHY length to not match MAC length */
 	++sky2->net_stats.rx_length_errors;
+	printk(KERN_INFO PFX "%s: rx length mismatch: length %d !=
%d\n",
+	       dev->name, length, status >> 16);
 
 error:
 	++sky2->net_stats.rx_errors;
-
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