91a65338 | 11-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Try harder to generate different keys during PAC tests
We very intermittently see failures in the single_thread_different_keys PAC test. As noted in the comment in the test the PAC
kselftest/arm64: Try harder to generate different keys during PAC tests
We very intermittently see failures in the single_thread_different_keys PAC test. As noted in the comment in the test the PAC field can be quite narrow so there is a chance of collisions even with different keys with a chance of 5% for 7 bit keys, and the potential for narrower keys. The test tries to avoid this by running repeatedly, but only tries 10 times which even with a 5% chance of collisions isn't enough.
Increase the number of times we attempt to look for collisions by a factor of 100, this also affects other tests which are following a similar pattern with running the test repeatedly and either don't care like with pac_instruction_not_nop or potentially have the same issue like exec_sign_all.
The PAC tests are very fast, running in a second or two even in emulation, so the 100x increased cost is mildly irritating but not a huge issue. The bulk of the overhead is in the exec_sign_all test which does a fork() and exec() per iteration.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241111-arm64-pac-test-collisions-v1-2-171875f37e44@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
27141b69 | 11-Nov-2024 |
Mark Brown <broonie@kernel.org> |
kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all()
The PAC exec_sign_all() test spawns some child processes, creating pipes to be stdin and stdout for the child. It cleans up most of the fi
kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all()
The PAC exec_sign_all() test spawns some child processes, creating pipes to be stdin and stdout for the child. It cleans up most of the file descriptors that are created as part of this but neglects to clean up the parent end of the child stdin and stdout. Add the missing close() calls.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241111-arm64-pac-test-collisions-v1-1-171875f37e44@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
show more ...
|
d21435e9 | 18-Sep-2020 |
Boyan Karatotev <boyan.karatotev@arm.com> |
kselftests/arm64: add PAuth tests for single threaded consistency and differently initialized keys
PAuth adds 5 different keys that can be used to sign addresses.
Add a test that verifies that the
kselftests/arm64: add PAuth tests for single threaded consistency and differently initialized keys
PAuth adds 5 different keys that can be used to sign addresses.
Add a test that verifies that the kernel initializes them to different values and preserves them across context switches.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Reviewed-by: Vincenzo Frascino <Vincenzo.Frascino@arm.com> Reviewed-by: Amit Daniel Kachhap <amit.kachhap@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> 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/20200918104715.182310-5-boian4o1@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
806a15b2 | 18-Sep-2020 |
Boyan Karatotev <boyan.karatotev@arm.com> |
kselftests/arm64: add PAuth test for whether exec() changes keys
Kernel documentation states that it will change PAuth keys on exec() calls.
Verify that all keys are correctly switched to new ones.
kselftests/arm64: add PAuth test for whether exec() changes keys
Kernel documentation states that it will change PAuth keys on exec() calls.
Verify that all keys are correctly switched to new ones.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Reviewed-by: Vincenzo Frascino <Vincenzo.Frascino@arm.com> Reviewed-by: Amit Daniel Kachhap <amit.kachhap@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> 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/20200918104715.182310-4-boian4o1@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|
766d95b1 | 18-Sep-2020 |
Boyan Karatotev <boyan.karatotev@arm.com> |
kselftests/arm64: add nop checks for PAuth tests
PAuth adds sign/verify controls to enable and disable groups of instructions in hardware for compatibility with libraries that do not implement PAuth
kselftests/arm64: add nop checks for PAuth tests
PAuth adds sign/verify controls to enable and disable groups of instructions in hardware for compatibility with libraries that do not implement PAuth. The kernel always enables them if it detects PAuth.
Add a test that checks that each group of instructions is enabled, if the kernel reports PAuth as detected.
Note: For groups, for the purpose of this patch, we intend instructions that use a certain key.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Reviewed-by: Vincenzo Frascino <Vincenzo.Frascino@arm.com> Reviewed-by: Amit Daniel Kachhap <amit.kachhap@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> 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/20200918104715.182310-3-boian4o1@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
show more ...
|