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] [day] [month] [year] [list]
Message-ID: <20241009140123.GB99782@kernel.org>
Date: Wed, 9 Oct 2024 15:01:23 +0100
From: Simon Horman <horms@...nel.org>
To: Daniel Machon <daniel.machon@...rochip.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Lars Povlsen <lars.povlsen@...rochip.com>,
	Steen Hegelund <Steen.Hegelund@...rochip.com>,
	UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: sparx5: fix source port register when mirroring

On Wed, Oct 09, 2024 at 02:49:56PM +0200, Daniel Machon wrote:
> When port mirroring is added to a port, the bit position of the source
> port, needs to be written to the register ANA_AC_PROBE_PORT_CFG.  This
> register is replicated for n_ports > 32, and therefore we need to derive
> the correct register from the port number.
> 
> Before this patch, we wrongly calculate the register from portno /
> BITS_PER_BYTE, where the divisor ought to be 32, causing any port >=8 to
> be written to the wrong register. We fix this, by using do_div(), where
> the dividend is the register, the remainder is the bit position and the
> divisor is now 32.
> 
> Fixes: 4e50d72b3b95 ("net: sparx5: add port mirroring implementation")
> Signed-off-by: Daniel Machon <daniel.machon@...rochip.com>

Reviewed-by: Simon Horman <horms@...nel.org>

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ