1
0
mirror of https://github.com/golang/go synced 2024-11-15 08:40:59 -07:00
Commit Graph

4455 Commits

Author SHA1 Message Date
Robert Griesemer
adc5b559db spec: adjust for-range prose to include iterator functions where missing
Also add a missing table entry to the language versions section in the
appendix.

Fixes #67977.

Change-Id: I1f98abbbcc34a4ff31f390752635435eaf6120b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/592595
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
2024-06-13 20:48:21 +00:00
Robert Griesemer
8219848c94 spec: allow range-over-func to omit iteration variables
For #65236.

Change-Id: I5a11811cc52467ea4446db29c3f86b119f9b2409
Reviewed-on: https://go-review.googlesource.com/c/go/+/592295
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-06-13 15:47:54 +00:00
Dmitri Shuralyov
97bc577812 doc/next: improve description of proposal 61308
For #61308.
For #65614.

Change-Id: I36b4f2392075d5a3fb9f53a28bd19b997e7be363
Reviewed-on: https://go-review.googlesource.com/c/go/+/592197
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
2024-06-12 18:56:34 +00:00
Cherry Mui
3622ad9705 doc/next: reword map iterator function notes
The notes don't define identifiers m and seq. Describe in words
instead.

While here, rename 3-structs.md to 4-structs.md.

For #65614.

Change-Id: I6690f552903d1870c70e28673c87ac84b7c5c041
Reviewed-on: https://go-review.googlesource.com/c/go/+/592195
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-12 18:30:46 +00:00
Ian Lance Taylor
ee4a42bd58 net: add GODEBUG=netedns0=0 to disable sending EDNS0 header
It reportedly breaks the DNS server on some modems.

For #6464
For #21160
For #44135
For #51127
For #51153
Fixes #67925

Change-Id: I54a11906159f00246d08a54cc8be7327e9ebfd2c
Reviewed-on: https://go-review.googlesource.com/c/go/+/591995
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-06-12 17:31:13 +00:00
Cherry Mui
04b5d13256 doc/next: document GORISCV64 environment variable
For #65614.
Updates #61476.

Change-Id: Id677aa6d2a59366ab75a26f08a383d2d253f270e
Reviewed-on: https://go-review.googlesource.com/c/go/+/591895
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-06-11 17:18:52 +00:00
Cherry Mui
1554e87c19 doc/next: document GOARM64 environment variable
For #65614.
Updates #60905.

Change-Id: I2dd9df3c7066357cf06268d918bad3c255b38aed
Reviewed-on: https://go-review.googlesource.com/c/go/+/591875
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
2024-06-11 17:18:41 +00:00
Cherry Mui
816538d517 doc/next: document locking down linkname usages
For #65614.
Updates #67401.

Change-Id: Ib38c134ea7ffc69434c79600ba75185e02809d0f
Reviewed-on: https://go-review.googlesource.com/c/go/+/591898
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-06-11 17:18:10 +00:00
Cherry Mui
6165bb11d7 doc/next: resolve a TODO for openbsd/riscv64 port
I think we want to keep the "experimental" as we did before. Also
added "64-bit" to be more specific.

For #65614.

Change-Id: I928d0ba6f1b53efa1f882f81f68bfb2446c7ab42
Reviewed-on: https://go-review.googlesource.com/c/go/+/591896
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-06-11 16:54:08 +00:00
Cherry Mui
5d759ac902 doc/next: reword linker -bindnow release notes
For #65614.

Change-Id: I1a2a4bc18601526053840a280e0604a8e1028ce6
Reviewed-on: https://go-review.googlesource.com/c/go/+/591899
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2024-06-11 16:47:18 +00:00
Robert Griesemer
7274921681 doc: document new default for GODEBUG gotypesalias setting in release notes
For #65614.

Change-Id: I9487521817348053170da293c01ac55f6e3dcd20
Reviewed-on: https://go-review.googlesource.com/c/go/+/590895
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-06-05 21:30:00 +00:00
Dmitri Shuralyov
e53d10dc04 doc: mark range-over-func as documented
The language change for the accepted range-over-func proposal #61405
was documented in CL 590616. Remove the corresponding 'TODO' entry.

Also improve formatting slightly, and switch to preferred relative
links. They'll work better in the long term and in more contexts.

While here, also simplify the suggested line to preview release notes
locally: setting the -content='' flag explicitly is no longer required
as of CL 589936.

For #65614.

Change-Id: I6cee951b9ede33900bca48c9f709e3b2c5e87337
Reviewed-on: https://go-review.googlesource.com/c/go/+/590756
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
2024-06-05 19:56:43 +00:00
Ian Lance Taylor
93bbf719a6 doc/next: mention new error on time.Parse timezone overflow
For #65614
For #67470

Change-Id: Iba2f263f8ca1fb10c383e12ff3455aa86b26421d
Reviewed-on: https://go-review.googlesource.com/c/go/+/590795
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2024-06-05 17:30:16 +00:00
Robert Griesemer
f3ae135604 doc: document GOEXPERIMENT=aliastypeparams in release notes
For #65614.

Change-Id: I05b20a80b1163e1d3927c2f763ef6b7d20e6a937
Reviewed-on: https://go-review.googlesource.com/c/go/+/590617
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-06-05 15:56:51 +00:00
Robert Griesemer
1b07b774c0 doc: document "range-over-func" language change in release notes
For #65614.

Change-Id: Idbbcb6eb57b7294d52b174c1aba74ca7aa1b8efd
Reviewed-on: https://go-review.googlesource.com/c/go/+/590616
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
2024-06-04 23:33:52 +00:00
Robert Griesemer
1724c26142 spec: better examples for range-over-func
For #65237.

Change-Id: Id38747efebd46633f453eadaf68d818064faa778
Reviewed-on: https://go-review.googlesource.com/c/go/+/590396
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
2024-06-04 21:07:21 +00:00
Robert Griesemer
535f81e74e spec: document for range loop over functions
For #61405.
Fixes #65237.

Change-Id: Ia7820c0ef089c828ea7ed3d2802c5185c945290e
Reviewed-on: https://go-review.googlesource.com/c/go/+/589397
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2024-06-04 15:28:33 +00:00
Carlos Amedee
44d06616b5 doc/next: preannounce a new Linux kernel version requirement
This change adds a preannouncement to the release notes. Go 1.24
will require the Linux kernel to be at version 3.17 or later,
with an exception that systems running 3.10 or later will
continue to be supported if the kernel has been patched to
support the getrandom system call.

For #65614
For #67001

Change-Id: I61a3838b9ce4f48eb9f94830aa03372d589afdcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/589015
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-05-30 19:26:10 +00:00
Dmitri Shuralyov
c8cb31a36e doc/next: document proposal 62518 as not relevant
For #65614.

Change-Id: I03dc3a46052f1e55dc1ab46b45c886c96c4a1b39
Reviewed-on: https://go-review.googlesource.com/c/go/+/589216
TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-05-30 18:01:58 +00:00
Rhys Hiltner
ca7d300509 Revert "runtime: remove GODEBUG=runtimecontentionstacks"
This reverts commit 87e930f728 (CL 585639)

Reason for revert: This is part of a patch series that changed the
handling of contended lock2/unlock2 calls, reducing the maximum
throughput of contended runtime.mutex values, and causing a performance
regression on applications where that is (or became) the bottleneck.

Updates #66999
Updates #67585

Change-Id: I1e286d2a16d16e4af202cd5dc04b2d9c4ee71b32
Reviewed-on: https://go-review.googlesource.com/c/go/+/589097
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
2024-05-30 17:52:17 +00:00
Michael Matloob
8e2b3ac705 cmd/go: add release notes for go telemetry, and telemetry env values
This change fills in the release notes for the go telemetry command as
well as the unsettable GOTELEMETRY and GOTELEMETRYDIR go env values.

For #67111

Change-Id: Id6943f79f7ab2457787e1639d8d5fb1c1e2649dc
Reviewed-on: https://go-review.googlesource.com/c/go/+/587923
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-28 19:06:07 +00:00
Michael Anthony Knyszek
a2eae66c30 doc: add release notes for a couple minor tracing features
For #65614.

Change-Id: I759bf671b8f84c5224798b0dfaee6b158fdcc95a
Reviewed-on: https://go-review.googlesource.com/c/go/+/587927
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-24 21:37:09 +00:00
Dmitri Shuralyov
960cd14124 doc/README: suggest a way to preview next content, tweak release steps
Smaller edits are usually fine to do without previewing, since Markdown
can be intuitive. But for larger changes including re-ordering sections
and such, it can be helpful to quickly see the end result. Write down a
way to do that.

Update the release steps to capture that the doc/next content will move
to x/website before RC 1, when the complete release note draft is ready.

For #64169.

Change-Id: Ie554ed5294ce819fd0689e2249e6013826f0c71f
Reviewed-on: https://go-review.googlesource.com/c/go/+/587922
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2024-05-24 16:43:34 +00:00
Dmitri Shuralyov
acc93dac83 doc/next: populate TODOs found with relnote todo
This is the first round of TODOs created based on relnote todo output.
There are many entries that need to be documented, expanded, reworded,
and this change makes progress on setting that up.

For this cycle, relnote todo implemented a simple heuristic of finding
CLs that mention accepted proposals (see issue 62376, or comment
https://go.dev/issue/62376#issuecomment-2101086794 specifically).
The "Items that don't need to be mentioned in Go 1.23 release notes but
are picked up by relnote todo." section in todo.md contains an attempt
at reviewing that list. The large number of items needed to be reviewed
made it impractical to spend much time on any individual one.

For #65614.

Change-Id: Id9d5f1795575a46df2ec4ed0088de07ee6075a90
Reviewed-on: https://go-review.googlesource.com/c/go/+/588015
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2024-05-23 20:49:22 +00:00
Dmitri Shuralyov
a5339da341 doc/next: document go mod tidy -diff flag
Add a release note for the flag that CL 585401 added.

For #27005.
For #65614.

Change-Id: Ib26eb1b85c511d3cb41a29a8d9354577dd9a0e14
Reviewed-on: https://go-review.googlesource.com/c/go/+/587695
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
2024-05-23 14:44:59 +00:00
Roland Shoemaker
9eeb627f60 crypto/tls: add ech client support
This CL adds a (very opinionated) client-side ECH implementation.

In particular, if a user configures a ECHConfigList, by setting the
Config.EncryptedClientHelloConfigList, but we determine that none of
the configs are appropriate, we will not fallback to plaintext SNI, and
will instead return an error. It is then up to the user to decide if
they wish to fallback to plaintext themselves (by removing the config
list).

Additionally if Config.EncryptedClientHelloConfigList is provided, we
will not offer TLS support lower than 1.3, since negotiating any other
version, while offering ECH, is a hard error anyway. Similarly, if a
user wishes to fallback to plaintext SNI by using 1.2, they may do so
by removing the config list.

With regard to PSK GREASE, we match the boringssl  behavior, which does
not include PSK identities/binders in the outer hello when doing ECH.

If the server rejects ECH, we will return a ECHRejectionError error,
which, if provided by the server, will contain a ECHConfigList in the
RetryConfigList field containing configs that should be used if the user
wishes to retry. It is up to the user to replace their existing
Config.EncryptedClientHelloConfigList with the retry config list.

Fixes #63369

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Change-Id: I9bc373c044064221a647a388ac61624efd6bbdbf
Reviewed-on: https://go-review.googlesource.com/c/go/+/578575
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-23 03:10:12 +00:00
Mordy Ovits
fd1363240a doc: fix two instances of "the the" in godebug.md
Remove two instances of "the the" introduced recently
in CL 562343 and CL 562975.

Change-Id: Ib32ca80fcd6764343021c84135bd65853945c9ea
GitHub-Last-Rev: 0bd2c0b4bd
GitHub-Pull-Request: golang/go#67594
Reviewed-on: https://go-review.googlesource.com/c/go/+/587717
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
2024-05-23 01:45:30 +00:00
Roland Shoemaker
56ec5d96bc crypto/tls: populate Leaf in X509KeyPair
Fixes #67065

Change-Id: I189e194de8aa94523eb64e1dd294a70cb81cbdf6
Reviewed-on: https://go-review.googlesource.com/c/go/+/585856
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2024-05-22 22:58:43 +00:00
Filippo Valsorda
587c3847da math/rand/v2: add ChaCha8.Read
Fixes #67059
Closes #67452
Closes #67498

Change-Id: I84eba2ed787a17e9d6aaad2a8a78596e3944909a
Reviewed-on: https://go-review.googlesource.com/c/go/+/587280
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-22 22:09:08 +00:00
Filippo Valsorda
032660573c crypto/tls: disable 3-DES by default
Fixes #66214

Change-Id: Iba8006a17fc7cd33c7485ab1a1ef8f56531c0ed1
Reviewed-on: https://go-review.googlesource.com/c/go/+/587295
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
2024-05-22 21:30:50 +00:00
islishude
2bf686dfe9 net/http: add partitioned attribute to cookie type
Fixes #62490

Change-Id: Ibe7df96f50275c9321462e994a962031cb1f3018
GitHub-Last-Rev: 7df8738b80
GitHub-Pull-Request: golang/go#62499
Reviewed-on: https://go-review.googlesource.com/c/go/+/526435
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Théo Dury <tdury2@gmail.com>
2024-05-22 18:33:05 +00:00
Dmitri Shuralyov
614f2284d9 doc/initial, doc/next: add draft notice to introduction
Go release notes always start out as a draft with a clear notice.
That notice is removed when the final release (go1.N.0) is made.
For example, the last time was in CL 562255.

Add this to the Go 1.23 draft and to the future fragment template.

Also switch to the main pkg.go.dev instance and use a relative issue
link in 3-tools.md while here.

For #64169.
For #65614.

Change-Id: I16bc0fa8a3a43ee7a9edd7fa253999041f1892e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/587415
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2024-05-22 18:25:26 +00:00
Roland Shoemaker
0ec709f180 html: update jstmpllitinterp doc
We no longer do anything with this GODEBUG.

Fixes #66217

Change-Id: I998797b6a573013f5b9c8ded835acae572327d18
Reviewed-on: https://go-review.googlesource.com/c/go/+/584117
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
2024-05-22 18:04:29 +00:00
Damien Neil
cbd8f16adc crypto/tls: improved 0-RTT QUIC API
Add synchronous management of stored sessions to QUICConn.

This adds QUICStoreSession and QUICResumeSession events,
permitting a QUIC implementation to handle session resumption
as part of its regular event loop processing.

Fixes #63691

Change-Id: I9fe16207cc1986eac084869675bc36e227cbf3f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/536935
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Marten Seemann <martenseemann@gmail.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2024-05-22 17:23:54 +00:00
Roland Shoemaker
8524931a2c crypto/x509: reject serial numbers longer than 20 octets
Updates #65085

Change-Id: I8e5fb6c77c54f07247b30afea9fe8c548bf6d0be
Reviewed-on: https://go-review.googlesource.com/c/go/+/562975
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2024-05-22 17:23:31 +00:00
Roland Shoemaker
db13584bae crypto/x509: reject negative serial numbers
There is only one trusted certificate I could find in the web pki which
has a negative serial number. Removing this exception seems reasonable.

Updates #65085

Change-Id: I55435b3d75479dcb41d523383e4ff7894a1496ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/562343
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
2024-05-22 17:23:27 +00:00
Jes Cok
5f6a85637c doc: correct issue number for release note
Also simplify links.

Change-Id: I412d6c914d05bd093df46926a4f1742d664fefea
Reviewed-on: https://go-review.googlesource.com/c/go/+/587355
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2024-05-22 16:06:02 +00:00
Filippo Valsorda
d0edd9acc8 crypto/tls: implement X25519Kyber768Draft00
Forced the testConfig CurvePreferences to exclude X25519Kyber768Draft00
to avoid bloating the transcripts, but I manually tested it and the
tests all update and pass successfully, causing 7436 insertions(+), 3251
deletions(-).

Fixes #67061

Change-Id: If6f13bca561835777ab0889a490487b7c2366c3c
Reviewed-on: https://go-review.googlesource.com/c/go/+/586656
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-22 14:56:25 +00:00
Filippo Valsorda
c96159c252 crypto/x509: cleanup signature generation
Centralizing some repetitive code, which would have prevented #45990.

This also fixes the deprecated Certificate.CreateCRL for RSA-PSS, not
that anyone cared, probably.

This has two other minor observable behavior changes: MD2 is now treated
as a completely unknown algorithm (why did we even have that!? removing
lets us treat hash == 0 as always meaning no prehash); and we now do the
signature verification self-check for all signing operations.

Change-Id: I3b34fe0c3b6eb6181d2145b0704834225cd45a27
Reviewed-on: https://go-review.googlesource.com/c/go/+/586015
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-22 09:20:15 +00:00
Rhys Hiltner
87e930f728 runtime: remove GODEBUG=runtimecontentionstacks
Go 1.22 promised to remove the setting in a future release once the
semantics of runtime-internal lock contention matched that of
sync.Mutex. That work is done, remove the setting.

For #66999

Change-Id: I3c4894148385adf2756d8754e44d7317305ad758
Reviewed-on: https://go-review.googlesource.com/c/go/+/585639
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2024-05-21 17:17:36 +00:00
Felix Geisendörfer
1b9dc3e178 runtime: increase profiling stack depth to 128
The current stack depth limit for alloc, mutex, block, threadcreate and
goroutine profiles of 32 frequently leads to truncated stack traces in
production applications. Increase the limit to 128 which is the same
size used by the execution tracer.

Create internal/profilerecord to define variants of the runtime's
StackRecord, MemProfileRecord and BlockProfileRecord types that can hold
arbitrarily big stack traces. Implement internal profiling APIs based on
these new types and use them for creating protobuf profiles and to act
as shims for the public profiling APIs using the old types.

This will lead to an increase in memory usage for applications that
use the impacted profile types and have stack traces exceeding the
current limit of 32. Those applications will also experience a slight
increase in CPU usage, but this will hopefully soon be mitigated via CL
540476 and 533258 which introduce frame pointer unwinding for the
relevant profile types.

For #43669.

Change-Id: Ie53762e65d0f6295f5d4c7d3c87172d5a052164e
Reviewed-on: https://go-review.googlesource.com/c/go/+/572396
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-05-21 14:38:45 +00:00
David Chase
22344e11f2 cmd/compile: add structs.HostLayout
This is for the proposal, plus a few bug fixes
that would/will be necessary when this is put into
actual use.

Fixes #66408.
Updates #63131.

Change-Id: I3a66e09d707dd579c59f155e7f53367f41214c30
Reviewed-on: https://go-review.googlesource.com/c/go/+/578355
Reviewed-by: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: David Chase <drchase@google.com>
2024-05-20 21:19:39 +00:00
David Chase
1028d973d2 doc: add release notes for hot block alignment
This is for the changes in CL 577935.

Change-Id: I8f70dd36c89aaede11a37744c0f279439e01eb13
Reviewed-on: https://go-review.googlesource.com/c/go/+/586895
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
2024-05-20 20:23:04 +00:00
Lorenz Bauer
04bf36e973 encoding/binary: add Append, Encode and Decode
Add a function which appends the binary representation of a value to the end of a slice.
This allows users to encode values with zero allocations. Also add Encode and Decode
functions which mimic unicode/utf8.

goos: darwin
goarch: arm64
pkg: encoding/binary
cpu: Apple M1 Pro
                            │   base.txt    │             append.txt              │
                            │    sec/op     │    sec/op     vs base               │
ReadSlice1000Int32s-10         2.690µ ±  0%    2.532µ ± 3%   -5.86% (p=0.002 n=6)
ReadStruct-10                  205.8n ±  0%    201.4n ± 1%   -2.14% (p=0.002 n=6)
WriteStruct-10                 159.1n ±  0%    153.5n ± 0%   -3.55% (p=0.002 n=6)
WriteSlice1000Structs-10       129.8µ ±  0%    124.2µ ± 0%   -4.34% (p=0.002 n=6)
ReadSlice1000Structs-10        161.7µ ±  0%    160.3µ ± 0%   -0.89% (p=0.002 n=6)
ReadInts-10                    156.8n ±  0%    161.6n ± 0%   +3.09% (p=0.002 n=6)
WriteInts-10                   134.5n ±  0%    139.5n ± 2%   +3.72% (p=0.002 n=6)
WriteSlice1000Int32s-10        2.691µ ± 16%    2.551µ ± 4%   -5.20% (p=0.002 n=6)
PutUint16-10                  0.6448n ±  4%   0.6212n ± 1%        ~ (p=0.093 n=6)
AppendUint16-10                1.414n ±  0%    1.424n ± 1%        ~ (p=0.115 n=6)
PutUint32-10                  0.6210n ±  0%   0.6211n ± 0%        ~ (p=0.833 n=6)
AppendUint32-10                1.414n ±  0%    1.426n ± 1%   +0.85% (p=0.017 n=6)
PutUint64-10                  0.6210n ±  0%   0.6394n ± 1%   +2.95% (p=0.002 n=6)
AppendUint64-10                1.414n ±  0%    1.427n ± 2%        ~ (p=0.052 n=6)
LittleEndianPutUint16-10      0.6239n ±  0%   0.6271n ± 1%        ~ (p=0.063 n=6)
LittleEndianAppendUint16-10    1.421n ±  0%    1.432n ± 1%   +0.81% (p=0.002 n=6)
LittleEndianPutUint32-10      0.6240n ±  0%   0.6240n ± 0%        ~ (p=0.766 n=6)
LittleEndianAppendUint32-10    1.422n ±  1%    1.425n ± 0%        ~ (p=0.673 n=6)
LittleEndianPutUint64-10      0.6242n ±  0%   0.6238n ± 0%   -0.08% (p=0.030 n=6)
LittleEndianAppendUint64-10    1.420n ±  0%    1.449n ± 1%   +2.04% (p=0.002 n=6)
ReadFloats-10                  39.36n ±  0%    42.54n ± 1%   +8.08% (p=0.002 n=6)
WriteFloats-10                 33.65n ±  0%    35.27n ± 1%   +4.80% (p=0.002 n=6)
ReadSlice1000Float32s-10       2.656µ ±  0%    2.526µ ± 1%   -4.91% (p=0.002 n=6)
WriteSlice1000Float32s-10      2.765µ ±  0%    2.857µ ± 3%   +3.31% (p=0.002 n=6)
ReadSlice1000Uint8s-10         129.1n ±  1%    130.4n ± 1%        ~ (p=0.126 n=6)
WriteSlice1000Uint8s-10       144.90n ±  3%    18.67n ± 2%  -87.12% (p=0.002 n=6)
PutUvarint32-10                12.11n ±  0%    12.12n ± 0%        ~ (p=0.675 n=6)
PutUvarint64-10                30.82n ±  0%    30.79n ± 1%        ~ (p=0.658 n=6)
AppendStruct-10                                107.8n ± 0%
AppendSlice1000Structs-10                      119.0µ ± 0%
AppendInts-10                                  55.29n ± 0%
AppendSlice1000Int32s-10                       2.211µ ± 1%
geomean                        33.07n          48.18n        -7.03%

Fixes #60023

Change-Id: Ife3f217b11d5f3eaa5a53fe8a7e877552f751f94
Reviewed-on: https://go-review.googlesource.com/c/go/+/579157
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Ingo Oeser <nightlyone@googlemail.com>
Reviewed-by: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-20 18:58:26 +00:00
Jes Cok
fd54936ea5 doc: simplify links for release notes
Change-Id: If9e3c5a58726ae3628d2e835d71f1a4708594c11
Reviewed-on: https://go-review.googlesource.com/c/go/+/586575
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2024-05-20 18:34:13 +00:00
aimuz
2b0f2f8169 maps: add All, Keys, Values, Insert, Collect
Fixed #61900.

Change-Id: Ic5962dc92b3102e7448635bef541414a2eaf415e
GitHub-Last-Rev: 3c6f74d617
GitHub-Pull-Request: golang/go#67521
Reviewed-on: https://go-review.googlesource.com/c/go/+/586716
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-05-20 16:01:35 +00:00
Mauri de Souza Meneguzzo
192d65e46b sync/atomic: public And/Or ops and race instrumentation
This CL implements the new sync/atomic AND and OR apis as well as their race
counterparts.

Fixes #61395

Change-Id: I294eefe4b3ac27bc4ed237edcbfa88a8c646d86f
GitHub-Last-Rev: f174297007
GitHub-Pull-Request: golang/go#64331
Reviewed-on: https://go-review.googlesource.com/c/go/+/544455
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Auto-Submit: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
2024-05-17 18:37:29 +00:00
Chen.Zhidong
a523152ea1 net/http: add Pattern field in Request to return matched pattern info
Fixes #66405

Change-Id: Icd80944b6ca081aa7addd4fb85d2b3c29b6c9542
GitHub-Last-Rev: c6e32742c4
GitHub-Pull-Request: golang/go#66618
Reviewed-on: https://go-review.googlesource.com/c/go/+/574997
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-16 18:42:34 +00:00
Jonathan Amsterdam
06b4578160 doc/README.md: give example of package-less symbol link
Change-Id: I84d7b6aae7319cc62628a2b5ee752a0680377a15
Reviewed-on: https://go-review.googlesource.com/c/go/+/586135
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-05-16 18:37:47 +00:00
Jonathan Amsterdam
4c1cc1c97f doc/next/64910.md: reword release note
Change-Id: I41a01dd2bcaf5716703946bad42830d4e8095c11
Reviewed-on: https://go-review.googlesource.com/c/go/+/586136
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-05-16 16:44:13 +00:00