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: <0ba74a65-a17c-43bb-8bf8-5b4dff68abd5@paulmck-laptop>
Date: Mon, 28 Apr 2025 12:50:20 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Petr Mladek <pmladek@...e.com>
Cc: linux-kernel@...r.kernel.org, kernel-team@...a.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kuniyuki Iwashima <kuniyu@...zon.com>,
	Mateusz Guzik <mjguzik@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	John Ogness <john.ogness@...utronix.de>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	Jon Pan-Doh <pandoh@...gle.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Karolina Stolarek <karolina.stolarek@...cle.com>,
	Bert Karwatzki <spasswolf@....de>,
	"Aithal, Srikanth" <sraithal@....com>,
	Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH v3 10/20] ratelimit: Allow zero ->burst to disable
 ratelimiting

On Mon, Apr 28, 2025 at 04:57:51PM +0200, Petr Mladek wrote:
> On Thu 2025-04-24 17:28:16, Paul E. McKenney wrote:
> > If ->interval is zero, then rate-limiting will be disabled.
> > Alternatively, if interval is greater than zero and ->burst is zero,
> > then rate-limiting will be applied unconditionally.
> > 
> > Therefore, make this classification be lockless.
> > 
> > Note that although negative ->interval and ->burst happen to be treated
> > as if they were zero, this is an accident of the current implementation.
> > The semantics of negative values for these fields is subject to change
> > without notice.  Especially given that Bert Karwatzki determined that
> > current calls to ___ratelimit() currently never have negative values
> > for these fields.
> >
> > This commit replaces an earlier buggy versions.
> 
> If there was another revision then it would be nice to explicitly
> describe also the reason why both zero ->interval and ->burst never
> rate-limits. It is the state when the structure is zeroed. Some
> existing code relied in this behavior.
> 
> If I get it correctly then this is the difference between this and
> the previous version of this patch. And the previous version
> caused regressions described by the Links...

Very good, I will update the commit log on my next rebase.

> > Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/
> > Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/
> > Reported-by: Bert Karwatzki <spasswolf@....de>
> > Reported-by: "Aithal, Srikanth" <sraithal@....com>
> > Closes: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/
> > Reported-by: Mark Brown <broonie@...nel.org>
> > Closes: https://lore.kernel.org/all/257c3b91-e30f-48be-9788-d27a4445a416@sirena.org.uk/
> > Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
> > Tested-by: "Aithal, Srikanth" <sraithal@....com>
> 
> Otherwise, it looks good to me:
> 
> Reviewed-by: Petr Mladek <pmladek@...e.com>

Thank you!!!  And I will also apply this on my next rebase.

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ