Move fips140only.BackendApprovedHash to patch 0003#2205
Merged
gdams merged 1 commit intomicrosoft/mainfrom Mar 23, 2026
Merged
Conversation
Patch 0003 references fips140only.BackendApprovedHash in
backend_linux.go, backend_windows.go, and backend_darwin.go, but the
BackendApprovedHash variable and the updated ApprovedHash function were
only added to fips140only.go in patch 0004. This caused a build failure
when building at the 0003 commit:
# crypto/internal/backend
crypto/internal/backend/backend_linux.go:44:14: undefined: fips140only.BackendApprovedHash
Move the fips140only.go hunk from patch 0004 into patch 0003 so the
symbol exists when it is first used.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a patch-ordering build break by moving the introduction of fips140only.BackendApprovedHash (and the updated ApprovedHash behavior) into patch 0003, so the symbol exists at the first patch that references it. This resolves the undefined: fips140only.BackendApprovedHash failure reported in #2204 and allows the Patch Build workflow to build with the race detector again.
Changes:
- Move the
src/crypto/internal/fips140only/fips140only.gohunk that definesBackendApprovedHash+ updatesApprovedHashfrom patch0004into patch0003. - Update patch stats accordingly so
0004no longer lists/modifiesfips140only.go. - Re-enable the race build in
.github/workflows/patch-build.ymlby removing-skipbuildrace.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
patches/0003-Implement-crypto-internal-backend.patch |
Adds the fips140only.go change so BackendApprovedHash exists when backends set it during init. |
patches/0004-Use-crypto-backends.patch |
Removes the now-duplicated fips140only.go hunk and updates patch stats accordingly. |
.github/workflows/patch-build.yml |
Restores default eng/run.ps1 build (including race build), now that patch 0003 builds cleanly. |
Patches are happy!
qmuntal
approved these changes
Mar 23, 2026
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.
fixes: #2204
Patch 0003 references fips140only.BackendApprovedHash in backend_linux.go, backend_windows.go, and backend_darwin.go, but the BackendApprovedHash variable and the updated ApprovedHash function were only added to fips140only.go in patch 0004. This caused a build failure when building at the 0003 commit:
Move the fips140only.go hunk from patch 0004 into patch 0003 so the symbol exists when it is first used.