selftests/vm/pkeys: Add a regression test for setting PKRU through ptrace
authorKyle Huey <me@kylehuey.com>
Mon, 9 Jan 2023 21:02:14 +0000 (13:02 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Jan 2023 09:23:28 +0000 (10:23 +0100)
commit46aa1557581ff4cc380c3b29ef516f2b15129a4e
treed366340653ea366a73a6b21cdd16ebf1d3e0196f
parent3c1940c54922c2f5d434f11f568045dc5e5154f4
selftests/vm/pkeys: Add a regression test for setting PKRU through ptrace

commit 6ea25770b043c7997ab21d1ce95ba5de4d3d85d9 upstream

This tests PTRACE_SETREGSET with NT_X86_XSTATE modifying PKRU directly and
removing the PKRU bit from XSTATE_BV.

Signed-off-by: Kyle Huey <me@kylehuey.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20221115230932.7126-7-khuey%40kylehuey.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/vm/pkey-x86.h
tools/testing/selftests/vm/protection_keys.c