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:	Fri, 8 Apr 2011 09:39:04 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Amerigo Wang <amwang@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	Mel Gorman <mel@....ul.ie>,
	Minchan Kim <minchan.kim@...il.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: Re: [Patch v2] rcu: update the CONFIG logic in
 include/linux/pagemap.h

On Wed, Apr 06, 2011 at 02:32:48PM +0800, Amerigo Wang wrote:
> TREE_RCU depends on !PREEMPT && SMP, when !CONFIG_SMP is true, CONFIG_TREE_RCU
> will be false, thus "!defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU)"
> is always false.
> 
> Paul suggested to update the logic to
> !defined(CONFIG_SMP) && defined(CONFIG_TREE_PREEMPT_RCU).

Hello, Amerigo,

Thank you for keeping on top of this one!

But how does this patch handle the #else clauses?

							Thanx, Paul

> Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Signed-off-by: WANG Cong <amwang@...hat.com>
> 
> ---
>  include/linux/pagemap.h |    9 +++------
>  1 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index c119506..a296d7c 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -133,10 +133,9 @@ static inline int page_cache_get_speculative(struct page *page)
>  {
>  	VM_BUG_ON(in_interrupt());
> 
> -#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU)
> -# ifdef CONFIG_PREEMPT
> +#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_PREEMPT_RCU)
> +	/* Must have CONFIG_PREEMPT here, implied by CONFIG_TREE_PREEMPT_RCU. */
>  	VM_BUG_ON(!in_atomic());
> -# endif
>  	/*
>  	 * Preempt must be disabled here - we rely on rcu_read_lock doing
>  	 * this for us.
> @@ -171,10 +170,8 @@ static inline int page_cache_add_speculative(struct page *page, int count)
>  {
>  	VM_BUG_ON(in_interrupt());
> 
> -#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU)
> -# ifdef CONFIG_PREEMPT
> +#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_PREEMPT_RCU)
>  	VM_BUG_ON(!in_atomic());
> -# endif
>  	VM_BUG_ON(page_count(page) == 0);
>  	atomic_add(count, &page->_count);
> 
--
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