| 306219d5 | 21-Feb-2025 |
Catalin Marinas <[email protected]> |
kselftest/arm64: mte: Skip the hugetlb tests if MTE not supported on such mappings
While the kselftest was added at the same time with the kernel support for MTE on hugetlb mappings, the tests may b
kselftest/arm64: mte: Skip the hugetlb tests if MTE not supported on such mappings
While the kselftest was added at the same time with the kernel support for MTE on hugetlb mappings, the tests may be run on older kernels. Skip the tests if PROT_MTE is not supported on MAP_HUGETLB mappings.
Fixes: 27879e8cb6b0 ("selftests: arm64: add hugetlb mte tests") Cc: Yang Shi <[email protected]> Reported-by: Naresh Kamboju <[email protected]> Reviewed-by: Dev Jain <[email protected]> Reviewed-by: Yang Shi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| 89d72c03 | 12-Jan-2023 |
Mark Brown <[email protected]> |
kselftest/arm64: Remove spurious comment from MTE test Makefile
There's a stray comment in the MTE test Makefile which documents something that's since been removed, delete it.
Signed-off-by: Mark
kselftest/arm64: Remove spurious comment from MTE test Makefile
There's a stray comment in the MTE test Makefile which documents something that's since been removed, delete it.
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| a75df5be | 13-Nov-2022 |
[email protected] <[email protected]> |
kselftest/arm64: fix array_size.cocci warning
Fix following coccicheck warning:
tools/testing/selftests/arm64/mte/check_mmap_options.c:64:24-25: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm6
kselftest/arm64: fix array_size.cocci warning
Fix following coccicheck warning:
tools/testing/selftests/arm64/mte/check_mmap_options.c:64:24-25: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_mmap_options.c:66:20-21: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_mmap_options.c:135:25-26: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_mmap_options.c:96:25-26: WARNING: Use ARRAY_SIZE tools/testing/selftests/arm64/mte/check_mmap_options.c:190:24-25: WARNING: Use ARRAY_SIZE
Signed-off-by: KaiLong Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
show more ...
|
| 0639e022 | 10-May-2022 |
Mark Brown <[email protected]> |
selftests/arm64: Use switch statements in mte_common_util.c
In the MTE tests there are several places where we use chains of if statements to open code what could be written as switch statements, mo
selftests/arm64: Use switch statements in mte_common_util.c
In the MTE tests there are several places where we use chains of if statements to open code what could be written as switch statements, move over to switch statements to make the idiom clearer.
Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| 541235de | 10-May-2022 |
Mark Brown <[email protected]> |
selftests/arm64: Remove casts to/from void in check_tags_inclusion
Void pointers may be freely used with other pointer types in C, any casts between void * and other pointer types serve no purpose o
selftests/arm64: Remove casts to/from void in check_tags_inclusion
Void pointers may be freely used with other pointer types in C, any casts between void * and other pointer types serve no purpose other than to mask potential warnings. Drop such casts from check_tags_inclusion to help with future review of the code.
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| 72d6771c | 10-May-2022 |
Mark Brown <[email protected]> |
selftests/arm64: Check failures to set tags in check_tags_inclusion
The MTE check_tags_inclusion test uses the mte_switch_mode() helper but ignores the return values it generates meaning we might no
selftests/arm64: Check failures to set tags in check_tags_inclusion
The MTE check_tags_inclusion test uses the mte_switch_mode() helper but ignores the return values it generates meaning we might not be testing the things we're trying to test, fail the test if it reports an error. The helper will log any errors it returns.
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| ffc8274c | 10-May-2022 |
Mark Brown <[email protected]> |
selftests/arm64: Allow zero tags in mte_switch_mode()
mte_switch_mode() currently rejects attempts to set a zero tag however there are tests such as check_tags_inclusion which attempt to cover cases
selftests/arm64: Allow zero tags in mte_switch_mode()
mte_switch_mode() currently rejects attempts to set a zero tag however there are tests such as check_tags_inclusion which attempt to cover cases with zero tags using mte_switch_mode(). Since it is not clear why we are rejecting zero tags change the test to accept them.
The issue has not previously been as apparent as it should be since the return value of mte_switch_mode() was not always checked in the callers and the tests weren't otherwise failing.
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| e2d9642a | 19-Apr-2022 |
Mark Brown <[email protected]> |
kselftest/arm64: Add simple test for MTE prctl
The current tests use the prctls for various things but there's no coverage of the edges of the interface so add some basics. This isn't hugely useful
kselftest/arm64: Add simple test for MTE prctl
The current tests use the prctls for various things but there's no coverage of the edges of the interface so add some basics. This isn't hugely useful as it is (it originally had some coverage for the combinations with asymmetric mode but we removed the prctl() for that) but it might be a helpful starting point for future work, for example covering error handling.
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| f326c9a6 | 19-Apr-2022 |
Mark Brown <[email protected]> |
kselftest/arm64: Refactor parameter checking in mte_switch_mode()
Currently we just have a big if statement with a non-specific diagnostic checking both the mode and the tag. Since we'll need to dyn
kselftest/arm64: Refactor parameter checking in mte_switch_mode()
Currently we just have a big if statement with a non-specific diagnostic checking both the mode and the tag. Since we'll need to dynamically check for asymmetric mode support in the system and to improve debugability split these checks out.
Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| 0a775ccb | 09-Feb-2022 |
Joey Gouly <[email protected]> |
kselftest/arm64: mte: user_mem: test a wider range of values
Instead of hard coding a small amount of tests, generate a wider range of tests to try catch any corner cases that could show up.
These
kselftest/arm64: mte: user_mem: test a wider range of values
Instead of hard coding a small amount of tests, generate a wider range of tests to try catch any corner cases that could show up.
These new tests test different MTE tag lengths and offsets, which previously would have caused infinite loops in the kernel. This was fixed by 295cf156231c ("arm64: Avoid premature usercopy failure"), so these are regressions tests for that corner case.
Signed-off-by: Joey Gouly <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Mark Brown <[email protected]> Cc: Shuah Khan <[email protected]> Reviewed-by: Mark Brown <[email protected]> Tested-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
show more ...
|
| e8d3974f | 09-Feb-2022 |
Joey Gouly <[email protected]> |
kselftest/arm64: mte: user_mem: add more test types
To expand the test coverage for MTE tags in userspace memory, also perform the test with `write`, `readv` and `writev` syscalls.
Signed-off-by: J
kselftest/arm64: mte: user_mem: add more test types
To expand the test coverage for MTE tags in userspace memory, also perform the test with `write`, `readv` and `writev` syscalls.
Signed-off-by: Joey Gouly <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Mark Brown <[email protected]> Cc: Shuah Khan <[email protected]> Reviewed-by: Mark Brown <[email protected]> Tested-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
show more ...
|
| b9fc7001 | 09-Feb-2022 |
Joey Gouly <[email protected]> |
kselftest/arm64: mte: user_mem: add test type enum
The test is currently hardcoded to use the `read` syscall, this commit adds a test_type enum to support expanding the test coverage to other syscal
kselftest/arm64: mte: user_mem: add test type enum
The test is currently hardcoded to use the `read` syscall, this commit adds a test_type enum to support expanding the test coverage to other syscalls.
Signed-off-by: Joey Gouly <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Mark Brown <[email protected]> Cc: Shuah Khan <[email protected]> Reviewed-by: Mark Brown <[email protected]> Tested-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
show more ...
|
| 682b064b | 09-Feb-2022 |
Joey Gouly <[email protected]> |
kselftest/arm64: mte: user_mem: check different offsets and sizes
To check there are no assumptions in the kernel about buffer sizes or alignments of user space pointers, expand the test to cover di
kselftest/arm64: mte: user_mem: check different offsets and sizes
To check there are no assumptions in the kernel about buffer sizes or alignments of user space pointers, expand the test to cover different sizes and offsets.
Signed-off-by: Joey Gouly <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Mark Brown <[email protected]> Cc: Shuah Khan <[email protected]> Reviewed-by: Mark Brown <[email protected]> Tested-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
show more ...
|
| ff0b9aba | 09-Feb-2022 |
Joey Gouly <[email protected]> |
kselftest/arm64: mte: user_mem: rework error handling
Future commits will have multiple iterations of tests in this function, so make the error handling assume it will pass and then bail out if ther
kselftest/arm64: mte: user_mem: rework error handling
Future commits will have multiple iterations of tests in this function, so make the error handling assume it will pass and then bail out if there is an error.
Signed-off-by: Joey Gouly <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Mark Brown <[email protected]> Cc: Shuah Khan <[email protected]> Reviewed-by: Mark Brown <[email protected]> Tested-by: Mark Brown <[email protected]> Reviewed-by: Shuah Khan <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
show more ...
|