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: <202108202248.921E8C66@keescook>
Date:   Fri, 20 Aug 2021 22:48:56 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Randy Dunlap <rdunlap@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Nathan Chancellor <nathan@...nel.org>
Subject: Re: linux-next: Tree for Aug 20 (Wno-alloc-size-larger-than)

On Fri, Aug 20, 2021 at 02:54:05PM -0700, Randy Dunlap wrote:
> On 8/20/21 2:26 AM, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Changes since 20210819:
> > 
> 
> Both linux-next and mmotm have many of these warnings when using
> gcc (SUSE Linux) 7.5.0:
> 
> cc1: warning: unrecognized command line option '-Wno-alloc-size-larger-than'

Ew. Thanks for letting me know. I thought I'd verified this existed in
gcc going back to 4.9, but it looks like I did something wrong in that
test.

I think this should fix it:

diff --git a/Makefile b/Makefile
index b0fafc41b686..e33ffa05899e 100644
--- a/Makefile
+++ b/Makefile
@@ -1097,7 +1097,7 @@ endif
 ifdef CONFIG_CC_IS_GCC
 # The allocators already balk at large sizes, so silence the compiler
 # warnings for bounds checks involving those possible values.
-KBUILD_CFLAGS += -Wno-alloc-size-larger-than
+KBUILD_CFLAGS += $(call cc-option, -Wno-alloc-size-larger-than)
 endif
 
 # disable invalid "can't wrap" optimizations for signed / pointers

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ