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  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]
Date:	Sun, 30 May 2010 22:17:38 +0200
From:	Borislav Petkov <>
To:	"H. Peter Anvin" <>
Cc:	Geert Uytterhoeven <>,
	Borislav Petkov <>,
	Toralf Förster <>,,
Subject: Re: [PATCH] x86, hweight: Fix UML boot crash

> > This bothers me, because it really feels like something is fundamentally
> > broken in UML tryingto track the upstream architecture, and this is just
> > a bandage.
> First of all, scratch that patch. It is indeed dumb idea to sprinkle UML
> special cases in x86 just because they include it.
> Which begs the question why _is_ UML sucking in x86 stuff and can anyone
> provide us with some sensible reasons? Because if there aren't any, it
> is their includes that should be fixed. Let me see what I can do to
> redirect hweight stuff properly...

Ok, AFAICT UML is sucking in the includes of the sub-architecture the
UML "guest" is running on. See below¹ for the whole gcc string make
executes. Among the switches is


so there will be no untangling today. Instead, we could do another
bandaid which is confined to UML include space only and redirect
arch_hweight.h includes to the generic ones. Check this out, it seems to
work here:

From: Borislav Petkov <>
Date: Sun, 30 May 2010 22:11:32 +0200
Subject: [PATCH] um, hweight: Fix UML boot crash

Obviously UML cannot stomach callee reg-saving trickery
introduced with d61931d89be506372d01a90d1755f6d0a9fafe2d
(x86: Add optimized popcnt variants) and oopses during boot:

Redirect arch_hweight.h include from the x86 portion to the generic
arch_hweight.h which is a fallback to the software hweight routines.

LKML-Reference: <>
Signed-off-by: Borislav Petkov <>
 arch/um/include/asm/arch_hweight.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
 create mode 100644 arch/um/include/asm/arch_hweight.h

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>

¹ gcc -Wp,-MD,arch/um/sys-x86_64/.delay.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.4.4/include -I/home/boris/kernel/linux-2.6/arch/um/include -Iinclude  -include include/generated/autoconf.h -D__KERNEL__ -I/home/boris/kernel/linux-2.6/arch/um/sys-x86_64 -m64 -I/home/boris/kernel/linux-2.6/arch/x86/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -D__arch_um__ -DSUBARCH=\"x86_64\" -I/home/boris/kernel/linux-2.6/arch/um/include/shared -I/home/boris/kernel/linux-2.6/arch/um/sys-x86_64/shared -I/home/boris/kernel/linux-2.6/arch/um/include/shared/skas -Dvmap=kernel_vmap -Din6addr_loopback=kernel_in6addr_loopback -Din6addr_any=kernel_in6addr_any -fno-builtin -m64 -funit-at-a-time -D_LARGEFILE64_SOURCE -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask -Dmktime=kernel_mktime -Wframe-larger-than=2048 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack   -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(delay)"  -D"KBUILD_MODNAME=KBUILD_STR(delay)"  -c -o arch/um/sys-x86_64/delay.o arch/um/sys-x86_64/delay.c

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists