History log of /external/linux-kselftest/tools/testing/selftests/powerpc/tm/tm-signal-msr-resv.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
501e279c231bd8d5eed4ecea5a18dcd79d51b026 02-Mar-2016 Michael Ellerman <mpe@ellerman.id.au> 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>
/external/linux-kselftest/tools/testing/selftests/powerpc/tm/tm-signal-msr-resv.c
25007a69e852389985ee98235e76d740d4821c6c 20-Nov-2015 Michael Neuling <mikey@neuling.org> selftests/powerpc: Add TM signal return test

Test the kernel's signal return code to ensure that it doesn't crash
when both the transactional and suspend MSR bits are set in the signal
context.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Tested-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
[mpe: Skip if we don't have TM]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
/external/linux-kselftest/tools/testing/selftests/powerpc/tm/tm-signal-msr-resv.c