[PATCH 0/2] kselftest/arm64: Avoid detecting spurious PAC key collisions

Mark Brown posted 2 patches 1 week, 5 days ago
tools/testing/selftests/arm64/pauth/pac.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[PATCH 0/2] kselftest/arm64: Avoid detecting spurious PAC key collisions
Posted by Mark Brown 1 week, 5 days ago
The PAC tests currently generate a very small number of false failures
since the limited size of PAC keys, especially with fewer bits allocated
for PAC due to larger VA, means collisions in generated PACs are
possible even if the PAC keys are different.  The test tries to work around
this by testing repeatedly but doesn't iterate often enough to be
reliable.

We also fix a leak of file descriptors in the exec test which doesn't
matter now but can become an issue when the number of iterations is
increased, we can bump into limits on allocated file descriptors.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (2):
      kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all()
      kselftest/arm64: Try harder to generate different keys during PAC tests

 tools/testing/selftests/arm64/pauth/pac.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
base-commit: 8e929cb546ee42c9a61d24fae60605e9e3192354
change-id: 20241111-arm64-pac-test-collisions-5613f5dfe479

Best regards,
-- 
Mark Brown <broonie@kernel.org>
Re: [PATCH 0/2] kselftest/arm64: Avoid detecting spurious PAC key collisions
Posted by Catalin Marinas 1 week, 4 days ago
On Mon, 11 Nov 2024 16:18:54 +0000, Mark Brown wrote:
> The PAC tests currently generate a very small number of false failures
> since the limited size of PAC keys, especially with fewer bits allocated
> for PAC due to larger VA, means collisions in generated PACs are
> possible even if the PAC keys are different.  The test tries to work around
> this by testing repeatedly but doesn't iterate often enough to be
> reliable.
> 
> [...]

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

[1/2] kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all()
      https://git.kernel.org/arm64/c/27141b690547
[2/2] kselftest/arm64: Try harder to generate different keys during PAC tests
      https://git.kernel.org/arm64/c/91a6533811bb

-- 
Catalin