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] [thread-next>] [day] [month] [year] [list]
Message-Id: <1364001923-10796-10-git-send-email-andi@firstfloor.org>
Date:	Fri, 22 Mar 2013 18:25:03 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	linux-kernel@...r.kernel.org
Cc:	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	x86@...nel.org, Andi Kleen <ak@...ux.intel.com>, jeremy@...p.org
Subject: [PATCH 09/29] x86, xen: Support arch_spin_unlock_irq/flags

From: Andi Kleen <ak@...ux.intel.com>

Add simple implementations of arch_spin_unlock_flags/irq to the Xen
paravirt spinlock code.

Cc: jeremy@...p.org
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
 arch/x86/xen/spinlock.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index f7a080e..4e22520 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -353,6 +353,21 @@ static void xen_spin_unlock(struct arch_spinlock *lock)
 		xen_spin_unlock_slow(xl);
 }
 
+/* inline the Xen functions for irqs? */
+
+static void xen_spin_unlock_flags(struct arch_spinlock *lock,
+				  unsigned long flags)
+{
+	xen_spin_unlock(lock);
+	local_irq_restore(flags);
+}
+
+static void xen_spin_unlock_irq(struct arch_spinlock *lock)
+{
+	xen_spin_unlock(lock);
+	local_irq_enable();
+}
+
 static irqreturn_t dummy_handler(int irq, void *dev_id)
 {
 	BUG();
@@ -395,6 +410,8 @@ void __init xen_init_spinlocks(void)
 	pv_lock_ops.spin_lock_flags = xen_spin_lock_flags;
 	pv_lock_ops.spin_trylock = xen_spin_trylock;
 	pv_lock_ops.spin_unlock = xen_spin_unlock;
+	pv_lock_ops.spin_unlock_flags = xen_spin_unlock_flags;
+	pv_lock_ops.spin_unlock_irq = xen_spin_unlock_irq;
 }
 
 #ifdef CONFIG_XEN_DEBUG_FS
-- 
1.7.7.6

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