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:	Fri, 11 Mar 2011 11:31:07 GMT
From:	tip-bot for Michel Lespinasse <walken@...gle.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	mingo@...hat.com, torvalds@...ux-foundation.org,
	schwidefsky@...ibm.com, peterz@...radead.org, cmetcalf@...era.com,
	tony.luck@...el.com, ralf@...ux-mips.org, monstr@...str.eu,
	linux@....linux.org.uk, tglx@...utronix.de,
	linux-kernel@...r.kernel.org, hpa@...or.com, darren@...art.com,
	lethal@...ux-sh.org, davem@...emloft.net, dhowells@...hat.com,
	benh@...nel.crashing.org, mattst88@...il.com,
	jejb@...isc-linux.org, walken@...gle.com
Subject: [tip:core/futexes] futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic()

Commit-ID:  522d7decc0370070448a8c28982c8dfd8970489e
Gitweb:     http://git.kernel.org/tip/522d7decc0370070448a8c28982c8dfd8970489e
Author:     Michel Lespinasse <walken@...gle.com>
AuthorDate: Thu, 10 Mar 2011 18:47:31 -0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 11 Mar 2011 12:23:08 +0100

futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic()

kernel/futex.c disables page faults before calling
futex_atomic_cmpxchg_inatomic(), so there is no need to do it again
within that function.
    
Signed-off-by: Michel Lespinasse <walken@...gle.com>
Cc: Darren Hart <darren@...art.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Matt Turner <mattst88@...il.com>
Cc: Russell King <linux@....linux.org.uk>
Cc: David Howells <dhowells@...hat.com>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Michal Simek <monstr@...str.eu>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: "James E.J. Bottomley" <jejb@...isc-linux.org>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: Paul Mundt <lethal@...ux-sh.org>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Chris Metcalf <cmetcalf@...era.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
LKML-Reference: <20110311024731.GB26122@...gle.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

---
 arch/arm/include/asm/futex.h |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h
index b33fe70..7133a86 100644
--- a/arch/arm/include/asm/futex.h
+++ b/arch/arm/include/asm/futex.h
@@ -95,7 +95,8 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
 	if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
 		return -EFAULT;
 
-	pagefault_disable();	/* implies preempt_disable() */
+	/* Note that preemption is disabled by futex_atomic_cmpxchg_inatomic
+	 * call sites. */
 
 	__asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n"
 	"1:	" T(ldr) "	%0, [%3]\n"
@@ -115,8 +116,6 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
 	: "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT)
 	: "cc", "memory");
 
-	pagefault_enable();	/* subsumes preempt_enable() */
-
 	return val;
 }
 
--
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