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)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 22 Mar 2023 18:00:49 +0000 (11:00 -0700)
commit62faca1ca10cc84e99ae7f38aa28df2bc945369b
treeff8e4b76f76727e5a8e46fe850dd38e988dfbb5f
parentb15888840207c2bfe678dd1f68a32db54315e71f
selftests/x86/amx: Add a ptrace test

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
tools/testing/selftests/x86/amx.c