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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 5 Nov 2021 08:36:15 +0000
From:   Volodymyr Mytnyk <volodymyr.mytnyk@...ision.eu>
To:     Guenter Roeck <linux@...ck-us.net>
CC:     "kuba@...nel.org" <kuba@...nel.org>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "mickeyr@...vell.com" <mickeyr@...vell.com>,
        Serhiy Pshyk <serhiy.pshyk@...ision.eu>,
        Taras Chornyi <taras.chornyi@...ision.eu>,
        Volodymyr Mytnyk <vmytnyk@...vell.com>,
        Vadym Kochan <vkochan@...vell.com>,
        Yevhen Orlov <yevhen.orlov@...ision.eu>,
        Taras Chornyi <tchornyi@...vell.com>,
        "David S. Miller" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v4] net: marvell: prestera: add firmware v4.0
 support

> 
> > From: Volodymyr Mytnyk <vmytnyk@...vell.com>
> > 
> > Add firmware (FW) version 4.0 support for Marvell Prestera
> > driver.
> > 
> > Major changes have been made to new v4.0 FW ABI to add support
> > of new features, introduce the stability of the FW ABI and ensure
> > better forward compatibility for the future driver vesrions.
> > 
> > Current v4.0 FW feature set support does not expect any changes
> > to ABI, as it was defined and tested through long period of time.
> > The ABI may be extended in case of new features, but it will not
> > break the backward compatibility.
> > 
> > ABI major changes done in v4.0:
> > - L1 ABI, where MAC and PHY API configuration are split.
> > - ACL has been split to low-level TCAM and Counters ABI
> >   to provide more HW ACL capabilities for future driver
> >   versions.
> > 
> > To support backward support, the addition compatibility layer is
> > required in the driver which will have two different codebase under
> > "if FW-VER elif FW-VER else" conditions that will be removed
> > in the future anyway, So, the idea was to break backward support
> > and focus on more stable FW instead of supporting old version
> > with very minimal and limited set of features/capabilities.
> > 
> > Improve FW msg validation:
> >  * Use __le64, __le32, __le16 types in msg to/from FW to
> >    catch endian mismatch by sparse.
> >  * Use BUILD_BUG_ON for structures sent/recv to/from FW.
> > 
> > Co-developed-by: Vadym Kochan <vkochan@...vell.com>
> > Signed-off-by: Vadym Kochan <vkochan@...vell.com>
> > Signed-off-by: Yevhen Orlov <yevhen.orlov@...ision.eu>
> > Signed-off-by: Taras Chornyi <tchornyi@...vell.com>
> > Signed-off-by: Volodymyr Mytnyk <vmytnyk@...vell.com>
> 
> Compiling this file on m68k results in:
> 
> In file included from <command-line>:
> In function 'prestera_hw_build_tests',
>     inlined from 'prestera_hw_switch_init' at drivers/net/ethernet/marvell/prestera/prestera_hw.c:788:2:
> include/linux/compiler_types.h:317:45: error: call to '__compiletime_assert_351' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct prestera_msg_switch_attr_req) != 16
> 
> The size of struct prestera_msg_switch_attr_req is not well defined.
> 
> struct prestera_msg_switch_attr_req {
>         struct prestera_msg_cmd cmd;                    // 4 bytes
>         __le32 attr;                                    // 4 bytes
>         union prestera_msg_switch_param param;          // 6 bytes
> };
> 
> The compiler may well decide, in this situation, to generate a structure of
> size 14, not 16. The error is therefore not surprising.

Hi Guenter,

	This commit has been merged w/o waiting for all review comments to be addressed for some reason. So, there is other commits that fix this problem.

1.  [PATCH] [-next] net: marvell: prestera: Add explicit padding   (merged already)
    https://www.spinics.net/lists/kernel/msg4132698.html

2.  [PATCH net v3] net: marvell: prestera: fix hw structure laid out  (not merged yet, still need to address the comments and new patch v4 to be uploaded)
    https://www.spinics.net/lists/kernel/msg4132698.html

> 
> Guenter

   Volodymyr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ