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]
Date:	Thu, 28 Feb 2008 20:53:09 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, hidave.darkstar@...il.com,
	akpm@...ux-foundation.org, fzu@...gehoertderstaat.de,
	ego@...ibm.com, dipankar@...ibm.com, niv@...ibm.com,
	dvhltc@...ibm.com
Subject: Re: [PATCH] Remove never-migrates assumption from
	rcu_process_callbacks()


* Paul E. McKenney <paulmck@...ux.vnet.ibm.com> wrote:

> Hello again!
> 
> This patch fixes a potentially invalid access to a per-CPU variable in 
> rcu_process_callbacks().  This per-CPU access needs to be done in such 
> a way as to guarantee that the code using it cannot move to some other 
> CPU before all uses of the value accessed have completed.  Even though 
> this code is currently only invoked from softirq context, which 
> currrently cannot migrate to some other CPU, life would be better if 
> this code did not silently make such an assumption.

i've got the patch below queued up already - same thing, right?

	Ingo

----------->
Subject: rcupreempt: fix hibernate/resume in presence of PREEMPT_RCU and hotplug
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Date: Wed, 27 Feb 2008 16:21:10 -0800

This fixes a oops encountered when doing hibernate/resume in presence
of PREEMPT_RCU.  The problem was that the code failed to disable preemption
when accessing a per-CPU variable.  This is OK when called from code
that already has preemption disabled, but such is not the case from
the suspend/resume code path.

Reported-by: Dave Young <hidave.darkstar@...il.com>
Tested-by: Dave Young <hidave.darkstar@...il.com>
Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 kernel/rcupreempt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/kernel/rcupreempt.c
===================================================================
--- linux.orig/kernel/rcupreempt.c
+++ linux/kernel/rcupreempt.c
@@ -918,8 +918,9 @@ void rcu_offline_cpu(int cpu)
 	 * fix.
 	 */
 
+	local_irq_save(flags);
 	rdp = RCU_DATA_ME();
-	spin_lock_irqsave(&rdp->lock, flags);
+	spin_lock(&rdp->lock);
 	*rdp->nexttail = list;
 	if (list)
 		rdp->nexttail = tail;
--
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