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: <4236cc30-86f6-803d-82dc-a340fbe89481@gmail.com>
Date:   Fri, 24 Mar 2023 15:21:07 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Oleksij Rempel <o.rempel@...gutronix.de>,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Vladimir Oltean <olteanv@...il.com>,
        Woojung Huh <woojung.huh@...rochip.com>,
        Arun Ramadoss <arun.ramadoss@...rochip.com>
Cc:     kernel@...gutronix.de, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH net v2 5/6] net: dsa: microchip: ksz8863_smi: fix bulk
 access

On 3/24/23 01:06, Oleksij Rempel wrote:
> Current regmap bulk access is broken, resulting to wrong reads/writes
> if ksz_read64/ksz_write64 functions are used.
> Mostly this issue was visible by using ksz8_fdb_dump(), which returned
> corrupt MAC address.
> 
> The reason is that regmap was configured to have max_raw_read/write,
> even if ksz8863_mdio_read/write functions are able to handle unlimited
> read/write accesses. On ksz_read64 function we are using multiple 32bit
> accesses by incrementing each access by 1 instead of 4. Resulting buffer
> had 01234567.12345678 instead of 01234567.89abcdef.
> 
> We have multiple ways to fix it:
> - enable 4 byte alignment for 32bit accesses. Since the HW do not have
>    this requirement. It will break driver.
> - disable max_raw_* limit.
> 
> This patch is removing max_raw_* limit for regmap accesses in ksz8863_smi.
> 
> Fixes: 60a364760002 ("net: dsa: microchip: Add Microchip KSZ8863 SMI based driver support")
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ