linux_dsm_epyc7002/tools/testing/selftests/powerpc/tm
Michael Ellerman 501e279c23 selftests/powerpc: Fix out of bounds access in TM signal test
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>
2016-03-02 23:34:45 +11:00
..
.gitignore selftests/powerpc: Add test to check if VSRs are corrupted 2015-12-14 20:41:50 +11:00
Makefile selftests/powerpc: Add test to check if VSRs are corrupted 2015-12-14 20:41:50 +11:00
tm-resched-dscr.c selftests/powerpc: Skip tm-resched-dscr if we don't have TM 2015-12-14 20:41:48 +11:00
tm-signal-msr-resv.c selftests/powerpc: Fix out of bounds access in TM signal test 2016-03-02 23:34:45 +11:00
tm-signal-stack.c selftests/powerpc: Add TM signal with invalid stack test 2015-12-14 20:41:49 +11:00
tm-syscall-asm.S selftests/powerpc: Add transactional syscall test 2015-04-11 20:49:20 +10:00
tm-syscall.c selftests/powerpc: Move TM helpers into tm.h 2015-12-14 20:41:48 +11:00
tm-vmxcopy.c selftests/powerpc: Add test to check if VSRs are corrupted 2015-12-14 20:41:50 +11:00
tm.h selftests/powerpc: Move TM helpers into tm.h 2015-12-14 20:41:48 +11:00