All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the kspp tree
@ 2021-08-30  8:44 Stephen Rothwell
  2021-08-30 23:50 ` Kees Cook
  2021-09-06  5:41 ` Stephen Rothwell
  0 siblings, 2 replies; 11+ messages in thread
From: Stephen Rothwell @ 2021-08-30  8:44 UTC (permalink / raw)
  To: Kees Cook
  Cc: Gustavo A. R. Silva, Linux Kernel Mailing List,
	Linux Next Mailing List, Anitha Chrisanthus, Sam Ravnborg

[-- Attachment #1: Type: text/plain, Size: 1774 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (powerpc
allyesconfig) produced this warning:

drivers/gpu/drm/kmb/kmb_plane.c:135:20: warning: array subscript 3 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
  135 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
   48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
      |                       ^~~~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c:132:20: warning: array subscript 2 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
  132 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE;
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
   48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
      |                       ^~~~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c:129:20: warning: array subscript 1 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
  129 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_VL2_ENABLE;
      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
   48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
      |                       ^~~~~~~~~~~~

Exposed by commit

  656256c0d67c ("Makefile: Enable -Warray-bounds")

Introduced by commit

  7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display")

from v5.11-rc1.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build warning after merge of the kspp tree
  2021-08-30  8:44 linux-next: build warning after merge of the kspp tree Stephen Rothwell
@ 2021-08-30 23:50 ` Kees Cook
  2021-08-31  0:49   ` Stephen Rothwell
  2021-09-06  5:41 ` Stephen Rothwell
  1 sibling, 1 reply; 11+ messages in thread
From: Kees Cook @ 2021-08-30 23:50 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo A. R. Silva, Linux Kernel Mailing List,
	Linux Next Mailing List, Anitha Chrisanthus, Sam Ravnborg,
	edmund.j.dea



On August 30, 2021 1:44:29 AM PDT, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>Hi all,
>
>After merging the kspp tree, today's linux-next build (powerpc
>allyesconfig) produced this warning:
>
>drivers/gpu/drm/kmb/kmb_plane.c:135:20: warning: array subscript 3 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
>  135 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
>      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
>In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
>drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
>   48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
>      |                       ^~~~~~~~~~~~

Hi!

Ah yes, thanks for the report. I encountered this too, and have been told the warning will go away soon:
https://lore.kernel.org/lkml/BY5PR11MB4182ABD607EB99C1F68777928CC69@BY5PR11MB4182.namprd11.prod.outlook.com/

-Kees


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build warning after merge of the kspp tree
  2021-08-30 23:50 ` Kees Cook
@ 2021-08-31  0:49   ` Stephen Rothwell
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2021-08-31  0:49 UTC (permalink / raw)
  To: Kees Cook
  Cc: Gustavo A. R. Silva, Linux Kernel Mailing List,
	Linux Next Mailing List, Anitha Chrisanthus, Sam Ravnborg,
	edmund.j.dea

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

Hi Kees,

On Mon, 30 Aug 2021 16:50:55 -0700 Kees Cook <keescook@chromium.org> wrote:
>
> On August 30, 2021 1:44:29 AM PDT, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> >After merging the kspp tree, today's linux-next build (powerpc
> >allyesconfig) produced this warning:
> >
> >drivers/gpu/drm/kmb/kmb_plane.c:135:20: warning: array subscript 3 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
> >  135 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
> >      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
> >In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
> >drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
> >   48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
> >      |                       ^~~~~~~~~~~~  
> 
> Ah yes, thanks for the report. I encountered this too, and have been told the warning will go away soon:
> https://lore.kernel.org/lkml/BY5PR11MB4182ABD607EB99C1F68777928CC69@BY5PR11MB4182.namprd11.prod.outlook.com/

ok, thanks

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build warning after merge of the kspp tree
  2021-08-30  8:44 linux-next: build warning after merge of the kspp tree Stephen Rothwell
  2021-08-30 23:50 ` Kees Cook
@ 2021-09-06  5:41 ` Stephen Rothwell
  2021-09-06 17:06   ` Kees Cook
  1 sibling, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2021-09-06  5:41 UTC (permalink / raw)
  To: Kees Cook
  Cc: Gustavo A. R. Silva, Linux Kernel Mailing List,
	Linux Next Mailing List, Anitha Chrisanthus, Sam Ravnborg,
	Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]

Hi all,

On Mon, 30 Aug 2021 18:44:29 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the kspp tree, today's linux-next build (powerpc
> allyesconfig) produced this warning:
> 
> drivers/gpu/drm/kmb/kmb_plane.c:135:20: warning: array subscript 3 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
>   135 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
>       |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
> In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
> drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
>    48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
>       |                       ^~~~~~~~~~~~
> drivers/gpu/drm/kmb/kmb_plane.c:132:20: warning: array subscript 2 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
>   132 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE;
>       |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
> In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
> drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
>    48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
>       |                       ^~~~~~~~~~~~
> drivers/gpu/drm/kmb/kmb_plane.c:129:20: warning: array subscript 1 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
>   129 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_VL2_ENABLE;
>       |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
> In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
> drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
>    48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
>       |                       ^~~~~~~~~~~~
> 
> Exposed by commit
> 
>   656256c0d67c ("Makefile: Enable -Warray-bounds")
> 
> Introduced by commit
> 
>   7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display")
> 
> from v5.11-rc1.

Due to Linus -Werror, these are now errors :-(

I have reverted commit 656256c0d67c for now.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build warning after merge of the kspp tree
  2021-09-06  5:41 ` Stephen Rothwell
@ 2021-09-06 17:06   ` Kees Cook
  2021-09-06 17:12     ` Linus Torvalds
  0 siblings, 1 reply; 11+ messages in thread
From: Kees Cook @ 2021-09-06 17:06 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Gustavo A. R. Silva, Linux Kernel Mailing List,
	Linux Next Mailing List, Anitha Chrisanthus, Sam Ravnborg,
	Linus Torvalds

On Mon, Sep 06, 2021 at 03:41:51PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> On Mon, 30 Aug 2021 18:44:29 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the kspp tree, today's linux-next build (powerpc
> > allyesconfig) produced this warning:
> > 
> > drivers/gpu/drm/kmb/kmb_plane.c:135:20: warning: array subscript 3 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
> >   135 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
> >       |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
> > In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
> > drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
> >    48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
> >       |                       ^~~~~~~~~~~~
> > drivers/gpu/drm/kmb/kmb_plane.c:132:20: warning: array subscript 2 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
> >   132 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE;
> >       |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
> > In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
> > drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
> >    48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
> >       |                       ^~~~~~~~~~~~
> > drivers/gpu/drm/kmb/kmb_plane.c:129:20: warning: array subscript 1 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
> >   129 |   kmb->plane_status[plane_id].ctrl = LCD_CTRL_VL2_ENABLE;
> >       |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~
> > In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
> > drivers/gpu/drm/kmb/kmb_drv.h:48:23: note: while referencing 'plane_status'
> >    48 |  struct layer_status  plane_status[KMB_MAX_PLANES];
> >       |                       ^~~~~~~~~~~~
> > 
> > Exposed by commit
> > 
> >   656256c0d67c ("Makefile: Enable -Warray-bounds")
> > 
> > Introduced by commit
> > 
> >   7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display")
> > 
> > from v5.11-rc1.
> 
> Due to Linus -Werror, these are now errors :-(
> 
> I have reverted commit 656256c0d67c for now.

I'm still surprised Linus added -Werror (it seems to go against years of
his earlier mandates on not breaking the build). Seems like
3fe617ccafd6 should be reverted instead. ;)

Linus, warnings are being reported (as above), are you sure -Werror is
the right way to go? (I can't believe I'm saying this, given my past
desire to make various hardening failures break the build -- you
convinced me to always warn instead, and it made good sense: a developer
still gets binary results as well as any new warnings...)

-Kees

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build warning after merge of the kspp tree
  2021-09-06 17:06   ` Kees Cook
@ 2021-09-06 17:12     ` Linus Torvalds
  0 siblings, 0 replies; 11+ messages in thread
From: Linus Torvalds @ 2021-09-06 17:12 UTC (permalink / raw)
  To: Kees Cook
  Cc: Stephen Rothwell, Gustavo A. R. Silva, Linux Kernel Mailing List,
	Linux Next Mailing List, Anitha Chrisanthus, Sam Ravnborg

On Mon, Sep 6, 2021 at 10:06 AM Kees Cook <keescook@chromium.org> wrote:
>>
> Linus, warnings are being reported (as above)

New warnings are apparently at least partly reported, but also clearly
(a) old warnings are ignored, and (b) new warnings seem to be very
spottily fixed too.

Guenter reports "pass: 89 fail: 64" for his build setups.

So the fact that *I* require a clean build, and generally have two
reject a couple of build requests every merge window because of that
clearly doesn't mean that we actually have clean builds.

I've had that "no warnings" requirement for years. And that means that
*my* build has been clean for years.

I want *all* builds to be clean, or at least as far as possible.

You should be the last to complain. You are literally the drop that
broke the camel's back. I'm done being the last guard against build
warnings.

           Linus

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build warning after merge of the kspp tree
  2024-03-07  6:16 Stephen Rothwell
@ 2024-03-07 19:25 ` Kees Cook
  0 siblings, 0 replies; 11+ messages in thread
From: Kees Cook @ 2024-03-07 19:25 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

On Thu, Mar 07, 2024 at 05:16:03PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> include/linux/overflow.h:408: warning: Excess function parameter 'initializer...' description in '_DEFINE_FLEX'
> 
> Introduced by commit
> 
>   014dc22af922 ("overflow: Change DEFINE_FLEX to take __counted_by member")

Thanks! I've fixed this now. (Weird that kern-doc will take "..." as an
argument name, but "foo..." becomes "foo" not "foo...", but okay.)

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 11+ messages in thread

* linux-next: build warning after merge of the kspp tree
@ 2024-03-07  6:16 Stephen Rothwell
  2024-03-07 19:25 ` Kees Cook
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2024-03-07  6:16 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (htmldocs) produced
this warning:

include/linux/overflow.h:408: warning: Excess function parameter 'initializer...' description in '_DEFINE_FLEX'

Introduced by commit

  014dc22af922 ("overflow: Change DEFINE_FLEX to take __counted_by member")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* linux-next: build warning after merge of the kspp tree
@ 2024-02-22  5:56 Stephen Rothwell
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2024-02-22  5:56 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

arch/arm/boot/compressed/misc.c:157:6: warning: no previous prototype for '__fortify_panic' [-Wmissing-prototypes]
  157 | void __fortify_panic(const u8 reason, size_t avail, size_t size)
      |      ^~~~~~~~~~~~~~~

Introduced by commit

  0f4459080884 ("fortify: Split reporting and avoid passing string pointer")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build warning after merge of the kspp tree
  2024-02-08  3:48 Stephen Rothwell
@ 2024-02-10  6:44 ` Kees Cook
  0 siblings, 0 replies; 11+ messages in thread
From: Kees Cook @ 2024-02-10  6:44 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

On Thu, Feb 08, 2024 at 02:48:42PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the kspp tree, today's linux-next build (htmldocs) produced
> this warning:
> 
> include/linux/string.h:142: warning: Function parameter or struct member 'dst' not described in 'strscpy_pad'
> include/linux/string.h:142: warning: Excess function parameter 'dest' description in 'strscpy_pad'
> include/linux/string.h:142: warning: Excess function parameter 'count' description in 'strscpy_pad'
> 
> Introduced by commit
> 
>   0bf7961afff1 ("string: Allow 2-argument strscpy_pad()")

Thanks! This is fixed now.

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 11+ messages in thread

* linux-next: build warning after merge of the kspp tree
@ 2024-02-08  3:48 Stephen Rothwell
  2024-02-10  6:44 ` Kees Cook
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2024-02-08  3:48 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

Hi all,

After merging the kspp tree, today's linux-next build (htmldocs) produced
this warning:

include/linux/string.h:142: warning: Function parameter or struct member 'dst' not described in 'strscpy_pad'
include/linux/string.h:142: warning: Excess function parameter 'dest' description in 'strscpy_pad'
include/linux/string.h:142: warning: Excess function parameter 'count' description in 'strscpy_pad'

Introduced by commit

  0bf7961afff1 ("string: Allow 2-argument strscpy_pad()")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-07 19:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30  8:44 linux-next: build warning after merge of the kspp tree Stephen Rothwell
2021-08-30 23:50 ` Kees Cook
2021-08-31  0:49   ` Stephen Rothwell
2021-09-06  5:41 ` Stephen Rothwell
2021-09-06 17:06   ` Kees Cook
2021-09-06 17:12     ` Linus Torvalds
2024-02-08  3:48 Stephen Rothwell
2024-02-10  6:44 ` Kees Cook
2024-02-22  5:56 Stephen Rothwell
2024-03-07  6:16 Stephen Rothwell
2024-03-07 19:25 ` Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.