linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
	Yufen Wang <wangyufen@huawei.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org,
	Russell King <linux@armlinux.org.uk>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: fix out-of-bound access to ipi_types[]
Date: Tue, 19 Mar 2019 16:37:36 +0000	[thread overview]
Message-ID: <86imwezupb.wl-marc.zyngier@arm.com> (raw)
In-Reply-To: <1553010745-26585-1-git-send-email-yamada.masahiro@socionext.com>

On Tue, 19 Mar 2019 15:52:25 +0000,
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> 
> Since commit e7273ff49acf ("ARM: 8488/1: Make IPI_CPU_BACKTRACE a
> "non-secure" SGI"), IPI_CPU_BACKTRACE is assigned to SGI7.
> 
> raise_nmi() passes IPI_CPU_BACKTRACE (=7) into smp_cross_call(),
> but it is above the array bound of ipi_types[].
> 
> Increase NR_IPI, and add the entry to ipi_types[].
> 
> This fixes the following GCC warning:
> 
>   CC      arch/arm/kernel/smp.o
> arch/arm/kernel/smp.c: In function 'raise_nmi':
> arch/arm/kernel/smp.c:522:2: warning: array subscript 7 is above array bounds of 'const char *[7]' [-Warray-bounds]
>   trace_ipi_raise_rcuidle(target, ipi_types[ipinr]);
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

+Arnd.

A fix for this has been around since 2016:

http://lists.infradead.org/pipermail/linux-arm-kernel/2016-February/409393.html

and reposted several times since. I don't know why it hasn't been
picked up.

	M.

-- 
Jazz is not dead, it just smell funny.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2019-03-19 16:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 15:52 [PATCH] ARM: fix out-of-bound access to ipi_types[] Masahiro Yamada
2019-03-19 16:37 ` Marc Zyngier [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=86imwezupb.wl-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=arnd@arndb.de \
    --cc=dietmar.eggemann@arm.com \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=wangyufen@huawei.com \
    --cc=yamada.masahiro@socionext.com \
    /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 NNTP newsgroup(s).