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: <27c12575-e670-4355-8d12-d5b544ec16f2@kernel.org>
Date: Thu, 12 Sep 2024 10:10:00 +0300
From: Roger Quadros <rogerq@...nel.org>
To: Simon Horman <horms@...nel.org>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Siddharth Vadapalli <s-vadapalli@...com>,
 Nathan Chancellor <nathan@...nel.org>,
 Nick Desaulniers <ndesaulniers@...gle.com>, Bill Wendling
 <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>
Cc: netdev@...r.kernel.org, linux-omap@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH net-next 2/3] net: ethernet: ti: am65-cpsw: Use __be64
 type for id_temp



On 10/09/2024 10:17, Simon Horman wrote:
> The id_temp local variable in am65_cpsw_nuss_probe() is
> used to hold a 64-bit big-endian value as it is assigned using
> cpu_to_be64().
> 
> It is read using memcpy(), where it is written as an identifier into a
> byte-array.  So this can also be treated as big endian.
> 
> As it's type is currently host byte order (u64), sparse flags
> an endian mismatch when compiling for little-endian systems:
> 
> .../am65-cpsw-nuss.c:3454:17: warning: incorrect type in assignment (different base types)
> .../am65-cpsw-nuss.c:3454:17:    expected unsigned long long [usertype] id_temp
> .../am65-cpsw-nuss.c:3454:17:    got restricted __be64 [usertype]
> 
> Address this by using __be64 as the type of id_temp.
> 
> No functional change intended.
> Compile tested only.
> 
> Signed-off-by: Simon Horman <horms@...nel.org>

Reviewed-by: Roger Quadros <rogerq@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ