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]
Date: Thu, 11 Jan 2024 09:57:40 +0000
From: Vincent Donnefort <vdonnefort@...gle.com>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: rostedt@...dmis.org, linux-kernel@...r.kernel.org,
	linux-trace-kernel@...r.kernel.org, mathieu.desnoyers@...icios.com,
	kernel-team@...roid.com
Subject: Re: [PATCH v10 1/2] ring-buffer: Introducing ring-buffer mapping
 functions

[...]

> > > +	 */
> > > +	smp_wmb();
> > > +	WRITE_ONCE(cpu_buffer->mapped, 1);
> > > +
> > > +	/* Init meta_page values unless the writer did it already */
> > > +	cmpxchg(&cpu_buffer->meta_page->entries, 0,
> > > +		local_read(&cpu_buffer->entries));
> > > +	cmpxchg(&cpu_buffer->meta_page->overrun, 0,
> > > +		local_read(&cpu_buffer->overrun));
> > > +	cmpxchg(&cpu_buffer->meta_page->subbufs_touched, 0,
> > > +		local_read(&cpu_buffer->pages_touched));
> > > +	cmpxchg(&cpu_buffer->meta_page->subbufs_lost, 0,
> > > +		local_read(&cpu_buffer->pages_lost));
> > 
> > Instead of using these cmpxchg, can we move this initialization before
> > smp_wmb()? Thus we can avoid conflict with rb_update_meta_page()
> 
> Good point, Not sure why I made this more complicated than it should be.

Ha, I know, that was before v6, where the writer was updating all of that. From
v6 the update has been moved to the irq_rb_work.

> 
> > 
> > Thank you,
> >
> 
> [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ