]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Fix wild_bctr test to work on ppc64
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 12 Nov 2018 02:46:06 +0000 (13:46 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 12 Nov 2018 03:47:54 +0000 (14:47 +1100)
commitbd36ec1d9a387d4e65fe842f6a6f9ae786994f95
tree4ac37971e808e324b428551a9836bf5934bbad29
parent2f47568571e2503e92024c802a78ae6aa3693452
selftests/powerpc: Fix wild_bctr test to work on ppc64

The selftest I recently added to test branching to an out-of-bounds
NIP doesn't work on 64-bit big endian. It does fail but not in the
right way. That is it SEGVs trying to load from the opd at BAD_NIP,
but it never gets as far as branching to BAD_NIP.

To fix it we need to create an opd which is reachable but which holds
the bad address.

Fixes: d861d7979f5d ("selftests/powerpc: Add a test of wild bctr")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/mm/wild_bctr.c