[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210113233927.njnrwuduo77bbma2@skbuf>
Date: Thu, 14 Jan 2021 01:39:27 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Gilles DOFFE <gilles.doffe@...oirfairelinux.com>
Cc: netdev@...r.kernel.org, Woojung Huh <woojung.huh@...rochip.com>,
UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 6/6] net: dsa: ksz: fix wrong read cast to u64
On Wed, Jan 13, 2021 at 01:45:22PM +0100, Gilles DOFFE wrote:
> '(u64)*value' casts a u32 to a u64. So depending on endianness,
> LSB or MSB is lost.
> The pointer needs to be cast to read the full u64:
> '*((u64 *)value)'
>
> Signed-off-by: Gilles DOFFE <gilles.doffe@...oirfairelinux.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@...il.com>
Powered by blists - more mailing lists