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: <CAK7LNAQUL4qEgk97z0WfagVDgGAARzj8hqFyrC2wnPjiLduEoQ@mail.gmail.com>
Date:   Wed, 24 Feb 2021 23:40:36 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Jessica Yu <jeyu@...nel.org>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Christoph Hellwig <hch@....de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Miroslav Benes <mbenes@...e.cz>,
        Emil Velikov <emil.l.velikov@...il.com>
Subject: Re: [GIT PULL] Modules updates for v5.12

On Wed, Feb 24, 2021 at 5:33 PM Jessica Yu <jeyu@...nel.org> wrote:
>
> +++ Linus Torvalds [23/02/21 12:03 -0800]:
> >On Tue, Feb 23, 2021 at 12:01 PM Christoph Hellwig <hch@....de> wrote:
> >>
> >> Does your build now enable TRIM_UNUSED_KSYMS but previously didn't by
> >> chance?
> >
> >Crossed emails.
> >
> >This is plain "make allmodconfig", so yes, now it will enable TRIM_UNUSED_KSYMS.
> >
> >This is unacceptably slow. If that symbol trimming takes 30% of the
> >whole kernel build time, it needs to be fixed or removed.
>
> [ Adding Masahiro to CC ]
>
> It looks like CONFIG_TRIM_UNUSED_KSYMS had been hiding behind
> CONFIG_UNUSED_SYMBOLS all this time, and once the EXPORT_UNUSED_SYMBOL
> stuff was removed, it exposed that option to be selected by
> allyesconfig. That option had previously caused build issues on
> powerpc on linux-next, so I had temporarily marked that as BROKEN on
> powerpc until Masahiro's fix landed in linux-next. I was not aware of
> the additional build slowdown issue :/ In any case, Christoph's
> suggestion to invert the option sounds reasonable, since the mips
> defconfig selects it, it does not seem totally unused.


TRIM_UNUSED_KSYMS builds the tree twice by its concept.

[1] 1st build
      At this point of time, we do not know  which EXPORT_SYMBOL()
      is needed. So, EXPORT_SYMBOL() is enabled, or noop'ed
      based on the temporal guess.
      (in the fresh build, EXPORT_SYMBOL() are all nooped.)

[2]  Get the list of symbols needed to resolve all symbol references.
     (this information is collected in include/generated/autoksyms.h)

[3] 2nd build
     Rebuild the objects whose EXPORT_SYMBOL()
     must be flipped.


The build system cleverly tracks which object needs rebuild.
So, building the tree twice does not mean
the build cost is twice.
But, 30% increase is reasonable.


In my understanding, TRIM_UNUSED_KSYMS is used
by Android.  (Generic Kernel Image)
So, we should revive it.






--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ