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-next>] [day] [month] [year] [list]
Message-ID: <4C1018FD.8090109@linux.intel.com>
Date:	Wed, 09 Jun 2010 15:43:09 -0700
From:	"H. Peter Anvin" <hpa@...ux.intel.com>
To:	mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
	jdike@...toit.com, bharrosh@...asas.com, bp@...en8.de,
	geert@...ux-m68k.org, akpm@...ux-foundation.org,
	toralf.foerster@....de, tglx@...utronix.de, hpa@...ux.intel.com
CC:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/urgent] x86, hweight: Fix UML boot crash

Note: I have applied this  because it fixes a regression, but it bugs
the living bejeezus out of me that the saner patch:

diff --git a/arch/um/include/asm/arch_hweight.h
b/arch/um/include/asm/arch_hweight.h
new file mode 100644
index 0000000..c656cf4
--- /dev/null
+++ b/arch/um/include/asm/arch_hweight.h
@@ -0,0 +1,6 @@
+#ifndef _ASM_UM_HWEIGHT_H
+#define _ASM_UM_HWEIGHT_H
+
+#include <asm-generic/bitops/arch_hweight.h>
+
+#endif

... supposedly didn't work.  As such, I consider this a temporary kluge
until a proper solution is found.  From a code-cleanliness perspective,
this patch is awful.

	-hpa


On 06/09/2010 03:07 PM, tip-bot for Borislav Petkov wrote:
> Commit-ID:  cc7f0a7b3004a4ca0bfef0e1ca79f2e0da6ca1b0
> Gitweb:     http://git.kernel.org/tip/cc7f0a7b3004a4ca0bfef0e1ca79f2e0da6ca1b0
> Author:     Borislav Petkov <bp@...en8.de>
> AuthorDate: Sun, 30 May 2010 19:03:46 +0200
> Committer:  H. Peter Anvin <hpa@...ux.intel.com>
> CommitDate: Wed, 9 Jun 2010 14:23:29 -0700
> 
> x86, hweight: Fix UML boot crash
> 
> UML apparently cannot stomach callee reg-saving trickery introduced
> with d61931d89be506372d01a90d1755f6d0a9fafe2d (x86: Add optimized
> popcnt variants) for reasons currently unknown, and oopses during
> boot: http://marc.info/?l=linux-kernel&m=127522065202435&w=2
> 
> Go ahead and fall back to the software hweight* routines on UML.
> 
> LKML-Reference: <201005271944.09541.toralf.foerster@....de>
> Tested-by: Toralf Förster <toralf.foerster@....de>
> Tested-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> LKML-Reference: <20100530170346.GC1565@...ndog.tnic>
> Signed-off-by: Borislav Petkov <bp@...en8.de>
> Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
> Cc: Boaz Harrosh <bharrosh@...asas.com>
> Cc: Jeff Dike <jdike@...toit.com>
> Cc: Andrew Morgon <akpm@...ux-foundation.org>
> ---
>  arch/x86/include/asm/bitops.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
> index 545776e..c9dad12 100644
> --- a/arch/x86/include/asm/bitops.h
> +++ b/arch/x86/include/asm/bitops.h
> @@ -444,7 +444,11 @@ static inline int fls(int x)
>  
>  #define ARCH_HAS_FAST_MULTIPLIER 1
>  
> +#ifdef CONFIG_UML
> +#include <asm-generic/bitops/arch_hweight.h>
> +#else
>  #include <asm/arch_hweight.h>
> +#endif
>  
>  #include <asm-generic/bitops/const_hweight.h>
>  

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