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

[nrf fromlist] Bluetooth: Host: Use memset to initialize `psa_mac_o… #2555

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

theob-pro
Copy link
Contributor

…peration_t`

In db_hash_setup() the state object for MAC operations was initialized using psa_mac_operation_init(). This function was not always optimized or inlined.

A way to reduce stack usage is to use memset() and set the object to 0. This is one of the option documented to initialize psa_mac_operation_t object.

Upstream PR #: 86094

@theob-pro theob-pro force-pushed the bring_db_hash_setup_stack_opti branch from 0a869ab to d58f61d Compare February 25, 2025 11:13
…peration_t`

In `db_hash_setup()` the state object for MAC operations was initialized
using `psa_mac_operation_init()`. This function was not always optimized
or inlined.

A way to reduce stack usage is to use `memset()` and set the object to
0. This is one of the option documented to initialize
`psa_mac_operation_t` object.

Upstream PR #: 86094

Signed-off-by: Théo Battrel <[email protected]>
@theob-pro theob-pro force-pushed the bring_db_hash_setup_stack_opti branch from d58f61d to a83bfcb Compare February 26, 2025 05:55
@rlubos rlubos merged commit a35da4f into nrfconnect:main Feb 26, 2025
17 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