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: <6d54c372-86bc-b28f-00b0-c22e46215116@gmail.com>
Date:   Mon, 21 Dec 2020 13:49:03 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     netdev@...r.kernel.org, andrew@...n.ch,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Murali Krishna Policharla <murali.policharla@...adcom.com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        "open list:BROADCOM SYSTEMPORT ETHERNET DRIVER" 
        <bcm-kernel-feedback-list@...adcom.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] net: systemport: set dev->max_mtu to
 UMAC_MAX_MTU_SIZE



On 12/18/2020 1:17 PM, Florian Fainelli wrote:
>>>>>>> SYSTEMPORT Lite does not actually validate the frame length, so setting
>>>>>>> a maximum number to the buffer size we allocate could work, but I don't
>>>>>>> see a reason to differentiate the two types of MACs here.
>>>>>>
>>>>>> And if the Lite doesn't validate the frame length, then shouldn't it
>>>>>> report a max_mtu equal to the max_mtu of the attached DSA switch, plus
>>>>>> the Broadcom tag length? Doesn't the b53 driver support jumbo frames?
>>>>>
>>>>> And how would I do that without create a horrible layering violation in
>>>>> either the systemport driver or DSA? Yes the b53 driver supports jumbo
>>>>> frames.
>>>>
>>>> Sorry, I don't understand where is the layering violation (maybe it doesn't
>>>> help me either that I'm not familiar with Broadcom architectures).
>>>>
>>>> Is the SYSTEMPORT Lite always used as a DSA master, or could it also be
>>>> used standalone? What would be the issue with hardcoding a max_mtu value
>>>> which is large enough for b53 to use jumbo frames?
>>>
>>> SYSTEMPORT Lite is always used as a DSA master AFAICT given its GMII
>>> Integration Block (GIB) was specifically designed with another MAC and
>>> particularly that of a switch on the other side.
>>>
>>> The layering violation I am concerned with is that we do not know ahead
>>> of time which b53 switch we are going to be interfaced with, and they
>>> have various limitations on the sizes they support. Right now b53 only
>>> concerns itself with returning JMS_MAX_SIZE, but I am fairly positive
>>> this needs fixing given the existing switches supported by the driver.
>>
>> Maybe we don't need to over-engineer this. As long as you report a large
>> enough max_mtu in the SYSTEMPORT Lite driver to accomodate for all
>> possible revisions of embedded switches, and the max_mtu of the switch
>> itself is still accurate and representative of the switch revision limits,
>> I think that's good enough.
> 
> I suppose that is fair, v2 coming, thanks!

I was going to issue a v2 for this patch, but given that we don't
allocate buffers larger than 2KiB and there is really no need to
implement ndo_change_mtu(), is there really a point not to use
UMAC_MAX_MTU_SIZE for both variants of the SYSTEMPORT MAC?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ