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:	Tue, 3 Feb 2009 15:07:10 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	"K.Prasad" <prasad@...ux.vnet.ibm.com>
cc:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Roland McGrath <roland@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>, <mingo@...e.hu>,
	<richardj_moore@...ibm.com>
Subject: Re: [RFC Patch 1/10] Introducing generic hardware breakpoint handler
 interfaces

On Tue, 3 Feb 2009, K.Prasad wrote:

> Hi Alan,
> 	After a better understanding about RCU usage in this patch, I'm
> thinking if the list traversals in kernel/hw_breakpoint.c should be
> changed into their RCU equivalent i.e. list_for_each_entry_rcu() instead
> of list_for_each_entry() and list_del_rcu() instead of list_del() -
> given that we are considering the list of thread HW breakpoints
> (thread_bps) and kernel breakpoints (cur_kbpdata) which are also
> accessed from exception-handler contexts.
> 
> I think that with the possibility of parallel execution of
> the 'update' sections which would alter the protected data structures
> (mentioned above) through functions such as - say insert_bp_in_list(),
> balance_kernel_vs_user() and various other routines and the read-side
> critical regions which need to be identified after converting the list
> traversal routines it would be necessary to wrap the code around them
> with rcu_read_(un)lock() routines.

The read-side critical sections don't need to be identified -- I can
tell you exactly what they are.  There is only one, and it is in
switch_to_thread_hw_breakpoint().  If you go look at that routine,
you'll see it already uses list_for_each_entry_rcu().

> What do you think? Is there something grossly incorrect in this
> assessment of locking requirements?

Not in your assessment of locking requirements, only in your 
understanding of where the critical section is.

Alan Stern

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