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: <20141109073234.GA28668@mew.home.network>
Date:	Sat, 8 Nov 2014 23:32:34 -0800
From:	Omar Sandoval <osandov@...ndov.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Chris Mason <clm@...com>, Josef Bacik <jbacik@...com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Josh Triplett <josh@...htriplett.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	linux-kernel@...r.kernel.org, linux-btrfs@...r.kernel.org
Subject: Re: [PATCH v6] Move BTRFS RCU string to common library

On Sat, Nov 08, 2014 at 08:13:37AM -0800, Joe Perches wrote:
> On Sat, 2014-11-08 at 00:46 -0800, Omar Sandoval wrote:
> > The RCU-friendly string API used internally by BTRFS is generic enough for
> > common use. This doesn't add any new functionality, but instead just moves the
> > code and documents the existing API.
> 
> Some more trivia, can be updated later if desired.
> 
> > diff --git a/include/linux/rcustring.h b/include/linux/rcustring.h
> > new file mode 100644
> []
> > +
> > +/**
> > + * printk_in_rcu() - printk in an RCU read-side critical section
> 
> It'd be nice to show the arguments for kernel-doc here
My impression is that referencing printk tells you everything you need to know,
but for completeness' sake, that sounds fair.

> > + */
> > +#define printk_in_rcu(fmt, ...)			\
> > +	do {					\
> > +		rcu_read_lock();		\
> > +		printk(fmt, __VA_ARGS__);	\
> 
> This should use ##__VA_ARGS__ to allow the
> compiler to elide the comma when using
> 
> 	printk_in_rcu("Hello World!");
> 
Luckily, there's probably no sane reason anyone would do a printk_in_rcu
without the varargs, but once again, it's probably good hygiene.

Anyone else have anything to add? Otherwise, I'll wrap this up in another
iteration of the patch.

Thanks!
-- 
Omar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ