mbox series

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

Message ID 20241111-arm64-pac-test-collisions-v1-0-171875f37e44@kernel.org
Headers show
Series kselftest/arm64: Avoid detecting spurious PAC key collisions | expand

Message

Mark Brown Nov. 11, 2024, 4:18 p.m. UTC
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,

Comments

Catalin Marinas Nov. 12, 2024, 4:07 p.m. UTC | #1
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