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: <CAGVrzcZq=GEyBG47xphCi5EVDs64xjYkAZjLiefJkewVDb1jJQ@mail.gmail.com>
Date:	Thu, 15 May 2014 09:45:04 -0700
From:	Florian Fainelli <f.fainelli@...il.com>
To:	David Laight <David.Laight@...lab.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH net-next v5 2/2] net: systemport: pad packets to a minimum
 of 68 bytes

2014-05-15 2:28 GMT-07:00 David Laight <David.Laight@...lab.com>:
> From: Florian Fainelli
>> With packets having Broadcom tags, the 4-bytes tag is first stripped
>> off the packet, and the packet length is then checked, so we need to
>> make sure that the packet length with FCS is at least 64 bytes.
>
> Ah - finally an explanation!
>
> I think you should only do that when the Broadcom Tags are enabled.

I thought about that, and could not make my mind about doing something like:

min_pad_len = ETH_ZLEN;
if (netdev_uses_brcm_tag(dev))
           min_pad_len += ENET_BRCM_TAG_LEN;

or doing the padding unconditionally like this.

The switch driver has been submitted for review on netdev, and that
includes the netdev_uses_brcm_tag() helper function to tell us whether
Broadcom tags are enabled or not on that particular interface.

One of the argument that I have against that, is that it makes our
driver a little more special, and that would make it the only one (for
now at least). I sort of wanted the fix to be independent from
eventually other non-DSA switch implementations.
-- 
Florian
--
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