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]
Message-ID: <CAK7LNASyp8SzO3G+th5RgmRNBM_ryKuy0XzaMrdUdo8Sd6RR0A@mail.gmail.com>
Date:   Fri, 2 Sep 2022 18:18:10 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Borislav Petkov <bp@...en8.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: [PATCH] x86/config: Make the x86 defconfigs a bit more usable

On Fri, Sep 2, 2022 at 5:50 PM Ingo Molnar <mingo@...nel.org> wrote:
>
>
> * Nathan Chancellor <nathan@...nel.org> wrote:
>
> > On Sun, Mar 27, 2022 at 09:03:14PM +0200, Ingo Molnar wrote:
> > > Yeah, good catch! ...
> > >
> > > I use defconfigs by explicitly adding in the architecture:
> > >
> > >   kepler:~/tip> make ARCH=i386 defconfig
> > >
> > >   kepler:~/tip> kconfig-arch
> > >   i386
> > >
> > > ... so never I noticed this bug.
> >
> > Ah, good point!
> >
> > > I fixed this in the latest version (attached).
> > >
> > > Arguably 'make ARCH=i386 savedefconfig' should preserve this, so that
> > > refreshing defconfigs on bi-arch architectures is idempotent, but that's no
> > > excuse to regress the existing defconfig behavior.
> >
> > Hmmm, I thought that it would, but I think the behavior of savedefconfig
> > is actually correct with regards to how it handles CONFIG_64BIT in the
> > presence of an explicit ARCH value, based on how CONFIG_64BIT is
> > defined:
> >
> > config 64BIT
> >       bool "64-bit kernel" if "$(ARCH)" = "x86"
> >       default "$(ARCH)" != "i386"
> >       help
> >         Say yes to build a 64-bit kernel - formerly known as x86_64
> >         Say no to build a 32-bit kernel - formerly known as i386
> >
> > As the default is no when ARCH == i386 and there is no prompt in that
> > situation, "# CONFIG_64BIT is not set" gets dropped, as that is the
> > default. Using savedefconfig without the ARCH variable would do the
> > right thing.
> >
> > I tried playing around with these Kconfig symbols to see if I could get
> > something that would work for savedefconfig with or without ARCH, but I
> > could not really come up with anything. I did not try super hard though,
> > it might still be possible.
>
> Unfortunately, even without the ARCH=i386 'make savedefconfig' doesn't seem
> to be doing the right thing & is dropping the '# CONFIG_64BIT is not set'
> line:


Oh, really?

Without ARCH=i386, it works correctly for me.



masahiro@zoe:~/ref/linux$ make i386_defconfig savedefconfig
#
# No change to .config
#
masahiro@zoe:~/ref/linux$ grep CONFIG_64BIT defconfig
# CONFIG_64BIT is not set




I guess you gave ARCH=i386 somewhere.







>  kepler:~/tip> make ARCH=i386 defconfig
>  *** Default configuration is based on 'i386_defconfig'
>  #
>  # configuration written to .config
>  #
>  kepler:~/tip> make savedefconfig
>  kepler:~/tip> diff -up arch/x86/configs/i386_defconfig defconfig
>  --- arch/x86/configs/i386_defconfig    2022-09-02 10:45:43.117430882 +0200
>  +++ defconfig  2022-09-02 10:46:56.663864901 +0200
>  @@ -282,4 +282,3 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
>   CONFIG_EARLY_PRINTK_DBGP=y
>   CONFIG_DEBUG_BOOT_PARAMS=y
>   CONFIG_UNWINDER_FRAME_POINTER=y
>  -# CONFIG_64BIT is not set
>  kepler:~/tip>
>
> This is annoying in that every time I modify the i386 defconfig and use
> 'make savedefconfig', I have to manually revert that change ...
>
> This reduces the usability of 'make savedefconfig' quite a bit.
>
> Maybe Masahiro-san can tell me how I'm doing this wrong?
>
> Thanks,
>
>         Ingo



--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ