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:	Thu, 3 Oct 2013 11:45:12 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Oleg Nesterov <oleg@...hat.com>, Mel Gorman <mgorman@...e.de>,
	Rik van Riel <riel@...hat.com>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...nel.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] rcu: Create rcu_sync infrastructure

On Thu, Oct 03, 2013 at 08:40:01PM +0200, Peter Zijlstra wrote:
> On Thu, Oct 03, 2013 at 09:41:17AM -0700, Paul E. McKenney wrote:
> > On Wed, Oct 02, 2013 at 04:56:57PM +0200, Peter Zijlstra wrote:
> > #ifdef CONFIG_PROVE_RCU
> > #define rcu_sync_is_idle_check(rss) BUG_ON(!rss->read_side_check())
> > #else
> > #define rcu_sync_is_idle_check(rss) do { } while (0)
> > #endif
> > 
> > 	rcu_sync_is_idle_check(rss);
> 
> The below actually seems to build, although I didn't test the config
> permutations, only defconfig.

Looks good to me!

							Thanx, Paul

> ---
> --- a/include/linux/rcusync.h
> +++ b/include/linux/rcusync.h
> @@ -14,6 +14,7 @@ struct rcu_sync_struct {
> 
>  	void (*sync)(void);
>  	void (*call)(struct rcu_head *, void (*)(struct rcu_head *));
> +	int  (*held)(void);
>  };
> 
>  #define ___RCU_SYNC_INIT(name)						\
> @@ -26,18 +27,21 @@ struct rcu_sync_struct {
>  	___RCU_SYNC_INIT(name),						\
>  	.sync = synchronize_sched,					\
>  	.call = call_rcu_sched,						\
> +	.held = rcu_read_lock_sched_held,				\
>  }
> 
>  #define __RCU_BH_SYNC_INIT(name) {					\
>  	___RCU_SYNC_INIT(name),						\
>  	.sync = synchronize_rcu_bh,					\
>  	.call = call_rcu_bh,						\
> +	.held = rcu_read_lock_bh_held,					\
>  }
> 
>  #define __RCU_SYNC_INIT(name) {						\
>  	___RCU_SYNC_INIT(name),						\
>  	.sync = synchronize_rcu,					\
>  	.call = call_rcu,						\
> +	.held = rcu_read_lock_held,					\
>  }
> 
>  #define DEFINE_RCU_SCHED_SYNC(name)					\
> @@ -51,6 +55,9 @@ struct rcu_sync_struct {
> 
>  static inline bool rcu_sync_is_idle(struct rcu_sync_struct *rss)
>  {
> +#ifdef CONFIG_PROVE_RCU
> +	BUG_ON(!rss->held());
> +#endif
>  	return !rss->gp_state; /* GP_IDLE */
>  }
> 
> 

--
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