From 12394e85bbf69f267ca470cfada32b4d5f30adf5 Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 17 Feb 2026 14:19:41 +0000 Subject: [PATCH 1/3] [release-branch.go1.26] implement loong64 assembly for CGO-less --- .../0001-Vendor-external-dependencies.patch | 939 +++++++++++++++++- ...03-Implement-crypto-internal-backend.patch | 56 +- 2 files changed, 949 insertions(+), 46 deletions(-) diff --git a/patches/0001-Vendor-external-dependencies.patch b/patches/0001-Vendor-external-dependencies.patch index 0ffd8c8b84..8822c3c119 100644 --- a/patches/0001-Vendor-external-dependencies.patch +++ b/patches/0001-Vendor-external-dependencies.patch @@ -62,13 +62,16 @@ Use a 'go' that was recently built by the current branch to ensure stable result .../github.com/golang-fips/openssl/v2/hmac.go | 282 ++ .../openssl/v2/internal/fakecgo/abi_amd64.h | 99 + .../openssl/v2/internal/fakecgo/abi_arm64.h | 39 + + .../openssl/v2/internal/fakecgo/abi_loong64.h | 60 + .../openssl/v2/internal/fakecgo/abi_ppc64x.h | 195 ++ .../openssl/v2/internal/fakecgo/asm_386.s | 29 + .../openssl/v2/internal/fakecgo/asm_amd64.s | 39 + .../openssl/v2/internal/fakecgo/asm_arm.s | 52 + .../openssl/v2/internal/fakecgo/asm_arm64.s | 36 + + .../openssl/v2/internal/fakecgo/asm_loong64.s | 40 + .../openssl/v2/internal/fakecgo/asm_ppc64le.s | 82 + .../openssl/v2/internal/fakecgo/asm_riscv64.s | 78 + + .../openssl/v2/internal/fakecgo/asm_s390x.s | 55 + .../openssl/v2/internal/fakecgo/callbacks.go | 93 + .../openssl/v2/internal/fakecgo/fakecgo.go | 29 + .../openssl/v2/internal/fakecgo/fakecgo.lock | 3 + @@ -88,8 +91,10 @@ Use a 'go' that was recently built by the current branch to ensure stable result .../v2/internal/fakecgo/trampolines_amd64.s | 107 + .../v2/internal/fakecgo/trampolines_arm.s | 81 + .../v2/internal/fakecgo/trampolines_arm64.s | 84 + + .../v2/internal/fakecgo/trampolines_loong64.s | 88 + .../v2/internal/fakecgo/trampolines_ppc64le.s | 227 ++ .../v2/internal/fakecgo/trampolines_riscv64.s | 72 + + .../v2/internal/fakecgo/trampolines_s390x.s | 163 ++ .../openssl/v2/internal/fakecgo/zsymbols.go | 165 ++ .../v2/internal/fakecgo/zsymbols_darwin.go | 59 + .../v2/internal/fakecgo/zsymbols_linux.go | 294 ++ @@ -99,16 +104,20 @@ Use a 'go' that was recently built by the current branch to ensure stable result .../fakecgo/ztrampolines_linux_amd64.s | 102 + .../internal/fakecgo/ztrampolines_linux_arm.s | 74 + .../fakecgo/ztrampolines_linux_arm64.s | 93 + + .../fakecgo/ztrampolines_linux_loong64.s | 92 + .../fakecgo/ztrampolines_linux_ppc64le.s | 101 + .../fakecgo/ztrampolines_linux_riscv64.s | 92 + + .../fakecgo/ztrampolines_linux_s390x.s | 90 + .../v2/internal/fakecgo/ztrampolines_stubs.s | 55 + .../openssl/v2/internal/ossl/asm_386.s | 98 + .../openssl/v2/internal/ossl/asm_amd64.s | 120 + .../openssl/v2/internal/ossl/asm_arm.s | 104 + .../openssl/v2/internal/ossl/asm_arm64.s | 97 + + .../openssl/v2/internal/ossl/asm_loong64.s | 116 + .../openssl/v2/internal/ossl/asm_others.s | 7 + .../openssl/v2/internal/ossl/asm_ppc64le.s | 141 + .../openssl/v2/internal/ossl/asm_riscv64.s | 109 + + .../openssl/v2/internal/ossl/asm_s390x.s | 117 + .../golang-fips/openssl/v2/internal/ossl/dl.h | 12 + .../openssl/v2/internal/ossl/errors.go | 34 + .../openssl/v2/internal/ossl/errors_cgo.go | 14 + @@ -120,7 +129,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result .../v2/internal/ossl/syscall_nocgo_linux.go | 5 + .../v2/internal/ossl/syscall_nocgo_unix.go | 20 + .../v2/internal/ossl/syscall_nocgo_windows.go | 22 + - .../openssl/v2/internal/ossl/zdl.s | 53 + + .../openssl/v2/internal/ossl/zdl.s | 55 + .../openssl/v2/internal/ossl/zdl_nocgo.go | 45 + .../openssl/v2/internal/ossl/zossl.c | 2056 ++++++++++++++ .../openssl/v2/internal/ossl/zossl.go | 67 + @@ -268,7 +277,7 @@ Use a 'go' that was recently built by the current branch to ensure stable result .../internal/subtle/aliasing.go | 32 + .../internal/sysdll/sys_windows.go | 55 + src/vendor/modules.txt | 23 + - 260 files changed, 33274 insertions(+), 7 deletions(-) + 269 files changed, 34097 insertions(+), 7 deletions(-) create mode 100644 src/cmd/internal/telemetry/counter/deps_ignore.go create mode 100644 src/cmd/vendor/github.com/microsoft/go-infra/telemetry/LICENSE create mode 100644 src/cmd/vendor/github.com/microsoft/go-infra/telemetry/README.md @@ -316,13 +325,16 @@ Use a 'go' that was recently built by the current branch to ensure stable result create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/hmac.go create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/abi_amd64.h create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/abi_arm64.h + create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/abi_loong64.h create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/abi_ppc64x.h create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_386.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_amd64.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_arm.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_arm64.s + create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_loong64.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_ppc64le.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_riscv64.s + create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_s390x.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/callbacks.go create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/fakecgo.go create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/fakecgo.lock @@ -342,8 +354,10 @@ Use a 'go' that was recently built by the current branch to ensure stable result create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_amd64.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_arm.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_arm64.s + create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_loong64.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_ppc64le.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_riscv64.s + create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_s390x.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/zsymbols.go create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/zsymbols_darwin.go create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/zsymbols_linux.go @@ -353,16 +367,20 @@ Use a 'go' that was recently built by the current branch to ensure stable result create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_amd64.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_arm.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_arm64.s + create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_loong64.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_ppc64le.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_riscv64.s + create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_s390x.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_stubs.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_386.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_amd64.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_arm.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_arm64.s + create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_loong64.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_others.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_ppc64le.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_riscv64.s + create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_s390x.s create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/dl.h create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/errors.go create mode 100644 src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/errors_cgo.go @@ -2195,7 +2213,7 @@ index 00000000000000..ae4055d2d71303 +// that are used by the backend package. This allows to track +// their versions in a single patch file. diff --git a/src/go.mod b/src/go.mod -index efc07451b53448..a8fc3b2a8237a6 100644 +index efc07451b53448..92c3c1585973d2 100644 --- a/src/go.mod +++ b/src/go.mod @@ -11,3 +11,9 @@ require ( @@ -2204,17 +2222,17 @@ index efc07451b53448..a8fc3b2a8237a6 100644 ) + +require ( -+ github.com/golang-fips/openssl/v2 v2.0.4-0.20260209093649-295f210329ab ++ github.com/golang-fips/openssl/v2 v2.0.4-0.20260217140351-4e237614ceb4 + github.com/microsoft/go-crypto-darwin v0.0.3-0.20260130143703-78cb726ef357 + github.com/microsoft/go-crypto-winnative v0.0.0-20260127024749-832b168a84e9 +) diff --git a/src/go.sum b/src/go.sum -index b6b841b44d8e38..7c3a229e078b22 100644 +index b6b841b44d8e38..351d0574653a2a 100644 --- a/src/go.sum +++ b/src/go.sum @@ -1,3 +1,9 @@ -+github.com/golang-fips/openssl/v2 v2.0.4-0.20260209093649-295f210329ab h1:KdqScmkTRe6k9qClbxj0db4ZS84etcXI8Rm219Rhcnc= -+github.com/golang-fips/openssl/v2 v2.0.4-0.20260209093649-295f210329ab/go.mod h1:EtVnMfLGkB4pihGOH+tXEV0WlXxewWdT1n3GLJEHvpw= ++github.com/golang-fips/openssl/v2 v2.0.4-0.20260217140351-4e237614ceb4 h1:2kbDvyeg2zT1dsjfp6I445SCP4ryK88vnIODU+x0W3o= ++github.com/golang-fips/openssl/v2 v2.0.4-0.20260217140351-4e237614ceb4/go.mod h1:EtVnMfLGkB4pihGOH+tXEV0WlXxewWdT1n3GLJEHvpw= +github.com/microsoft/go-crypto-darwin v0.0.3-0.20260130143703-78cb726ef357 h1:ILqgGD8SGjjtSweSBanrXyX8Aco33yFSJEqsnJgmXHU= +github.com/microsoft/go-crypto-darwin v0.0.3-0.20260130143703-78cb726ef357/go.mod h1:MTii5PQwRlfUjYpGoF8CPLGwXSHTbLHGRN9FVNML5N0= +github.com/microsoft/go-crypto-winnative v0.0.0-20260127024749-832b168a84e9 h1:joliMChkkfHV3vAPKzu9kefdw0K+d89A8r9gTm3MFS4= @@ -7280,6 +7298,72 @@ index 00000000000000..5d5061ec1dbf8c + FLDPD ((offset)+2*8)(RSP), (F10, F11) \ + FLDPD ((offset)+4*8)(RSP), (F12, F13) \ + FLDPD ((offset)+6*8)(RSP), (F14, F15) +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/abi_loong64.h b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/abi_loong64.h +new file mode 100644 +index 00000000000000..b10d83732f1c6e +--- /dev/null ++++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/abi_loong64.h +@@ -0,0 +1,60 @@ ++// Copyright 2022 The Go Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style ++// license that can be found in the LICENSE file. ++ ++// Macros for transitioning from the host ABI to Go ABI0. ++// ++// These macros save and restore the callee-saved registers ++// from the stack, but they don't adjust stack pointer, so ++// the user should prepare stack space in advance. ++// SAVE_R22_TO_R31(offset) saves R22 ~ R31 to the stack space ++// of ((offset)+0*8)(R3) ~ ((offset)+9*8)(R3). ++// ++// SAVE_F24_TO_F31(offset) saves F24 ~ F31 to the stack space ++// of ((offset)+0*8)(R3) ~ ((offset)+7*8)(R3). ++// ++// Note: g is R22 ++ ++#define SAVE_R22_TO_R31(offset) \ ++ MOVV g, ((offset)+(0*8))(R3) \ ++ MOVV R23, ((offset)+(1*8))(R3) \ ++ MOVV R24, ((offset)+(2*8))(R3) \ ++ MOVV R25, ((offset)+(3*8))(R3) \ ++ MOVV R26, ((offset)+(4*8))(R3) \ ++ MOVV R27, ((offset)+(5*8))(R3) \ ++ MOVV R28, ((offset)+(6*8))(R3) \ ++ MOVV R29, ((offset)+(7*8))(R3) \ ++ MOVV R30, ((offset)+(8*8))(R3) \ ++ MOVV R31, ((offset)+(9*8))(R3) ++ ++#define SAVE_F24_TO_F31(offset) \ ++ MOVD F24, ((offset)+(0*8))(R3) \ ++ MOVD F25, ((offset)+(1*8))(R3) \ ++ MOVD F26, ((offset)+(2*8))(R3) \ ++ MOVD F27, ((offset)+(3*8))(R3) \ ++ MOVD F28, ((offset)+(4*8))(R3) \ ++ MOVD F29, ((offset)+(5*8))(R3) \ ++ MOVD F30, ((offset)+(6*8))(R3) \ ++ MOVD F31, ((offset)+(7*8))(R3) ++ ++#define RESTORE_R22_TO_R31(offset) \ ++ MOVV ((offset)+(0*8))(R3), g \ ++ MOVV ((offset)+(1*8))(R3), R23 \ ++ MOVV ((offset)+(2*8))(R3), R24 \ ++ MOVV ((offset)+(3*8))(R3), R25 \ ++ MOVV ((offset)+(4*8))(R3), R26 \ ++ MOVV ((offset)+(5*8))(R3), R27 \ ++ MOVV ((offset)+(6*8))(R3), R28 \ ++ MOVV ((offset)+(7*8))(R3), R29 \ ++ MOVV ((offset)+(8*8))(R3), R30 \ ++ MOVV ((offset)+(9*8))(R3), R31 ++ ++#define RESTORE_F24_TO_F31(offset) \ ++ MOVD ((offset)+(0*8))(R3), F24 \ ++ MOVD ((offset)+(1*8))(R3), F25 \ ++ MOVD ((offset)+(2*8))(R3), F26 \ ++ MOVD ((offset)+(3*8))(R3), F27 \ ++ MOVD ((offset)+(4*8))(R3), F28 \ ++ MOVD ((offset)+(5*8))(R3), F29 \ ++ MOVD ((offset)+(6*8))(R3), F30 \ ++ MOVD ((offset)+(7*8))(R3), F31 diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/abi_ppc64x.h b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/abi_ppc64x.h new file mode 100644 index 00000000000000..245a5266f6e9fa @@ -7661,6 +7745,52 @@ index 00000000000000..50e5261d922c56 + + ADD $(8*24), RSP + RET +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_loong64.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_loong64.s +new file mode 100644 +index 00000000000000..e81df86a56e4ad +--- /dev/null ++++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_loong64.s +@@ -0,0 +1,40 @@ ++// Copyright 2022 The Go Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style ++// license that can be found in the LICENSE file. ++ ++#include "textflag.h" ++#include "abi_loong64.h" ++ ++// Called by C code generated by cmd/cgo. ++// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr) ++// Saves C callee-saved registers and calls cgocallback with three arguments. ++// fn is the PC of a func(a unsafe.Pointer) function. ++TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0 ++/* ++ * We still need to save all callee save register as before, and then ++ * push 3 args for fn (R4, R5, R7), skipping R6. ++ * Also note that at procedure entry in gc world, 8(R29) will be the ++ * first arg. ++ */ ++ ++ ADDV $(-23*8), R3 ++ MOVV R4, (1*8)(R3) // fn unsafe.Pointer ++ MOVV R5, (2*8)(R3) // a unsafe.Pointer ++ MOVV R7, (3*8)(R3) // ctxt uintptr ++ ++ SAVE_R22_TO_R31((4*8)) ++ SAVE_F24_TO_F31((14*8)) ++ MOVV R1, (22*8)(R3) ++ ++ // Initialize Go ABI environment ++ JAL runtime·load_g(SB) ++ ++ JAL runtime·cgocallback(SB) ++ ++ RESTORE_R22_TO_R31((4*8)) ++ RESTORE_F24_TO_F31((14*8)) ++ MOVV (22*8)(R3), R1 ++ ++ ADDV $(23*8), R3 ++ ++ RET diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_ppc64le.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_ppc64le.s new file mode 100644 index 00000000000000..6d1938cd8d8bcd @@ -7833,6 +7963,67 @@ index 00000000000000..acf82c1b5ae501 + ADD $(8*29), X2 + + RET +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_s390x.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_s390x.s +new file mode 100644 +index 00000000000000..b64466501dee38 +--- /dev/null ++++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/asm_s390x.s +@@ -0,0 +1,55 @@ ++// Copyright 2016 The Go Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style ++// license that can be found in the LICENSE file. ++ ++#include "textflag.h" ++ ++// Called by C code generated by cmd/cgo. ++// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr) ++// Saves C callee-saved registers and calls cgocallback with three arguments. ++// fn is the PC of a func(a unsafe.Pointer) function. ++TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0 ++ // Start with standard C stack frame layout and linkage. ++ ++ // Save R6-R15 in the register save area of the calling function. ++ STMG R6, R15, 48(R15) ++ ++ // Allocate 96 bytes on the stack. ++ MOVD $-96(R15), R15 ++ ++ // Save F8-F15 in our stack frame. ++ FMOVD F8, 32(R15) ++ FMOVD F9, 40(R15) ++ FMOVD F10, 48(R15) ++ FMOVD F11, 56(R15) ++ FMOVD F12, 64(R15) ++ FMOVD F13, 72(R15) ++ FMOVD F14, 80(R15) ++ FMOVD F15, 88(R15) ++ ++ // Initialize Go ABI environment. ++ BL runtime·load_g(SB) ++ ++ MOVD R2, 8(R15) // fn unsafe.Pointer ++ MOVD R3, 16(R15) // a unsafe.Pointer ++ ++ // Skip R4 = n uint32 ++ MOVD R5, 24(R15) // ctxt uintptr ++ BL runtime·cgocallback(SB) ++ ++ FMOVD 32(R15), F8 ++ FMOVD 40(R15), F9 ++ FMOVD 48(R15), F10 ++ FMOVD 56(R15), F11 ++ FMOVD 64(R15), F12 ++ FMOVD 72(R15), F13 ++ FMOVD 80(R15), F14 ++ FMOVD 88(R15), F15 ++ ++ // De-allocate stack frame. ++ MOVD $96(R15), R15 ++ ++ // Restore R6-R15. ++ LMG 48(R15), R6, R15 ++ ++ RET diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/callbacks.go b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/callbacks.go new file mode 100644 index 00000000000000..5f70632fa7cc33 @@ -7969,12 +8160,12 @@ index 00000000000000..7927deb2785263 +} diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/fakecgo.lock b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/fakecgo.lock new file mode 100644 -index 00000000000000..57250706a043f1 +index 00000000000000..4e9bbeb5c4f3e3 --- /dev/null +++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/fakecgo.lock @@ -0,0 +1,3 @@ +{ -+ "commit_hash": "49bede11a66085d4400e4a257e4c77c9604c791a" ++ "commit_hash": "585a4c527464bb6ef91b22aef08d55219c8fab09" +} diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/generate.go b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/generate.go new file mode 100644 @@ -8927,16 +9118,110 @@ index 00000000000000..ddd01434d04cda + CALL R9 + MOVD R0, ret+48(FP) + RET +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_loong64.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_loong64.s +new file mode 100644 +index 00000000000000..89bf8813bade7a +--- /dev/null ++++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_loong64.s +@@ -0,0 +1,88 @@ ++// SPDX-License-Identifier: Apache-2.0 ++// SPDX-FileCopyrightText: 2025 The Ebitengine Authors ++ ++//go:build !cgo && (darwin || linux) ++ ++#include "textflag.h" ++#include "go_asm.h" ++#include "abi_loong64.h" ++ ++// these trampolines map the gcc ABI to Go ABI and then calls into the Go equivalent functions. ++// R23 is used as temporary register. ++ ++TEXT x_cgo_init_trampoline(SB), NOSPLIT, $16 ++ MOVV R4, 8(R3) ++ MOVV R5, 16(R3) ++ MOVV ·x_cgo_init_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $8 ++ MOVV R4, 8(R3) ++ MOVV ·x_cgo_thread_start_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $8 ++ MOVV R4, 8(R3) ++ MOVV ·x_cgo_setenv_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $8 ++ MOVV R4, 8(R3) ++ MOVV ·x_cgo_unsetenv_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0 ++ CALL ·x_cgo_notify_runtime_init_done(SB) ++ RET ++ ++TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0 ++ CALL ·x_cgo_bindm(SB) ++ RET ++ ++// func setg_trampoline(setg uintptr, g uintptr) ++TEXT ·setg_trampoline(SB), NOSPLIT, $0 ++ MOVV G+8(FP), R4 ++ MOVV setg+0(FP), R23 ++ CALL (R23) ++ RET ++ ++TEXT threadentry_trampoline(SB), NOSPLIT, $0 ++ // See crosscall2. ++ ADDV $(-23*8), R3 ++ MOVV R4, (1*8)(R3) // fn unsafe.Pointer ++ MOVV R5, (2*8)(R3) // a unsafe.Pointer ++ MOVV R7, (3*8)(R3) // ctxt uintptr ++ ++ SAVE_R22_TO_R31((4*8)) ++ SAVE_F24_TO_F31((14*8)) ++ MOVV R1, (22*8)(R3) ++ ++ MOVV ·threadentry_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ ++ RESTORE_R22_TO_R31((4*8)) ++ RESTORE_F24_TO_F31((14*8)) ++ MOVV (22*8)(R3), R1 ++ ++ ADDV $(23*8), R3 ++ RET ++ ++TEXT ·call5(SB), NOSPLIT, $0-0 ++ MOVV fn+0(FP), R23 ++ MOVV a1+8(FP), R4 ++ MOVV a2+16(FP), R5 ++ MOVV a3+24(FP), R6 ++ MOVV a4+32(FP), R7 ++ MOVV a5+40(FP), R8 ++ CALL (R23) ++ MOVV R4, ret+48(FP) ++ RET diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_ppc64le.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_ppc64le.s new file mode 100644 -index 00000000000000..b9b5016a611382 +index 00000000000000..586ccaf91df1a4 --- /dev/null +++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_ppc64le.s @@ -0,0 +1,227 @@ +// SPDX-License-Identifier: Apache-2.0 -+// SPDX-FileCopyrightText: 2024 The Ebitengine Authors ++// SPDX-FileCopyrightText: 2026 The Ebitengine Authors + -+//go:build !cgo && linux ++//go:build !cgo && (darwin || linux) + +#include "textflag.h" +#include "go_asm.h" @@ -9238,6 +9523,175 @@ index 00000000000000..50b364773606d1 + CALL X5 + MOV X10, ret+48(FP) + RET +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_s390x.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_s390x.s +new file mode 100644 +index 00000000000000..49fec0cf2f1718 +--- /dev/null ++++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/trampolines_s390x.s +@@ -0,0 +1,163 @@ ++// SPDX-License-Identifier: Apache-2.0 ++// SPDX-FileCopyrightText: 2026 The Ebitengine Authors ++ ++//go:build go1.27 && !cgo && linux ++ ++#include "textflag.h" ++#include "go_asm.h" ++ ++// S390X ELF ABI: args R2-R6, return R2, callee-save R6-R13/R15/F8-F15, R14=LR, R15=SP ++// CRITICAL: R0 as base register means "no base" (literal 0), not R0's value! ++ ++// x_cgo_init_trampoline must preserve R9 for Go runtime ++TEXT x_cgo_init_trampoline(SB), NOSPLIT|NOFRAME, $0-0 ++ MOVD R14, R0 ++ MOVD R15, R1 ++ SUB $192, R15 ++ MOVD R1, 0(R15) // backchain ++ MOVD R0, 160(R15) // save R14 ++ MOVD R1, 168(R15) // save old R15 ++ MOVD R9, 176(R15) // save R9 (Go runtime needs this preserved) ++ ++ MOVD ·x_cgo_init_call(SB), R1 ++ MOVD (R1), R1 ++ BL R1 ++ ++ MOVD 176(R15), R9 ++ MOVD 160(R15), R14 ++ MOVD 168(R15), R15 ++ BR R14 ++ ++// Standard trampoline pattern: save R14/R15, call via pointer, restore ++TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT|NOFRAME, $0-0 ++ MOVD R14, R0 ++ MOVD R15, R1 ++ SUB $176, R15 ++ MOVD R1, 0(R15) ++ MOVD R0, 152(R15) ++ ++ MOVD ·x_cgo_thread_start_call(SB), R1 ++ MOVD (R1), R1 ++ BL R1 ++ ++ MOVD 152(R15), R14 ++ ADD $176, R15 ++ BR R14 ++ ++TEXT x_cgo_setenv_trampoline(SB), NOSPLIT|NOFRAME, $0-0 ++ MOVD R14, R0 ++ MOVD R15, R1 ++ SUB $176, R15 ++ MOVD R1, 0(R15) ++ MOVD R0, 152(R15) ++ ++ MOVD ·x_cgo_setenv_call(SB), R1 ++ MOVD (R1), R1 ++ BL R1 ++ ++ MOVD 152(R15), R14 ++ ADD $176, R15 ++ BR R14 ++ ++TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT|NOFRAME, $0-0 ++ MOVD R14, R0 ++ MOVD R15, R1 ++ SUB $176, R15 ++ MOVD R1, 0(R15) ++ MOVD R0, 152(R15) ++ ++ MOVD ·x_cgo_unsetenv_call(SB), R1 ++ MOVD (R1), R1 ++ BL R1 ++ ++ MOVD 152(R15), R14 ++ ADD $176, R15 ++ BR R14 ++ ++// These just tail-call into Go functions ++TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT|NOFRAME, $0-0 ++ BR ·x_cgo_notify_runtime_init_done(SB) ++ ++TEXT x_cgo_bindm_trampoline(SB), NOSPLIT|NOFRAME, $0-0 ++ BR ·x_cgo_bindm(SB) ++ ++// setg_trampoline(setg uintptr, g uintptr) - called from Go ++TEXT ·setg_trampoline(SB), NOSPLIT|NOFRAME, $0-16 ++ MOVD 8(R15), R1 // setg function pointer ++ MOVD 16(R15), R2 // g pointer → C arg ++ ++ MOVD R14, R0 ++ MOVD R15, R3 ++ SUB $160, R15 ++ MOVD R3, 0(R15) ++ MOVD R0, 112(R15) ++ ++ BL R1 // call setg_gcc ++ BL runtime·load_g(SB) ++ ++ MOVD 112(R15), R14 ++ ADD $160, R15 ++ BR R14 ++ ++// threadentry_trampoline - called FROM C (pthread_create), arg in R2 ++TEXT threadentry_trampoline(SB), NOSPLIT|NOFRAME, $0-0 ++ STMG R6, R15, 48(R15) // C save area ++ MOVD R15, R1 ++ SUB $176, R15 ++ MOVD R1, 0(R15) // backchain ++ MOVD R2, 8(R15) // pthread arg → Go arg ++ ++ MOVD ·threadentry_call(SB), R1 ++ MOVD (R1), R1 ++ BL R1 ++ ++ ADD $176, R15 ++ LMG 48(R15), R6, R15 ++ RET ++ ++// call5(fn, a1, a2, a3, a4, a5 uintptr) uintptr - Go calling C ++TEXT ·call5(SB), NOSPLIT|NOFRAME, $0-56 ++ // Load Go args before modifying R15 ++ MOVD 8(R15), R1 // fn ++ MOVD 16(R15), R7 // a1 ++ MOVD 24(R15), R8 // a2 ++ MOVD 32(R15), R9 // a3 ++ MOVD 40(R15), R10 // a4 ++ MOVD 48(R15), R11 // a5 ++ ++ // Save state ++ MOVD R15, R0 // original R15 ++ MOVD R12, R6 // Go's R12 ++ ADD $-128, R15 ++ ++ // Set up C frame with backchain ++ MOVD R0, 0(R15) // backchain → original R15 ++ MOVD R0, R3 // R3 = original R15 (can't use R0 as base!) ++ MOVD 0(R3), R7 // save 0(original R15) ++ MOVD $0, 0(R3) // terminate backchain ++ ++ // Save context ++ MOVD R14, 8(R15) ++ MOVD R6, 16(R15) // R12 ++ MOVD R0, 24(R15) // original R15 ++ MOVD R7, 32(R15) // saved backchain ++ ++ // Set up C args (reload a1 since R7 was clobbered) ++ MOVD 16(R3), R2 // a1 (use R3 as base, not R0!) ++ MOVD R8, R3 // a2 ++ MOVD R9, R4 // a3 ++ MOVD R10, R5 // a4 ++ MOVD R11, R6 // a5 ++ ++ BL R1 ++ ++ // Store result and restore ++ MOVD 24(R15), R3 // original R15 ++ MOVD R2, 56(R3) // return value ++ MOVD 32(R15), R7 ++ MOVD R7, 0(R3) // restore backchain ++ ++ MOVD 8(R15), R14 ++ MOVD 16(R15), R12 ++ MOVD 24(R15), R15 ++ BR R14 diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/zsymbols.go b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/zsymbols.go new file mode 100644 index 00000000000000..fb667453f207c0 @@ -10224,6 +10678,104 @@ index 00000000000000..0b25425c004d38 +TEXT _setgroups(SB), NOSPLIT, $0-0 + JMP purego_setgroups(SB) + +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_loong64.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_loong64.s +new file mode 100644 +index 00000000000000..3c8a0d64e659fa +--- /dev/null ++++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_loong64.s +@@ -0,0 +1,92 @@ ++// Code generated by 'go generate' with gen.go. DO NOT EDIT. ++ ++// SPDX-License-Identifier: Apache-2.0 ++// SPDX-FileCopyrightText: 2022 The Ebitengine Authors ++ ++//go:build !cgo ++ ++#include "textflag.h" ++ ++TEXT ___errno_location(SB), NOSPLIT, $0-0 ++ JMP purego___errno_location(SB) ++ ++TEXT _cgo_purego_setegid_trampoline(SB), NOSPLIT, $0 ++ MOVV ·x_cgo_purego_setegid_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT _setegid(SB), NOSPLIT, $0-0 ++ JMP purego_setegid(SB) ++ ++TEXT _cgo_purego_seteuid_trampoline(SB), NOSPLIT, $0 ++ MOVV ·x_cgo_purego_seteuid_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT _seteuid(SB), NOSPLIT, $0-0 ++ JMP purego_seteuid(SB) ++ ++TEXT _cgo_purego_setgid_trampoline(SB), NOSPLIT, $0 ++ MOVV ·x_cgo_purego_setgid_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT _setgid(SB), NOSPLIT, $0-0 ++ JMP purego_setgid(SB) ++ ++TEXT _cgo_purego_setregid_trampoline(SB), NOSPLIT, $0 ++ MOVV ·x_cgo_purego_setregid_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT _setregid(SB), NOSPLIT, $0-0 ++ JMP purego_setregid(SB) ++ ++TEXT _cgo_purego_setresgid_trampoline(SB), NOSPLIT, $0 ++ MOVV ·x_cgo_purego_setresgid_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT _setresgid(SB), NOSPLIT, $0-0 ++ JMP purego_setresgid(SB) ++ ++TEXT _cgo_purego_setresuid_trampoline(SB), NOSPLIT, $0 ++ MOVV ·x_cgo_purego_setresuid_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT _setresuid(SB), NOSPLIT, $0-0 ++ JMP purego_setresuid(SB) ++ ++TEXT _cgo_purego_setreuid_trampoline(SB), NOSPLIT, $0 ++ MOVV ·x_cgo_purego_setreuid_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT _setreuid(SB), NOSPLIT, $0-0 ++ JMP purego_setreuid(SB) ++ ++TEXT _cgo_purego_setuid_trampoline(SB), NOSPLIT, $0 ++ MOVV ·x_cgo_purego_setuid_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT _setuid(SB), NOSPLIT, $0-0 ++ JMP purego_setuid(SB) ++ ++TEXT _cgo_purego_setgroups_trampoline(SB), NOSPLIT, $0 ++ MOVV ·x_cgo_purego_setgroups_call(SB), R23 ++ MOVV (R23), R23 ++ CALL (R23) ++ RET ++ ++TEXT _setgroups(SB), NOSPLIT, $0-0 ++ JMP purego_setgroups(SB) diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_ppc64le.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_ppc64le.s new file mode 100644 index 00000000000000..70c51e674587ef @@ -10429,6 +10981,102 @@ index 00000000000000..30dbb92f51fbb8 + +TEXT _setgroups(SB), NOSPLIT, $0-0 + JMP purego_setgroups(SB) +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_s390x.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_s390x.s +new file mode 100644 +index 00000000000000..edc21761ddd8ad +--- /dev/null ++++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_linux_s390x.s +@@ -0,0 +1,90 @@ ++// Code generated by 'go generate' with gen.go. DO NOT EDIT. ++ ++// SPDX-License-Identifier: Apache-2.0 ++// SPDX-FileCopyrightText: 2022 The Ebitengine Authors ++ ++//go:build go1.27 && !cgo ++ ++#include "textflag.h" ++ ++TEXT ___errno_location(SB), NOSPLIT, $0-0 ++ JMP purego___errno_location(SB) ++ ++TEXT _cgo_purego_setegid_trampoline(SB), NOSPLIT|NOFRAME, $0 ++ // R2 already has the argument from C caller ++ MOVD ·x_cgo_purego_setegid_call(SB), R1 ++ MOVD (R1), R1 ++ BR R1 ++ ++TEXT _setegid(SB), NOSPLIT|NOFRAME, $0-0 ++ JMP purego_setegid(SB) ++ ++TEXT _cgo_purego_seteuid_trampoline(SB), NOSPLIT|NOFRAME, $0 ++ MOVD ·x_cgo_purego_seteuid_call(SB), R1 ++ MOVD (R1), R1 ++ BR R1 ++ ++TEXT _seteuid(SB), NOSPLIT|NOFRAME, $0-0 ++ JMP purego_seteuid(SB) ++ ++TEXT _cgo_purego_setgid_trampoline(SB), NOSPLIT|NOFRAME, $0 ++ MOVD ·x_cgo_purego_setgid_call(SB), R1 ++ MOVD (R1), R1 ++ BR R1 ++ ++TEXT _setgid(SB), NOSPLIT|NOFRAME, $0-0 ++ JMP purego_setgid(SB) ++ ++TEXT _cgo_purego_setregid_trampoline(SB), NOSPLIT|NOFRAME, $0 ++ // R2, R3 have arguments from C caller ++ MOVD ·x_cgo_purego_setregid_call(SB), R1 ++ MOVD (R1), R1 ++ BR R1 ++ ++TEXT _setregid(SB), NOSPLIT|NOFRAME, $0-0 ++ JMP purego_setregid(SB) ++ ++TEXT _cgo_purego_setresgid_trampoline(SB), NOSPLIT|NOFRAME, $0 ++ // R2, R3, R4 have arguments from C caller ++ MOVD ·x_cgo_purego_setresgid_call(SB), R1 ++ MOVD (R1), R1 ++ BR R1 ++ ++TEXT _setresgid(SB), NOSPLIT|NOFRAME, $0-0 ++ JMP purego_setresgid(SB) ++ ++TEXT _cgo_purego_setresuid_trampoline(SB), NOSPLIT|NOFRAME, $0 ++ // R2, R3, R4 have arguments from C caller ++ MOVD ·x_cgo_purego_setresuid_call(SB), R1 ++ MOVD (R1), R1 ++ BR R1 ++ ++TEXT _setresuid(SB), NOSPLIT|NOFRAME, $0-0 ++ JMP purego_setresuid(SB) ++ ++TEXT _cgo_purego_setreuid_trampoline(SB), NOSPLIT|NOFRAME, $0 ++ // R2, R3 have arguments from C caller ++ MOVD ·x_cgo_purego_setreuid_call(SB), R1 ++ MOVD (R1), R1 ++ BR R1 ++ ++TEXT _setreuid(SB), NOSPLIT|NOFRAME, $0-0 ++ JMP purego_setreuid(SB) ++ ++TEXT _cgo_purego_setuid_trampoline(SB), NOSPLIT|NOFRAME, $0 ++ MOVD ·x_cgo_purego_setuid_call(SB), R1 ++ MOVD (R1), R1 ++ BR R1 ++ ++TEXT _setuid(SB), NOSPLIT|NOFRAME, $0-0 ++ JMP purego_setuid(SB) ++ ++TEXT _cgo_purego_setgroups_trampoline(SB), NOSPLIT|NOFRAME, $0 ++ // R2, R3 have arguments from C caller ++ MOVD ·x_cgo_purego_setgroups_call(SB), R1 ++ MOVD (R1), R1 ++ BR R1 ++ ++TEXT _setgroups(SB), NOSPLIT|NOFRAME, $0-0 ++ JMP purego_setgroups(SB) ++ diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_stubs.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/fakecgo/ztrampolines_stubs.s new file mode 100644 index 00000000000000..6a073bea0944d1 @@ -10933,9 +11581,131 @@ index 00000000000000..261a7e4cb90d56 + MOVD R1, libcCallInfo_r2(R3) // save r2 + + RET +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_loong64.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_loong64.s +new file mode 100644 +index 00000000000000..83ab9979dfdbfe +--- /dev/null ++++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_loong64.s +@@ -0,0 +1,116 @@ ++// Copyright 2015 The Go Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style ++// license that can be found in the LICENSE file. ++ ++//go:build !cgo ++ ++#include "go_asm.h" ++#include "textflag.h" ++ ++TEXT ·syscallNSystemStack_trampoline(SB), NOSPLIT, $16 ++ MOVV R4, 8(R3) ++ CALL ·syscallNSystemStack(SB) ++ RET ++ ++TEXT ·syscallNAsm(SB), NOSPLIT, $0-8 ++ // Load pointer from stack (ABI0 calling convention) ++ MOVV libcArgs+0(FP), R12 ++ ++ // Save original stack pointer ++ MOVV R3, R23 ++ ++ // Align stack to 16 bytes for C calling convention ++ MOVV $-16, R15 ++ AND R15, R3 ++ ++ MOVV libcCallInfo_args(R12), R13 ++ MOVV libcCallInfo_fn(R12), R14 ++ ++ // Do we have more than 8 arguments? ++ MOVV libcCallInfo_n(R12), R4 ++ BEQ R4, R0, _0args ++ MOVV $1, R15 ++ BEQ R4, R15, _1args ++ MOVV $2, R15 ++ BEQ R4, R15, _2args ++ MOVV $3, R15 ++ BEQ R4, R15, _3args ++ MOVV $4, R15 ++ BEQ R4, R15, _4args ++ MOVV $5, R15 ++ BEQ R4, R15, _5args ++ MOVV $6, R15 ++ BEQ R4, R15, _6args ++ MOVV $7, R15 ++ BEQ R4, R15, _7args ++ MOVV $8, R15 ++ BEQ R4, R15, _8args ++ ++ // Reserve stack space for remaining args ++ MOVV R4, R16 ++ ADDV $-8, R16 // R16 = n-8 ++ MOVV R16, R12 // R12 = n-8 (reuse R12, no longer need libcArgs) ++ ADDV $1, R12 // R12 = (n-8)+1 ++ MOVV $-2, R15 ++ AND R15, R12 // make even number of words for stack alignment ++ SLLV $3, R12 // R12 = bytes to reserve ++ SUBV R12, R3 // SP -= bytes ++ ++ // R16: size of stack arguments (n-8)*8 ++ // R15: &args[8] ++ // R17: loop counter, from 0 to (n-8)*8 ++ // R18: scratch ++ // R19: copy of R3 (SP) ++ // R20: scratch ++ SLLV $3, R16 // R16 = (n-8)*8 ++ MOVV R13, R15 ++ ADDV $(8*8), R15 // R15 = args + 64 = &args[8] ++ MOVV R0, R17 // R17 = 0 (loop counter) ++ MOVV R3, R19 // R19 = SP copy ++ ++stackargs: ++ MOVV R15, R18 ++ ADDV R17, R18 // R18 = &args[8] + counter ++ MOVV (R18), R18 // R18 = args[8 + counter/8] ++ MOVV R19, R20 ++ ADDV R17, R20 // R20 = SP_copy + counter ++ MOVV R18, (R20) // stack[counter/8] = R18 ++ ADDV $8, R17 // counter += 8 ++ BNE R17, R16, stackargs // while counter != (n-8)*8 ++ ++_8args: ++ MOVV (7*8)(R13), R11 ++ ++_7args: ++ MOVV (6*8)(R13), R10 ++ ++_6args: ++ MOVV (5*8)(R13), R9 ++ ++_5args: ++ MOVV (4*8)(R13), R8 ++ ++_4args: ++ MOVV (3*8)(R13), R7 ++ ++_3args: ++ MOVV (2*8)(R13), R6 ++ ++_2args: ++ MOVV (1*8)(R13), R5 ++ ++_1args: ++ MOVV (0*8)(R13), R4 ++ ++_0args: ++ ++ CALL (R14) ++ ++ // Restore original stack pointer ++ MOVV R23, R3 ++ ++ MOVV libcArgs+0(FP), R12 ++ MOVV R4, libcCallInfo_r1(R12) // save r1 ++ MOVV R5, libcCallInfo_r2(R12) // save r2 ++ ++ RET diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_others.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_others.s new file mode 100644 -index 00000000000000..340bfcc9cd9605 +index 00000000000000..59cfb27799734a --- /dev/null +++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_others.s @@ -0,0 +1,7 @@ @@ -10943,7 +11713,7 @@ index 00000000000000..340bfcc9cd9605 +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + -+//go:build !cgo && !arm && !arm64 && !386 && !amd64 && !ppc64le && !riscv64 ++//go:build !cgo && !arm && !arm64 && !386 && !amd64 && !loong64 && !ppc64le && !riscv64 && (!s390x || !go1.27) + +// This file silences errors about body-less functions. diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_ppc64le.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_ppc64le.s @@ -11208,6 +11978,129 @@ index 00000000000000..6ff0ddd2922d8b + MOV X11, libcCallInfo_r2(X5) // save r2 + + RET +diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_s390x.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_s390x.s +new file mode 100644 +index 00000000000000..0fbccc3731dae4 +--- /dev/null ++++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/asm_s390x.s +@@ -0,0 +1,117 @@ ++// Copyright 2009 The Go Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style ++// license that can be found in the LICENSE file. ++ ++//go:build go1.27 && !cgo ++ ++#include "go_asm.h" ++#include "textflag.h" ++ ++// S390X ELF ABI: ++// - Args in R2-R6, float args in F0, F2, F4, F6 ++// - Return values in R2, R3 (and F0 for floats) ++// - Callee-saved: R6-R13, R15, F8-F15 ++// - R14 is link register (return address) ++// - R15 is stack pointer ++// - Standard frame: 160 bytes minimum with register save area at 48(R15) ++ ++TEXT ·syscallNSystemStack_trampoline(SB), NOSPLIT|NOFRAME, $0-0 ++ // R2 already contains the libcArgs pointer from cgocall ++ // Save callee-saved registers to caller's save area ++ STMG R6, R15, 48(R15) ++ MOVD R15, R1 ++ SUB $32, R15 ++ MOVD R1, 0(R15) ++ MOVD R2, 8(R15) ++ BL ·syscallNSystemStack(SB) ++ ADD $32, R15 ++ LMG 48(R15), R6, R15 ++ RET ++ ++TEXT ·syscallNAsm(SB), NOSPLIT, $64-8 ++ // Save callee-saved registers we'll use (R6-R11) ++ STMG R6, R11, 8(R15) ++ ++ // Load libcArgs pointer from stack (ABI0 calling convention) ++ MOVD libcArgs+0(FP), R11 ++ ++ // Store values we need across the C call in callee-saved registers ++ MOVD R15, R7 // R7 = original SP ++ MOVD R11, R8 // R8 = libcArgs ++ MOVD libcCallInfo_args(R11), R9 // R9 = args ++ MOVD libcCallInfo_fn(R11), R10 // R10 = fn ++ MOVD libcCallInfo_n(R11), R6 // R6 = n ++ ++ // Do we have more than 5 arguments? ++ CMPBLE R6, $5, _allocsmall ++ ++ // >5 args: allocate frame for stack args ((n-5+1) & ~1) * 8 + 160 ++ MOVD R6, R1 ++ SUB $5, R1 ++ ADD $1, R1 ++ MOVD $~1, R0 ++ AND R0, R1 ++ SLD $3, R1 ++ ADD $160, R1 ++ SUB R1, R7, R15 ++ MOVD $~15, R0 ++ AND R0, R15 // 16-byte align ++ MOVD R7, 0(R15) // back chain ++ ++ // Copy args[5..n-1] to stack at offset 160 ++ MOVD $5, R1 ++ ++_stackargs: ++ SLD $3, R1, R3 ++ MOVD (R9)(R3*1), R0 ++ SUB $5, R1, R4 ++ SLD $3, R4 ++ ADD $160, R4 ++ MOVD R0, (R15)(R4*1) ++ ADD $1, R1 ++ CMP R1, R6 ++ BLT _stackargs ++ BR _5args ++ ++_allocsmall: ++ // <=5 args: allocate minimum 160-byte C frame ++ SUB $160, R7, R15 ++ MOVD $~15, R0 ++ AND R0, R15 ++ MOVD R7, 0(R15) // back chain ++ ++ // Branch to appropriate label based on arg count ++ CMPBEQ R6, $0, _0args ++ CMPBEQ R6, $1, _1args ++ CMPBEQ R6, $2, _2args ++ CMPBEQ R6, $3, _3args ++ CMPBEQ R6, $4, _4args ++ ++_5args: ++ MOVD (4*8)(R9), R6 ++ ++_4args: ++ MOVD (3*8)(R9), R5 ++ ++_3args: ++ MOVD (2*8)(R9), R4 ++ ++_2args: ++ MOVD (1*8)(R9), R3 ++ ++_1args: ++ MOVD (0*8)(R9), R2 ++ ++_0args: ++ BL R10 ++ ++ // Restore stack pointer ++ MOVD R7, R15 ++ ++ // Save return values ++ MOVD R2, libcCallInfo_r1(R8) ++ MOVD R3, libcCallInfo_r2(R8) ++ ++ // Restore callee-saved registers (R6-R11) ++ LMG 8(R15), R6, R11 ++ RET diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/dl.h b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/dl.h new file mode 100644 index 00000000000000..e94cca9e27e30a @@ -11927,11 +12820,11 @@ index 00000000000000..20cb4556a12aa8 +//go:cgo_import_dynamic _ _ "libdl.so.2" diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/syscall_nocgo_unix.go b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/syscall_nocgo_unix.go new file mode 100644 -index 00000000000000..9564b3a7033521 +index 00000000000000..5bdbec31d8f2ce --- /dev/null +++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/syscall_nocgo_unix.go @@ -0,0 +1,20 @@ -+//go:build !cgo && unix ++//go:build !cgo && unix && (go1.27 || !s390x) + +package ossl + @@ -11981,10 +12874,10 @@ index 00000000000000..48640cdcbf558f +} diff --git a/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/zdl.s b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/zdl.s new file mode 100644 -index 00000000000000..42f49b44875f91 +index 00000000000000..068a94d4c83ae1 --- /dev/null +++ b/src/vendor/github.com/golang-fips/openssl/v2/internal/ossl/zdl.s -@@ -0,0 +1,53 @@ +@@ -0,0 +1,55 @@ +// Code generated by mkcgo. DO NOT EDIT. + +//go:build !cgo && unix @@ -11999,6 +12892,7 @@ index 00000000000000..42f49b44875f91 +#ifndef GOARCH_mips64le +#ifndef GOARCH_ppc64 +#ifndef GOARCH_ppc64le ++#ifndef GOARCH_s390x +#ifndef GOARCH_sparc64 +#define _GOPTRSIZE 4 +#endif @@ -12010,6 +12904,7 @@ index 00000000000000..42f49b44875f91 +#endif +#endif +#endif ++#endif + +#ifndef _GOPTRSIZE +#define _GOPTRSIZE 8 @@ -19486,11 +20381,11 @@ index 00000000000000..0e61cc128ef981 +} diff --git a/src/vendor/github.com/golang-fips/openssl/v2/osslsetup/init_nocgo_unix.go b/src/vendor/github.com/golang-fips/openssl/v2/osslsetup/init_nocgo_unix.go new file mode 100644 -index 00000000000000..1a2f48ed510326 +index 00000000000000..2985d598579236 --- /dev/null +++ b/src/vendor/github.com/golang-fips/openssl/v2/osslsetup/init_nocgo_unix.go @@ -0,0 +1,32 @@ -+//go:build unix && !cmd_go_bootstrap && !cgo ++//go:build unix && !cmd_go_bootstrap && !cgo && (go1.27 || !s390x) + +package osslsetup + @@ -37422,11 +38317,11 @@ index 00000000000000..1722410e5af193 + return getSystemDirectory() + "\\" + dll +} diff --git a/src/vendor/modules.txt b/src/vendor/modules.txt -index b6f6376eac041a..5e6086aba7e37a 100644 +index b6f6376eac041a..d1a867d0452fed 100644 --- a/src/vendor/modules.txt +++ b/src/vendor/modules.txt @@ -1,3 +1,26 @@ -+# github.com/golang-fips/openssl/v2 v2.0.4-0.20260209093649-295f210329ab ++# github.com/golang-fips/openssl/v2 v2.0.4-0.20260217140351-4e237614ceb4 +## explicit; go 1.24 +github.com/golang-fips/openssl/v2 +github.com/golang-fips/openssl/v2/bbig diff --git a/patches/0003-Implement-crypto-internal-backend.patch b/patches/0003-Implement-crypto-internal-backend.patch index 247be5b95d..e28110fbd2 100644 --- a/patches/0003-Implement-crypto-internal-backend.patch +++ b/patches/0003-Implement-crypto-internal-backend.patch @@ -10,7 +10,7 @@ Update the Go toolchain build settings so that it uses the desired goexperiments and build tags. --- .gitignore | 2 + - .../compile/internal/logopt/logopt_test.go | 6 +- + .../compile/internal/logopt/logopt_test.go | 5 + src/cmd/compile/script_test.go | 8 + src/cmd/dist/build.go | 80 +++- src/cmd/dist/test.go | 30 +- @@ -18,7 +18,7 @@ desired goexperiments and build tags. src/cmd/go/internal/cfg/cfg.go | 16 + src/cmd/go/internal/load/pkg.go | 3 + src/cmd/go/internal/tool/tool.go | 9 +- - src/cmd/go/systemcrypto_test.go | 249 ++++++++++ + src/cmd/go/systemcrypto_test.go | 258 +++++++++++ .../go/testdata/script/env_cross_build.txt | 2 + .../script/test_android_issue62123.txt | 2 + src/cmd/internal/testdir/testdir_test.go | 7 + @@ -53,7 +53,7 @@ desired goexperiments and build tags. src/internal/buildcfg/exp.go | 77 ++++ src/runtime/runtime_boring.go | 5 + src/syscall/exec_linux_test.go | 4 + - 44 files changed, 2773 insertions(+), 17 deletions(-) + 44 files changed, 2782 insertions(+), 16 deletions(-) create mode 100644 src/cmd/go/systemcrypto_test.go create mode 100644 src/crypto/internal/backend/backend_test.go create mode 100644 src/crypto/internal/backend/bbig/big.go @@ -95,7 +95,7 @@ index 344b31f7ac1c1d..b4583113d5aa15 100644 # For files created by specific development environment (e.g. editor), # use alternative ways to exclude files from git. diff --git a/src/cmd/compile/internal/logopt/logopt_test.go b/src/cmd/compile/internal/logopt/logopt_test.go -index 1edabf9fb7ff04..026f8cb0278ab6 100644 +index 1edabf9fb7ff04..fff0c40834a3f9 100644 --- a/src/cmd/compile/internal/logopt/logopt_test.go +++ b/src/cmd/compile/internal/logopt/logopt_test.go @@ -5,6 +5,7 @@ @@ -106,14 +106,13 @@ index 1edabf9fb7ff04..026f8cb0278ab6 100644 "internal/testenv" "os" "path/filepath" -@@ -147,7 +148,10 @@ func s15a8(x *[15]int64) [15]int64 { - arches := []string{runtime.GOARCH} +@@ -148,6 +149,10 @@ func s15a8(x *[15]int64) [15]int64 { goos0 := runtime.GOOS if runtime.GOARCH == "amd64" { // Test many things with "linux" (wasm will get "js") -- arches = []string{"arm", "arm64", "386", "amd64", "mips", "mips64", "loong64", "ppc64le", "riscv64", "s390x", "wasm"} -+ if !goexperiment.SystemCrypto { -+ // SystemCrypto does not support cross-compilation. -+ arches = []string{"arm", "arm64", "386", "amd64", "mips", "mips64", "loong64", "ppc64le", "riscv64", "s390x", "wasm"} + arches = []string{"arm", "arm64", "386", "amd64", "mips", "mips64", "loong64", "ppc64le", "riscv64", "s390x", "wasm"} ++ if goexperiment.SystemCrypto { ++ // SystemCrypto does not support cross-compilation on all architectures. ++ arches = []string{"arm", "arm64", "386", "amd64", "loong64", "ppc64le", "riscv64"} + } goos0 = "linux" } @@ -447,10 +446,10 @@ index 92e8a803105f8d..95d47b625c28a7 100644 buildAndRunTool(loaderstate, ctx, tool, args, runFunc) diff --git a/src/cmd/go/systemcrypto_test.go b/src/cmd/go/systemcrypto_test.go new file mode 100644 -index 00000000000000..b6ba8158598a6c +index 00000000000000..552ce078e780fb --- /dev/null +++ b/src/cmd/go/systemcrypto_test.go -@@ -0,0 +1,249 @@ +@@ -0,0 +1,258 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. @@ -539,12 +538,21 @@ index 00000000000000..b6ba8158598a6c + goexp string + succeed bool + }{ -+ {"linux", "amd64", "noms_nocgo_opensslcrypto", false}, // cgoless OpenSSL requires ms_nocgo_opensslcrypto on linux/amd64 -+ {"linux", "arm64", "noms_nocgo_opensslcrypto", false}, // cgoless OpenSSL requires ms_nocgo_opensslcrypto on linux/arm64 -+ {"linux", "ppc64le", "ms_nocgo_cngcrypto", false}, // cgoless OpenSSL not supported on linux/ppc64le -+ {"linux", "arm", "ms_nocgo_cngcrypto", false}, // cgoless OpenSSL not supported on linux/arm ++ // cgoless OpenSSL requires ms_nocgo_opensslcrypto ++ {"linux", "386", "noms_nocgo_opensslcrypto", false}, ++ {"linux", "amd64", "noms_nocgo_opensslcrypto", false}, ++ {"linux", "arm64", "noms_nocgo_opensslcrypto", false}, ++ {"linux", "ppc64le", "noms_nocgo_opensslcrypto", false}, ++ {"linux", "riscv64", "noms_nocgo_opensslcrypto", false}, ++ {"linux", "loong64", "noms_nocgo_opensslcrypto", false}, ++ {"linux", "arm", "noms_nocgo_opensslcrypto", false}, ++ {"linux", "386", "ms_nocgo_opensslcrypto", true}, + {"linux", "amd64", "ms_nocgo_opensslcrypto", true}, + {"linux", "arm64", "ms_nocgo_opensslcrypto", true}, ++ {"linux", "ppc64le", "ms_nocgo_opensslcrypto", true}, ++ {"linux", "loong64", "ms_nocgo_opensslcrypto", true}, ++ {"linux", "riscv64", "ms_nocgo_opensslcrypto", true}, ++ {"linux", "arm", "ms_nocgo_opensslcrypto", true}, + {"darwin", "amd64", "", true}, + {"darwin", "arm64", "", true}, + {"windows", "386", "", false}, // cgoless system crypto not supported on windows/386 @@ -755,7 +763,7 @@ index a4b3a0422f2f41..0140c385e47991 100644 if !strings.Contains(buildVersion, "-") { // See go.dev/issue/75953. sep = "-" diff --git a/src/cmd/link/link_test.go b/src/cmd/link/link_test.go -index 541733b8e615f0..e45f1286595f4f 100644 +index 036eda13bc8807..33a79409ecc1fe 100644 --- a/src/cmd/link/link_test.go +++ b/src/cmd/link/link_test.go @@ -12,6 +12,7 @@ import ( @@ -3163,7 +3171,7 @@ index 00000000000000..5e4b436554d44d +// (because the implementation might be here). diff --git a/src/crypto/systemcrypto_nocgo_linux.go b/src/crypto/systemcrypto_nocgo_linux.go new file mode 100644 -index 00000000000000..d272072340a213 +index 00000000000000..3aa3c4bb73cfbd --- /dev/null +++ b/src/crypto/systemcrypto_nocgo_linux.go @@ -0,0 +1,17 @@ @@ -3171,7 +3179,7 @@ index 00000000000000..d272072340a213 +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + -+//go:build goexperiment.opensslcrypto && !(cgo || (goexperiment.ms_nocgo_opensslcrypto && (386 || amd64 || arm || arm64 || ppc64le || riscv64))) ++//go:build goexperiment.opensslcrypto && !(cgo || (goexperiment.ms_nocgo_opensslcrypto && (386 || amd64 || arm || arm64 || loong64 || ppc64le || riscv64))) + +package crypto + @@ -3185,10 +3193,10 @@ index 00000000000000..d272072340a213 + ` +} diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go -index a0436aa1901b7e..ad2c8fa13fd07a 100644 +index 3f2b2399ec4127..f52b6b1ac71711 100644 --- a/src/go/build/deps_test.go +++ b/src/go/build/deps_test.go -@@ -369,7 +369,7 @@ var depsRules = ` +@@ -370,7 +370,7 @@ var depsRules = ` math/big, go/token < go/constant; @@ -3197,7 +3205,7 @@ index a0436aa1901b7e..ad2c8fa13fd07a 100644 < internal/buildcfg; container/heap, go/constant, go/parser, internal/buildcfg, internal/goversion, internal/types/errors -@@ -564,6 +564,10 @@ var depsRules = ` +@@ -565,6 +565,10 @@ var depsRules = ` < github.com/microsoft/go-crypto-winnative/internal/sysdll < github.com/microsoft/go-crypto-winnative/internal/bcrypt; @@ -3208,7 +3216,7 @@ index a0436aa1901b7e..ad2c8fa13fd07a 100644 FIPS, internal/godebug, embed < crypto/internal/fips140only < crypto -@@ -584,6 +588,13 @@ var depsRules = ` +@@ -585,6 +589,13 @@ var depsRules = ` github.com/microsoft/go-crypto-winnative/internal/bcrypt < github.com/microsoft/go-crypto-winnative/cng; @@ -3222,7 +3230,7 @@ index a0436aa1901b7e..ad2c8fa13fd07a 100644 FIPS, internal/godebug, embed, crypto/internal/boring/sig, crypto/internal/boring/syso, -@@ -619,8 +630,15 @@ var depsRules = ` +@@ -620,8 +631,15 @@ var depsRules = ` math/big, github.com/microsoft/go-crypto-darwin/xcrypto < github.com/microsoft/go-crypto-darwin/bbig; math/big, github.com/microsoft/go-crypto-winnative/cng < github.com/microsoft/go-crypto-winnative/cng/bbig; From a150716154de02942a785532f2195012e991f443 Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 17 Feb 2026 14:23:15 +0000 Subject: [PATCH 2/3] fix 1ES image name --- eng/pipeline/stages/pool-2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipeline/stages/pool-2.yml b/eng/pipeline/stages/pool-2.yml index d6499f0818..c560822a1b 100644 --- a/eng/pipeline/stages/pool-2.yml +++ b/eng/pipeline/stages/pool-2.yml @@ -49,7 +49,7 @@ stages: image: 1es-ubuntu-2204 os: linux ${{ elseif parameters.public }}: - demands: ImageOverride -equals 1es-ubuntu-2004-open + demands: ImageOverride -equals build.ubuntu.2204.amd64.open ${{ else }}: demands: ImageOverride -equals 1es-ubuntu-2204 os: linux From 371ab6228032c88ca0274c5553fff4c7aba19b59 Mon Sep 17 00:00:00 2001 From: Quim Muntal Date: Tue, 17 Feb 2026 11:58:00 +0100 Subject: [PATCH 3/3] cherry-pick: Upgrade and don't pin go infra images --- eng/pipeline/pr-outerloop-pipeline.yml | 8 ++--- eng/pipeline/pr-pipeline.yml | 8 ++--- eng/pipeline/rolling-innerloop-pipeline.yml | 8 ++--- eng/pipeline/rolling-pipeline.yml | 8 ++--- patches/0015-skip-sanitizer-tests.patch | 36 +++++++++++++++++++++ 5 files changed, 52 insertions(+), 16 deletions(-) create mode 100644 patches/0015-skip-sanitizer-tests.patch diff --git a/eng/pipeline/pr-outerloop-pipeline.yml b/eng/pipeline/pr-outerloop-pipeline.yml index bcac1eb3cf..39003c269c 100644 --- a/eng/pipeline/pr-outerloop-pipeline.yml +++ b/eng/pipeline/pr-outerloop-pipeline.yml @@ -24,13 +24,13 @@ variables: resources: containers: - container: ubuntu2204 - image: mcr.microsoft.com/microsoft-go/infra-images:ubuntu-22.04-amd64-default-20241026145220-02e8663 + image: mcr.microsoft.com/microsoft-go/infra-images:ubuntu-22.04-amd64-default - container: mariner2 - image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-amd64-default-20241029143752-6049f85 + image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-amd64-default - container: mariner2arm64 - image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-arm64-default-20241029143304-6049f85 + image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-arm64-default - container: azurelinux3 - image: mcr.microsoft.com/microsoft-go/infra-images:azurelinux-3.0-amd64-default-20241210101540-a3a1203 + image: mcr.microsoft.com/microsoft-go/infra-images:azurelinux-3.0-amd64-default stages: - template: stages/go-builder-matrix-stages.yml diff --git a/eng/pipeline/pr-pipeline.yml b/eng/pipeline/pr-pipeline.yml index 915a337b91..8fdc2ed9bb 100644 --- a/eng/pipeline/pr-pipeline.yml +++ b/eng/pipeline/pr-pipeline.yml @@ -21,13 +21,13 @@ resources: # (container: ... image: ...) is not the same as the one 1ES PT uses, so updating these requires # separate changes. - container: ubuntu2204 - image: mcr.microsoft.com/microsoft-go/infra-images:ubuntu-22.04-amd64-default-20241026145220-02e8663 + image: mcr.microsoft.com/microsoft-go/infra-images:ubuntu-22.04-amd64-default - container: mariner2 - image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-amd64-default-20241029143752-6049f85 + image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-amd64-default - container: mariner2arm64 - image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-arm64-default-20241029143304-6049f85 + image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-arm64-default - container: azurelinux3 - image: mcr.microsoft.com/microsoft-go/infra-images:azurelinux-3.0-amd64-default-20241210101540-a3a1203 + image: mcr.microsoft.com/microsoft-go/infra-images:azurelinux-3.0-amd64-default stages: - template: stages/go-builder-matrix-stages.yml diff --git a/eng/pipeline/rolling-innerloop-pipeline.yml b/eng/pipeline/rolling-innerloop-pipeline.yml index 0d7b99792e..74fc3763de 100644 --- a/eng/pipeline/rolling-innerloop-pipeline.yml +++ b/eng/pipeline/rolling-innerloop-pipeline.yml @@ -48,13 +48,13 @@ extends: suppressionFile: $(Build.SourcesDirectory)/.config/guardian/.gdnsuppress containers: ubuntu2204: - image: mcr.microsoft.com/microsoft-go/infra-images:ubuntu-22.04-amd64-default-20241026145220-02e8663 + image: mcr.microsoft.com/microsoft-go/infra-images:ubuntu-22.04-amd64-default mariner2: - image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-amd64-default-20241029143752-6049f85 + image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-amd64-default mariner2arm64: - image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-arm64-default-20241029143304-6049f85 + image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-arm64-default azurelinux3: - image: mcr.microsoft.com/microsoft-go/infra-images:azurelinux-3.0-amd64-default-20241210101540-a3a1203 + image: mcr.microsoft.com/microsoft-go/infra-images:azurelinux-3.0-amd64-default stages: - template: stages/go-builder-matrix-stages.yml diff --git a/eng/pipeline/rolling-pipeline.yml b/eng/pipeline/rolling-pipeline.yml index 5f5c8780c9..fdb49aeb64 100644 --- a/eng/pipeline/rolling-pipeline.yml +++ b/eng/pipeline/rolling-pipeline.yml @@ -37,13 +37,13 @@ extends: suppressionFile: $(Build.SourcesDirectory)/.config/guardian/.gdnsuppress containers: ubuntu2204: - image: mcr.microsoft.com/microsoft-go/infra-images:ubuntu-22.04-amd64-default-20241026145220-02e8663 + image: mcr.microsoft.com/microsoft-go/infra-images:ubuntu-22.04-amd64-default mariner2: - image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-amd64-default-20241029143752-6049f85 + image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-amd64-default mariner2arm64: - image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-arm64-default-20241029143304-6049f85 + image: mcr.microsoft.com/microsoft-go/infra-images:cbl-mariner-2.0-arm64-default azurelinux3: - image: mcr.microsoft.com/microsoft-go/infra-images:azurelinux-3.0-amd64-default-20241210101540-a3a1203 + image: mcr.microsoft.com/microsoft-go/infra-images:azurelinux-3.0-amd64-default stages: - template: stages/go-builder-matrix-stages.yml diff --git a/patches/0015-skip-sanitizer-tests.patch b/patches/0015-skip-sanitizer-tests.patch new file mode 100644 index 0000000000..a962a86f45 --- /dev/null +++ b/patches/0015-skip-sanitizer-tests.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: bot-for-go[bot] <199222863+bot-for-go[bot]@users.noreply.github.com> +Date: Fri, 13 Feb 2026 16:58:59 +0100 +Subject: [PATCH] skip sanitizer tests + +Skipping sanitizer tests until they are less flaky. +See https://github.com/golang/go/issues/72996. +--- + src/cmd/cgo/internal/testsanitizers/asan_test.go | 1 + + src/cmd/cgo/internal/testsanitizers/lsan_test.go | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/cmd/cgo/internal/testsanitizers/asan_test.go b/src/cmd/cgo/internal/testsanitizers/asan_test.go +index cb7d857280416f..3c6aa4a324f7e7 100644 +--- a/src/cmd/cgo/internal/testsanitizers/asan_test.go ++++ b/src/cmd/cgo/internal/testsanitizers/asan_test.go +@@ -144,6 +144,7 @@ func TestASANFuzz(t *testing.T) { + } + + func mustHaveASAN(t *testing.T) *config { ++ t.Skip("skipping sanitizer tests until we have a better way to reliably test it in CI. See https://github.com/golang/go/issues/72996.") + testenv.MustHaveGoBuild(t) + testenv.MustHaveCGO(t) + goos, err := goEnv("GOOS") +diff --git a/src/cmd/cgo/internal/testsanitizers/lsan_test.go b/src/cmd/cgo/internal/testsanitizers/lsan_test.go +index 4dde3d20eca038..0e0ed2ffab8c3f 100644 +--- a/src/cmd/cgo/internal/testsanitizers/lsan_test.go ++++ b/src/cmd/cgo/internal/testsanitizers/lsan_test.go +@@ -74,6 +74,7 @@ func TestLSAN(t *testing.T) { + } + + func mustHaveLSAN(t *testing.T) *config { ++ t.Skip("skipping sanitizer tests until we have a better way to reliably test it in CI. See https://github.com/golang/go/issues/72996.") + testenv.MustHaveGoBuild(t) + testenv.MustHaveCGO(t) + goos, err := goEnv("GOOS")