OSDN Git Service

kselftest/arm64: Verify all different mmap MTE options
authorAmit Daniel Kachhap <amit.kachhap@arm.com>
Fri, 2 Oct 2020 11:56:28 +0000 (17:26 +0530)
committerWill Deacon <will@kernel.org>
Mon, 5 Oct 2020 17:52:17 +0000 (18:52 +0100)
commit53ec81d232134f61806dfd93025320caa1aaf559
tree4cf28c7ab5c4cc70718f7d68a418a222800a4c8c
parentdfe537cf47186bfb59db3e57eed7417cd5efde17
kselftest/arm64: Verify all different mmap MTE options

This testcase checks the different unsupported/supported options for mmap
if used with PROT_MTE memory protection flag. These checks are,

* Either pstate.tco enable or prctl PR_MTE_TCF_NONE option should not cause
  any tag mismatch faults.
* Different combinations of anonymous/file memory mmap, mprotect,
  sync/async error mode and private/shared mappings should work.
* mprotect should not be able to clear the PROT_MTE page property.

Co-developed-by: Gabor Kertesz <gabor.kertesz@arm.com>
Signed-off-by: Gabor Kertesz <gabor.kertesz@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201002115630.24683-5-amit.kachhap@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
tools/testing/selftests/arm64/mte/.gitignore
tools/testing/selftests/arm64/mte/check_mmap_options.c [new file with mode: 0644]