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: <4AA16336.3050606@zytor.com>
Date:	Fri, 04 Sep 2009 11:57:58 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Ingo Molnar <mingo@...e.hu>, Jeff Dike <jdike@...toit.com>,
	Sam Ravnborg <sam@...nborg.org>
CC:	David Woodhouse <dwmw2@...radead.org>,
	linux-kernel@...r.kernel.org, mingo@...hat.com, sam@...nborg.org,
	tglx@...utronix.de, David.Woodhouse@...el.com,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/kbuild] x86: Don't silently override CONFIG_64BIT in
 'make oldconfig'

On 09/04/2009 11:31 AM, Ingo Molnar wrote:
> 
> * H. Peter Anvin <hpa@...or.com> wrote:
> 
>> On 09/04/2009 08:33 AM, David Woodhouse wrote:
>>> On Fri, 4 Sep 2009, Ingo Molnar wrote:
>>>
>>>
>>>>> x86: Don't silently override CONFIG_64BIT in 'make oldconfig'
>>>>
>>>> -tip testing found that this commit broke the UML build:
>>>>
>>>> /home/mingo/tip/arch/um/Makefile:52:
>>>> /home/mingo/tip/arch/um/Makefile-x86: No such file or directory
>>>> make[1]: *** No rule to make target
>>>> `/home/mingo/tip/arch/um/Makefile-x86'.  Stop.
>>>> make: *** [sub-make] Error 2
>>>
>>> Hm, doesn't that mean that UML has always been broken for ARCH=x86?
>>
>> Quite possible.  ARCH=x86 hasn't exactly been widely used.
> 
> Note, i used 'make ARCH=um' so this commit cannot be pushed upwards 
> until this problem is fixed. It could very well be some missing 
> changes on the UML side.
> 

Okay, the problem is the following: UM treats i386 and x86-64 as
separate architectures, and it gets very unhappy with SUBARCH=x86.  A
trivial attempt to fix it:

diff --git a/arch/um/Makefile b/arch/um/Makefile
index 0728def..b1cc9cf 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -12,6 +12,17 @@ OS := $(shell uname -s)
 # features.
 SHELL := /bin/bash

+#
+# i386 and x86_64 are separate architectures to the UM build.
+#
+ifeq ($(SUBARCH),x86)
+ifeq ($(CONFIG_64BIT),y)
+SUBARCH := x86_64
+else
+SUBARCH := i386
+endif
+endif
+
 filechk_gen_header = $<

 core-y                 += $(ARCH_DIR)/kernel/          \

... didn't fix it, as "make defconfig" promptly made a 32-bit
configuration on my 64-bit system, and the build failed.

The "obvious" change of allowing SUBARCH to take values like i386 and
x86_64 is also wrong (and possibly have a DEFAULT_ARCH which can be
different than SUBARCH), because we have several instances of:

ifneq ($(SUBARCH),$(ARCH))

... in the build tree, and even have ugliness like:

[scripts/tags.h]
# Support um (which uses SUBARCH)
if [ "${ARCH}" = "um" ]; then
        if [ "$SUBARCH" = "i386" ]; then
                archinclude=x86
        elif [ "$SUBARCH" = "x86_64" ]; then
                archinclude=x86
        else
                archinclude=${SUBARCH}
        fi
fi

Anyway... it sounds like we need to drop this commit for now and
re-merge it when there is a fix for UM.

Jeff, Sam, I would appreciate your suggestions as how best to fix this
kind of stuff...

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