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
| ||
|
Message-ID: <20100808045751.GF19600@linux.vnet.ibm.com> Date: Sat, 7 Aug 2010 21:57:51 -0700 From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> To: David Miller <davem@...emloft.net> Cc: xiaosuo@...il.com, therbert@...gle.com, netdev@...r.kernel.org Subject: Re: [PATCH] net: disable preemption before call smp_processor_id() On Sat, Aug 07, 2010 at 08:37:00PM -0700, David Miller wrote: > From: Changli Gao <xiaosuo@...il.com> > Date: Sat, 7 Aug 2010 17:26:02 +0800 > > > Although netif_rx() isn't expected to be called in process context with > > preemption enabled, it'd better handle this case. And this is why get_cpu() > > is used in the non-RPS #ifdef branch. If tree RCU is selected, > > rcu_read_lock() won't disable preemption, so preempt_disable() should be > > called explictly. > > > > Signed-off-by: Changli Gao <xiaosuo@...il.com> > > Applied, thanks Changli. > > Paul, perhaps the comment above rcu_read_lock()'s definition should > be updated in rcupdate.h? It says blocking is not allowed inside > of a read side critical section, but obviously with tree-rcu that > is not the case. > > Either we should add a mention of tree-rcu's semantics or just remote > this part of the comment altogether. Good point, that last sentence is quite obsolete. It also survived a recent cleanup. :-/ If I cover preemptible RCU's semantics, a first cut comes out like this: * In non-preemptible RCU implementations (TREE_RCU and TINY_RCU), it * is illegal to block while in an RCU read-side critical section. In * preemptible RCU implementations (TREE_PREEMPT_RCU and TINY_PREEMPT_RCU) * in CONFIG_PREEMPT kernel builds, RCU read-side critical sections may * be preempted, but explicit blocking is illegal. Finally, in preemptible * RCU implementations in real-time (CONFIG_PREEMPT_RT) kernel builds, * RCU read-side critical sections may be preempted and they may also * block, but only when acquiring spinlocks that are subject to priority * inheritance. Does that seem reasonable? Thanx, Paul -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists