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: Mon, 17 Jun 2024 11:29:01 +0100
From: Simon Horman <horms@...nel.org>
To: xiaolei wang <xiaolei.wang@...driver.com>
Cc: olteanv@...il.com, linux@...linux.org.uk, alexandre.torgue@...s.st.com,
	andrew@...n.ch, joabreu@...opsys.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	mcoquelin.stm32@...il.com, wojciech.drewek@...el.com,
	netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [net PATCH] net: stmmac: No need to calculate speed divider when
 offload is disabled

On Sun, Jun 16, 2024 at 09:15:05AM +0800, xiaolei wang wrote:
> 
> On 6/15/24 22:47, Simon Horman wrote:
> > On Fri, Jun 14, 2024 at 04:19:16PM +0800, Xiaolei Wang wrote:

...

> >          /* Final adjustments for HW */
> >          value = div_s64(qopt->idleslope * 1024ll * ptr, port_transmit_rate_kbps);
> >          priv->plat->tx_queues_cfg[queue].idle_slope = value & GENMASK(31, 0);
> > 
> >          value = div_s64(-qopt->sendslope * 1024ll * ptr, port_transmit_rate_kbps);
> >          priv->plat->tx_queues_cfg[queue].send_slope = value & GENMASK(31, 0);
> > 
> > And the div_s64() lines above appear to use
> > ptr uninitialised in the !qopt->enable case.
> 
> Oh, when deleting the configuration, idleslope and sendslope are both 0, do
> you mean we also need to set ptr to 0?

Understood, if idleslope and sendslope are 0, then ptr could be set to any
value and the result would be the same.  And, based on my limited
understanding, 0 does not seem to be a bad choice.

My point is that ptr shouldn't be uninitialised at this point.

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ