[PATCH v3 0/4] selftests/arm64: Fix MTE test setup and TAP reporting

Muhammad Usama Anjum posted 4 patches 1 month ago
tools/testing/selftests/arm64/config          | 17 ++++++++++
.../selftests/arm64/mte/check_buffer_fill.c   |  2 ++
.../selftests/arm64/mte/check_child_memory.c  |  2 ++
.../arm64/mte/check_gcr_el1_cswitch.c         |  1 +
.../arm64/mte/check_hugetlb_options.c         |  2 ++
.../selftests/arm64/mte/check_ksm_options.c   | 31 +++++++++++++++++--
.../selftests/arm64/mte/check_mmap_options.c  |  2 ++
.../testing/selftests/arm64/mte/check_prctl.c |  2 +-
.../arm64/mte/check_tags_inclusion.c          |  2 ++
.../selftests/arm64/mte/check_user_mem.c      |  2 ++
10 files changed, 59 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/selftests/arm64/config
[PATCH v3 0/4] selftests/arm64: Fix MTE test setup and TAP reporting
Posted by Muhammad Usama Anjum 1 month ago
Running the mainline arm64 MTE selftests on a Pixel 8 exposed three
independent reporting problems. Fix these reporting problems, then add
an arm64 Kconfig fragment covering the facilities used by the MTE tests.

Testing was performed on a Pixel 8 with an Android 6.1 kernel built with
the new configuration. All nine static MTE binaries returned success.

Changes since v2:
- Combine the MTE TAP header fixes into a single patch.
- Treat inaccessible KSM merge_across_nodes as a skipped prerequisite.

Changes since v1:
- Add missing MTE TAP headers as an output-only cleanup and clarify why
  line buffering prevents duplicate GCR_EL1 plan output.
- Validate KSM privileges and optional sysfs access before setup.
- Move and expand the arm64 config fragment, and standardize subjects on
  the selftests/arm64 prefix.

Muhammad Usama Anjum (4):
  selftests/arm64: Print missing MTE TAP headers
  selftests/arm64: Treat KSM merge_across_nodes as optional
  selftests/arm64: Fix MTE prctl TAP plan
  selftests/arm64: Add MTE test config fragment

 tools/testing/selftests/arm64/config          | 17 ++++++++++
 .../selftests/arm64/mte/check_buffer_fill.c   |  2 ++
 .../selftests/arm64/mte/check_child_memory.c  |  2 ++
 .../arm64/mte/check_gcr_el1_cswitch.c         |  1 +
 .../arm64/mte/check_hugetlb_options.c         |  2 ++
 .../selftests/arm64/mte/check_ksm_options.c   | 31 +++++++++++++++++--
 .../selftests/arm64/mte/check_mmap_options.c  |  2 ++
 .../testing/selftests/arm64/mte/check_prctl.c |  2 +-
 .../arm64/mte/check_tags_inclusion.c          |  2 ++
 .../selftests/arm64/mte/check_user_mem.c      |  2 ++
 10 files changed, 59 insertions(+), 4 deletions(-)
 create mode 100644 tools/testing/selftests/arm64/config

-- 
2.47.3
Re: [PATCH v3 0/4] selftests/arm64: Fix MTE test setup and TAP reporting
Posted by Will Deacon 1 month ago
On Tue, 25 Aug 2026 12:18:33 +0100, Muhammad Usama Anjum wrote:
> Running the mainline arm64 MTE selftests on a Pixel 8 exposed three
> independent reporting problems. Fix these reporting problems, then add
> an arm64 Kconfig fragment covering the facilities used by the MTE tests.
> 
> Testing was performed on a Pixel 8 with an Android 6.1 kernel built with
> the new configuration. All nine static MTE binaries returned success.
> 
> [...]

Applied to arm64 (for-next/core), thanks!

[1/4] selftests/arm64: Print missing MTE TAP headers
      https://git.kernel.org/arm64/c/8d2237e9d690
[2/4] selftests/arm64: Treat KSM merge_across_nodes as optional
      https://git.kernel.org/arm64/c/1a0dba077f34
[3/4] selftests/arm64: Fix MTE prctl TAP plan
      https://git.kernel.org/arm64/c/bb52892f9234
[4/4] selftests/arm64: Add MTE test config fragment
      https://git.kernel.org/arm64/c/2bd533739234

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev