From 30fdb6bcfd62adb677f007181027c25cfeb9eb42 Mon Sep 17 00:00:00 2001 From: jackeyji Date: Wed, 4 Dec 2024 12:14:57 +0800 Subject: [PATCH] upgrade to 1.22.10 for golang 1.21 is EOS Signed-off-by: jackeyji --- apply-patches | 8 +- fix-CVE-2023-45288.patch | 90 -------------- fix-CVE-2023-45289.patch | 114 ----------------- fix-CVE-2023-45290.patch | 263 --------------------------------------- fix-CVE-2024-24783.patch | 75 ----------- fix-CVE-2024-24784.patch | 201 ------------------------------ fix-CVE-2024-24785.patch | 190 ---------------------------- golang.spec | 14 ++- loongarch64-1.22.10.conf | 160 ++++++++++++++++++++++++ loongarch64.conf | 125 ------------------- sources | 4 +- 11 files changed, 176 insertions(+), 1068 deletions(-) delete mode 100644 fix-CVE-2023-45288.patch delete mode 100644 fix-CVE-2023-45289.patch delete mode 100644 fix-CVE-2023-45290.patch delete mode 100644 fix-CVE-2024-24783.patch delete mode 100644 fix-CVE-2024-24784.patch delete mode 100644 fix-CVE-2024-24785.patch create mode 100644 loongarch64-1.22.10.conf delete mode 100644 loongarch64.conf diff --git a/apply-patches b/apply-patches index b335a44..b33d2ca 100644 --- a/apply-patches +++ b/apply-patches @@ -2,12 +2,14 @@ set -ex +goversion="1.22.10" + if [ ! -d loongarch64 ]; then - tar -xf loongarch64.tar.gz + tar -xf loongarch64-${goversion}.tar.gz fi -for p in $(cat loongarch64.conf); do +for p in $(cat loongarch64-${goversion}.conf); do git apply -p1 loongarch64/$p done -rm -rf $0 loongarch64 loongarch64.tar.gz loongarch64.conf +rm -rf $0 loongarch64 loongarch64-${goversion}.tar.gz loongarch64-${goversion}.conf diff --git a/fix-CVE-2023-45288.patch b/fix-CVE-2023-45288.patch deleted file mode 100644 index ee7de43..0000000 --- a/fix-CVE-2023-45288.patch +++ /dev/null @@ -1,90 +0,0 @@ -From ae5913347d15cf7d1f218916c22717e5739a9ea3 Mon Sep 17 00:00:00 2001 -From: Damien Neil -Date: Thu, 28 Mar 2024 16:49:40 -0700 -Subject: [PATCH] [release-branch.go1.21] net/http: update bundled - golang.org/x/net/http2 - -Disable cmd/internal/moddeps test, since this update includes PRIVATE -track fixes. - -Fixes CVE-2023-45288 -For #65051 -Fixes #65387 - -Change-Id: I17da6da2fe0dd70062b49f94377875acb34829a1 -Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2197267 -Reviewed-by: Dmitri Shuralyov -Run-TryBot: Damien Neil -Reviewed-by: Tatiana Bradley -Reviewed-on: https://go-review.googlesource.com/c/go/+/576075 -TryBot-Bypass: Dmitri Shuralyov -Commit-Queue: Dmitri Shuralyov -Auto-Submit: Dmitri Shuralyov -Reviewed-by: Than McIntosh ---- - src/cmd/internal/moddeps/moddeps_test.go | 2 ++ - src/net/http/h2_bundle.go | 31 ++++++++++++++++++++++++ - 2 files changed, 33 insertions(+) - -diff --git a/src/cmd/internal/moddeps/moddeps_test.go b/src/cmd/internal/moddeps/moddeps_test.go -index ae890b66cb479..718e120b3487c 100644 ---- a/src/cmd/internal/moddeps/moddeps_test.go -+++ b/src/cmd/internal/moddeps/moddeps_test.go -@@ -33,6 +33,8 @@ import ( - // See issues 36852, 41409, and 43687. - // (Also see golang.org/issue/27348.) - func TestAllDependencies(t *testing.T) { -+ t.Skip("TODO(#65051): 1.21.9 contains unreleased changes from vendored modules") -+ - goBin := testenv.GoToolPath(t) - - // Ensure that all packages imported within GOROOT -diff --git a/src/net/http/h2_bundle.go b/src/net/http/h2_bundle.go -index 032d7fe9a95a8..80c0c962cfc72 100644 ---- a/src/net/http/h2_bundle.go -+++ b/src/net/http/h2_bundle.go -@@ -2966,6 +2966,7 @@ func (fr *http2Framer) readMetaFrame(hf *http2HeadersFrame) (*http2MetaHeadersFr - if size > remainSize { - hdec.SetEmitEnabled(false) - mh.Truncated = true -+ remainSize = 0 - return - } - remainSize -= size -@@ -2978,6 +2979,36 @@ func (fr *http2Framer) readMetaFrame(hf *http2HeadersFrame) (*http2MetaHeadersFr - var hc http2headersOrContinuation = hf - for { - frag := hc.HeaderBlockFragment() -+ -+ // Avoid parsing large amounts of headers that we will then discard. -+ // If the sender exceeds the max header list size by too much, -+ // skip parsing the fragment and close the connection. -+ // -+ // "Too much" is either any CONTINUATION frame after we've already -+ // exceeded the max header list size (in which case remainSize is 0), -+ // or a frame whose encoded size is more than twice the remaining -+ // header list bytes we're willing to accept. -+ if int64(len(frag)) > int64(2*remainSize) { -+ if http2VerboseLogs { -+ log.Printf("http2: header list too large") -+ } -+ // It would be nice to send a RST_STREAM before sending the GOAWAY, -+ // but the struture of the server's frame writer makes this difficult. -+ return nil, http2ConnectionError(http2ErrCodeProtocol) -+ } -+ -+ // Also close the connection after any CONTINUATION frame following an -+ // invalid header, since we stop tracking the size of the headers after -+ // an invalid one. -+ if invalid != nil { -+ if http2VerboseLogs { -+ log.Printf("http2: invalid header: %v", invalid) -+ } -+ // It would be nice to send a RST_STREAM before sending the GOAWAY, -+ // but the struture of the server's frame writer makes this difficult. -+ return nil, http2ConnectionError(http2ErrCodeProtocol) -+ } -+ - if _, err := hdec.Write(frag); err != nil { - return nil, http2ConnectionError(http2ErrCodeCompression) - } diff --git a/fix-CVE-2023-45289.patch b/fix-CVE-2023-45289.patch deleted file mode 100644 index b0b1a79..0000000 --- a/fix-CVE-2023-45289.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 20586c0dbe03d144f914155f879fa5ee287591a1 Mon Sep 17 00:00:00 2001 -From: Damien Neil -Date: Thu, 11 Jan 2024 11:31:57 -0800 -Subject: [PATCH] [release-branch.go1.21] net/http, net/http/cookiejar: avoid - subdomain matches on IPv6 zones - -When deciding whether to forward cookies or sensitive headers -across a redirect, do not attempt to interpret an IPv6 address -as a domain name. - -Avoids a case where a maliciously-crafted redirect to an -IPv6 address with a scoped addressing zone could be -misinterpreted as a within-domain redirect. For example, -we could interpret "::1%.www.example.com" as a subdomain -of "www.example.com". - -Thanks to Juho Nurminen of Mattermost for reporting this issue. - -Fixes CVE-2023-45289 -Fixes #65385 -For #65065 - -Change-Id: I8f463f59f0e700c8a18733d2b264a8bcb3a19599 -Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2131938 -Reviewed-by: Tatiana Bradley -Reviewed-by: Roland Shoemaker -Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2173775 -Reviewed-by: Carlos Amedee -Reviewed-on: https://go-review.googlesource.com/c/go/+/569239 -Reviewed-by: Carlos Amedee -Auto-Submit: Michael Knyszek -TryBot-Bypass: Michael Knyszek ---- - src/net/http/client.go | 6 ++++++ - src/net/http/client_test.go | 1 + - src/net/http/cookiejar/jar.go | 7 +++++++ - src/net/http/cookiejar/jar_test.go | 10 ++++++++++ - 4 files changed, 24 insertions(+) - -diff --git a/src/net/http/client.go b/src/net/http/client.go -index 2cab53a585ab7..77a701b806113 100644 ---- a/src/net/http/client.go -+++ b/src/net/http/client.go -@@ -1014,6 +1014,12 @@ func isDomainOrSubdomain(sub, parent string) bool { - if sub == parent { - return true - } -+ // If sub contains a :, it's probably an IPv6 address (and is definitely not a hostname). -+ // Don't check the suffix in this case, to avoid matching the contents of a IPv6 zone. -+ // For example, "::1%.www.example.com" is not a subdomain of "www.example.com". -+ if strings.ContainsAny(sub, ":%") { -+ return false -+ } - // If sub is "foo.example.com" and parent is "example.com", - // that means sub must end in "."+parent. - // Do it without allocating. -diff --git a/src/net/http/client_test.go b/src/net/http/client_test.go -index 0fe555af38f08..fc1d79161248b 100644 ---- a/src/net/http/client_test.go -+++ b/src/net/http/client_test.go -@@ -1725,6 +1725,7 @@ func TestShouldCopyHeaderOnRedirect(t *testing.T) { - {"authorization", "http://foo.com/", "https://foo.com/", true}, - {"authorization", "http://foo.com:1234/", "http://foo.com:4321/", true}, - {"www-authenticate", "http://foo.com/", "http://bar.com/", false}, -+ {"authorization", "http://foo.com/", "http://[::1%25.foo.com]/", false}, - - // But subdomains should work: - {"www-authenticate", "http://foo.com/", "http://foo.com/", true}, -diff --git a/src/net/http/cookiejar/jar.go b/src/net/http/cookiejar/jar.go -index 273b54c84c7fd..4b16266057b4e 100644 ---- a/src/net/http/cookiejar/jar.go -+++ b/src/net/http/cookiejar/jar.go -@@ -362,6 +362,13 @@ func jarKey(host string, psl PublicSuffixList) string { - - // isIP reports whether host is an IP address. - func isIP(host string) bool { -+ if strings.ContainsAny(host, ":%") { -+ // Probable IPv6 address. -+ // Hostnames can't contain : or %, so this is definitely not a valid host. -+ // Treating it as an IP is the more conservative option, and avoids the risk -+ // of interpeting ::1%.www.example.com as a subtomain of www.example.com. -+ return true -+ } - return net.ParseIP(host) != nil - } - -diff --git a/src/net/http/cookiejar/jar_test.go b/src/net/http/cookiejar/jar_test.go -index 56d0695a660c0..251f7c16171c3 100644 ---- a/src/net/http/cookiejar/jar_test.go -+++ b/src/net/http/cookiejar/jar_test.go -@@ -252,6 +252,7 @@ var isIPTests = map[string]bool{ - "127.0.0.1": true, - "1.2.3.4": true, - "2001:4860:0:2001::68": true, -+ "::1%zone": true, - "example.com": false, - "1.1.1.300": false, - "www.foo.bar.net": false, -@@ -629,6 +630,15 @@ var basicsTests = [...]jarTest{ - {"http://www.host.test:1234/", "a=1"}, - }, - }, -+ { -+ "IPv6 zone is not treated as a host.", -+ "https://example.com/", -+ []string{"a=1"}, -+ "a=1", -+ []query{ -+ {"https://[::1%25.example.com]:80/", ""}, -+ }, -+ }, - } - - func TestBasics(t *testing.T) { diff --git a/fix-CVE-2023-45290.patch b/fix-CVE-2023-45290.patch deleted file mode 100644 index 95b330d..0000000 --- a/fix-CVE-2023-45290.patch +++ /dev/null @@ -1,263 +0,0 @@ -From bf80213b121074f4ad9b449410a4d13bae5e9be0 Mon Sep 17 00:00:00 2001 -From: Damien Neil -Date: Tue, 16 Jan 2024 15:37:52 -0800 -Subject: [PATCH] [release-branch.go1.21] net/textproto, mime/multipart: avoid - unbounded read in MIME header - -mime/multipart.Reader.ReadForm allows specifying the maximum amount -of memory that will be consumed by the form. While this limit is -correctly applied to the parsed form data structure, it was not -being applied to individual header lines in a form. - -For example, when presented with a form containing a header line -that never ends, ReadForm will continue to read the line until it -runs out of memory. - -Limit the amount of data consumed when reading a header. - -Fixes CVE-2023-45290 -Fixes #65389 -For #65383 - -Change-Id: I7f9264d25752009e95f6b2c80e3d76aaf321d658 -Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2134435 -Reviewed-by: Roland Shoemaker -Reviewed-by: Tatiana Bradley -Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2173776 -Reviewed-by: Carlos Amedee -Reviewed-on: https://go-review.googlesource.com/c/go/+/569240 -Auto-Submit: Michael Knyszek -LUCI-TryBot-Result: Go LUCI -Reviewed-by: Carlos Amedee ---- - src/mime/multipart/formdata_test.go | 42 +++++++++++++++++++++++++ - src/net/textproto/reader.go | 48 ++++++++++++++++++++--------- - src/net/textproto/reader_test.go | 12 ++++++++ - 3 files changed, 87 insertions(+), 15 deletions(-) - -diff --git a/src/mime/multipart/formdata_test.go b/src/mime/multipart/formdata_test.go -index d422729c96ab4..bfa9f68382585 100644 ---- a/src/mime/multipart/formdata_test.go -+++ b/src/mime/multipart/formdata_test.go -@@ -452,6 +452,48 @@ func TestReadFormLimits(t *testing.T) { - } - } - -+func TestReadFormEndlessHeaderLine(t *testing.T) { -+ for _, test := range []struct { -+ name string -+ prefix string -+ }{{ -+ name: "name", -+ prefix: "X-", -+ }, { -+ name: "value", -+ prefix: "X-Header: ", -+ }, { -+ name: "continuation", -+ prefix: "X-Header: foo\r\n ", -+ }} { -+ t.Run(test.name, func(t *testing.T) { -+ const eol = "\r\n" -+ s := `--boundary` + eol -+ s += `Content-Disposition: form-data; name="a"` + eol -+ s += `Content-Type: text/plain` + eol -+ s += test.prefix -+ fr := io.MultiReader( -+ strings.NewReader(s), -+ neverendingReader('X'), -+ ) -+ r := NewReader(fr, "boundary") -+ _, err := r.ReadForm(1 << 20) -+ if err != ErrMessageTooLarge { -+ t.Fatalf("ReadForm(1 << 20): %v, want ErrMessageTooLarge", err) -+ } -+ }) -+ } -+} -+ -+type neverendingReader byte -+ -+func (r neverendingReader) Read(p []byte) (n int, err error) { -+ for i := range p { -+ p[i] = byte(r) -+ } -+ return len(p), nil -+} -+ - func BenchmarkReadForm(b *testing.B) { - for _, test := range []struct { - name string -diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go -index fc2590b1cdc24..fcd1a011ac754 100644 ---- a/src/net/textproto/reader.go -+++ b/src/net/textproto/reader.go -@@ -16,6 +16,10 @@ import ( - "sync" - ) - -+// TODO: This should be a distinguishable error (ErrMessageTooLarge) -+// to allow mime/multipart to detect it. -+var errMessageTooLarge = errors.New("message too large") -+ - // A Reader implements convenience methods for reading requests - // or responses from a text protocol network connection. - type Reader struct { -@@ -36,20 +40,23 @@ func NewReader(r *bufio.Reader) *Reader { - // ReadLine reads a single line from r, - // eliding the final \n or \r\n from the returned string. - func (r *Reader) ReadLine() (string, error) { -- line, err := r.readLineSlice() -+ line, err := r.readLineSlice(-1) - return string(line), err - } - - // ReadLineBytes is like ReadLine but returns a []byte instead of a string. - func (r *Reader) ReadLineBytes() ([]byte, error) { -- line, err := r.readLineSlice() -+ line, err := r.readLineSlice(-1) - if line != nil { - line = bytes.Clone(line) - } - return line, err - } - --func (r *Reader) readLineSlice() ([]byte, error) { -+// readLineSlice reads a single line from r, -+// up to lim bytes long (or unlimited if lim is less than 0), -+// eliding the final \r or \r\n from the returned string. -+func (r *Reader) readLineSlice(lim int64) ([]byte, error) { - r.closeDot() - var line []byte - for { -@@ -57,6 +64,9 @@ func (r *Reader) readLineSlice() ([]byte, error) { - if err != nil { - return nil, err - } -+ if lim >= 0 && int64(len(line))+int64(len(l)) > lim { -+ return nil, errMessageTooLarge -+ } - // Avoid the copy if the first call produced a full line. - if line == nil && !more { - return l, nil -@@ -88,7 +98,7 @@ func (r *Reader) readLineSlice() ([]byte, error) { - // - // Empty lines are never continued. - func (r *Reader) ReadContinuedLine() (string, error) { -- line, err := r.readContinuedLineSlice(noValidation) -+ line, err := r.readContinuedLineSlice(-1, noValidation) - return string(line), err - } - -@@ -109,7 +119,7 @@ func trim(s []byte) []byte { - // ReadContinuedLineBytes is like ReadContinuedLine but - // returns a []byte instead of a string. - func (r *Reader) ReadContinuedLineBytes() ([]byte, error) { -- line, err := r.readContinuedLineSlice(noValidation) -+ line, err := r.readContinuedLineSlice(-1, noValidation) - if line != nil { - line = bytes.Clone(line) - } -@@ -120,13 +130,14 @@ func (r *Reader) ReadContinuedLineBytes() ([]byte, error) { - // returning a byte slice with all lines. The validateFirstLine function - // is run on the first read line, and if it returns an error then this - // error is returned from readContinuedLineSlice. --func (r *Reader) readContinuedLineSlice(validateFirstLine func([]byte) error) ([]byte, error) { -+// It reads up to lim bytes of data (or unlimited if lim is less than 0). -+func (r *Reader) readContinuedLineSlice(lim int64, validateFirstLine func([]byte) error) ([]byte, error) { - if validateFirstLine == nil { - return nil, fmt.Errorf("missing validateFirstLine func") - } - - // Read the first line. -- line, err := r.readLineSlice() -+ line, err := r.readLineSlice(lim) - if err != nil { - return nil, err - } -@@ -154,13 +165,21 @@ func (r *Reader) readContinuedLineSlice(validateFirstLine func([]byte) error) ([ - // copy the slice into buf. - r.buf = append(r.buf[:0], trim(line)...) - -+ if lim < 0 { -+ lim = math.MaxInt64 -+ } -+ lim -= int64(len(r.buf)) -+ - // Read continuation lines. - for r.skipSpace() > 0 { -- line, err := r.readLineSlice() -+ r.buf = append(r.buf, ' ') -+ if int64(len(r.buf)) >= lim { -+ return nil, errMessageTooLarge -+ } -+ line, err := r.readLineSlice(lim - int64(len(r.buf))) - if err != nil { - break - } -- r.buf = append(r.buf, ' ') - r.buf = append(r.buf, trim(line)...) - } - return r.buf, nil -@@ -507,7 +526,8 @@ func readMIMEHeader(r *Reader, maxMemory, maxHeaders int64) (MIMEHeader, error) - - // The first line cannot start with a leading space. - if buf, err := r.R.Peek(1); err == nil && (buf[0] == ' ' || buf[0] == '\t') { -- line, err := r.readLineSlice() -+ const errorLimit = 80 // arbitrary limit on how much of the line we'll quote -+ line, err := r.readLineSlice(errorLimit) - if err != nil { - return m, err - } -@@ -515,7 +535,7 @@ func readMIMEHeader(r *Reader, maxMemory, maxHeaders int64) (MIMEHeader, error) - } - - for { -- kv, err := r.readContinuedLineSlice(mustHaveFieldNameColon) -+ kv, err := r.readContinuedLineSlice(maxMemory, mustHaveFieldNameColon) - if len(kv) == 0 { - return m, err - } -@@ -544,7 +564,7 @@ func readMIMEHeader(r *Reader, maxMemory, maxHeaders int64) (MIMEHeader, error) - - maxHeaders-- - if maxHeaders < 0 { -- return nil, errors.New("message too large") -+ return nil, errMessageTooLarge - } - - // Skip initial spaces in value. -@@ -557,9 +577,7 @@ func readMIMEHeader(r *Reader, maxMemory, maxHeaders int64) (MIMEHeader, error) - } - maxMemory -= int64(len(value)) - if maxMemory < 0 { -- // TODO: This should be a distinguishable error (ErrMessageTooLarge) -- // to allow mime/multipart to detect it. -- return m, errors.New("message too large") -+ return m, errMessageTooLarge - } - if vv == nil && len(strs) > 0 { - // More than likely this will be a single-element key. -diff --git a/src/net/textproto/reader_test.go b/src/net/textproto/reader_test.go -index 696ae406f3860..26ff617470be3 100644 ---- a/src/net/textproto/reader_test.go -+++ b/src/net/textproto/reader_test.go -@@ -36,6 +36,18 @@ func TestReadLine(t *testing.T) { - } - } - -+func TestReadLineLongLine(t *testing.T) { -+ line := strings.Repeat("12345", 10000) -+ r := reader(line + "\r\n") -+ s, err := r.ReadLine() -+ if err != nil { -+ t.Fatalf("Line 1: %v", err) -+ } -+ if s != line { -+ t.Fatalf("%v-byte line does not match expected %v-byte line", len(s), len(line)) -+ } -+} -+ - func TestReadContinuedLine(t *testing.T) { - r := reader("line1\nline\n 2\nline3\n") - s, err := r.ReadContinuedLine() diff --git a/fix-CVE-2024-24783.patch b/fix-CVE-2024-24783.patch deleted file mode 100644 index 73ff05d..0000000 --- a/fix-CVE-2024-24783.patch +++ /dev/null @@ -1,75 +0,0 @@ -From be5b52bea674190ef7de272664be6c7ae93ec5a0 Mon Sep 17 00:00:00 2001 -From: Roland Shoemaker -Date: Thu, 18 Jan 2024 12:51:13 -0800 -Subject: [PATCH] [release-branch.go1.21] crypto/x509: make sure pub key is - non-nil before interface conversion - -alreadyInChain assumes all keys fit a interface which contains the -Equal method (which they do), but this ignores that certificates may -have a nil key when PublicKeyAlgorithm is UnknownPublicKeyAlgorithm. In -this case alreadyInChain panics. - -Check that the key is non-nil as part of considerCandidate (we are never -going to build a chain containing UnknownPublicKeyAlgorithm anyway). - -For #65390 -Fixes #65392 -Fixes CVE-2024-24783 - -Change-Id: Ibdccc0a487e3368b6812be35daad2512220243f3 -Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2137282 -Reviewed-by: Damien Neil -Run-TryBot: Roland Shoemaker -Reviewed-by: Tatiana Bradley -Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2173774 -Reviewed-by: Roland Shoemaker -Reviewed-by: Carlos Amedee -Reviewed-on: https://go-review.googlesource.com/c/go/+/569238 -Auto-Submit: Michael Knyszek -LUCI-TryBot-Result: Go LUCI -Reviewed-by: Carlos Amedee ---- - src/crypto/x509/verify.go | 2 +- - src/crypto/x509/verify_test.go | 19 +++++++++++++++++++ - 2 files changed, 20 insertions(+), 1 deletion(-) - -diff --git a/src/crypto/x509/verify.go b/src/crypto/x509/verify.go -index 345d434453c44..56a1a1725cc33 100644 ---- a/src/crypto/x509/verify.go -+++ b/src/crypto/x509/verify.go -@@ -899,7 +899,7 @@ func (c *Certificate) buildChains(currentChain []*Certificate, sigChecks *int, o - ) - - considerCandidate := func(certType int, candidate *Certificate) { -- if alreadyInChain(candidate, currentChain) { -+ if candidate.PublicKey == nil || alreadyInChain(candidate, currentChain) { - return - } - -diff --git a/src/crypto/x509/verify_test.go b/src/crypto/x509/verify_test.go -index 37f13f861f1b5..6d09d24da2389 100644 ---- a/src/crypto/x509/verify_test.go -+++ b/src/crypto/x509/verify_test.go -@@ -2718,3 +2718,22 @@ func TestVerifyEKURootAsLeaf(t *testing.T) { - } - - } -+ -+func TestVerifyNilPubKey(t *testing.T) { -+ c := &Certificate{ -+ RawIssuer: []byte{1, 2, 3}, -+ AuthorityKeyId: []byte{1, 2, 3}, -+ } -+ opts := &VerifyOptions{} -+ opts.Roots = NewCertPool() -+ r := &Certificate{ -+ RawSubject: []byte{1, 2, 3}, -+ SubjectKeyId: []byte{1, 2, 3}, -+ } -+ opts.Roots.AddCert(r) -+ -+ _, err := c.buildChains([]*Certificate{r}, nil, opts) -+ if _, ok := err.(UnknownAuthorityError); !ok { -+ t.Fatalf("buildChains returned unexpected error, got: %v, want %v", err, UnknownAuthorityError{}) -+ } -+} diff --git a/fix-CVE-2024-24784.patch b/fix-CVE-2024-24784.patch deleted file mode 100644 index 9ec0bde..0000000 --- a/fix-CVE-2024-24784.patch +++ /dev/null @@ -1,201 +0,0 @@ -From 263c059b09fdd40d9dd945f2ecb20c89ea28efe5 Mon Sep 17 00:00:00 2001 -From: Roland Shoemaker -Date: Wed, 10 Jan 2024 11:02:14 -0800 -Subject: [PATCH] [release-branch.go1.21] net/mail: properly handle special - characters in phrase and obs-phrase - -Fixes a couple of misalignments with RFC 5322 which introduce -significant diffs between (mostly) conformant parsers. - -This change reverts the changes made in CL50911, which allowed certain -special RFC 5322 characters to appear unquoted in the "phrase" syntax. -It is unclear why this change was made in the first place, and created -a divergence from comformant parsers. In particular this resulted in -treating comments in display names incorrectly. - -Additionally properly handle trailing malformed comments in the group -syntax. - -For #65083 -Fixes #65848 - -Change-Id: I00dddc044c6ae3381154e43236632604c390f672 -Reviewed-on: https://go-review.googlesource.com/c/go/+/555596 -Reviewed-by: Damien Neil -LUCI-TryBot-Result: Go LUCI -Reviewed-on: https://go-review.googlesource.com/c/go/+/566195 -Reviewed-by: Carlos Amedee ---- - src/net/mail/message.go | 30 +++++++++++++++------------ - src/net/mail/message_test.go | 40 ++++++++++++++++++++++++++---------- - 2 files changed, 46 insertions(+), 24 deletions(-) - -diff --git a/src/net/mail/message.go b/src/net/mail/message.go -index af516fc30f470..fc2a9e46f811b 100644 ---- a/src/net/mail/message.go -+++ b/src/net/mail/message.go -@@ -280,7 +280,7 @@ func (a *Address) String() string { - // Add quotes if needed - quoteLocal := false - for i, r := range local { -- if isAtext(r, false, false) { -+ if isAtext(r, false) { - continue - } - if r == '.' { -@@ -444,7 +444,7 @@ func (p *addrParser) parseAddress(handleGroup bool) ([]*Address, error) { - if !p.consume('<') { - atext := true - for _, r := range displayName { -- if !isAtext(r, true, false) { -+ if !isAtext(r, true) { - atext = false - break - } -@@ -479,7 +479,9 @@ func (p *addrParser) consumeGroupList() ([]*Address, error) { - // handle empty group. - p.skipSpace() - if p.consume(';') { -- p.skipCFWS() -+ if !p.skipCFWS() { -+ return nil, errors.New("mail: misformatted parenthetical comment") -+ } - return group, nil - } - -@@ -496,7 +498,9 @@ func (p *addrParser) consumeGroupList() ([]*Address, error) { - return nil, errors.New("mail: misformatted parenthetical comment") - } - if p.consume(';') { -- p.skipCFWS() -+ if !p.skipCFWS() { -+ return nil, errors.New("mail: misformatted parenthetical comment") -+ } - break - } - if !p.consume(',') { -@@ -566,6 +570,12 @@ func (p *addrParser) consumePhrase() (phrase string, err error) { - var words []string - var isPrevEncoded bool - for { -+ // obs-phrase allows CFWS after one word -+ if len(words) > 0 { -+ if !p.skipCFWS() { -+ return "", errors.New("mail: misformatted parenthetical comment") -+ } -+ } - // word = atom / quoted-string - var word string - p.skipSpace() -@@ -661,7 +671,6 @@ Loop: - // If dot is true, consumeAtom parses an RFC 5322 dot-atom instead. - // If permissive is true, consumeAtom will not fail on: - // - leading/trailing/double dots in the atom (see golang.org/issue/4938) --// - special characters (RFC 5322 3.2.3) except '<', '>', ':' and '"' (see golang.org/issue/21018) - func (p *addrParser) consumeAtom(dot bool, permissive bool) (atom string, err error) { - i := 0 - -@@ -672,7 +681,7 @@ Loop: - case size == 1 && r == utf8.RuneError: - return "", fmt.Errorf("mail: invalid utf-8 in address: %q", p.s) - -- case size == 0 || !isAtext(r, dot, permissive): -+ case size == 0 || !isAtext(r, dot): - break Loop - - default: -@@ -850,18 +859,13 @@ func (e charsetError) Error() string { - - // isAtext reports whether r is an RFC 5322 atext character. - // If dot is true, period is included. --// If permissive is true, RFC 5322 3.2.3 specials is included, --// except '<', '>', ':' and '"'. --func isAtext(r rune, dot, permissive bool) bool { -+func isAtext(r rune, dot bool) bool { - switch r { - case '.': - return dot - - // RFC 5322 3.2.3. specials -- case '(', ')', '[', ']', ';', '@', '\\', ',': -- return permissive -- -- case '<', '>', '"', ':': -+ case '(', ')', '<', '>', '[', ']', ':', ';', '@', '\\', ',', '"': // RFC 5322 3.2.3. specials - return false - } - return isVchar(r) -diff --git a/src/net/mail/message_test.go b/src/net/mail/message_test.go -index 1e1bb4092f659..1f2f62afbf406 100644 ---- a/src/net/mail/message_test.go -+++ b/src/net/mail/message_test.go -@@ -385,8 +385,11 @@ func TestAddressParsingError(t *testing.T) { - 13: {"group not closed: null@example.com", "expected comma"}, - 14: {"group: first@example.com, second@example.com;", "group with multiple addresses"}, - 15: {"john.doe", "missing '@' or angle-addr"}, -- 16: {"john.doe@", "no angle-addr"}, -+ 16: {"john.doe@", "missing '@' or angle-addr"}, - 17: {"John Doe@foo.bar", "no angle-addr"}, -+ 18: {" group: null@example.com; (asd", "misformatted parenthetical comment"}, -+ 19: {" group: ; (asd", "misformatted parenthetical comment"}, -+ 20: {`(John) Doe `, "missing word in phrase:"}, - } - - for i, tc := range mustErrTestCases { -@@ -436,24 +439,19 @@ func TestAddressParsing(t *testing.T) { - Address: "john.q.public@example.com", - }}, - }, -- { -- `"John (middle) Doe" `, -- []*Address{{ -- Name: "John (middle) Doe", -- Address: "jdoe@machine.example", -- }}, -- }, -+ // Comment in display name - { - `John (middle) Doe `, - []*Address{{ -- Name: "John (middle) Doe", -+ Name: "John Doe", - Address: "jdoe@machine.example", - }}, - }, -+ // Display name is quoted string, so comment is not a comment - { -- `John !@M@! Doe `, -+ `"John (middle) Doe" `, - []*Address{{ -- Name: "John !@M@! Doe", -+ Name: "John (middle) Doe", - Address: "jdoe@machine.example", - }}, - }, -@@ -788,6 +786,26 @@ func TestAddressParsing(t *testing.T) { - }, - }, - }, -+ // Comment in group display name -+ { -+ `group (comment:): a@example.com, b@example.com;`, -+ []*Address{ -+ { -+ Address: "a@example.com", -+ }, -+ { -+ Address: "b@example.com", -+ }, -+ }, -+ }, -+ { -+ `x(:"):"@a.example;("@b.example;`, -+ []*Address{ -+ { -+ Address: `@a.example;(@b.example`, -+ }, -+ }, -+ }, - } - for _, test := range tests { - if len(test.exp) == 1 { diff --git a/fix-CVE-2024-24785.patch b/fix-CVE-2024-24785.patch deleted file mode 100644 index 4dafb52..0000000 --- a/fix-CVE-2024-24785.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 3643147a29352ca2894fd5d0d2069bc4b4335a7e Mon Sep 17 00:00:00 2001 -From: Roland Shoemaker -Date: Wed, 14 Feb 2024 17:18:36 -0800 -Subject: [PATCH] [release-branch.go1.21] html/template: escape additional - tokens in MarshalJSON errors - -Escape " -Reviewed-by: Damien Neil -(cherry picked from commit ccbc725f2d678255df1bd326fa511a492aa3a0aa) -Reviewed-on: https://go-review.googlesource.com/c/go/+/567515 -Reviewed-by: Carlos Amedee ---- - src/html/template/js.go | 22 ++++++++- - src/html/template/js_test.go | 96 ++++++++++++++++++++---------------- - 2 files changed, 74 insertions(+), 44 deletions(-) - -diff --git a/src/html/template/js.go b/src/html/template/js.go -index 4e05c1455723f..f4d1303bebecf 100644 ---- a/src/html/template/js.go -+++ b/src/html/template/js.go -@@ -171,13 +171,31 @@ func jsValEscaper(args ...any) string { - // cyclic data. This may be an unacceptable DoS risk. - b, err := json.Marshal(a) - if err != nil { -- // Put a space before comment so that if it is flush against -+ // While the standard JSON marshaller does not include user controlled -+ // information in the error message, if a type has a MarshalJSON method, -+ // the content of the error message is not guaranteed. Since we insert -+ // the error into the template, as part of a comment, we attempt to -+ // prevent the error from either terminating the comment, or the script -+ // block itself. -+ // -+ // In particular we: -+ // * replace "*/" comment end tokens with "* /", which does not -+ // terminate the comment -+ // * replace " 1 so this loses precision in JS - // but it is still a representable integer literal. -- {uint64(1)<<53 + 1, " 9007199254740993 "}, -- {float32(1.0), " 1 "}, -- {float32(-1.0), " -1 "}, -- {float32(0.5), " 0.5 "}, -- {float32(-0.5), " -0.5 "}, -- {float32(1.0) / float32(256), " 0.00390625 "}, -- {float32(0), " 0 "}, -- {math.Copysign(0, -1), " -0 "}, -- {float64(1.0), " 1 "}, -- {float64(-1.0), " -1 "}, -- {float64(0.5), " 0.5 "}, -- {float64(-0.5), " -0.5 "}, -- {float64(0), " 0 "}, -- {math.Copysign(0, -1), " -0 "}, -- {"", `""`}, -- {"foo", `"foo"`}, -+ {uint64(1)<<53 + 1, " 9007199254740993 ", false}, -+ {float32(1.0), " 1 ", false}, -+ {float32(-1.0), " -1 ", false}, -+ {float32(0.5), " 0.5 ", false}, -+ {float32(-0.5), " -0.5 ", false}, -+ {float32(1.0) / float32(256), " 0.00390625 ", false}, -+ {float32(0), " 0 ", false}, -+ {math.Copysign(0, -1), " -0 ", false}, -+ {float64(1.0), " 1 ", false}, -+ {float64(-1.0), " -1 ", false}, -+ {float64(0.5), " 0.5 ", false}, -+ {float64(-0.5), " -0.5 ", false}, -+ {float64(0), " 0 ", false}, -+ {math.Copysign(0, -1), " -0 ", false}, -+ {"", `""`, false}, -+ {"foo", `"foo"`, false}, - // Newlines. -- {"\r\n\u2028\u2029", `"\r\n\u2028\u2029"`}, -+ {"\r\n\u2028\u2029", `"\r\n\u2028\u2029"`, false}, - // "\v" == "v" on IE 6 so use "\u000b" instead. -- {"\t\x0b", `"\t\u000b"`}, -- {struct{ X, Y int }{1, 2}, `{"X":1,"Y":2}`}, -- {[]any{}, "[]"}, -- {[]any{42, "foo", nil}, `[42,"foo",null]`}, -- {[]string{""}, `["\u003c!--","\u003c/script\u003e","--\u003e"]`}, -- {"", `"--\u003e"`}, -- {"", `"]]\u003e"`}, -- {"", "-->"}, `["\u003c!--","\u003c/script\u003e","--\u003e"]`, false}, -+ {"", `"--\u003e"`, false}, -+ {"", `"]]\u003e"`, false}, -+ {" - 1.22.10-1 +- [Type] bugfix +- [DESC] upgrade to 1.22.10 for golang 1.21 is EOS + * Wed Oct 30 2024 zhaoxiaolin - 1.21.13-3 - [Type] other - [DESC] add instructions and code optimization on loongarch64 diff --git a/loongarch64-1.22.10.conf b/loongarch64-1.22.10.conf new file mode 100644 index 0000000..cc94421 --- /dev/null +++ b/loongarch64-1.22.10.conf @@ -0,0 +1,160 @@ +0001-internal-abi-internal-buildcfg-always-enable-registe.patch +0002-all-delete-loong64-non-register-ABI-fallback-path.patch +0003-cmd-internal-cmd-link-unify-the-relocation-naming-st.patch +0004-cmd-link-cmd-internal-unify-the-relocation-name-styl.patch +0005-cmd-internal-objabi-add-new-relocations-used-in-inte.patch +0006-cmd-link-internal-add-support-for-internal-linking-o.patch +0007-internal-platform-cmd-dist-enable-internal-linking-a.patch +0008-cmd-link-internal-return-the-reloc-size-of-R_LARCH_R.patch +0009-cmd-internal-obj-loong64-remove-Class-C_LEXT-and-C_S.patch +0010-cmd-internal-obj-loong64-remove-repeated-optab-item.patch +0011-cmd-internal-obj-loong64-reclassify-three-register-o.patch +0012-cmd-internal-obj-loong64-remove-case-17-because-no-r.patch +0013-cmd-internal-obj-loong64-cmd-asm-remove-useless-inst.patch +0014-cmd-internal-obj-loong64-remove-unuseless-functions.patch +0015-cmd-internal-obj-loong64-fixed-operand-assignment-er.patch +0016-cmd-internal-obj-loong64-return-an-error-when-gettin.patch +0017-cmd-internal-obj-loong64-cmd-asm-remove-invalid-opta.patch +0018-cmd-internal-obj-loong64-optimize-instruction-implem.patch +0019-cmd-internal-obj-loong64-rename-Class-to-represent-t.patch +0020-cmd-internal-obj-loong64-adjust-the-order-of-class-n.patch +0021-cmd-internal-obj-loong64-add-new-floating-point-data.patch +0022-cmd-internal-obj-loong64-one-branch-class-is-enough.patch +0023-cmd-internal-obj-loong64-optimize-the-code-logic-of-.patch +0024-cmd-internal-obj-loong64-add-stmt-prologueEnd-to-DWA.patch +0025-runtime-crash-stack-support-for-loong64.patch +0026-cmd-runtime-enable-race-detector-on-loong64.patch +0027-runtime-delete-on-register-ABI-fallback-path-for-rac.patch +0028-runtime-internal-atomic-add-loong64-operators-for-An.patch +0029-cmd-internal-obj-loong64-recheck-jump-offset-boundar.patch +0030-cmd-internal-obj-loong64-switch-Lookup-function-call.patch +0031-cmd-internal-obj-loong64-remove-unused-register-alia.patch +0032-cmd-internal-obj-loong64-move-C_NCLASS-to-be-last-cl.patch +0033-cmd-link-internal-loong64-correct-the-musl-dynamic-l.patch +0034-cmd-internal-obj-loong64-improve-the-definition-of-p.patch +0035-cmd-internal-obj-loong64-add-atomic-memory-access-in.patch +0036-cmd-compiler-internal-runtime-atomic-optimize-xchg-a.patch +0037-cmd-compiler-internal-runtime-atomic-optimize-xadd-a.patch +0038-cmd-compiler-internal-runtime-atomic-optimize-And-64.patch +0039-cmd-compile-internal-intrinsify-publicationBarrier-o.patch +0040-cmd-compiler-internal-runtime-atomic-Remove-implemen.patch +0041-cmd-compiler-set-LoweredAtomicExchange-32-64-to-asyn.patch +0042-cmd-compiler-implementation-of-optimizing-atomic.and.patch +0043-cmd-compile-internal-fix-the-dbar-mask-error-of-publ.patch +0044-cmd-compiler-internal-runtime-atomic-optimize-Store-.patch +0045-cmd-link-internal-loong64-fix-internal-linker-implem.patch +0046-cmd-link-add-argument-for-function-isPLTCall.patch +0047-cmd-link-add-support-for-trampoline-insertation-on-l.patch +0048-cmd-compiler-internal-runtime-atomic-optimize-Load-6.patch +0049-cmd-compiler-internal-delete-duplicate-intrinsify-St.patch +0050-cmd-compiler-internal-restrict-the-register-allocati.patch +0051-cmd-internal-obj-loong64-add-CPUCFG-instructions-sup.patch +0052-internal-cpu-runtime-make-linux-loong64-HWCAP-data-a.patch +0053-cmd-compiler-runtime-internal-atomic-optimize-Cas-64.patch +0054-cmd-internal-obj-loong64-add-support-for-FRINT.D-COP.patch +0055-runtime-save-and-restore-register-fcsr0-in-async-pre.patch +0056-cmd-compile-math-make-math.Ceil-Floor-RoundToEven-Tr.patch +0057-Modify-the-register-type-of-the-second-source-operan.patch +0058-cmd-internal-obj-loong64-add-support-for-BITREVW-and.patch +0059-cmd-compile-make-math-bits.Reverse-intrinsics-on-loo.patch +0060-cmd-asm-add-support-for-loong64-CRC32-instructions.patch +0061-hash-crc32-optimize-the-loong64-crc32-implementation.patch +0062-runtime-use-ABIInternal-for-calls-to-sigtrampgo-on-l.patch +0063-cmd-internal-obj-loong64-add-FLDX-FSTX-LDX.STX-instr.patch +0064-cmd-internal-obj-loong64-add-back-instruction-WORD.patch +0065-cmd-compile-Modify-the-implementation-of-math.Ceil-F.patch +0066-cmd-internal-obj-loong64-fix-invalid-register-pair-f.patch +0067-internal-bytealg-optimize-IndexByte-and-IndexByteStr.patch +0068-internal-bytealg-optimize-memequal-and-memequal_varl.patch +0069-internal-bytealg-optimize-Index-and-IndexString-func.patch +0070-internal-bytealg-optimize-Count-and-CountString-func.patch +0071-cmd-internal-obj-loong64-add-testcase-TestPCALIGN.patch +0072-cmd-internal-obj-loong64-add-testcase-TestNoRet.patch +0073-cmd-compile-internal-ssa-support-testcases-about-deb.patch +0074-cmd-compile-internal-loopvar-support-testcases-about.patch +0075-runtime-support-debug-call-injection-and-its-test-on.patch +0076-runtime-fix-the-access-method-of-sc_extcontext-in-de.patch +0077-internal-bytealg-adjust-the-format-of-assembly-files.patch +0078-cmd-internal-obj-loong64-correct-the-special-registe.patch +0079-cmd-link-internal-loong64-fix-musl-dynamic-linker-pa.patch +0080-cmd-internal-obj-loong64-add-doc.go.patch +0081-cmd-internal-obj-loong64-add-support-for-instruction.patch +0082-cmd-compile-intrinsics-for-math-bits.TrailingZeros-o.patch +0083-cmd-internal-obj-loong64-add-support-for-instruction.patch +0084-cmd-compile-intrinsics-for-math-bits.ReverseBytes-an.patch +0085-cmd-internal-obj-loong64-add-support-for-instruction.patch +0086-cmd-internal-obj-loong64-add-FCLASS.-S-D-instruction.patch +0087-cmd-internal-obj-loong64-add-support-for-instruction.patch +0088-cmd-internal-obj-loong64-add-support-for-instruction.patch +0089-cmd-internal-obj-loong64-add-support-for-instruction.patch +0090-src-math-implement-archFloor-archCeil-archTrunc-in-h.patch +0091-cmd-compile-intrinsics-for-math.min-max-and-implemen.patch +0092-runtime-optimize-the-function-memmove-on-loong64.patch +0093-runtime-optimize-the-function-memclrNoHeapPointers-o.patch +0094-src-internal-bytealg-optimize-the-function-Compare-o.patch +0095-cmd-compile-internal-ssa-Optimize-rules-Zero-and-Mov.patch +0096-crypto-sha256-implement-sha256block-in-hardware-on-l.patch +0097-crypto-md5-implement-md5block-in-hardware-on-loong64.patch +0098-crypto-sha512-implement-sha512block-in-hardware-on-l.patch +0099-crypto-sha1-implement-sha1block-in-hardware-on-loong.patch +0100-crypto-subtle-implement-func-xorBytes-in-hardware-on.patch +0101-cmd-internal-obj-loong64-add-new-operand-classes-for.patch +0102-crypto-internal-bigmod-provide-assembly-addMulVVW-fo.patch +0103-cmd-compiler-internal-atomic-operations-use-universa.patch +0104-cmd-compile-internal-ssa-optimize-if-control-flow-ru.patch +0105-math-big-optimize-addVV-function-for-loong64.patch +0106-math-big-optimize-addVW-function-for-loong64.patch +0107-math-big-optimize-subVV-function-for-loong64.patch +0108-math-big-optimize-subVW-function-for-loong64.patch +0109-math-big-optimize-shlVU-function-for-loong64.patch +0110-math-big-optimize-shrVU-function-for-loong64.patch +0111-math-big-optimize-mulAddVWW-function-for-loong64.patch +0112-math-big-optimize-addMulVVW-function-for-loong64.patch +0113-cmd-asm-internal-obj-loong64-add-support-for-F-N-M-A.patch +0114-cmd-compile-add-fused-multiply-add-sub-support-on-lo.patch +0115-cmd-compile-internal-ssa-optimize-store-zero-rules-o.patch +0116-cmd-compile-internal-ssa-optimize-ANDconst-rule.patch +0117-cmd-internal-obj-loong64-optimize-immediate-loading.patch +0118-cmd-compile-internal-optimize-condition-branch-imple.patch +0119-cmd-internal-objfile-cmd-vendor-add-objdump-tool-sup.patch +0120-Fix-bug-panic-big-over-2-63-1-math.Trunc-is-incorrec.patch +0121-cmd-compile-optimize-math.Float64-32-bits-and-math.F.patch +0122-cmd-internal-obj-loong64-add-testcase-TestLargeCall-.patch +0123-cmd-link-internal-ld-add-testcase-TestLoong64Trampol.patch +0124-cmd-compile-optimize-RotateLeft8-16-on-loong64.patch +0125-cmd-internal-obj-loong64-add-support-for-instruction.patch +0126-cmd-internal-obj-loong64-add-support-for-instruction.patch +0127-cmd-objdump-add-testcase-for-loong64.patch +0128-cmd-asm-adjust-the-operand-order-of-F-N-M-ADD-SUB-F-.patch +0129-cmd-vendor-golang.org-x-tools-latest.patch +0130-runtime-switch-cputics-and-switchTocrashStack0-on-lo.patch +0131-cmd-internal-obj-loong64-add-support-for-instruction.patch +0132-cmd-compiler-internal-runtime-atomic-optimize-Store-.patch +0133-cmd-internal-obj-loong64-add-support-for-instruction.patch +0134-cmd-internal-obj-optimize-the-function-stacksplit-on.patch +0135-cmd-internal-obj-loong64-mark-functions-with-small-s.patch +0136-cmd-compile-fold-MOV-nop-and-MOV-const-on-loong64.patch +0137-cmd-compile-add-loong64-specific-inlining-for-runtim.patch +0138-cmd-compile-add-patterns-for-bitfield-opcodes-on-loo.patch +0139-cmd-compile-fold-constant-shift-with-extension-on-lo.patch +0140-test-codegen-fix-the-matching-instructions-inside-pl.patch +0141-cmd-compile-optimize-loong64-with-register-indexed-l.patch +0142-cmd-compile-add-rules-to-optimize-go-codes-to-consta.patch +0143-cmd-compile-optimize-the-condition-for-the-rule-x-lc.patch +0144-cmd-compile-inline-constant-sized-memclrNoHeapPointe.patch +0145-cmd-internal-obj-loong64-add-V-XV-LD-V-XV-LDX-V-XV-S.patch +0146-cmd-internal-obj-loong64-add-V-XV-SEQ.-B-H-W-D-instr.patch +0147-cmd-internal-obj-loong64-add-support-of-VMOVQ-and-XV.patch +0148-cmd-internal-obj-loong64-add-V-XV-PCNT.-B-H-W-D-inst.patch +0149-cmd-compile-optimize-math-bits.OnesCount-16-32-64-im.patch +0150-runtime-improve-CALLFN-macro-for-loong64.patch +0151-cmd-comtime-runtime-internal-atomic-Remove-redundant.patch +0152-update-golang.org-x-arch-to-v0.11.1-0.20241106162200.patch +0153-cmd-asm-internal-arch-fix-wrong-type-for-arg-reg-in-.patch +0154-cmd-compile-optimize-shifts-of-int32-and-uint32-on-l.patch +0155-cmd-compile-simplify-bounded-shift-on-loong64.patch +0156-runtime-use-ABIInternal-on-syscall-and-other-sys.stu.patch +0157-runtime-use-correct-memory-barrier-in-exitThread-fun.patch +0158-cmd-asm-add-support-for-the-rest-of-loong64-unary-bi.patch +0159-cmd-asm-use-single-instruction-forms-for-all-loong64.patch +0160-cmd-asm-cmd-internal-obj-optimize-immediate-loading.patch diff --git a/loongarch64.conf b/loongarch64.conf deleted file mode 100644 index 0391d9b..0000000 --- a/loongarch64.conf +++ /dev/null @@ -1,125 +0,0 @@ -0001-cmd-dist-cmd-link-internal-runtime-add-buildmode-plu.patch -0002-runtime-cmd-go-enable-memory-sanitizer-on-linux-loon.patch -0003-runtime-cmd-go-enable-address-sanitizer-on-linux-loo.patch -0004-internal-sysinfo-print-cpu-type-from-cpuinfo-when-in.patch -0005-cmd-cmd-vendor-pick-up-updates-for-golang.org-x-arch.patch -0006-cmd-internal-objfile-add-loong64-disassembler-suppor.patch -0007-runtime-remove-the-meaningless-offset-of-8-for-duffz.patch -0008-cmd-compiler-remove-the-meaningless-offset-of-8-for-.patch -0009-cmd-internal-obj-loong64-add-atomic-memory-access-in.patch -0010-cmd-compiler-runtime-internal-atomic-optimize-xchg-a.patch -0011-cmd-compiler-runtime-internal-atomic-optimize-xadd-a.patch -0012-cmd-compiler-runtime-internal-atomic-optimize-And-32.patch -0013-cmd-compiler-runtime-internal-atomic-Implementing-xc.patch -0014-cmd-compiler-runtime-internal-atomic-Implementing-xa.patch -0015-cmd-compiler-runtime-internal-atomic-Implementing-An.patch -0016-cmd-internal-obj-loong64-remove-the-invalid-plan9-fo.patch -0017-cmd-internal-obj-loong64-correct-the-instruction-for.patch -0018-cmd-internal-obj-loong64-recheck-jump-offset-boundar.patch -0019-cmd-link-internal-loong64-correct-the-glibc-dynamic-.patch -0020-cmd-link-internal-loadelf-correct-the-relocation-siz.patch -0021-cmd-compile-cmd-internal-runtime-change-the-register.patch -0022-cmd-compile-add-ABI-register-definations-for-loong64.patch -0023-cmd-compile-cmd-internal-runtime-change-registers-on.patch -0024-internal-abi-define-loong64-regABI-constants.patch -0025-cmd-compile-internal-add-register-info-for-loong64-r.patch -0026-cmd-compile-internal-add-spill-support-for-loong64-r.patch -0027-cmd-compile-update-loong64-CALL-ops.patch -0028-runtime-make-duff-device-as-ABIInternal-for-loong64.patch -0029-runtime-support-regABI-and-add-spill-functions-in-ru.patch -0030-reflect-runtime-add-reflect-support-for-regABI-on-lo.patch -0031-internal-bytealg-add-regABI-support-in-bytealg-funct.patch -0032-runtime-add-regABI-support-in-memclr-and-memmove-fun.patch -0033-cmd-internal-obj-set-morestack-arg-spilling-and-rega.patch -0034-cmd-compile-fix-If-lowering-on-loong64.patch -0035-runtime-internal-syscall-use-ABIInternal-for-Syscall.patch -0036-cmd-compile-internal-buildcfg-enable-regABI-on-loong.patch -0037-internal-abi-internal-buildcfg-always-enable-registe.patch -0038-all-delete-loong64-non-register-ABI-fallback-path.patch -0039-cmd-internal-obj-loong64-using-LookupABI-to-find-duf.patch -0040-cmd-internal-cmd-link-unify-the-relocation-naming-st.patch -0041-cmd-link-internal-loadelf-remove-useless-relocation-.patch -0042-cmd-link-internal-loadelf-add-additional-relocations.patch -0043-cmd-link-add-new-relocations-numbered-101-to-109-for.patch -0044-api-add-new-relocations-numbered-101-to-109-for-loon.patch -0045-cmd-internal-obj-loong64-remove-unused-register-alia.patch -0046-cmd-internal-runtime-change-the-LR-parameter-registe.patch -0047-cmd-runtime-enable-race-detector-on-loong64.patch -0048-runtime-Mark-race-functions-on-loong64-as-ABInternal.patch -0049-runtime-delete-on-register-ABI-fallback-path-for-rac.patch -0050-cmd-dist-update-isUnsupportedVMASize-test-skip.patch -0051-runtime-race-update-race_linux_loong64.syso.patch -0052-cmd-internal-objabi-add-new-relocations-used-in-inte.patch -0053-cmd-link-internal-add-support-for-internal-linking-o.patch -0054-internal-platform-cmd-dist-enable-internal-linking-a.patch -0055-cmd-link-internal-return-reloc-size-of-R_LARCH_RELAX.patch -0056-cmd-internal-obj-loong64-add-stmt-prologueEnd-to-DWA.patch -0057-cmd-link-internal-loong64-correct-the-musl-dynamic-l.patch -0058-cmd-compiler-internal-runtime-atomic-Remove-implemen.patch -0059-cmd-compiler-set-LoweredAtomicExchange-32-64-to-asyn.patch -0060-cmd-compiler-implementation-of-optimizing-atomic.and.patch -0061-cmd-internal-obj-loong64-improve-the-definition-of-p.patch -0062-cmd-compile-internal-intrinsify-publicationBarrier-o.patch -0063-cmd-compiler-internal-runtime-atomic-optimize-Store-.patch -0064-cmd-link-internal-loong64-fix-internal-linker-implem.patch -0065-cmd-link-add-argument-for-function-isPLTCall.patch -0066-cmd-link-add-support-for-trampoline-insertation-on-l.patch -0067-cmd-compiler-internal-runtime-atomic-optimize-Load-6.patch -0068-cmd-compiler-internal-delete-duplicate-intrinsify-St.patch -0069-cmd-compiler-internal-restrict-the-register-allocati.patch -0070-cmd-internal-obj-loong64-add-CPUCFG-instructions-sup.patch -0071-internal-cpu-runtime-make-linux-loong64-HWCAP-data-a.patch -0072-cmd-compiler-runtime-internal-atomic-optimize-Cas-64.patch -0073-cmd-internal-obj-loong64-add-support-for-FRINT.D-COP.patch -0074-cmd-compile-math-make-math.Ceil-Floor-RoundToEven-Tr.patch -0075-cmd-internal-remove-unused-case-31.patch -0076-runtime-save-and-restore-register-fcsr0-in-async-pre.patch -0077-Modify-the-register-type-of-the-second-source-operan.patch -0078-cmd-internal-obj-loong64-add-support-for-BITREVW-and.patch -0079-cmd-compile-make-math-bits.Reverse-intrinsics-on-loo.patch -0080-cmd-asm-add-support-for-loong64-CRC32-instructions.patch -0081-hash-crc32-optimize-the-loong64-crc32-implementation.patch -0082-runtime-use-ABIInternal-for-calls-to-sigtrampgo-on-l.patch -0083-cmd-internal-obj-loong64-add-FLDX-FSTX-LDX.STX-instr.patch -0084-cmd-compile-Modify-the-implementation-of-math.Ceil-F.patch -0085-cmd-internal-obj-loong64-fix-invalid-register-pair-f.patch -0086-internal-bytealg-optimize-IndexByte-and-IndexByteStr.patch -0087-internal-bytealg-optimize-memequal-and-memequal_varl.patch -0088-internal-bytealg-optimize-Index-and-IndexString-func.patch -0089-internal-bytealg-optimize-Count-and-CountString-func.patch -0090-internal-bytealg-adjust-the-format-of-assembly-files.patch -0091-cmd-internal-obj-loong64-correct-the-special-registe.patch -0092-cmd-link-internal-loong64-fix-musl-dynamic-linker-pa.patch -0093-cmd-internal-obj-loong64-add-doc.go.patch -0094-cmd-internal-obj-loong64-add-support-for-instruction.patch -0095-cmd-compile-intrinsics-for-math-bits.TrailingZeros-o.patch -0096-cmd-internal-obj-loong64-add-support-for-instruction.patch -0097-cmd-compile-intrinsics-for-math-bits.ReverseBytes-an.patch -0098-cmd-internal-obj-loong64-add-support-for-instruction.patch -0099-cmd-internal-obj-loong64-add-FCLASS.-S-D-instruction.patch -0100-cmd-internal-obj-loong64-add-support-for-instruction.patch -0101-cmd-internal-obj-loong64-add-support-for-instruction.patch -0102-cmd-internal-obj-loong64-add-support-for-instruction.patch -0103-src-math-implement-archFloor-archCeil-archTrunc-in-h.patch -0104-cmd-compile-intrinsics-for-math.min-max-and-implemen.patch -0105-runtime-optimize-the-function-memmove-on-loong64.patch -0106-src-internal-bytealg-optimize-the-function-Compare-o.patch -0107-cmd-compile-internal-ssa-Optimize-rules-Zero-and-Mov.patch -0108-runtime-optimize-the-function-memclrNoHeapPointers-o.patch -0109-crypto-md5-implement-md5block-in-hardware-on-loong64.patch -0110-crypto-sha1-implement-sha1block-in-hardware-on-loong.patch -0111-crypto-sha256-implement-sha256block-in-hardware-on-l.patch -0112-crypto-sha512-implement-sha512block-in-hardware-on-l.patch -0113-crypto-subtle-implement-func-xorBytes-in-hardware-on.patch -0114-cmd-internal-obj-loong64-add-new-operand-classes-for.patch -0115-crypto-internal-bigmod-provide-assembly-addMulVVW-fo.patch -0116-cmd-compiler-internal-atomic-operations-use-universa.patch -0117-cmd-compile-internal-ssa-optimize-if-control-flow-ru.patch -0118-math-big-optimize-addVV-function-for-loong64.patch -0119-math-big-optimize-addVW-function-for-loong64.patch -0120-math-big-optimize-subVV-function-for-loong64.patch -0121-math-big-optimize-subVW-function-for-loong64.patch -0122-math-big-optimize-shlVU-function-for-loong64.patch -0123-math-big-optimize-shrVU-function-for-loong64.patch -0124-math-big-optimize-mulAddVWW-function-for-loong64.patch -0125-math-big-optimize-addMulVVW-function-for-loong64.patch diff --git a/sources b/sources index f3be9e3..1267029 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (go1.21.13.src.tar.gz) = f316984154ead8256d9ec0613e3cfef5699553387d87c24bb2a96265f986bf4450838e6451841def3713d65ebaa9bf55e36ff39c5690d79522e1c1ba7655be2f -SHA512 (loongarch64.tar.gz) = d2ee3a6dbada5d39ec2fdd53019d7d58409a617a8cdbb96aebc27621243eb07f596f12e90726c24374e3aeb5acfa1f85ee6b2f1ce03974fdbd755fe8f422f49c +SHA512 (go1.22.10.src.tar.gz) = 0ccf4a42a8bf40c94f21b014fea3ea002d46e8ecb1142be7444148c4937b3d10ce863fb5556f2c1a8f4b51d34d85efe16efa892255eeb4447108c44ac080ce13 +SHA512 (loongarch64-1.22.10.tar.gz) = d8776a2a80df3bd03aa426b5df99154c1f30014832dd6b33939f32927a481392746fc9fe0acd3624810ecf07ddeece7b8f5113d77d93801c656b496c196618e0 -- Gitee