Hello Jamin,

On 5/14/25 04:48, Jamin Lin wrote:
Hi Cédric,

Subject: RE: [PATCH v2 05/25] hw/misc/aspeed_hace: Split hash execution into
helper functions for clarity

Hi Cédric

Subject: Re: [PATCH v2 05/25] hw/misc/aspeed_hace: Split hash
execution into helper functions for clarity

Hello Jamin

On 5/13/25 08:28, Jamin Lin wrote:
Refactor "do_hash_operation()" by extracting hash execution and
result handling into dedicated helper functions:

- "hash_write_digest_and_unmap_iov()": Writes the digest result to
memory
and
    unmaps IOVs after processing.
- "hash_execute_non_acc_mode()": Handles one-shot (non-accumulated)
hash
    operations.
- "hash_execute_acc_mode()": Handles accumulated hashing, including
update and
    finalize logic.

No functional changes introduced.

This patch is breaking 'check-qtest-arm'


    stderr:
    **
    ERROR:../tests/qtest/aspeed_hace-test.c:254:test_sha512: assertion
failed (digest == test_result_sha512)



I’d like to provide some additional information:

My test environment is Ubuntu 24.04, and the glibc version is 2.39.
I previously encountered issues where very very older versions of glibc (such 
as those on Ubuntu 18.04) did not support SHA-512 properly.
In those cases, I switched to using libgcrypt to perform SHA-512 testing 
instead.

If you're still experiencing failures when testing SHA-512, please try building with either the 
"--enable-gcrypt" or "--enable-nettle" option enabled.

The test fails on RHEL9 and Ubuntu 22.04 and it doesn't on F42. Most
likely, it is a compiler behavior difference.


The problem is due to the local 'size_t digest_len' variable not being
initialized to zero. With that fixed, the test passes on all distros.

Please split patch 5 to introduce these routines one by one :

  hash_prepare_sg_iov
  hash_prepare_direct_iov
  hash_execute_acc_mode
  hash_execute_non_acc_mode

Thanks,

C.



Reply via email to