Repository navigation
crypto: add SG2002 SM3 DMA with an OpenSSL compression patch - #516
Closed
dormancygrace wants to merge 2 commits into
Closed
dormancygrace wants to merge 2 commits into
dormancygrace wants to merge 2 commits into
Conversation
Build outputsCompared with the build of main at c93fb1a; codex/openssl-sm4 is at 560af7d, so outputs changed since then are listed too. 4 changed, 14 added, 0 removed of 584 outputs.
|
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.
Adds
0009-sm3-dma.patchon top of #514 and the matching SG2002 SM3 kernel extension. OpenSSL keeps its buffering, padding and length tracking; hardware absence or failed chunks resume software from the last committed state. The original RUN/INFO ioctl numbers and layouts stay unchanged, with a separate INFO2 for SM3 counters. No ENGINE or cryptodev is used.Sophgo added the SM3 descriptor bit and result registers in 6ef521238996, superseding the older TRM reserved-bit description. The driver uses separate DMA output and retains bounded waits and the poison policy.
Validation: warning-free RISC-V OpenSSL 3.5.9 and Linux 7.3.0-r3 module builds; ASan/UBSan transport tests for all eight algorithms and negative control; 960 SM3 continuation cases with independent compression/KAT; descriptor/ABI/status tests with 4098 length cases; 288 independent host EVP reference cases.
Draft: the first physical SG2002 SM3 request timed out (status 0, result registers all zero). SM3 is disabled by default: it is absent from INFO capabilities and direct requests return EOPNOTSUPP. The
experimental_sm3=1load-time parameter is diagnostic only. The timeout poison policy worked; 288 SM3 and 864 SHA EVP cases passed through software afterward, and reboot restored the installed module without changing its file.Hardware result order, completion and chaining still need investigation. CPU/RAM benefit and the 4 KiB threshold are not qualified. The included
dma-verify.cchecks raw hardware messages against software OpenSSL before integrated EVP qualification.