Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Espressif SHA HW/SW mutex messages #8225

Merged

Conversation

gojimmypi
Copy link
Contributor

@gojimmypi gojimmypi commented Nov 25, 2024

Description

This PR improves some of the debugging messages for hardware-accelerated SHA calculations on the Espressif ESP32.

Currently there are messages such as:

E (16054) wolf_hw_sha: ERROR: Release unfinished lock for 3fce56cc but found 0

Although accurate, the condition is merely interesting, not actually an error. This typically occurs when there are multiple, concurrent hash calculations in progress, such as during TLS handshake negotiation. The unused hash values are abandoned, and although the hardware is released during cleanup, it is not the normal process of actually finishing up a SHA calculation.

There's also this one, that is also merely interesting:

W (1556694) wolf_hw_sha: Warning: sha mutex unlock from unexpected task

In this case, the message likely occurred when using a ctx object across multiple threads, as operation are not thread-safe. It is up to the developer to handle any cross-thread operations.

A variety of other messages and mutex-related SHA issues have also been updated.

Fixes zd# 19003

Testing

Manually tested with various configurations using the Espessif client and server examples.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

edit: reference zd 19003 and note manual testing.

@gojimmypi gojimmypi requested a review from dgarske November 25, 2024 22:54
@dgarske dgarske removed their request for review November 26, 2024 00:00
@dgarske dgarske assigned wolfSSL-Bot and unassigned dgarske Nov 26, 2024
@gojimmypi
Copy link
Contributor Author

Jenkins retest this please

@gojimmypi gojimmypi force-pushed the pr-espressif-improve-sha-msg branch from 54b3896 to 7bc0265 Compare December 9, 2024 22:51
@gojimmypi
Copy link
Contributor Author

recent force-push: refreshed from upstream, corrected spelling.

@gojimmypi
Copy link
Contributor Author

Jenkins retest this please

@JacobBarthelmeh JacobBarthelmeh merged commit 59ea24f into wolfSSL:master Dec 11, 2024
133 of 147 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants