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: <20220318204040.nx5zt2x37t4uzqwh@skbuf>
Date:   Fri, 18 Mar 2022 22:40:40 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Tobias Waldekranz <tobias@...dekranz.com>
Cc:     davem@...emloft.net, kuba@...nel.org,
        Marek BehĂșn <kabel@...nel.org>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: Require ops be
 implemented to claim STU support

On Fri, Mar 18, 2022 at 09:13:20PM +0100, Tobias Waldekranz wrote:
> Simply having a physical STU table in the device doesn't do us any
> good if there's no implementation of the relevant ops to access that
> table. So ensure that chips that claim STU support can also talk to
> the hardware.
> 
> This fixes an issue where chips that had a their ->info->max_sid
> set (due to their family membership), but no implementation (due to
> their chip-specific ops struct) would fail to probe.
> 
> Fixes: 49c98c1dc7d9 ("net: dsa: mv88e6xxx: Disentangle STU from VTU")
> Reported-by: Marek BehĂșn <kabel@...nel.org>
> Signed-off-by: Tobias Waldekranz <tobias@...dekranz.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv@...il.com>

(with the mention that Marek's problem is probably still not solved)

>  drivers/net/dsa/mv88e6xxx/chip.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h
> index 6a0b66354e1d..5e03cfe50156 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.h
> +++ b/drivers/net/dsa/mv88e6xxx/chip.h
> @@ -730,7 +730,9 @@ struct mv88e6xxx_hw_stat {
>  
>  static inline bool mv88e6xxx_has_stu(struct mv88e6xxx_chip *chip)
>  {
> -	return chip->info->max_sid > 0;
> +	return chip->info->max_sid > 0 &&
> +		chip->info->ops->stu_loadpurge &&
> +		chip->info->ops->stu_getnext;
>  }
>  
>  static inline bool mv88e6xxx_has_pvt(struct mv88e6xxx_chip *chip)
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ