Thread (2 messages) flat view 2 messages, 1 author, 2016-03-03

Re: selftests/powerpc: Fix out of bounds access in TM signal test

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-03-03 10:58:53

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help