Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1429618

Re: [PATCH] fbdev: atyfb: fix array overflow

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] fbdev: atyfb: fix array overflow
Date 2016-06-23 11:10 +0200
Message-ID <rN8O6-7LB-11@gated-at.bofh.it> (permalink)
References <rMPBM-3lU-31@gated-at.bofh.it> <rN0Qx-2iS-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thursday, June 23, 2016 3:28:25 AM CEST Ville Syrjälä wrote:
> On Wed, Jun 22, 2016 at 02:37:11PM +0200, Arnd Bergmann wrote:
> > When building with CONFIG_UBSAN_SANITIZE_ALL on ARM, I get this
> > gcc warning for atyfb:
> > 
> > drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_bl_update_status':
> > drivers/video/fbdev/aty/atyfb_base.c:167:33: warning: array subscript is above array bounds [-Warray-bounds]
> > drivers/video/fbdev/aty/atyfb_base.c:152:26: warning: array subscript is above array bounds [-Warray-bounds]
> > 
> > Apparently the warning is correct and there is indeed an overflow,
> 
> Nope. All the LCD register indexes on the Rage LT (the only relevant
> chip for this code path) should stay below the table size. At least
> I can't see any place where we'd walk past the end.

I don't understand what you mean: the warning is about LCD_MISC_CNTL,
which is defined as 0x14, while the array size is 9 and that is smaller.

Is there something more subtle going on than what gcc sees?

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] fbdev: atyfb: fix array overflow Arnd Bergmann <arnd@arndb.de> - 2016-06-22 14:40 +0200
  Re: [PATCH] fbdev: atyfb: fix array overflow Ville Syrjälä <syrjala@sci.fi> - 2016-06-23 02:40 +0200
    Re: [PATCH] fbdev: atyfb: fix array overflow Arnd Bergmann <arnd@arndb.de> - 2016-06-23 11:10 +0200
      Re: [PATCH] fbdev: atyfb: fix array overflow Ville Syrjälä <syrjala@sci.fi> - 2016-06-23 19:30 +0200
  Re: [PATCH] fbdev: atyfb: fix array overflow Geert Uytterhoeven <geert@linux-m68k.org> - 2016-06-23 11:00 +0200
    Re: [PATCH] fbdev: atyfb: fix array overflow Arnd Bergmann <arnd@arndb.de> - 2016-06-23 11:30 +0200
      Re: [PATCH] fbdev: atyfb: fix array overflow Ville Syrjälä <syrjala@sci.fi> - 2016-06-23 19:40 +0200

csiph-web