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] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW3PR11MB4554B661BCDEAAB6F5558C599C1A9@MW3PR11MB4554.namprd11.prod.outlook.com>
Date:   Fri, 25 Mar 2022 10:23:56 +0000
From:   "Penigalapati, Sandeep" <sandeep.penigalapati@...el.com>
To:     "Lobakin, Alexandr" <alexandr.lobakin@...el.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC:     "Szapar-Mudlaw, Martyna" <martyna.szapar-mudlaw@...el.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "David S. Miller" <davem@...emloft.net>
Subject: RE: [Intel-wired-lan] [PATCH v4 net-next 1/5] ice: switch: add and
 use u16[] aliases to ice_adv_lkup_elem::{h, m}_u

>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
>Alexander Lobakin
>Sent: Monday, March 21, 2022 4:30 PM
>To: intel-wired-lan@...ts.osuosl.org
>Cc: Szapar-Mudlaw, Martyna <martyna.szapar-mudlaw@...el.com>;
>netdev@...r.kernel.org; linux-kernel@...r.kernel.org; Jakub Kicinski
><kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; David S. Miller
><davem@...emloft.net>
>Subject: [Intel-wired-lan] [PATCH v4 net-next 1/5] ice: switch: add and use
>u16[] aliases to ice_adv_lkup_elem::{h, m}_u
>
>ice_adv_lkup_elem fields h_u and m_u are being accessed as raw u16 arrays
>in several places.
>To reduce cast and braces burden, add permanent array-of-u16 aliases with
>the same size as the `union ice_prot_hdr` itself via anonymous unions to the
>actual struct declaration, and just access them directly.
>
>This:
> - removes the need to cast the union to u16[] and then dereference
>   it each time -> reduces the horizon for potential bugs;
> - improves -Warray-bounds coverage -- the array size is now known
>   at compilation time;
> - addresses cppcheck complaints.
>
>Signed-off-by: Alexander Lobakin <alexandr.lobakin@...el.com>
>Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
>Tested-by: Marcin Szycik <marcin.szycik@...ux.intel.com>
>---
> drivers/net/ethernet/intel/ice/ice_switch.c | 15 +++++++--------
>drivers/net/ethernet/intel/ice/ice_switch.h | 12 ++++++++++--
> 2 files changed, 17 insertions(+), 10 deletions(-)
>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ