mbox series

[v3,0/6] add more test coverage to MTE kselftests

Message ID 20220209152240.52788-1-joey.gouly@arm.com (mailing list archive)
Headers show
Series add more test coverage to MTE kselftests | expand

Message

Joey Gouly Feb. 9, 2022, 3:22 p.m. UTC
This is a series which refactors and then adds some extra tests for MTE
in the kselftest framework.

The issue that these tests are for was was fixed by Robin in
295cf156231c ("arm64: Avoid premature usercopy failure") and based on a
simplified example by Catalin [1].

They test some combinations of pointer offsets, sizes and syscalls to
exercise different paths in the kernel.

Changes since v2 [3]:
  - simplified error handling further
  - added more detailed commit messages
  - add reviewed-by and tested-by

Changes since v1 [2]:
  - add a page_sz to the tests, for non-4K kernels
  - use loops to generate more tests and avoid long lines

Thanks,
Joey

[1] https://lore.kernel.org/all/20210624150911.GA25097@arm.com/
[2] https://lore.kernel.org/linux-arm-kernel/20220125150920.23955-1-joey.gouly@arm.com/
[3] https://lore.kernel.org/linux-arm-kernel/45ab2d96-c8e0-7b72-a384-c4160b9312ac@linuxfoundation.org/T/

Joey Gouly (6):
  kselftest/arm64: mte: user_mem: introduce tag_offset and tag_len
  kselftest/arm64: mte: user_mem: rework error handling
  kselftest/arm64: mte: user_mem: check different offsets and sizes
  kselftest/arm64: mte: user_mem: add test type enum
  kselftest/arm64: mte: user_mem: add more test types
  kselftest/arm64: mte: user_mem: test a wider range of values

 .../selftests/arm64/mte/check_user_mem.c      | 193 +++++++++++++++---
 1 file changed, 160 insertions(+), 33 deletions(-)

Comments

Will Deacon Feb. 15, 2022, 11:18 p.m. UTC | #1
On Wed, 9 Feb 2022 15:22:34 +0000, Joey Gouly wrote:
> This is a series which refactors and then adds some extra tests for MTE
> in the kselftest framework.
> 
> The issue that these tests are for was was fixed by Robin in
> 295cf156231c ("arm64: Avoid premature usercopy failure") and based on a
> simplified example by Catalin [1].
> 
> [...]

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

[1/6] kselftest/arm64: mte: user_mem: introduce tag_offset and tag_len
      https://git.kernel.org/arm64/c/d53f8f8dbe97
[2/6] kselftest/arm64: mte: user_mem: rework error handling
      https://git.kernel.org/arm64/c/ff0b9aba30ae
[3/6] kselftest/arm64: mte: user_mem: check different offsets and sizes
      https://git.kernel.org/arm64/c/682b064bae87
[4/6] kselftest/arm64: mte: user_mem: add test type enum
      https://git.kernel.org/arm64/c/b9fc700176f1
[5/6] kselftest/arm64: mte: user_mem: add more test types
      https://git.kernel.org/arm64/c/e8d3974f34fa
[6/6] kselftest/arm64: mte: user_mem: test a wider range of values
      https://git.kernel.org/arm64/c/0a775ccb8120

Cheers,