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: <20250602094017.gicndnpplnncbekv@skbuf>
Date: Mon, 2 Jun 2025 12:40:17 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Álvaro Fernández Rojas <noltari@...il.com>
Cc: jonas.gorski@...il.com, florian.fainelli@...adcom.com, andrew@...n.ch,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, vivien.didelot@...il.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, dgcbueu@...il.com
Subject: Re: [RFC PATCH 05/10] net: dsa: b53: prevent DIS_LEARNING access on
 BCM5325

On Sat, May 31, 2025 at 12:13:03PM +0200, Álvaro Fernández Rojas wrote:
> BCM5325 doesn't implement DIS_LEARNING register so we should avoid reading
> or writing it.
> 
> Fixes: f9b3827ee66c ("net: dsa: b53: Support setting learning on port")
> Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
> ---
>  drivers/net/dsa/b53/b53_common.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 6b2ad82aa95f..9667d4107139 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -593,6 +593,9 @@ static void b53_port_set_learning(struct b53_device *dev, int port,
>  {
>  	u16 reg;
>  
> +	if (is5325(dev))
> +		return;
> +
>  	b53_read16(dev, B53_CTRL_PAGE, B53_DIS_LEARNING, &reg);
>  	if (learning)
>  		reg &= ~BIT(port);
> -- 
> 2.39.5
> 

I think if this switch family has that limitation, you should also patch
b53_br_flags_pre() to not permit BR_LEARNING in flags.val, and return
-EINVAL in that case. Otherwise, the "ip link set swp0 type bridge_slave
learning off" command will go through.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ