From: Michael Ellerman <mpe@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, <linuxppc-dev@ozlabs.org>
Cc: Michael Neuling <mikey@neuling.org>,
cyrilbur@gmail.com, sjitindarsingh@gmail.com
Subject: Re: selftests/powerpc: Fix out of bounds access in TM signal test
Date: Thu, 3 Mar 2016 21:58:53 +1100 (AEDT) [thread overview]
Message-ID: <20160303105853.811CA140C3C@ozlabs.org> (raw)
In-Reply-To: <1456922671-31676-1-git-send-email-mpe@ellerman.id.au>
On Wed, 2016-02-03 at 12:44:31 UTC, Michael Ellerman wrote:
> Gcc helpfully points out that we're accessing past the end of the gprs
> array:
>
> tm-signal-msr-resv.c: In function 'signal_usr1':
> tm-signal-msr-resv.c:43:37: error: array subscript is above array bounds [-Werror=array-bounds]
> ucp->uc_mcontext.regs->gpr[PT_MSR] |= (7ULL);
>
> We haven't noticed previously because -flto was hiding it somehow.
>
> The code is confused, PT_MSR isn't a gpr, instead it's in
> uc_regs->gregs, so fix it.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/501e279c231bd8d5eed4ecea5a
cheers
prev parent reply other threads:[~2016-03-03 10:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 12:44 [PATCH] selftests/powerpc: Fix out of bounds access in TM signal test Michael Ellerman
2016-03-03 10:58 ` Michael Ellerman [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=20160303105853.811CA140C3C@ozlabs.org \
--to=mpe@ellerman.id.au \
--cc=cyrilbur@gmail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=sjitindarsingh@gmail.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).