selftests/powerpc: Add test of memcmp at end of page
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 22 Jul 2020 05:53:15 +0000 (15:53 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 23 Jul 2020 07:43:36 +0000 (17:43 +1000)
commit8ac9b9d61f0eceba6ce571e7527798465ae9a7c5
tree36d4e852178add5d0a4d64a03c849b6cfdc9c088
parent5c92fb1b46102e1efe0eed69e743f711bc1c7d2e
selftests/powerpc: Add test of memcmp at end of page

Update our memcmp selftest, to test the case where we're comparing up
to the end of a page and the subsequent page is not mapped. We have to
make sure we don't read off the end of the page and cause a fault.

We had a bug there in the past, fixed in commit
d9470757398a ("powerpc/64: Fix memcmp reading past the end of src/dest").

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200722055315.962391-1-mpe@ellerman.id.au
tools/testing/selftests/powerpc/stringloops/memcmp.c