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] [day] [month] [year] [list]
Message-ID: <CAK7LNATQVOjxP9dO45OQq_HzXV0VtbObZKcwJFt4Saczaob8gw@mail.gmail.com>
Date:   Thu, 16 Feb 2023 01:54:08 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        Arnd Bergmann <arnd@...db.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nicolas Schier <nicolas@...sle.eu>,
        Miguel Ojeda <ojeda@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: make 64-bit defconfig the default

On Wed, Feb 15, 2023 at 6:17 PM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> Running 'make ARCH=x86 defconfig' on anything other than an x86_64
> machine currently results in a 32-bit build, which is rarely what
> anyone wants these days.
>
> Change the default so that the 64-bit config gets used unless
> the user asks for i386_defconfig, uses ARCH=i386 or runs on
> a system that "uname -m" identifies as i386/i486/i586/i686.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  arch/x86/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index a27b27d1418d..cc7efb6e6e6b 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -3,10 +3,10 @@
>
>  # select defconfig based on actual architecture
>  ifeq ($(ARCH),x86)
> -  ifeq ($(shell uname -m),x86_64)
> -        KBUILD_DEFCONFIG := x86_64_defconfig
> -  else
> +  ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)


I did not test this, but I think

     ifneq ($(shell uname -m | grep 'i.86'),)

is simpler.




     ifneq ($(filter i%86, $(shell uname -m)),)


will also work with less process forks.






>          KBUILD_DEFCONFIG := i386_defconfig
> +  else
> +        KBUILD_DEFCONFIG := x86_64_defconfig
>    endif
>  else
>          KBUILD_DEFCONFIG := $(ARCH)_defconfig
> --
> 2.39.1
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ