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: <Y4cKSJI/TSQVMMJr@black.fi.intel.com>
Date:   Wed, 30 Nov 2022 09:46:16 +0200
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <YehezkelShB@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Subject: Re: [resend, PATCH net-next v1 2/2] net: thunderbolt: Use separate
 header data type for the Rx

On Tue, Nov 29, 2022 at 06:13:59PM +0200, Andy Shevchenko wrote:
> The same data type structure is used for bitwise operations and
> regular ones. It makes sparse unhappy, for example:
> 
>   .../thunderbolt.c:718:23: warning: cast to restricted __le32
> 
>   .../thunderbolt.c:953:23: warning: incorrect type in initializer (different base types)
>   .../thunderbolt.c:953:23:    expected restricted __wsum [usertype] wsum
>   .../thunderbolt.c:953:23:    got restricted __be32 [usertype]
> 
> Split the header to bitwise one and specific for Rx to make sparse
> happy. Assure the layout by involving static_assert() against size
> and offsets of the member of the structures.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/net/thunderbolt.c | 22 +++++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)

I would much rather keep the humans reading this happy than add 20+
lines just to silence a tool. Unless this of course is some kind of a
real bug.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ