All of lore.kernel.org
 help / color / mirror / Atom feed
From: Meelis Roos <mroos@linux.ee>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: namei_vfat.c array subscript is above array bounds
Date: Fri, 7 Jul 2017 16:58:04 +0300 (EEST)	[thread overview]
Message-ID: <alpine.LRH.2.20.1707071647480.605@math.ut.ee> (raw)
In-Reply-To: <8760f4pdhz.fsf@devron>

> > I do not know if this is old or new, just noticed it scrolling by while 
> > compiling current 4.12+git on 32-bit x86.
> 
> Which version of compiler?

gcc version 6.4.0 20170704 (Debian 6.4.0-1)

After "touch fs/fat/namei_vfat.c" it appears consitently for me. Debian 
unstable, up to date.

> Well, latest change of namei_vfat.c is Sep, 2016. And I can't reproduce
> it by "gcc version 6.3.0 20170516 (Debian 6.3.0-18)".
> 
> >   CC [M]  fs/fat/namei_vfat.o
> > In file included from ./arch/x86/include/asm/string.h:2:0,
> >                  from ./include/linux/string.h:18,
> >                  from ./include/linux/bitmap.h:8,
> >                  from ./include/linux/cpumask.h:11,
> >                  from ./arch/x86/include/asm/cpumask.h:4,
> >                  from ./arch/x86/include/asm/msr.h:10,
> >                  from ./arch/x86/include/asm/processor.h:20,
> >                  from ./arch/x86/include/asm/cpufeature.h:4,
> >                  from ./arch/x86/include/asm/thread_info.h:52,
> >                  from ./include/linux/thread_info.h:37,
> >                  from ./arch/x86/include/asm/preempt.h:6,
> >                  from ./include/linux/preempt.h:80,
> >                  from ./include/linux/spinlock.h:50,
> >                  from ./include/linux/seqlock.h:35,
> >                  from ./include/linux/time.h:5,
> >                  from ./include/linux/stat.h:18,
> >                  from ./include/linux/module.h:10,
> >                  from fs/fat/namei_vfat.c:18:
> > fs/fat/namei_vfat.c: In function ‘vfat_add_entry’:
> > ./arch/x86/include/asm/string_32.h:74:16: warning: array subscript is above array bounds [-Warray-bounds]
> >    *((char *)to + 4) = *((char *)from + 4);
> >     ~~~~~~~~~~~~^~~~
> > ./arch/x86/include/asm/string_32.h:74:16: warning: array subscript is above array bounds [-Warray-bounds]
> > ./arch/x86/include/asm/string_32.h:78:17: warning: array subscript is above array bounds [-Warray-bounds]
> >    *((short *)to + 2) = *((short *)from + 2);
> >     ~~~~~~~~~~~~~^~~~
> > ./arch/x86/include/asm/string_32.h:78:17: warning: array subscript is above array bounds [-Warray-bounds]
> > ./arch/x86/include/asm/string_32.h:82:15: warning: array subscript is above array bounds [-Warray-bounds]
> >    *((int *)to + 1) = *((int *)from + 1);
> >     ~~~~~~~~~~~^~~~
> > ./arch/x86/include/asm/string_32.h:82:15: warning: array subscript is above array bounds [-Warray-bounds]
> 
> 

-- 
Meelis Roos (mroos@linux.ee)

  reply	other threads:[~2017-07-07 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07  9:35 namei_vfat.c array subscript is above array bounds Meelis Roos
2017-07-07 13:45 ` OGAWA Hirofumi
2017-07-07 13:58   ` Meelis Roos [this message]
2017-07-08  5:56     ` OGAWA Hirofumi
2017-07-08  6:13       ` Meelis Roos
2017-07-08  7:42         ` OGAWA Hirofumi

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=alpine.LRH.2.20.1707071647480.605@math.ut.ee \
    --to=mroos@linux.ee \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@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 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.