Linux-sh Archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	linux-hardening@vger.kernel.org, linux-wireless@vger.kernel.org,
	linux-mips@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: Build regressions/improvements in v6.5-rc3
Date: Mon, 14 Aug 2023 12:00:51 -0700	[thread overview]
Message-ID: <202308141159.9E4C2332@keescook> (raw)
In-Reply-To: <CAMuHMdXRiacSxqDzYmakWAQB99kYvY0Bi9zALP9ZnC9Xs_xO5g@mail.gmail.com>

On Mon, Aug 14, 2023 at 06:20:59PM +0200, Geert Uytterhoeven wrote:
> Hi Kees,
> 
> On Sat, Jul 29, 2023 at 12:57 AM Kees Cook <keescook@chromium.org> wrote:
> > On Mon, Jul 24, 2023 at 02:43:02PM +0200, Geert Uytterhoeven wrote:
> > > On Mon, 24 Jul 2023, Geert Uytterhoeven wrote:
> > > > JFYI, when comparing v6.5-rc3[1] to v6.5-rc2[3], the summaries are:
> > > >  - build errors: +5/-0
> > >
> > >   + /kisskb/src/include/linux/fortify-string.h: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]:  => 583:25, 493:25
> > >
> > > mips-gcc13/mips-allmodconfig
> > >
> > > Full context:
> > >
> > >     In function 'fortify_memset_chk',
> > >       inlined from 'memset_io' at /kisskb/src/arch/mips/include/asm/io.h:486:2,
> > >       inlined from 'build_auth_frame' at /kisskb/src/drivers/net/wireless/legacy/ray_cs.c:2697:2:
> > >     /kisskb/src/include/linux/fortify-string.h:493:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
> > >       493 |                         __write_overflow_field(p_size_field, size);
> > >         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >     In function 'fortify_memcpy_chk',
> > >       inlined from 'memcpy_toio' at /kisskb/src/arch/mips/include/asm/io.h:494:2,
> > >       inlined from 'translate_frame' at /kisskb/src/drivers/net/wireless/legacy/ray_cs.c:955:3,
> > >       inlined from 'ray_hw_xmit.constprop' at /kisskb/src/drivers/net/wireless/legacy/ray_cs.c:912:12:
> > >     /kisskb/src/include/linux/fortify-string.h:583:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
> > >       583 |                         __write_overflow_field(p_size_field, size);
> > >         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> > > Single-element flexible array abuse in drivers/net/wireless/legacy/rayctl.h:tx_msg.var
> >
> > ^^^^
> > is this line from you or is there a tool outputting this? Because, yes,
> 
> It is a line from me.
> 
> (should I take it as a compliment that I start sounding like a tool? ;-)

Heh. It was so declaratory. :) I think I was hoping there was some
analyzer that could save us the pain of manually examining these
warnings.

> 
> > very true:
> >
> > struct tx_msg {
> >     struct tib_structure tib;
> >     struct phy_header phy;
> >     struct mac_header mac;
> >     UCHAR  var[1];
> > };
> >
> > I'll send a patch.
> 
> Thanks, I noticed you took care while I was enjoying summer holidays ;-)

Awesome! Thanks for the report. :)

-- 
Kees Cook

      reply	other threads:[~2023-08-14 19:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHk-=wi4Yau-3Bsv2rXYmtXMTLaj3=Wyf4cdM6d89czFvkVsRQ@mail.gmail.com>
     [not found] ` <20230724122626.1701631-1-geert@linux-m68k.org>
2023-07-24 12:43   ` Build regressions/improvements in v6.5-rc3 Geert Uytterhoeven
2023-07-28 22:57     ` Kees Cook
2023-08-14 16:20       ` Geert Uytterhoeven
2023-08-14 19:00         ` Kees Cook [this message]

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=202308141159.9E4C2332@keescook \
    --to=keescook@chromium.org \
    --cc=geert@linux-m68k.org \
    --cc=gustavoars@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).