selftests/x86/amx: Add a ptrace test
authorChang S. Bae <chang.seok.bae@intel.com>
Mon, 27 Feb 2023 21:05:04 +0000 (13:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2023 10:49:21 +0000 (12:49 +0200)
commitd080337f682764181f6e507a0378274b965bca28
treee04c02ad643e91b5089f71e75d536d90bb6df7f2
parent79f1e15c6b4b4e455eaae2ed5d5ca20972bd74d0
selftests/x86/amx: Add a ptrace test

commit 62faca1ca10cc84e99ae7f38aa28df2bc945369b upstream.

Include a test case to validate the XTILEDATA injection to the target.

Also, it ensures the kernel's ability to copy states between different
XSAVE formats.

Refactor the memcmp() code to be usable for the state validation.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20230227210504.18520-3-chang.seok.bae%40intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/x86/amx.c