From 6a42493c94b669108a36d0c83f1ab0c6c67397ba Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Wed, 7 Jan 2026 15:26:01 +0100 Subject: [PATCH] pvr: Use BUILD_ID_EXPECTED_HASH_LENGTH SHA1_DIGEST_LENGTH was changed to refect BLAKE3 exposed with SHA1 functions - switch to BUILD_ID_EXPECTED_HASH_LENGTH. Fixes: 492a176cbb2 ("util: increase SHA1_DIGEST_LENGTH to 32 (BLAKE3_KEY_LEN)") Signed-off-by: Christian Gmeiner Reviewed-by: Erik Faye-Lund Part-of: --- src/imagination/vulkan/pvr_instance.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/imagination/vulkan/pvr_instance.c b/src/imagination/vulkan/pvr_instance.c index 674ee131e59..632b2bc70df 100644 --- a/src/imagination/vulkan/pvr_instance.c +++ b/src/imagination/vulkan/pvr_instance.c @@ -306,7 +306,7 @@ out: } static bool -pvr_get_driver_build_sha(uint8_t sha_out[const static SHA1_DIGEST_LENGTH]) +pvr_get_driver_build_sha(uint8_t sha_out[const static BUILD_ID_EXPECTED_HASH_LENGTH]) { const struct build_id_note *note; unsigned build_id_len; @@ -318,12 +318,12 @@ pvr_get_driver_build_sha(uint8_t sha_out[const static SHA1_DIGEST_LENGTH]) } build_id_len = build_id_length(note); - if (build_id_len < SHA1_DIGEST_LENGTH) { + if (build_id_len < BUILD_ID_EXPECTED_HASH_LENGTH) { mesa_loge("Build-id too short. It needs to be a SHA."); return false; } - memcpy(sha_out, build_id_data(note), SHA1_DIGEST_LENGTH); + memcpy(sha_out, build_id_data(note), BUILD_ID_EXPECTED_HASH_LENGTH); return true; }