signal/testing: Don't look for __SI_FAULT in userspace
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 26 Jun 2017 21:36:57 +0000 (16:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Mar 2018 16:39:25 +0000 (18:39 +0200)
commitf41f8156aee5b69ef45f3e54a27ea85033973199
treeecd0d4f078795f5060cbbe9366f01b08bfcae66b
parent93b4839239e3c76a31fe1e56e19405674c9948e7
signal/testing: Don't look for __SI_FAULT in userspace

commit d12fe87e62d773e81e0cb3a123c5a480a10d7d91 upstream.

Fix the debug print statements in these tests where they reference
si_codes and in particular __SI_FAULT.  __SI_FAULT is a kernel
internal value and should never be seen by userspace.

While I am in there also fix si_code_str.  si_codes are an enumeration
there are not a bitmap so == and not & is the apropriate operation to
test for an si_code.

Cc: Dave Hansen <dave.hansen@linux.intel.com>
Fixes: 5f23f6d082a9 ("x86/pkeys: Add self-tests")
Fixes: e754aedc26ef ("x86/mpx, selftests: Add MPX self test")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/x86/mpx-mini-test.c
tools/testing/selftests/x86/protection_keys.c