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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091216005959.GC2408@feather>
Date:	Tue, 15 Dec 2009 16:59:59 -0800
From:	Josh Triplett <josh@...htriplett.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, dvhltc@...ibm.com, niv@...ibm.com,
	tglx@...utronix.de, peterz@...radead.org, rostedt@...dmis.org,
	Valdis.Kletnieks@...edu, dhowells@...hat.com
Subject: Re: [PATCH RFC tip/core/rcu 15/18] rcu: give different levels of
 the rcu_node hierarchy distinct lockdep names

On Tue, Dec 15, 2009 at 03:02:38PM -0800, Paul E. McKenney wrote:
> From: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> 
> Proposed for 2.6.34, not for inclusion.
> 
> Previously, each level of the rcu_node hierarchy had the same rather
> unimaginative name: "&rcu_node_class[i]".  This makes lockdep diagnostics
> involving these lockdep classes less helpful than would be nice.  This
> patch fixes this by giving each level of the rcu_node hierarchy a distinct
> name: "rcu_node_level_0", "rcu_node_level_1", and so on.
> 
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> ---
>  kernel/rcutree.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 0a4c328..a6e45f6 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -1811,11 +1811,17 @@ static void __init rcu_init_levelspread(struct rcu_state *rsp)
>   */
>  static void __init rcu_init_one(struct rcu_state *rsp)
>  {
> +	static char *buf[] = { "rcu_node_level_0",
> +			       "rcu_node_level_1",
> +			       "rcu_node_level_2",
> +			       "rcu_node_level_3" };  /* Match MAX_RCU_LVLS */
>  	int cpustride = 1;
>  	int i;
>  	int j;
>  	struct rcu_node *rnp;
>  
> +	WARN_ON_ONCE(MAX_RCU_LVLS > 4);  /* Fix buf[] initialization! */
> +

BUILD_BUG_ON seems better.  For that matter, please consider moving
these near the rest of the level-specific defines, making them const,
and ideally not emitting the strings for levels you don't have.

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