Repository navigation
hal2: bound AES loopback while the receiver is stopped - #952
Merged
techomancer merged 1 commit intoDec 6, 2026
Merged
Conversation
Keep at most 96,000 words and discard the oldest words on overflow so AES TX alone cannot grow host memory indefinitely. Document the buffering limit and cover overflow ordering with a regression test. Validation: the regression fails with the original unbounded enqueue; all 14 HAL2 tests pass with the fix (cargo +nightly test -p iris --lib dev::hal2::).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HAL2 AES transmit DMA can run while the receiver is stopped. Each transmitted word was appended to the internal loopback queue, so this state could grow host memory indefinitely on Indy and Indigo2.
Cap the queue at 96,000 words and discard the oldest words on overflow. The change includes an overflow/order regression and documents the emulator's buffering limit.
Validation on Linux:
cargo +nightly test -p iris --lib dev::hal2::: all 14 tests pass with the fix.