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-next>] [day] [month] [year] [list]
Date:   Fri,  7 Dec 2018 18:43:40 +0100
From:   Marek Vasut <marex@...x.de>
To:     netdev@...r.kernel.org
Cc:     f.fainelli@...il.com, vivien.didelot@...oirfairelinux.com,
        andrew@...n.ch, Woojung.Huh@...rochip.com,
        UNGLinuxDriver@...rochip.com, Marek Vasut <marex@...x.de>,
        Woojung Huh <woojung.huh@...rochip.com>,
        "David S . Miller" <davem@...emloft.net>,
        Tristram Ha <Tristram.Ha@...rochip.com>
Subject: [PATCH] net: dsa: ksz: Increase the tag alignment

Make sure to cater even for network packets with VLAN tags in them,
increase the minimal packets size to account for those.

Signed-off-by: Marek Vasut <marex@...x.de>
Cc: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc: Woojung Huh <woojung.huh@...rochip.com>
Cc: David S. Miller <davem@...emloft.net>
Cc: Tristram Ha <Tristram.Ha@...rochip.com>
---
 net/dsa/tag_ksz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c
index 96411f70ab9f4..cad4406d9d4c2 100644
--- a/net/dsa/tag_ksz.c
+++ b/net/dsa/tag_ksz.c
@@ -39,7 +39,7 @@ static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev)
 	int padlen;
 	u8 *tag;
 
-	padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len;
+	padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb->len;
 
 	if (skb_tailroom(skb) >= padlen + KSZ_INGRESS_TAG_LEN) {
 		/* Let dsa_slave_xmit() free skb */
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ