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: <20250407104727.32c1eada@gandalf.local.home>
Date: Mon, 7 Apr 2025 10:47:27 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
 <linux-trace-kernel@...r.kernel.org>, Mathieu Desnoyers
 <mathieu.desnoyers@...icios.com>, Tom Zanussi <zanussi@...nel.org>
Subject: Re: [PATCH v3] tracing: Move histogram trigger variables from stack
 to per CPU structure

On Mon, 7 Apr 2025 11:15:51 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:

> > +static int alloc_hist_pad(void)
> > +{
> > +	lockdep_assert_held(&event_mutex);
> > +
> > +	if (refcount_read(&hist_pad_ref)) {
> > +		refcount_inc(&hist_pad_ref);  
> 
> nit: If this always runs under event_mutex, do we need to use atomic
> refcount_t?

refcount has a bunch of debugging that will trigger if the refcount
goes bad (negative and such) so that I don't need to add those checks.

Basically, refcount is for refcounting, and this is a ref counter ;-)

It's a slow path, so I don't care about the added overhead from using an
atomic.

> 
> Others looks good to me.
> 
> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Thanks!

-- Steve


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ