userfaultfd: selftest: avoid my_bcmp false positives with powerpc
authorAndrea Arcangeli <aarcange@redhat.com>
Tue, 22 Sep 2015 21:59:00 +0000 (14:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Sep 2015 22:09:53 +0000 (15:09 -0700)
commit1f5fee2cf232f9fac05b65f21107d2cf3c32092c
tree128e8442c6a20e983b9c7939b2e91c55e03f6df5
parent56ed8f169e225dce1f9e40f6eee2e2dabe7d06fc
userfaultfd: selftest: avoid my_bcmp false positives with powerpc

Keep a non-zero placeholder after the count, for the my_bcmp comparison
of the page against the zeropage.  The lockless increment between 255 to
256 against a lockless my_bcmp could otherwise return false positives on
ppc32le.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/vm/userfaultfd.c