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]
Date:   Sun, 20 Aug 2017 22:19:07 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        mm-commits@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        stable <stable@...r.kernel.org>,
        gregkh <gregkh@...uxfoundation.org>
Subject: Re: + kbuild-disable-wformat-truncation-warnings-by-default.patch
 added to -mm tree

Hi Arnd,


2017-07-20 16:24 GMT+09:00 Arnd Bergmann <arnd@...db.de>:
> On Wed, Jul 19, 2017 at 11:50 PM,  <akpm@...ux-foundation.org> wrote:
>> ------------------------------------------------------
>> From: Arnd Bergmann <arnd@...db.de>
>> Subject: kbuild: disable -Wformat-truncation warnings by default
>>
>> With x86 allmodconfig, we currently get 233 -Wformat-truncation warnings,
>> which makes the entire warnings rather useless.
>>
>> This turns off the warning by default, unless we specify W=1 or higher
>>
>> Link: http://lkml.kernel.org/r/20170714120720.906842-2-arnd@arndb.de
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
>> ---
>>
>>  scripts/Makefile.extrawarn |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff -puN scripts/Makefile.extrawarn~kbuild-disable-wformat-truncation-warnings-by-default scripts/Makefile.extrawarn
>> --- a/scripts/Makefile.extrawarn~kbuild-disable-wformat-truncation-warnings-by-default
>> +++ a/scripts/Makefile.extrawarn
>> @@ -67,5 +67,8 @@ KBUILD_CFLAGS += $(call cc-disable-warni
>>  KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare)
>>  KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length)
>>  KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized)
>> +else
>> +# noisy gcc-7 warnings
>> +KBUILD_CFLAGS += $(call cc-option,-Wformat-truncation=0)
>>  endif
>>  endif
>
> Hi Andrew, Linus, Greg,
>
> I noticed that Linus has made a similar patch in 4.13-rc1, commit bd664f6b3e37
> ("disable new gcc-7.1.1 warnings for now"), and it completely disables three
> warnings (format-truncation, format-overflow and int-in-bool-context).
>
> Obviously there is no point in having both, so let's talk about what we
> want for 4.13, stable-backports and for future kernels, I'll then send those
> patches. Here is my first suggestion:
>
> - enable all three warnings with "make W=1" in 4.13, but leave them
>   disabled by default.
> - backport Linus' patch, plus the follow-up for W=1 to stable kernels,
>   to allow stable kernels to build cleanly
> - backport the patches that address any other gcc-7 warnings, as
>   well as those that are not obvious false-positives to stable kernels
> - In 4.14+, use my version above and address all int-in-bool-context
>   and format-overflow warnings, but only use -Wformat-truncation
>   with make W=1.
>

Talking about 4.14+, shall we move -Wformat-truncation
from the top Makefile (always disable) to
Makefile.extrawarn (enable with W=1) ?


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ