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]
Date: Fri, 07 Jun 2024 15:53:58 +0200
From: Martin Schiller <ms@....tdt.de>
To: Vladimir Oltean <olteanv@...il.com>
Cc: martin.blumenstingl@...glemail.com, hauke@...ke-m.de, andrew@...n.ch,
 f.fainelli@...il.com, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org,
 conor+dt@...nel.org, netdev@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 10/13] net: dsa: lantiq_gswip: Fix error message
 in gswip_add_single_port_br()

On 2024-06-07 15:50, Vladimir Oltean wrote:
> On Fri, Jun 07, 2024 at 03:34:13PM +0200, Martin Schiller wrote:
>> On 2024-06-07 13:27, Vladimir Oltean wrote:
>> > Isn't even the original condition (port >= max_ports) dead code? Why not
>> > remove the condition altogether?
>> 
>> I also agree here if we can be sure, that .port_enable, 
>> .port_bridge_join and
>> .port_bridge_leave are only called for "valid" (<= max_ports) ports.
> 
> dsa_switch_parse_ports_of() has:
> 
> 		if (reg >= ds->num_ports) {
> 			dev_err(ds->dev, "port %pOF index %u exceeds num_ports (%u)\n",
> 				port, reg, ds->num_ports);
> 			of_node_put(port);
> 			err = -EINVAL;
> 			goto out_put_node;
> 		}

OK, so I will remove this check altogether.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ