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:	Mon, 2 Jun 2008 10:22:26 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Ulrich Drepper <drepper@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	mtk.manpages@...il.com, torvalds@...ux-foundation.org,
	x86@...nel.org
Subject: Re: [PATCH 3/3] 64-bit futexes: x86 support


* Ulrich Drepper <drepper@...hat.com> wrote:

> This patch adds 64-bit futex support for x86.  As explained in the 
> introduction, this requires a new system call.  The remaining changes 
> are similarly to the x86-64 changes: enable support for FUTEX_WAKE_OP.

great work - the first two patches look good and we've created a new 
-tip topic branch for it, tip/core/futex-64bit.

but this 32-bit x86 patch has problems, it needed 3 fixes to even build 
(see below), then it stopped with various failures related to the 
assembly constraints:

  kernel/futex.c: In function 'do_futex':
  include/asm/futex.h:155: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
  [...]

	Ingo

-------------------->
Subject: 64 bit futexes: fixes
From: Ingo Molnar <mingo@...e.hu>
Date: Mon Jun 02 10:07:08 CEST 2008

- various build fixes on 32-bit.

Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 arch/x86/kernel/sys_i386_32.c |    1 +
 include/asm-x86/futex.h       |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Index: linux/arch/x86/kernel/sys_i386_32.c
===================================================================
--- linux.orig/arch/x86/kernel/sys_i386_32.c
+++ linux/arch/x86/kernel/sys_i386_32.c
@@ -18,6 +18,7 @@
 #include <linux/file.h>
 #include <linux/utsname.h>
 #include <linux/ipc.h>
+#include <linux/futex.h>
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
Index: linux/include/asm-x86/futex.h
===================================================================
--- linux.orig/include/asm-x86/futex.h
+++ linux/include/asm-x86/futex.h
@@ -65,7 +65,7 @@
 		     _ASM_EXTABLE(1b, 5b)			\
 		     _ASM_EXTABLE(2b, 5b)			\
 		     _ASM_EXTABLE(3b, 5b)			\
-		     : "=&a" (oldvaltemp1), "=&d" (oldvaltmep2),\
+		     : "=&a" (oldvaltemp1), "=&d" (oldvaltemp2),\
 		       "=&r" (ret),				\
 		       "+m" (((u32 __user *) uaddr)[0]),	\
 		       "+m" (((u32 __user *) uaddr)[1]),	\
@@ -127,7 +127,7 @@ static inline int futex_atomic_op_inuser
 #ifdef CONFIG_X86_32
 	/* Not all 32-bit machines support 8-byte cmpxchg.  We just
 	   unconditionally perform a runtime check for the feature.  */
-	if ((op & FUTEX_FLAG_64) && !boot_cpu_has(X86_FEATURE_CX8))
+	if ((op & FUTEX_64_FLAG) && !boot_cpu_has(X86_FEATURE_CX8))
 		return -ENOSYS;
 #endif
 
--
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