From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Kees Cook <keescook@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Nathan Chancellor <nathan@kernel.org>
Subject: Re: linux-next: Tree for Aug 20 (Wno-alloc-size-larger-than)
Date: Mon, 23 Aug 2021 20:37:42 +1000 [thread overview]
Message-ID: <20210823203742.5169ad54@canb.auug.org.au> (raw)
In-Reply-To: <8b9cb816-9d8a-2633-1afa-f5c4597a8314@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 3232 bytes --]
Hi all,
On Sat, 21 Aug 2021 12:09:48 -0700 Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 8/20/21 10:48 PM, Kees Cook wrote:
> > 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
> >
>
> Well. That didn't help. This is very weird.
>
> This -Wno... option works (is accepted, no warning) on most files
> that are being built, but a few files report an error with it:
>
> ../drivers/gpu/drm/radeon/radeon_object.c: At top level:
> cc1: warning: unrecognized command line option '-Wno-alloc-size-larger-than'
>
> ../drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: At top level:
> cc1: warning: unrecognized command line option '-Wno-alloc-size-larger-than'
>
> ../drivers/hwmon/dell-smm-hwmon.c: At top level:
> cc1: warning: unrecognized command line option '-Wno-alloc-size-larger-than'
>
> CC arch/x86/kernel/cpu/proc.o
> cc1: warning: unrecognized command line option '-Wno-alloc-size-larger-than'
>
> ../arch/x86/kvm/mmu/mmu.c: At top level:
> cc1: error: unrecognized command line option '-Wno-alloc-size-larger-than' [-Werror]
>
> ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_chardev.c: At top level:
> cc1: warning: unrecognized command line option '-Wno-alloc-size-larger-than'
>
> ../kernel/trace/trace_osnoise.c: At top level:
> cc1: warning: unrecognized command line option '-Wno-alloc-size-larger-than'
>
> CC kernel/dma/mapping.o
> cc1: warning: unrecognized command line option '-Wno-alloc-size-larger-than'
>
>
> It seems like it might be related to some .config option.
>
> I did a couple of partial builds with V=1 but that info didn't help me any.
>
>
> If I am the only person seeing (reporting) this build warning, it could
> just be (another) SUSE GCC-ism. (had one just last week with -Wmain and
> kernel/trace/trace_osnoise.c)
Today, I am also seeing thsese, but only with my sparc{,64} defconfig
cross builds. This is with gcc 7.3.1 built from sources. I also just
get a few of them.
Also, I have the above "fix" patch applied (Andrew added it to mmots
today).
So something weird is happening.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-08-23 10:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-20 9:26 linux-next: Tree for Aug 20 Stephen Rothwell
2021-08-20 21:54 ` linux-next: Tree for Aug 20 (Wno-alloc-size-larger-than) Randy Dunlap
2021-08-21 5:48 ` Kees Cook
2021-08-21 19:09 ` Randy Dunlap
2021-08-23 10:37 ` Stephen Rothwell [this message]
2021-08-24 1:24 ` Randy Dunlap
2021-08-24 1:58 ` Stephen Rothwell
2021-08-25 1:59 ` Kees Cook
2021-08-25 17:04 ` Kees Cook
2021-08-25 17:49 ` Randy Dunlap
2021-08-26 3:54 ` Kees Cook
2021-08-26 5:10 ` Randy Dunlap
2021-08-26 5:23 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210823203742.5169ad54@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®