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: <CAK8P3a2ih-L7Y4bzO7BKUp9PKaDq96sWG=WrmUb0pA1v2pWC9g@mail.gmail.com>
Date:   Thu, 30 Mar 2017 10:03:17 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Josh Triplett <josh@...htriplett.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/debug: define BUG() againfor !CONFIG_BUG

On Thu, Mar 30, 2017 at 9:47 AM, Ingo Molnar <mingo@...nel.org> wrote:
>
> * Peter Zijlstra <peterz@...radead.org> wrote:
>> So should we then, for x86, disable BUG=n instead?
>
> Arnd, does CONFIG_BUG=n give any (marginal) text savings wrt.
> CONFIG_BUG=y && CONFIG_BUG_VERBOSE=n?

My patch makes it slightly worse, but the difference is still
around 1% of the total vmlinux size:

# CONFIG_BUG=n without my patch
   text   data    bss    dec    hex filename
9543165 4190288 843776 14577229 de6e4d obj-x86/vmlinux

# CONFIG_BUG=n with my patch
   text   data    bss    dec    hex filename
9578700 4190480 843776 14612956 def9dc obj-x86/vmlinux

# CONFIG_BUG=y, CONFIG_BUGVERBOSE=n
   text   data    bss    dec    hex filename
9698166 4212208 843776 14754150 e12166 obj-x86/vmlinux

Among the things we save are:

- WARN()/WARN_ON() gets left out entirely
- The bug_entry section (46192 bytes in defconfig)
- The code for decoding and printing the bug

> If not then we should indeed just disable CONFIG_BUG=n.

CONFIG_BUG is already guarded by CONFIG_EXPERT, along with
this help text in Kconfig:

          Disabling this option eliminates support for BUG and WARN, reducing
          the size of your kernel image and potentially quietly ignoring
          numerous fatal conditions. You should only consider disabling this
          option for embedded systems with no facilities for reporting errors.
          Just say Y.

I think this is reasonable to disable for systems that have no console
at all.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ