diff --git a/go.mod b/go.mod
index 3ccb0665..efa988ed 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module code.cloudfoundry.org/cnbapplifecycle
-go 1.26.3
+go 1.26.4
tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint
@@ -8,7 +8,7 @@ require (
code.cloudfoundry.org/credhub-cli v0.0.0-20260316130226-db948d6c5f1c
github.com/BurntSushi/toml v1.6.0
github.com/apex/log v1.9.0
- github.com/buildpacks/lifecycle v0.21.9
+ github.com/buildpacks/lifecycle v0.21.12
github.com/buildpacks/pack v0.40.6
github.com/cespare/xxhash/v2 v2.3.0
github.com/google/go-containerregistry v0.21.5
@@ -116,10 +116,10 @@ require (
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/dlclark/regexp2 v1.11.5 // indirect
- github.com/docker/cli v29.4.3+incompatible // indirect
+ github.com/docker/cli v29.5.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v28.5.2+incompatible // indirect
- github.com/docker/docker-credential-helpers v0.9.6 // indirect
+ github.com/docker/docker-credential-helpers v0.9.7 // indirect
github.com/docker/go-connections v0.7.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.5.0 // indirect
@@ -185,7 +185,7 @@ require (
github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect
github.com/kisielk/errcheck v1.9.0 // indirect
github.com/kkHAIKE/contextcheck v1.1.6 // indirect
- github.com/klauspost/compress v1.18.5 // indirect
+ github.com/klauspost/compress v1.18.6 // indirect
github.com/kulti/thelper v0.7.1 // indirect
github.com/kunwardeep/paralleltest v1.0.15 // indirect
github.com/lasiar/canonicalheader v1.1.2 // indirect
@@ -211,7 +211,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
- github.com/moby/buildkit v0.29.0 // indirect
+ github.com/moby/buildkit v0.30.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.2.0 // indirect
github.com/moby/moby/client v0.4.1 // indirect
@@ -299,27 +299,25 @@ require (
go.augendre.info/arangolint v0.3.1 // indirect
go.augendre.info/fatcontext v0.9.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 // indirect
go.opentelemetry.io/otel v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
- go.opentelemetry.io/otel/sdk v1.43.0 // indirect
- go.opentelemetry.io/otel/sdk/metric v1.43.0 // indirect
go.opentelemetry.io/otel/trace v1.43.0 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
- golang.org/x/crypto v0.51.0 // indirect
+ golang.org/x/crypto v0.52.0 // indirect
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 // indirect
golang.org/x/mod v0.36.0 // indirect
- golang.org/x/net v0.53.0 // indirect
+ golang.org/x/net v0.54.0 // indirect
golang.org/x/sync v0.20.0 // indirect
- golang.org/x/sys v0.44.0 // indirect
+ golang.org/x/sys v0.45.0 // indirect
golang.org/x/term v0.43.0 // indirect
golang.org/x/text v0.37.0 // indirect
- golang.org/x/tools v0.44.0 // indirect
+ golang.org/x/tools v0.45.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
diff --git a/go.sum b/go.sum
index da338a66..eb44594f 100644
--- a/go.sum
+++ b/go.sum
@@ -163,8 +163,8 @@ github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDw
github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s=
github.com/buildpacks/imgutil v0.0.0-20260415151438-73856e68b72b h1:wW08ZcJrzVhubQjTOkjkWzfeVHAHW0Tlmg3twecDauA=
github.com/buildpacks/imgutil v0.0.0-20260415151438-73856e68b72b/go.mod h1:EBy9ZOatKkTBAWOgN2Y0aNV4P40dOdGyzzB9q2a5HBE=
-github.com/buildpacks/lifecycle v0.21.9 h1:w3Ou7GxBxnjbw4Q7/P9fg7y63AQNOWKI9Tz0VBf4vPY=
-github.com/buildpacks/lifecycle v0.21.9/go.mod h1:s4TBY4rW2Jh3mQYDR1sxYuLugeAa2P3u+1CGMBNjYOI=
+github.com/buildpacks/lifecycle v0.21.12 h1:0pj2lhDTuEcArgo2fFa2LYN69ildNLzOSQgxNf1TULM=
+github.com/buildpacks/lifecycle v0.21.12/go.mod h1:19rLV5zX7p68AslalkHDuNFCy2PvmipzWr1wwFcGuAg=
github.com/buildpacks/pack v0.40.6 h1:w2HbQLv5UEvkbdoGt/QHmEbrMrvIwZZwuo/L0KaPdWE=
github.com/buildpacks/pack v0.40.6/go.mod h1:/tcPeriACGmDZ0FCwkAyvwJaTFtDykGfaLUZk6u5aMw=
github.com/butuzov/ireturn v0.4.0 h1:+s76bF/PfeKEdbG8b54aCocxXmi0wvYdOVsWxVO7n8E=
@@ -244,14 +244,14 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
-github.com/docker/cli v29.4.3+incompatible h1:u+UliYm2J/rYrIh2FqHQg32neRG8GjbvNuwQRTzGspU=
-github.com/docker/cli v29.4.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
+github.com/docker/cli v29.5.0+incompatible h1:FPUvKJoKpeP4Njz8NrQdeUN8o247P7ndTiILtaP5/l4=
+github.com/docker/cli v29.5.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM=
github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker-credential-helpers v0.9.6 h1:cT2PbRPSlnMmNTfT2TDMXRyQ1KMWHG7xoTLBcn1ZNv0=
-github.com/docker/docker-credential-helpers v0.9.6/go.mod h1:v1S+hepowrQXITkEfw6o4+BMbGot02wiKpzWhGUZK6c=
+github.com/docker/docker-credential-helpers v0.9.7 h1:jaPIxEIDz5bQeghNAdzz0ETwMMnM4vzjZlxz3pWP4JA=
+github.com/docker/docker-credential-helpers v0.9.7/go.mod h1:v1S+hepowrQXITkEfw6o4+BMbGot02wiKpzWhGUZK6c=
github.com/docker/go-connections v0.7.0 h1:6SsRfJddP22WMrCkj19x9WKjEDTB+ahsdiGYf0mN39c=
github.com/docker/go-connections v0.7.0/go.mod h1:no1qkHdjq7kLMGUXYAduOhYPSJxxvgWBh7ogVvptn3Q=
github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8=
@@ -467,8 +467,8 @@ github.com/kisielk/errcheck v1.9.0/go.mod h1:kQxWMMVZgIkDq7U8xtG/n2juOjbLgZtedi0
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kkHAIKE/contextcheck v1.1.6 h1:7HIyRcnyzxL9Lz06NGhiKvenXq7Zw6Q0UQu/ttjfJCE=
github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg=
-github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE=
-github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
+github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao=
+github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -546,8 +546,8 @@ github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e h1:Qa6dnn8Dla
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e/go.mod h1:waEya8ee1Ro/lgxpVhkJI4BVASzkm3UZqkx/cFJiYHM=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/moby/buildkit v0.29.0 h1:wxLEFbCOJntEDjSNNN2YWd8zxltZxT5muDQ0LzpbtpU=
-github.com/moby/buildkit v0.29.0/go.mod h1:Dmv2FeDe34t75QuzeU87rBoZpAAkcpT5zeu4hXzmASc=
+github.com/moby/buildkit v0.30.0 h1:OsK8T3BaYH52UNStpKd7gytDtHWWt2Fawak/lAPWatU=
+github.com/moby/buildkit v0.30.0/go.mod h1:k2wuw5ddaOqzh58RLt+mBn2XhK34gi6+gd0faONQ1xU=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/go-archive v0.2.0 h1:zg5QDUM2mi0JIM9fdQZWC7U8+2ZfixfTYoHL7rWUcP8=
@@ -835,8 +835,8 @@ go.augendre.info/fatcontext v0.9.0 h1:Gt5jGD4Zcj8CDMVzjOJITlSb9cEch54hjRRlN3qDoj
go.augendre.info/fatcontext v0.9.0/go.mod h1:L94brOAT1OOUNue6ph/2HnwxoNlds9aXDF2FcUntbNw=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 h1:CqXxU8VOmDefoh0+ztfGaymYbhdB/tT3zs79QaZTNGY=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0/go.mod h1:BuhAPThV8PBHBvg8ZzZ/Ok3idOdhWIodywz2xEcRbJo=
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
@@ -869,8 +869,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
-golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI=
-golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8=
+golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
+golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJkhzJCK5J6kUi1NTVXfM=
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80=
golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
@@ -905,8 +905,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
-golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=
-golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=
+golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w=
+golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -949,8 +949,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
-golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
+golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
+golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
@@ -985,8 +985,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
-golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c=
-golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI=
+golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8=
+golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0=
golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM=
golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY=
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM=
diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file.go b/vendor/github.com/docker/cli/cli/config/configfile/file.go
index 1a0e5b46..26e148f0 100644
--- a/vendor/github.com/docker/cli/cli/config/configfile/file.go
+++ b/vendor/github.com/docker/cli/cli/config/configfile/file.go
@@ -20,6 +20,34 @@ import (
"github.com/sirupsen/logrus"
)
+// authConfigKey is the key used to store credentials for Docker Hub. It is
+// a copy of [registry.IndexServer].
+//
+// [registry.IndexServer]: https://pkg.go.dev/github.com/docker/docker@v28.5.1+incompatible/registry#IndexServer
+const authConfigKey = "https://index.docker.io/v1/"
+
+// getAuthConfigKey returns the canonical key used to look up stored
+// registry credentials for the given registry domain.
+//
+// For the official Docker Hub registry ("docker.io"), credentials are stored
+// under the historical full index address ("https://index.docker.io/v1/").
+//
+// For all other registries, the input is domainName to already be a normalized
+// hostname (optionally including ":port") and is returned unchanged.
+//
+// This function performs key normalization only; it does not validate or parse
+// the input.
+//
+// It is similar to [registry.GetAuthConfigKey] in the daemon.
+//
+// [registry.GetAuthConfigKey]: https://pkg.go.dev/github.com/docker/docker@v28.5.1+incompatible/registry#GetAuthConfigKey
+func getAuthConfigKey(domainName string) string {
+ if domainName == "docker.io" || domainName == "index.docker.io" {
+ return authConfigKey
+ }
+ return domainName
+}
+
// ConfigFile ~/.docker/config.json file info
type ConfigFile struct {
AuthConfigs map[string]types.AuthConfig `json:"auths"`
@@ -96,12 +124,12 @@ func New(fn string) *ConfigFile {
// LoadFromReader reads the configuration data given and sets up the auth config
// information with given directory and populates the receiver object
-func (configFile *ConfigFile) LoadFromReader(configData io.Reader) error {
- if err := json.NewDecoder(configData).Decode(configFile); err != nil && !errors.Is(err, io.EOF) {
+func (c *ConfigFile) LoadFromReader(configData io.Reader) error {
+ if err := json.NewDecoder(configData).Decode(c); err != nil && !errors.Is(err, io.EOF) {
return err
}
var err error
- for addr, ac := range configFile.AuthConfigs {
+ for addr, ac := range c.AuthConfigs {
if ac.Auth != "" {
ac.Username, ac.Password, err = decodeAuth(ac.Auth)
if err != nil {
@@ -110,33 +138,33 @@ func (configFile *ConfigFile) LoadFromReader(configData io.Reader) error {
}
ac.Auth = ""
ac.ServerAddress = addr
- configFile.AuthConfigs[addr] = ac
+ c.AuthConfigs[addr] = ac
}
return nil
}
// ContainsAuth returns whether there is authentication configured
// in this file or not.
-func (configFile *ConfigFile) ContainsAuth() bool {
- return configFile.CredentialsStore != "" ||
- len(configFile.CredentialHelpers) > 0 ||
- len(configFile.AuthConfigs) > 0
+func (c *ConfigFile) ContainsAuth() bool {
+ return c.CredentialsStore != "" ||
+ len(c.CredentialHelpers) > 0 ||
+ len(c.AuthConfigs) > 0
}
// GetAuthConfigs returns the mapping of repo to auth configuration
-func (configFile *ConfigFile) GetAuthConfigs() map[string]types.AuthConfig {
- if configFile.AuthConfigs == nil {
- configFile.AuthConfigs = make(map[string]types.AuthConfig)
+func (c *ConfigFile) GetAuthConfigs() map[string]types.AuthConfig {
+ if c.AuthConfigs == nil {
+ c.AuthConfigs = make(map[string]types.AuthConfig)
}
- return configFile.AuthConfigs
+ return c.AuthConfigs
}
// SaveToWriter encodes and writes out all the authorization information to
// the given writer
-func (configFile *ConfigFile) SaveToWriter(writer io.Writer) error {
+func (c *ConfigFile) SaveToWriter(writer io.Writer) error {
// Encode sensitive data into a new/temp struct
- tmpAuthConfigs := make(map[string]types.AuthConfig, len(configFile.AuthConfigs))
- for k, authConfig := range configFile.AuthConfigs {
+ tmpAuthConfigs := make(map[string]types.AuthConfig, len(c.AuthConfigs))
+ for k, authConfig := range c.AuthConfigs {
authCopy := authConfig
// encode and save the authstring, while blanking out the original fields
authCopy.Auth = encodeAuth(&authCopy)
@@ -146,18 +174,18 @@ func (configFile *ConfigFile) SaveToWriter(writer io.Writer) error {
tmpAuthConfigs[k] = authCopy
}
- saveAuthConfigs := configFile.AuthConfigs
- configFile.AuthConfigs = tmpAuthConfigs
- defer func() { configFile.AuthConfigs = saveAuthConfigs }()
+ saveAuthConfigs := c.AuthConfigs
+ c.AuthConfigs = tmpAuthConfigs
+ defer func() { c.AuthConfigs = saveAuthConfigs }()
// User-Agent header is automatically set, and should not be stored in the configuration
- for v := range configFile.HTTPHeaders {
+ for v := range c.HTTPHeaders {
if strings.EqualFold(v, "User-Agent") {
- delete(configFile.HTTPHeaders, v)
+ delete(c.HTTPHeaders, v)
}
}
- data, err := json.MarshalIndent(configFile, "", "\t")
+ data, err := json.MarshalIndent(c, "", "\t")
if err != nil {
return err
}
@@ -166,16 +194,16 @@ func (configFile *ConfigFile) SaveToWriter(writer io.Writer) error {
}
// Save encodes and writes out all the authorization information
-func (configFile *ConfigFile) Save() (retErr error) {
- if configFile.Filename == "" {
+func (c *ConfigFile) Save() (retErr error) {
+ if c.Filename == "" {
return errors.New("can't save config with empty filename")
}
- dir := filepath.Dir(configFile.Filename)
+ dir := filepath.Dir(c.Filename)
if err := os.MkdirAll(dir, 0o700); err != nil {
return err
}
- temp, err := os.CreateTemp(dir, filepath.Base(configFile.Filename))
+ temp, err := os.CreateTemp(dir, filepath.Base(c.Filename))
if err != nil {
return err
}
@@ -189,7 +217,7 @@ func (configFile *ConfigFile) Save() (retErr error) {
}
}()
- err = configFile.SaveToWriter(temp)
+ err = c.SaveToWriter(temp)
if err != nil {
return err
}
@@ -199,7 +227,7 @@ func (configFile *ConfigFile) Save() (retErr error) {
}
// Handle situation where the configfile is a symlink, and allow for dangling symlinks
- cfgFile := configFile.Filename
+ cfgFile := c.Filename
if f, err := filepath.EvalSymlinks(cfgFile); err == nil {
cfgFile = f
} else if os.IsNotExist(err) {
@@ -217,16 +245,16 @@ func (configFile *ConfigFile) Save() (retErr error) {
// ParseProxyConfig computes proxy configuration by retrieving the config for the provided host and
// then checking this against any environment variables provided to the container
-func (configFile *ConfigFile) ParseProxyConfig(host string, runOpts map[string]*string) map[string]*string {
+func (c *ConfigFile) ParseProxyConfig(host string, runOpts map[string]*string) map[string]*string {
var cfgKey string
- if _, ok := configFile.Proxies[host]; !ok {
+ if _, ok := c.Proxies[host]; !ok {
cfgKey = "default"
} else {
cfgKey = host
}
- config := configFile.Proxies[cfgKey]
+ config := c.Proxies[cfgKey]
permitted := map[string]*string{
"HTTP_PROXY": &config.HTTPProxy,
"HTTPS_PROXY": &config.HTTPSProxy,
@@ -290,11 +318,11 @@ func decodeAuth(authStr string) (string, string, error) {
// GetCredentialsStore returns a new credentials store from the settings in the
// configuration file
-func (configFile *ConfigFile) GetCredentialsStore(registryHostname string) credentials.Store {
- store := credentials.NewFileStore(configFile)
+func (c *ConfigFile) GetCredentialsStore(registryHostname string) credentials.Store {
+ store := credentials.NewFileStore(c)
- if helper := getConfiguredCredentialStore(configFile, registryHostname); helper != "" {
- store = newNativeStore(configFile, helper)
+ if helper := getConfiguredCredentialStore(c, getAuthConfigKey(registryHostname)); helper != "" {
+ store = newNativeStore(c, helper)
}
envConfig := os.Getenv(DockerEnvConfigKey)
@@ -357,8 +385,9 @@ var newNativeStore = func(configFile *ConfigFile, helperSuffix string) credentia
}
// GetAuthConfig for a repository from the credential store
-func (configFile *ConfigFile) GetAuthConfig(registryHostname string) (types.AuthConfig, error) {
- return configFile.GetCredentialsStore(registryHostname).Get(registryHostname)
+func (c *ConfigFile) GetAuthConfig(registryHostname string) (types.AuthConfig, error) {
+ acKey := getAuthConfigKey(registryHostname)
+ return c.GetCredentialsStore(acKey).Get(acKey)
}
// getConfiguredCredentialStore returns the credential helper configured for the
@@ -375,13 +404,13 @@ func getConfiguredCredentialStore(c *ConfigFile, registryHostname string) string
// GetAllCredentials returns all of the credentials stored in all of the
// configured credential stores.
-func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig, error) {
+func (c *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig, error) {
auths := make(map[string]types.AuthConfig)
addAll := func(from map[string]types.AuthConfig) {
maps.Copy(auths, from)
}
- defaultStore := configFile.GetCredentialsStore("")
+ defaultStore := c.GetCredentialsStore("")
newAuths, err := defaultStore.GetAll()
if err != nil {
return nil, err
@@ -389,8 +418,8 @@ func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig,
addAll(newAuths)
// Auth configs from a registry-specific helper should override those from the default store.
- for registryHostname := range configFile.CredentialHelpers {
- newAuth, err := configFile.GetAuthConfig(registryHostname)
+ for registryHostname := range c.CredentialHelpers {
+ newAuth, err := c.GetAuthConfig(registryHostname)
if err != nil {
// TODO(thaJeztah): use context-logger, so that this output can be suppressed (in tests).
logrus.WithError(err).Warnf("Failed to get credentials for registry: %s", registryHostname)
@@ -402,16 +431,16 @@ func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig,
}
// GetFilename returns the file name that this config file is based on.
-func (configFile *ConfigFile) GetFilename() string {
- return configFile.Filename
+func (c *ConfigFile) GetFilename() string {
+ return c.Filename
}
// PluginConfig retrieves the requested option for the given plugin.
-func (configFile *ConfigFile) PluginConfig(pluginname, option string) (string, bool) {
- if configFile.Plugins == nil {
+func (c *ConfigFile) PluginConfig(pluginname, option string) (string, bool) {
+ if c.Plugins == nil {
return "", false
}
- pluginConfig, ok := configFile.Plugins[pluginname]
+ pluginConfig, ok := c.Plugins[pluginname]
if !ok {
return "", false
}
@@ -423,14 +452,14 @@ func (configFile *ConfigFile) PluginConfig(pluginname, option string) (string, b
// plugin. Passing a value of "" will remove the option. If removing
// the final config item for a given plugin then also cleans up the
// overall plugin entry.
-func (configFile *ConfigFile) SetPluginConfig(pluginname, option, value string) {
- if configFile.Plugins == nil {
- configFile.Plugins = make(map[string]map[string]string)
+func (c *ConfigFile) SetPluginConfig(pluginname, option, value string) {
+ if c.Plugins == nil {
+ c.Plugins = make(map[string]map[string]string)
}
- pluginConfig, ok := configFile.Plugins[pluginname]
+ pluginConfig, ok := c.Plugins[pluginname]
if !ok {
pluginConfig = make(map[string]string)
- configFile.Plugins[pluginname] = pluginConfig
+ c.Plugins[pluginname] = pluginConfig
}
if value != "" {
pluginConfig[option] = value
@@ -438,6 +467,6 @@ func (configFile *ConfigFile) SetPluginConfig(pluginname, option, value string)
delete(pluginConfig, option)
}
if len(pluginConfig) == 0 {
- delete(configFile.Plugins, pluginname)
+ delete(c.Plugins, pluginname)
}
}
diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store.go
index a36afc41..35b9ae4f 100644
--- a/vendor/github.com/docker/cli/cli/config/credentials/default_store.go
+++ b/vendor/github.com/docker/cli/cli/config/credentials/default_store.go
@@ -2,12 +2,19 @@ package credentials
import "os/exec"
-// DetectDefaultStore return the default credentials store for the platform if
-// no user-defined store is passed, and the store executable is available.
-func DetectDefaultStore(store string) string {
- if store != "" {
+// DetectDefaultStore returns the credentials store to use if no user-defined
+// custom helper is passed.
+//
+// Some platforms define a preferred helper, in which case it attempts to look
+// up the helper binary before falling back to the platform's default.
+//
+// If no user-defined helper is passed, and no helper is found, it returns an
+// empty string, which means credentials are stored unencrypted in the CLI's
+// config-file without the use of a credentials store.
+func DetectDefaultStore(customStore string) string {
+ if customStore != "" {
// use user-defined
- return store
+ return customStore
}
platformDefault := defaultCredentialsStore()
diff --git a/vendor/github.com/klauspost/compress/.gitattributes b/vendor/github.com/klauspost/compress/.gitattributes
index 40243359..57aa6487 100644
--- a/vendor/github.com/klauspost/compress/.gitattributes
+++ b/vendor/github.com/klauspost/compress/.gitattributes
@@ -1,2 +1,3 @@
* -text
*.bin -text -diff
+*.md text eol=lf
diff --git a/vendor/github.com/klauspost/compress/README.md b/vendor/github.com/klauspost/compress/README.md
index e839fe9c..fb023f2c 100644
--- a/vendor/github.com/klauspost/compress/README.md
+++ b/vendor/github.com/klauspost/compress/README.md
@@ -1,700 +1,700 @@
-# compress
-
-This package provides various compression algorithms.
-
-* [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and decompression in pure Go.
-* [S2](https://github.com/klauspost/compress/tree/master/s2#s2-compression) is a high performance replacement for Snappy.
-* Optimized [deflate](https://godoc.org/github.com/klauspost/compress/flate) packages which can be used as a dropin replacement for [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip) and [zlib](https://godoc.org/github.com/klauspost/compress/zlib).
-* [snappy](https://github.com/klauspost/compress/tree/master/snappy) is a drop-in replacement for `github.com/golang/snappy` offering better compression and concurrent streams.
-* [huff0](https://github.com/klauspost/compress/tree/master/huff0) and [FSE](https://github.com/klauspost/compress/tree/master/fse) implementations for raw entropy encoding.
-* [gzhttp](https://github.com/klauspost/compress/tree/master/gzhttp) Provides client and server wrappers for handling gzipped/zstd HTTP requests efficiently.
-* [pgzip](https://github.com/klauspost/pgzip) is a separate package that provides a very fast parallel gzip implementation.
-
-[](https://pkg.go.dev/github.com/klauspost/compress?tab=subdirectories)
-[](https://github.com/klauspost/compress/actions/workflows/go.yml)
-[](https://sourcegraph.com/github.com/klauspost/compress?badge)
-
-# package usage
-
-Use `go get github.com/klauspost/compress@latest` to add it to your project.
-
-This package will support the current Go version and 2 versions back.
-
-* Use the `nounsafe` tag to disable all use of the "unsafe" package.
-* Use the `noasm` tag to disable all assembly across packages.
-
-Use the links above for more information on each.
-
-# changelog
-
-* Feb 9th, 2026 [1.18.4](https://github.com/klauspost/compress/releases/tag/v1.18.4)
- * gzhttp: Add zstandard to server handler wrapper https://github.com/klauspost/compress/pull/1121
- * zstd: Add ResetWithOptions to encoder/decoder https://github.com/klauspost/compress/pull/1122
- * gzhttp: preserve qvalue when extra parameters follow in Accept-Encoding by @analytically in https://github.com/klauspost/compress/pull/1116
-
-* Jan 16th, 2026 [1.18.3](https://github.com/klauspost/compress/releases/tag/v1.18.3)
- * Downstream CVE-2025-61728. See [golang/go#77102](https://github.com/golang/go/issues/77102).
-
-* Dec 1st, 2025 - [1.18.2](https://github.com/klauspost/compress/releases/tag/v1.18.2)
- * flate: Fix invalid encoding on level 9 with single value input in https://github.com/klauspost/compress/pull/1115
- * flate: reduce stateless allocations by @RXamzin in https://github.com/klauspost/compress/pull/1106
-
-* Oct 20, 2025 - [1.18.1](https://github.com/klauspost/compress/releases/tag/v1.18.1) - RETRACTED
- * zstd: Add simple zstd EncodeTo/DecodeTo functions https://github.com/klauspost/compress/pull/1079
- * zstd: Fix incorrect buffer size in dictionary encodes https://github.com/klauspost/compress/pull/1059
- * s2: check for cap, not len of buffer in EncodeBetter/Best by @vdarulis in https://github.com/klauspost/compress/pull/1080
- * zlib: Avoiding extra allocation in zlib.reader.Reset by @travelpolicy in https://github.com/klauspost/compress/pull/1086
- * gzhttp: remove redundant err check in zstdReader by @ryanfowler in https://github.com/klauspost/compress/pull/1090
- * flate: Faster load+store https://github.com/klauspost/compress/pull/1104
- * flate: Simplify matchlen https://github.com/klauspost/compress/pull/1101
- * flate: Use exact sizes for huffman tables https://github.com/klauspost/compress/pull/1103
-
-* Feb 19th, 2025 - [1.18.0](https://github.com/klauspost/compress/releases/tag/v1.18.0)
- * Add unsafe little endian loaders https://github.com/klauspost/compress/pull/1036
- * fix: check `r.err != nil` but return a nil value error `err` by @alingse in https://github.com/klauspost/compress/pull/1028
- * flate: Simplify L4-6 loading https://github.com/klauspost/compress/pull/1043
- * flate: Simplify matchlen (remove asm) https://github.com/klauspost/compress/pull/1045
- * s2: Improve small block compression speed w/o asm https://github.com/klauspost/compress/pull/1048
- * flate: Fix matchlen L5+L6 https://github.com/klauspost/compress/pull/1049
- * flate: Cleanup & reduce casts https://github.com/klauspost/compress/pull/1050
-
-
- See changes to v1.17.x
-
-* Oct 11th, 2024 - [1.17.11](https://github.com/klauspost/compress/releases/tag/v1.17.11)
- * zstd: Fix extra CRC written with multiple Close calls https://github.com/klauspost/compress/pull/1017
- * s2: Don't use stack for index tables https://github.com/klauspost/compress/pull/1014
- * gzhttp: No content-type on no body response code by @juliens in https://github.com/klauspost/compress/pull/1011
- * gzhttp: Do not set the content-type when response has no body by @kevinpollet in https://github.com/klauspost/compress/pull/1013
-
-* Sep 23rd, 2024 - [1.17.10](https://github.com/klauspost/compress/releases/tag/v1.17.10)
- * gzhttp: Add TransportAlwaysDecompress option. https://github.com/klauspost/compress/pull/978
- * gzhttp: Add supported decompress request body by @mirecl in https://github.com/klauspost/compress/pull/1002
- * s2: Add EncodeBuffer buffer recycling callback https://github.com/klauspost/compress/pull/982
- * zstd: Improve memory usage on small streaming encodes https://github.com/klauspost/compress/pull/1007
- * flate: read data written with partial flush by @vajexal in https://github.com/klauspost/compress/pull/996
-
-* Jun 12th, 2024 - [1.17.9](https://github.com/klauspost/compress/releases/tag/v1.17.9)
- * s2: Reduce ReadFrom temporary allocations https://github.com/klauspost/compress/pull/949
- * flate, zstd: Shave some bytes off amd64 matchLen by @greatroar in https://github.com/klauspost/compress/pull/963
- * Upgrade zip/zlib to 1.22.4 upstream https://github.com/klauspost/compress/pull/970 https://github.com/klauspost/compress/pull/971
- * zstd: BuildDict fails with RLE table https://github.com/klauspost/compress/pull/951
-
-* Apr 9th, 2024 - [1.17.8](https://github.com/klauspost/compress/releases/tag/v1.17.8)
- * zstd: Reject blocks where reserved values are not 0 https://github.com/klauspost/compress/pull/885
- * zstd: Add RLE detection+encoding https://github.com/klauspost/compress/pull/938
-
-* Feb 21st, 2024 - [1.17.7](https://github.com/klauspost/compress/releases/tag/v1.17.7)
- * s2: Add AsyncFlush method: Complete the block without flushing by @Jille in https://github.com/klauspost/compress/pull/927
- * s2: Fix literal+repeat exceeds dst crash https://github.com/klauspost/compress/pull/930
-
-* Feb 5th, 2024 - [1.17.6](https://github.com/klauspost/compress/releases/tag/v1.17.6)
- * zstd: Fix incorrect repeat coding in best mode https://github.com/klauspost/compress/pull/923
- * s2: Fix DecodeConcurrent deadlock on errors https://github.com/klauspost/compress/pull/925
-
-* Jan 26th, 2024 - [v1.17.5](https://github.com/klauspost/compress/releases/tag/v1.17.5)
- * flate: Fix reset with dictionary on custom window encodes https://github.com/klauspost/compress/pull/912
- * zstd: Add Frame header encoding and stripping https://github.com/klauspost/compress/pull/908
- * zstd: Limit better/best default window to 8MB https://github.com/klauspost/compress/pull/913
- * zstd: Speed improvements by @greatroar in https://github.com/klauspost/compress/pull/896 https://github.com/klauspost/compress/pull/910
- * s2: Fix callbacks for skippable blocks and disallow 0xfe (Padding) by @Jille in https://github.com/klauspost/compress/pull/916 https://github.com/klauspost/compress/pull/917
-https://github.com/klauspost/compress/pull/919 https://github.com/klauspost/compress/pull/918
-
-* Dec 1st, 2023 - [v1.17.4](https://github.com/klauspost/compress/releases/tag/v1.17.4)
- * huff0: Speed up symbol counting by @greatroar in https://github.com/klauspost/compress/pull/887
- * huff0: Remove byteReader by @greatroar in https://github.com/klauspost/compress/pull/886
- * gzhttp: Allow overriding decompression on transport https://github.com/klauspost/compress/pull/892
- * gzhttp: Clamp compression level https://github.com/klauspost/compress/pull/890
- * gzip: Error out if reserved bits are set https://github.com/klauspost/compress/pull/891
-
-* Nov 15th, 2023 - [v1.17.3](https://github.com/klauspost/compress/releases/tag/v1.17.3)
- * fse: Fix max header size https://github.com/klauspost/compress/pull/881
- * zstd: Improve better/best compression https://github.com/klauspost/compress/pull/877
- * gzhttp: Fix missing content type on Close https://github.com/klauspost/compress/pull/883
-
-* Oct 22nd, 2023 - [v1.17.2](https://github.com/klauspost/compress/releases/tag/v1.17.2)
- * zstd: Fix rare *CORRUPTION* output in "best" mode. See https://github.com/klauspost/compress/pull/876
-
-* Oct 14th, 2023 - [v1.17.1](https://github.com/klauspost/compress/releases/tag/v1.17.1)
- * s2: Fix S2 "best" dictionary wrong encoding https://github.com/klauspost/compress/pull/871
- * flate: Reduce allocations in decompressor and minor code improvements by @fakefloordiv in https://github.com/klauspost/compress/pull/869
- * s2: Fix EstimateBlockSize on 6&7 length input https://github.com/klauspost/compress/pull/867
-
-* Sept 19th, 2023 - [v1.17.0](https://github.com/klauspost/compress/releases/tag/v1.17.0)
- * Add experimental dictionary builder https://github.com/klauspost/compress/pull/853
- * Add xerial snappy read/writer https://github.com/klauspost/compress/pull/838
- * flate: Add limited window compression https://github.com/klauspost/compress/pull/843
- * s2: Do 2 overlapping match checks https://github.com/klauspost/compress/pull/839
- * flate: Add amd64 assembly matchlen https://github.com/klauspost/compress/pull/837
- * gzip: Copy bufio.Reader on Reset by @thatguystone in https://github.com/klauspost/compress/pull/860
-
-
-
- See changes to v1.16.x
-
-
-* July 1st, 2023 - [v1.16.7](https://github.com/klauspost/compress/releases/tag/v1.16.7)
- * zstd: Fix default level first dictionary encode https://github.com/klauspost/compress/pull/829
- * s2: add GetBufferCapacity() method by @GiedriusS in https://github.com/klauspost/compress/pull/832
-
-* June 13, 2023 - [v1.16.6](https://github.com/klauspost/compress/releases/tag/v1.16.6)
- * zstd: correctly ignore WithEncoderPadding(1) by @ianlancetaylor in https://github.com/klauspost/compress/pull/806
- * zstd: Add amd64 match length assembly https://github.com/klauspost/compress/pull/824
- * gzhttp: Handle informational headers by @rtribotte in https://github.com/klauspost/compress/pull/815
- * s2: Improve Better compression slightly https://github.com/klauspost/compress/pull/663
-
-* Apr 16, 2023 - [v1.16.5](https://github.com/klauspost/compress/releases/tag/v1.16.5)
- * zstd: readByte needs to use io.ReadFull by @jnoxon in https://github.com/klauspost/compress/pull/802
- * gzip: Fix WriterTo after initial read https://github.com/klauspost/compress/pull/804
-
-* Apr 5, 2023 - [v1.16.4](https://github.com/klauspost/compress/releases/tag/v1.16.4)
- * zstd: Improve zstd best efficiency by @greatroar and @klauspost in https://github.com/klauspost/compress/pull/784
- * zstd: Respect WithAllLitEntropyCompression https://github.com/klauspost/compress/pull/792
- * zstd: Fix amd64 not always detecting corrupt data https://github.com/klauspost/compress/pull/785
- * zstd: Various minor improvements by @greatroar in https://github.com/klauspost/compress/pull/788 https://github.com/klauspost/compress/pull/794 https://github.com/klauspost/compress/pull/795
- * s2: Fix huge block overflow https://github.com/klauspost/compress/pull/779
- * s2: Allow CustomEncoder fallback https://github.com/klauspost/compress/pull/780
- * gzhttp: Support ResponseWriter Unwrap() in gzhttp handler by @jgimenez in https://github.com/klauspost/compress/pull/799
-
-* Mar 13, 2023 - [v1.16.1](https://github.com/klauspost/compress/releases/tag/v1.16.1)
- * zstd: Speed up + improve best encoder by @greatroar in https://github.com/klauspost/compress/pull/776
- * gzhttp: Add optional [BREACH mitigation](https://github.com/klauspost/compress/tree/master/gzhttp#breach-mitigation). https://github.com/klauspost/compress/pull/762 https://github.com/klauspost/compress/pull/768 https://github.com/klauspost/compress/pull/769 https://github.com/klauspost/compress/pull/770 https://github.com/klauspost/compress/pull/767
- * s2: Add Intel LZ4s converter https://github.com/klauspost/compress/pull/766
- * zstd: Minor bug fixes https://github.com/klauspost/compress/pull/771 https://github.com/klauspost/compress/pull/772 https://github.com/klauspost/compress/pull/773
- * huff0: Speed up compress1xDo by @greatroar in https://github.com/klauspost/compress/pull/774
-
-* Feb 26, 2023 - [v1.16.0](https://github.com/klauspost/compress/releases/tag/v1.16.0)
- * s2: Add [Dictionary](https://github.com/klauspost/compress/tree/master/s2#dictionaries) support. https://github.com/klauspost/compress/pull/685
- * s2: Add Compression Size Estimate. https://github.com/klauspost/compress/pull/752
- * s2: Add support for custom stream encoder. https://github.com/klauspost/compress/pull/755
- * s2: Add LZ4 block converter. https://github.com/klauspost/compress/pull/748
- * s2: Support io.ReaderAt in ReadSeeker. https://github.com/klauspost/compress/pull/747
- * s2c/s2sx: Use concurrent decoding. https://github.com/klauspost/compress/pull/746
-
-
-
- See changes to v1.15.x
-
-* Jan 21st, 2023 (v1.15.15)
- * deflate: Improve level 7-9 https://github.com/klauspost/compress/pull/739
- * zstd: Add delta encoding support by @greatroar in https://github.com/klauspost/compress/pull/728
- * zstd: Various speed improvements by @greatroar https://github.com/klauspost/compress/pull/741 https://github.com/klauspost/compress/pull/734 https://github.com/klauspost/compress/pull/736 https://github.com/klauspost/compress/pull/744 https://github.com/klauspost/compress/pull/743 https://github.com/klauspost/compress/pull/745
- * gzhttp: Add SuffixETag() and DropETag() options to prevent ETag collisions on compressed responses by @willbicks in https://github.com/klauspost/compress/pull/740
-
-* Jan 3rd, 2023 (v1.15.14)
-
- * flate: Improve speed in big stateless blocks https://github.com/klauspost/compress/pull/718
- * zstd: Minor speed tweaks by @greatroar in https://github.com/klauspost/compress/pull/716 https://github.com/klauspost/compress/pull/720
- * export NoGzipResponseWriter for custom ResponseWriter wrappers by @harshavardhana in https://github.com/klauspost/compress/pull/722
- * s2: Add example for indexing and existing stream https://github.com/klauspost/compress/pull/723
-
-* Dec 11, 2022 (v1.15.13)
- * zstd: Add [MaxEncodedSize](https://pkg.go.dev/github.com/klauspost/compress@v1.15.13/zstd#Encoder.MaxEncodedSize) to encoder https://github.com/klauspost/compress/pull/691
- * zstd: Various tweaks and improvements https://github.com/klauspost/compress/pull/693 https://github.com/klauspost/compress/pull/695 https://github.com/klauspost/compress/pull/696 https://github.com/klauspost/compress/pull/701 https://github.com/klauspost/compress/pull/702 https://github.com/klauspost/compress/pull/703 https://github.com/klauspost/compress/pull/704 https://github.com/klauspost/compress/pull/705 https://github.com/klauspost/compress/pull/706 https://github.com/klauspost/compress/pull/707 https://github.com/klauspost/compress/pull/708
-
-* Oct 26, 2022 (v1.15.12)
-
- * zstd: Tweak decoder allocs. https://github.com/klauspost/compress/pull/680
- * gzhttp: Always delete `HeaderNoCompression` https://github.com/klauspost/compress/pull/683
-
-* Sept 26, 2022 (v1.15.11)
-
- * flate: Improve level 1-3 compression https://github.com/klauspost/compress/pull/678
- * zstd: Improve "best" compression by @nightwolfz in https://github.com/klauspost/compress/pull/677
- * zstd: Fix+reduce decompression allocations https://github.com/klauspost/compress/pull/668
- * zstd: Fix non-effective noescape tag https://github.com/klauspost/compress/pull/667
-
-* Sept 16, 2022 (v1.15.10)
-
- * zstd: Add [WithDecodeAllCapLimit](https://pkg.go.dev/github.com/klauspost/compress@v1.15.10/zstd#WithDecodeAllCapLimit) https://github.com/klauspost/compress/pull/649
- * Add Go 1.19 - deprecate Go 1.16 https://github.com/klauspost/compress/pull/651
- * flate: Improve level 5+6 compression https://github.com/klauspost/compress/pull/656
- * zstd: Improve "better" compression https://github.com/klauspost/compress/pull/657
- * s2: Improve "best" compression https://github.com/klauspost/compress/pull/658
- * s2: Improve "better" compression. https://github.com/klauspost/compress/pull/635
- * s2: Slightly faster non-assembly decompression https://github.com/klauspost/compress/pull/646
- * Use arrays for constant size copies https://github.com/klauspost/compress/pull/659
-
-* July 21, 2022 (v1.15.9)
-
- * zstd: Fix decoder crash on amd64 (no BMI) on invalid input https://github.com/klauspost/compress/pull/645
- * zstd: Disable decoder extended memory copies (amd64) due to possible crashes https://github.com/klauspost/compress/pull/644
- * zstd: Allow single segments up to "max decoded size" https://github.com/klauspost/compress/pull/643
-
-* July 13, 2022 (v1.15.8)
-
- * gzip: fix stack exhaustion bug in Reader.Read https://github.com/klauspost/compress/pull/641
- * s2: Add Index header trim/restore https://github.com/klauspost/compress/pull/638
- * zstd: Optimize seqdeq amd64 asm by @greatroar in https://github.com/klauspost/compress/pull/636
- * zstd: Improve decoder memcopy https://github.com/klauspost/compress/pull/637
- * huff0: Pass a single bitReader pointer to asm by @greatroar in https://github.com/klauspost/compress/pull/634
- * zstd: Branchless getBits for amd64 w/o BMI2 by @greatroar in https://github.com/klauspost/compress/pull/640
- * gzhttp: Remove header before writing https://github.com/klauspost/compress/pull/639
-
-* June 29, 2022 (v1.15.7)
-
- * s2: Fix absolute forward seeks https://github.com/klauspost/compress/pull/633
- * zip: Merge upstream https://github.com/klauspost/compress/pull/631
- * zip: Re-add zip64 fix https://github.com/klauspost/compress/pull/624
- * zstd: translate fseDecoder.buildDtable into asm by @WojciechMula in https://github.com/klauspost/compress/pull/598
- * flate: Faster histograms https://github.com/klauspost/compress/pull/620
- * deflate: Use compound hcode https://github.com/klauspost/compress/pull/622
-
-* June 3, 2022 (v1.15.6)
- * s2: Improve coding for long, close matches https://github.com/klauspost/compress/pull/613
- * s2c: Add Snappy/S2 stream recompression https://github.com/klauspost/compress/pull/611
- * zstd: Always use configured block size https://github.com/klauspost/compress/pull/605
- * zstd: Fix incorrect hash table placement for dict encoding in default https://github.com/klauspost/compress/pull/606
- * zstd: Apply default config to ZipDecompressor without options https://github.com/klauspost/compress/pull/608
- * gzhttp: Exclude more common archive formats https://github.com/klauspost/compress/pull/612
- * s2: Add ReaderIgnoreCRC https://github.com/klauspost/compress/pull/609
- * s2: Remove sanity load on index creation https://github.com/klauspost/compress/pull/607
- * snappy: Use dedicated function for scoring https://github.com/klauspost/compress/pull/614
- * s2c+s2d: Use official snappy framed extension https://github.com/klauspost/compress/pull/610
-
-* May 25, 2022 (v1.15.5)
- * s2: Add concurrent stream decompression https://github.com/klauspost/compress/pull/602
- * s2: Fix final emit oob read crash on amd64 https://github.com/klauspost/compress/pull/601
- * huff0: asm implementation of Decompress1X by @WojciechMula https://github.com/klauspost/compress/pull/596
- * zstd: Use 1 less goroutine for stream decoding https://github.com/klauspost/compress/pull/588
- * zstd: Copy literal in 16 byte blocks when possible https://github.com/klauspost/compress/pull/592
- * zstd: Speed up when WithDecoderLowmem(false) https://github.com/klauspost/compress/pull/599
- * zstd: faster next state update in BMI2 version of decode by @WojciechMula in https://github.com/klauspost/compress/pull/593
- * huff0: Do not check max size when reading table. https://github.com/klauspost/compress/pull/586
- * flate: Inplace hashing for level 7-9 https://github.com/klauspost/compress/pull/590
-
-
-* May 11, 2022 (v1.15.4)
- * huff0: decompress directly into output by @WojciechMula in [#577](https://github.com/klauspost/compress/pull/577)
- * inflate: Keep dict on stack [#581](https://github.com/klauspost/compress/pull/581)
- * zstd: Faster decoding memcopy in asm [#583](https://github.com/klauspost/compress/pull/583)
- * zstd: Fix ignored crc [#580](https://github.com/klauspost/compress/pull/580)
-
-* May 5, 2022 (v1.15.3)
- * zstd: Allow to ignore checksum checking by @WojciechMula [#572](https://github.com/klauspost/compress/pull/572)
- * s2: Fix incorrect seek for io.SeekEnd in [#575](https://github.com/klauspost/compress/pull/575)
-
-* Apr 26, 2022 (v1.15.2)
- * zstd: Add x86-64 assembly for decompression on streams and blocks. Contributed by [@WojciechMula](https://github.com/WojciechMula). Typically 2x faster. [#528](https://github.com/klauspost/compress/pull/528) [#531](https://github.com/klauspost/compress/pull/531) [#545](https://github.com/klauspost/compress/pull/545) [#537](https://github.com/klauspost/compress/pull/537)
- * zstd: Add options to ZipDecompressor and fixes [#539](https://github.com/klauspost/compress/pull/539)
- * s2: Use sorted search for index [#555](https://github.com/klauspost/compress/pull/555)
- * Minimum version is Go 1.16, added CI test on 1.18.
-
-* Mar 11, 2022 (v1.15.1)
- * huff0: Add x86 assembly of Decode4X by @WojciechMula in [#512](https://github.com/klauspost/compress/pull/512)
- * zstd: Reuse zip decoders in [#514](https://github.com/klauspost/compress/pull/514)
- * zstd: Detect extra block data and report as corrupted in [#520](https://github.com/klauspost/compress/pull/520)
- * zstd: Handle zero sized frame content size stricter in [#521](https://github.com/klauspost/compress/pull/521)
- * zstd: Add stricter block size checks in [#523](https://github.com/klauspost/compress/pull/523)
-
-* Mar 3, 2022 (v1.15.0)
- * zstd: Refactor decoder [#498](https://github.com/klauspost/compress/pull/498)
- * zstd: Add stream encoding without goroutines [#505](https://github.com/klauspost/compress/pull/505)
- * huff0: Prevent single blocks exceeding 16 bits by @klauspost in[#507](https://github.com/klauspost/compress/pull/507)
- * flate: Inline literal emission [#509](https://github.com/klauspost/compress/pull/509)
- * gzhttp: Add zstd to transport [#400](https://github.com/klauspost/compress/pull/400)
- * gzhttp: Make content-type optional [#510](https://github.com/klauspost/compress/pull/510)
-
-Both compression and decompression now supports "synchronous" stream operations. This means that whenever "concurrency" is set to 1, they will operate without spawning goroutines.
-
-Stream decompression is now faster on asynchronous, since the goroutine allocation much more effectively splits the workload. On typical streams this will typically use 2 cores fully for decompression. When a stream has finished decoding no goroutines will be left over, so decoders can now safely be pooled and still be garbage collected.
-
-While the release has been extensively tested, it is recommended to testing when upgrading.
-
-
-
-
- See changes to v1.14.x
-
-* Feb 22, 2022 (v1.14.4)
- * flate: Fix rare huffman only (-2) corruption. [#503](https://github.com/klauspost/compress/pull/503)
- * zip: Update deprecated CreateHeaderRaw to correctly call CreateRaw by @saracen in [#502](https://github.com/klauspost/compress/pull/502)
- * zip: don't read data descriptor early by @saracen in [#501](https://github.com/klauspost/compress/pull/501) #501
- * huff0: Use static decompression buffer up to 30% faster [#499](https://github.com/klauspost/compress/pull/499) [#500](https://github.com/klauspost/compress/pull/500)
-
-* Feb 17, 2022 (v1.14.3)
- * flate: Improve fastest levels compression speed ~10% more throughput. [#482](https://github.com/klauspost/compress/pull/482) [#489](https://github.com/klauspost/compress/pull/489) [#490](https://github.com/klauspost/compress/pull/490) [#491](https://github.com/klauspost/compress/pull/491) [#494](https://github.com/klauspost/compress/pull/494) [#478](https://github.com/klauspost/compress/pull/478)
- * flate: Faster decompression speed, ~5-10%. [#483](https://github.com/klauspost/compress/pull/483)
- * s2: Faster compression with Go v1.18 and amd64 microarch level 3+. [#484](https://github.com/klauspost/compress/pull/484) [#486](https://github.com/klauspost/compress/pull/486)
-
-* Jan 25, 2022 (v1.14.2)
- * zstd: improve header decoder by @dsnet [#476](https://github.com/klauspost/compress/pull/476)
- * zstd: Add bigger default blocks [#469](https://github.com/klauspost/compress/pull/469)
- * zstd: Remove unused decompression buffer [#470](https://github.com/klauspost/compress/pull/470)
- * zstd: Fix logically dead code by @ningmingxiao [#472](https://github.com/klauspost/compress/pull/472)
- * flate: Improve level 7-9 [#471](https://github.com/klauspost/compress/pull/471) [#473](https://github.com/klauspost/compress/pull/473)
- * zstd: Add noasm tag for xxhash [#475](https://github.com/klauspost/compress/pull/475)
-
-* Jan 11, 2022 (v1.14.1)
- * s2: Add stream index in [#462](https://github.com/klauspost/compress/pull/462)
- * flate: Speed and efficiency improvements in [#439](https://github.com/klauspost/compress/pull/439) [#461](https://github.com/klauspost/compress/pull/461) [#455](https://github.com/klauspost/compress/pull/455) [#452](https://github.com/klauspost/compress/pull/452) [#458](https://github.com/klauspost/compress/pull/458)
- * zstd: Performance improvement in [#420]( https://github.com/klauspost/compress/pull/420) [#456](https://github.com/klauspost/compress/pull/456) [#437](https://github.com/klauspost/compress/pull/437) [#467](https://github.com/klauspost/compress/pull/467) [#468](https://github.com/klauspost/compress/pull/468)
- * zstd: add arm64 xxhash assembly in [#464](https://github.com/klauspost/compress/pull/464)
- * Add garbled for binaries for s2 in [#445](https://github.com/klauspost/compress/pull/445)
-
-
-
- See changes to v1.13.x
-
-* Aug 30, 2021 (v1.13.5)
- * gz/zlib/flate: Alias stdlib errors [#425](https://github.com/klauspost/compress/pull/425)
- * s2: Add block support to commandline tools [#413](https://github.com/klauspost/compress/pull/413)
- * zstd: pooledZipWriter should return Writers to the same pool [#426](https://github.com/klauspost/compress/pull/426)
- * Removed golang/snappy as external dependency for tests [#421](https://github.com/klauspost/compress/pull/421)
-
-* Aug 12, 2021 (v1.13.4)
- * Add [snappy replacement package](https://github.com/klauspost/compress/tree/master/snappy).
- * zstd: Fix incorrect encoding in "best" mode [#415](https://github.com/klauspost/compress/pull/415)
-
-* Aug 3, 2021 (v1.13.3)
- * zstd: Improve Best compression [#404](https://github.com/klauspost/compress/pull/404)
- * zstd: Fix WriteTo error forwarding [#411](https://github.com/klauspost/compress/pull/411)
- * gzhttp: Return http.HandlerFunc instead of http.Handler. Unlikely breaking change. [#406](https://github.com/klauspost/compress/pull/406)
- * s2sx: Fix max size error [#399](https://github.com/klauspost/compress/pull/399)
- * zstd: Add optional stream content size on reset [#401](https://github.com/klauspost/compress/pull/401)
- * zstd: use SpeedBestCompression for level >= 10 [#410](https://github.com/klauspost/compress/pull/410)
-
-* Jun 14, 2021 (v1.13.1)
- * s2: Add full Snappy output support [#396](https://github.com/klauspost/compress/pull/396)
- * zstd: Add configurable [Decoder window](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithDecoderMaxWindow) size [#394](https://github.com/klauspost/compress/pull/394)
- * gzhttp: Add header to skip compression [#389](https://github.com/klauspost/compress/pull/389)
- * s2: Improve speed with bigger output margin [#395](https://github.com/klauspost/compress/pull/395)
-
-* Jun 3, 2021 (v1.13.0)
- * Added [gzhttp](https://github.com/klauspost/compress/tree/master/gzhttp#gzip-handler) which allows wrapping HTTP servers and clients with GZIP compressors.
- * zstd: Detect short invalid signatures [#382](https://github.com/klauspost/compress/pull/382)
- * zstd: Spawn decoder goroutine only if needed. [#380](https://github.com/klauspost/compress/pull/380)
-
-
-
-
- See changes to v1.12.x
-
-* May 25, 2021 (v1.12.3)
- * deflate: Better/faster Huffman encoding [#374](https://github.com/klauspost/compress/pull/374)
- * deflate: Allocate less for history. [#375](https://github.com/klauspost/compress/pull/375)
- * zstd: Forward read errors [#373](https://github.com/klauspost/compress/pull/373)
-
-* Apr 27, 2021 (v1.12.2)
- * zstd: Improve better/best compression [#360](https://github.com/klauspost/compress/pull/360) [#364](https://github.com/klauspost/compress/pull/364) [#365](https://github.com/klauspost/compress/pull/365)
- * zstd: Add helpers to compress/decompress zstd inside zip files [#363](https://github.com/klauspost/compress/pull/363)
- * deflate: Improve level 5+6 compression [#367](https://github.com/klauspost/compress/pull/367)
- * s2: Improve better/best compression [#358](https://github.com/klauspost/compress/pull/358) [#359](https://github.com/klauspost/compress/pull/358)
- * s2: Load after checking src limit on amd64. [#362](https://github.com/klauspost/compress/pull/362)
- * s2sx: Limit max executable size [#368](https://github.com/klauspost/compress/pull/368)
-
-* Apr 14, 2021 (v1.12.1)
- * snappy package removed. Upstream added as dependency.
- * s2: Better compression in "best" mode [#353](https://github.com/klauspost/compress/pull/353)
- * s2sx: Add stdin input and detect pre-compressed from signature [#352](https://github.com/klauspost/compress/pull/352)
- * s2c/s2d: Add http as possible input [#348](https://github.com/klauspost/compress/pull/348)
- * s2c/s2d/s2sx: Always truncate when writing files [#352](https://github.com/klauspost/compress/pull/352)
- * zstd: Reduce memory usage further when using [WithLowerEncoderMem](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithLowerEncoderMem) [#346](https://github.com/klauspost/compress/pull/346)
- * s2: Fix potential problem with amd64 assembly and profilers [#349](https://github.com/klauspost/compress/pull/349)
-
-
-
- See changes to v1.11.x
-
-* Mar 26, 2021 (v1.11.13)
- * zstd: Big speedup on small dictionary encodes [#344](https://github.com/klauspost/compress/pull/344) [#345](https://github.com/klauspost/compress/pull/345)
- * zstd: Add [WithLowerEncoderMem](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithLowerEncoderMem) encoder option [#336](https://github.com/klauspost/compress/pull/336)
- * deflate: Improve entropy compression [#338](https://github.com/klauspost/compress/pull/338)
- * s2: Clean up and minor performance improvement in best [#341](https://github.com/klauspost/compress/pull/341)
-
-* Mar 5, 2021 (v1.11.12)
- * s2: Add `s2sx` binary that creates [self extracting archives](https://github.com/klauspost/compress/tree/master/s2#s2sx-self-extracting-archives).
- * s2: Speed up decompression on non-assembly platforms [#328](https://github.com/klauspost/compress/pull/328)
-
-* Mar 1, 2021 (v1.11.9)
- * s2: Add ARM64 decompression assembly. Around 2x output speed. [#324](https://github.com/klauspost/compress/pull/324)
- * s2: Improve "better" speed and efficiency. [#325](https://github.com/klauspost/compress/pull/325)
- * s2: Fix binaries.
-
-* Feb 25, 2021 (v1.11.8)
- * s2: Fixed occasional out-of-bounds write on amd64. Upgrade recommended.
- * s2: Add AMD64 assembly for better mode. 25-50% faster. [#315](https://github.com/klauspost/compress/pull/315)
- * s2: Less upfront decoder allocation. [#322](https://github.com/klauspost/compress/pull/322)
- * zstd: Faster "compression" of incompressible data. [#314](https://github.com/klauspost/compress/pull/314)
- * zip: Fix zip64 headers. [#313](https://github.com/klauspost/compress/pull/313)
-
-* Jan 14, 2021 (v1.11.7)
- * Use Bytes() interface to get bytes across packages. [#309](https://github.com/klauspost/compress/pull/309)
- * s2: Add 'best' compression option. [#310](https://github.com/klauspost/compress/pull/310)
- * s2: Add ReaderMaxBlockSize, changes `s2.NewReader` signature to include varargs. [#311](https://github.com/klauspost/compress/pull/311)
- * s2: Fix crash on small better buffers. [#308](https://github.com/klauspost/compress/pull/308)
- * s2: Clean up decoder. [#312](https://github.com/klauspost/compress/pull/312)
-
-* Jan 7, 2021 (v1.11.6)
- * zstd: Make decoder allocations smaller [#306](https://github.com/klauspost/compress/pull/306)
- * zstd: Free Decoder resources when Reset is called with a nil io.Reader [#305](https://github.com/klauspost/compress/pull/305)
-
-* Dec 20, 2020 (v1.11.4)
- * zstd: Add Best compression mode [#304](https://github.com/klauspost/compress/pull/304)
- * Add header decoder [#299](https://github.com/klauspost/compress/pull/299)
- * s2: Add uncompressed stream option [#297](https://github.com/klauspost/compress/pull/297)
- * Simplify/speed up small blocks with known max size. [#300](https://github.com/klauspost/compress/pull/300)
- * zstd: Always reset literal dict encoder [#303](https://github.com/klauspost/compress/pull/303)
-
-* Nov 15, 2020 (v1.11.3)
- * inflate: 10-15% faster decompression [#293](https://github.com/klauspost/compress/pull/293)
- * zstd: Tweak DecodeAll default allocation [#295](https://github.com/klauspost/compress/pull/295)
-
-* Oct 11, 2020 (v1.11.2)
- * s2: Fix out of bounds read in "better" block compression [#291](https://github.com/klauspost/compress/pull/291)
-
-* Oct 1, 2020 (v1.11.1)
- * zstd: Set allLitEntropy true in default configuration [#286](https://github.com/klauspost/compress/pull/286)
-
-* Sept 8, 2020 (v1.11.0)
- * zstd: Add experimental compression [dictionaries](https://github.com/klauspost/compress/tree/master/zstd#dictionaries) [#281](https://github.com/klauspost/compress/pull/281)
- * zstd: Fix mixed Write and ReadFrom calls [#282](https://github.com/klauspost/compress/pull/282)
- * inflate/gz: Limit variable shifts, ~5% faster decompression [#274](https://github.com/klauspost/compress/pull/274)
-
-
-
- See changes to v1.10.x
-
-* July 8, 2020 (v1.10.11)
- * zstd: Fix extra block when compressing with ReadFrom. [#278](https://github.com/klauspost/compress/pull/278)
- * huff0: Also populate compression table when reading decoding table. [#275](https://github.com/klauspost/compress/pull/275)
-
-* June 23, 2020 (v1.10.10)
- * zstd: Skip entropy compression in fastest mode when no matches. [#270](https://github.com/klauspost/compress/pull/270)
-
-* June 16, 2020 (v1.10.9):
- * zstd: API change for specifying dictionaries. See [#268](https://github.com/klauspost/compress/pull/268)
- * zip: update CreateHeaderRaw to handle zip64 fields. [#266](https://github.com/klauspost/compress/pull/266)
- * Fuzzit tests removed. The service has been purchased and is no longer available.
-
-* June 5, 2020 (v1.10.8):
- * 1.15x faster zstd block decompression. [#265](https://github.com/klauspost/compress/pull/265)
-
-* June 1, 2020 (v1.10.7):
- * Added zstd decompression [dictionary support](https://github.com/klauspost/compress/tree/master/zstd#dictionaries)
- * Increase zstd decompression speed up to 1.19x. [#259](https://github.com/klauspost/compress/pull/259)
- * Remove internal reset call in zstd compression and reduce allocations. [#263](https://github.com/klauspost/compress/pull/263)
-
-* May 21, 2020: (v1.10.6)
- * zstd: Reduce allocations while decoding. [#258](https://github.com/klauspost/compress/pull/258), [#252](https://github.com/klauspost/compress/pull/252)
- * zstd: Stricter decompression checks.
-
-* April 12, 2020: (v1.10.5)
- * s2-commands: Flush output when receiving SIGINT. [#239](https://github.com/klauspost/compress/pull/239)
-
-* Apr 8, 2020: (v1.10.4)
- * zstd: Minor/special case optimizations. [#251](https://github.com/klauspost/compress/pull/251), [#250](https://github.com/klauspost/compress/pull/250), [#249](https://github.com/klauspost/compress/pull/249), [#247](https://github.com/klauspost/compress/pull/247)
-* Mar 11, 2020: (v1.10.3)
- * s2: Use S2 encoder in pure Go mode for Snappy output as well. [#245](https://github.com/klauspost/compress/pull/245)
- * s2: Fix pure Go block encoder. [#244](https://github.com/klauspost/compress/pull/244)
- * zstd: Added "better compression" mode. [#240](https://github.com/klauspost/compress/pull/240)
- * zstd: Improve speed of fastest compression mode by 5-10% [#241](https://github.com/klauspost/compress/pull/241)
- * zstd: Skip creating encoders when not needed. [#238](https://github.com/klauspost/compress/pull/238)
-
-* Feb 27, 2020: (v1.10.2)
- * Close to 50% speedup in inflate (gzip/zip decompression). [#236](https://github.com/klauspost/compress/pull/236) [#234](https://github.com/klauspost/compress/pull/234) [#232](https://github.com/klauspost/compress/pull/232)
- * Reduce deflate level 1-6 memory usage up to 59%. [#227](https://github.com/klauspost/compress/pull/227)
-
-* Feb 18, 2020: (v1.10.1)
- * Fix zstd crash when resetting multiple times without sending data. [#226](https://github.com/klauspost/compress/pull/226)
- * deflate: Fix dictionary use on level 1-6. [#224](https://github.com/klauspost/compress/pull/224)
- * Remove deflate writer reference when closing. [#224](https://github.com/klauspost/compress/pull/224)
-
-* Feb 4, 2020: (v1.10.0)
- * Add optional dictionary to [stateless deflate](https://pkg.go.dev/github.com/klauspost/compress/flate?tab=doc#StatelessDeflate). Breaking change, send `nil` for previous behaviour. [#216](https://github.com/klauspost/compress/pull/216)
- * Fix buffer overflow on repeated small block deflate. [#218](https://github.com/klauspost/compress/pull/218)
- * Allow copying content from an existing ZIP file without decompressing+compressing. [#214](https://github.com/klauspost/compress/pull/214)
- * Added [S2](https://github.com/klauspost/compress/tree/master/s2#s2-compression) AMD64 assembler and various optimizations. Stream speed >10GB/s. [#186](https://github.com/klauspost/compress/pull/186)
-
-
-
-
- See changes prior to v1.10.0
-
-* Jan 20,2020 (v1.9.8) Optimize gzip/deflate with better size estimates and faster table generation. [#207](https://github.com/klauspost/compress/pull/207) by [luyu6056](https://github.com/luyu6056), [#206](https://github.com/klauspost/compress/pull/206).
-* Jan 11, 2020: S2 Encode/Decode will use provided buffer if capacity is big enough. [#204](https://github.com/klauspost/compress/pull/204)
-* Jan 5, 2020: (v1.9.7) Fix another zstd regression in v1.9.5 - v1.9.6 removed.
-* Jan 4, 2020: (v1.9.6) Regression in v1.9.5 fixed causing corrupt zstd encodes in rare cases.
-* Jan 4, 2020: Faster IO in [s2c + s2d commandline tools](https://github.com/klauspost/compress/tree/master/s2#commandline-tools) compression/decompression. [#192](https://github.com/klauspost/compress/pull/192)
-* Dec 29, 2019: Removed v1.9.5 since fuzz tests showed a compatibility problem with the reference zstandard decoder.
-* Dec 29, 2019: (v1.9.5) zstd: 10-20% faster block compression. [#199](https://github.com/klauspost/compress/pull/199)
-* Dec 29, 2019: [zip](https://godoc.org/github.com/klauspost/compress/zip) package updated with latest Go features
-* Dec 29, 2019: zstd: Single segment flag condintions tweaked. [#197](https://github.com/klauspost/compress/pull/197)
-* Dec 18, 2019: s2: Faster compression when ReadFrom is used. [#198](https://github.com/klauspost/compress/pull/198)
-* Dec 10, 2019: s2: Fix repeat length output when just above at 16MB limit.
-* Dec 10, 2019: zstd: Add function to get decoder as io.ReadCloser. [#191](https://github.com/klauspost/compress/pull/191)
-* Dec 3, 2019: (v1.9.4) S2: limit max repeat length. [#188](https://github.com/klauspost/compress/pull/188)
-* Dec 3, 2019: Add [WithNoEntropyCompression](https://godoc.org/github.com/klauspost/compress/zstd#WithNoEntropyCompression) to zstd [#187](https://github.com/klauspost/compress/pull/187)
-* Dec 3, 2019: Reduce memory use for tests. Check for leaked goroutines.
-* Nov 28, 2019 (v1.9.3) Less allocations in stateless deflate.
-* Nov 28, 2019: 5-20% Faster huff0 decode. Impacts zstd as well. [#184](https://github.com/klauspost/compress/pull/184)
-* Nov 12, 2019 (v1.9.2) Added [Stateless Compression](#stateless-compression) for gzip/deflate.
-* Nov 12, 2019: Fixed zstd decompression of large single blocks. [#180](https://github.com/klauspost/compress/pull/180)
-* Nov 11, 2019: Set default [s2c](https://github.com/klauspost/compress/tree/master/s2#commandline-tools) block size to 4MB.
-* Nov 11, 2019: Reduce inflate memory use by 1KB.
-* Nov 10, 2019: Less allocations in deflate bit writer.
-* Nov 10, 2019: Fix inconsistent error returned by zstd decoder.
-* Oct 28, 2019 (v1.9.1) ztsd: Fix crash when compressing blocks. [#174](https://github.com/klauspost/compress/pull/174)
-* Oct 24, 2019 (v1.9.0) zstd: Fix rare data corruption [#173](https://github.com/klauspost/compress/pull/173)
-* Oct 24, 2019 zstd: Fix huff0 out of buffer write [#171](https://github.com/klauspost/compress/pull/171) and always return errors [#172](https://github.com/klauspost/compress/pull/172)
-* Oct 10, 2019: Big deflate rewrite, 30-40% faster with better compression [#105](https://github.com/klauspost/compress/pull/105)
-
-
-
-
- See changes prior to v1.9.0
-
-* Oct 10, 2019: (v1.8.6) zstd: Allow partial reads to get flushed data. [#169](https://github.com/klauspost/compress/pull/169)
-* Oct 3, 2019: Fix inconsistent results on broken zstd streams.
-* Sep 25, 2019: Added `-rm` (remove source files) and `-q` (no output except errors) to `s2c` and `s2d` [commands](https://github.com/klauspost/compress/tree/master/s2#commandline-tools)
-* Sep 16, 2019: (v1.8.4) Add `s2c` and `s2d` [commandline tools](https://github.com/klauspost/compress/tree/master/s2#commandline-tools).
-* Sep 10, 2019: (v1.8.3) Fix s2 decoder [Skip](https://godoc.org/github.com/klauspost/compress/s2#Reader.Skip).
-* Sep 7, 2019: zstd: Added [WithWindowSize](https://godoc.org/github.com/klauspost/compress/zstd#WithWindowSize), contributed by [ianwilkes](https://github.com/ianwilkes).
-* Sep 5, 2019: (v1.8.2) Add [WithZeroFrames](https://godoc.org/github.com/klauspost/compress/zstd#WithZeroFrames) which adds full zero payload block encoding option.
-* Sep 5, 2019: Lazy initialization of zstandard predefined en/decoder tables.
-* Aug 26, 2019: (v1.8.1) S2: 1-2% compression increase in "better" compression mode.
-* Aug 26, 2019: zstd: Check maximum size of Huffman 1X compressed literals while decoding.
-* Aug 24, 2019: (v1.8.0) Added [S2 compression](https://github.com/klauspost/compress/tree/master/s2#s2-compression), a high performance replacement for Snappy.
-* Aug 21, 2019: (v1.7.6) Fixed minor issues found by fuzzer. One could lead to zstd not decompressing.
-* Aug 18, 2019: Add [fuzzit](https://fuzzit.dev/) continuous fuzzing.
-* Aug 14, 2019: zstd: Skip incompressible data 2x faster. [#147](https://github.com/klauspost/compress/pull/147)
-* Aug 4, 2019 (v1.7.5): Better literal compression. [#146](https://github.com/klauspost/compress/pull/146)
-* Aug 4, 2019: Faster zstd compression. [#143](https://github.com/klauspost/compress/pull/143) [#144](https://github.com/klauspost/compress/pull/144)
-* Aug 4, 2019: Faster zstd decompression. [#145](https://github.com/klauspost/compress/pull/145) [#143](https://github.com/klauspost/compress/pull/143) [#142](https://github.com/klauspost/compress/pull/142)
-* July 15, 2019 (v1.7.4): Fix double EOF block in rare cases on zstd encoder.
-* July 15, 2019 (v1.7.3): Minor speedup/compression increase in default zstd encoder.
-* July 14, 2019: zstd decoder: Fix decompression error on multiple uses with mixed content.
-* July 7, 2019 (v1.7.2): Snappy update, zstd decoder potential race fix.
-* June 17, 2019: zstd decompression bugfix.
-* June 17, 2019: fix 32 bit builds.
-* June 17, 2019: Easier use in modules (less dependencies).
-* June 9, 2019: New stronger "default" [zstd](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression mode. Matches zstd default compression ratio.
-* June 5, 2019: 20-40% throughput in [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and better compression.
-* June 5, 2019: deflate/gzip compression: Reduce memory usage of lower compression levels.
-* June 2, 2019: Added [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression!
-* May 25, 2019: deflate/gzip: 10% faster bit writer, mostly visible in lower levels.
-* Apr 22, 2019: [zstd](https://github.com/klauspost/compress/tree/master/zstd#zstd) decompression added.
-* Aug 1, 2018: Added [huff0 README](https://github.com/klauspost/compress/tree/master/huff0#huff0-entropy-compression).
-* Jul 8, 2018: Added [Performance Update 2018](#performance-update-2018) below.
-* Jun 23, 2018: Merged [Go 1.11 inflate optimizations](https://go-review.googlesource.com/c/go/+/102235). Go 1.9 is now required. Backwards compatible version tagged with [v1.3.0](https://github.com/klauspost/compress/releases/tag/v1.3.0).
-* Apr 2, 2018: Added [huff0](https://godoc.org/github.com/klauspost/compress/huff0) en/decoder. Experimental for now, API may change.
-* Mar 4, 2018: Added [FSE Entropy](https://godoc.org/github.com/klauspost/compress/fse) en/decoder. Experimental for now, API may change.
-* Nov 3, 2017: Add compression [Estimate](https://godoc.org/github.com/klauspost/compress#Estimate) function.
-* May 28, 2017: Reduce allocations when resetting decoder.
-* Apr 02, 2017: Change back to official crc32, since changes were merged in Go 1.7.
-* Jan 14, 2017: Reduce stack pressure due to array copies. See [Issue #18625](https://github.com/golang/go/issues/18625).
-* Oct 25, 2016: Level 2-4 have been rewritten and now offers significantly better performance than before.
-* Oct 20, 2016: Port zlib changes from Go 1.7 to fix zlib writer issue. Please update.
-* Oct 16, 2016: Go 1.7 changes merged. Apples to apples this package is a few percent faster, but has a significantly better balance between speed and compression per level.
-* Mar 24, 2016: Always attempt Huffman encoding on level 4-7. This improves base 64 encoded data compression.
-* Mar 24, 2016: Small speedup for level 1-3.
-* Feb 19, 2016: Faster bit writer, level -2 is 15% faster, level 1 is 4% faster.
-* Feb 19, 2016: Handle small payloads faster in level 1-3.
-* Feb 19, 2016: Added faster level 2 + 3 compression modes.
-* Feb 19, 2016: [Rebalanced compression levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so there is a more even progression in terms of compression. New default level is 5.
-* Feb 14, 2016: Snappy: Merge upstream changes.
-* Feb 14, 2016: Snappy: Fix aggressive skipping.
-* Feb 14, 2016: Snappy: Update benchmark.
-* Feb 13, 2016: Deflate: Fixed assembler problem that could lead to sub-optimal compression.
-* Feb 12, 2016: Snappy: Added AMD64 SSE 4.2 optimizations to matching, which makes easy to compress material run faster. Typical speedup is around 25%.
-* Feb 9, 2016: Added Snappy package fork. This version is 5-7% faster, much more on hard to compress content.
-* Jan 30, 2016: Optimize level 1 to 3 by not considering static dictionary or storing uncompressed. ~4-5% speedup.
-* Jan 16, 2016: Optimization on deflate level 1,2,3 compression.
-* Jan 8 2016: Merge [CL 18317](https://go-review.googlesource.com/#/c/18317): fix reading, writing of zip64 archives.
-* Dec 8 2015: Make level 1 and -2 deterministic even if write size differs.
-* Dec 8 2015: Split encoding functions, so hashing and matching can potentially be inlined. 1-3% faster on AMD64. 5% faster on other platforms.
-* Dec 8 2015: Fixed rare [one byte out-of bounds read](https://github.com/klauspost/compress/issues/20). Please update!
-* Nov 23 2015: Optimization on token writer. ~2-4% faster. Contributed by [@dsnet](https://github.com/dsnet).
-* Nov 20 2015: Small optimization to bit writer on 64 bit systems.
-* Nov 17 2015: Fixed out-of-bound errors if the underlying Writer returned an error. See [#15](https://github.com/klauspost/compress/issues/15).
-* Nov 12 2015: Added [io.WriterTo](https://golang.org/pkg/io/#WriterTo) support to gzip/inflate.
-* Nov 11 2015: Merged [CL 16669](https://go-review.googlesource.com/#/c/16669/4): archive/zip: enable overriding (de)compressors per file
-* Oct 15 2015: Added skipping on uncompressible data. Random data speed up >5x.
-
-
-
-# deflate usage
-
-The packages are drop-in replacements for standard library [deflate](https://godoc.org/github.com/klauspost/compress/flate), [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip), and [zlib](https://godoc.org/github.com/klauspost/compress/zlib). Simply replace the import path to use them:
-
-Typical speed is about 2x of the standard library packages.
-
-| old import | new import | Documentation |
-|------------------|---------------------------------------|-------------------------------------------------------------------------|
-| `compress/gzip` | `github.com/klauspost/compress/gzip` | [gzip](https://pkg.go.dev/github.com/klauspost/compress/gzip?tab=doc) |
-| `compress/zlib` | `github.com/klauspost/compress/zlib` | [zlib](https://pkg.go.dev/github.com/klauspost/compress/zlib?tab=doc) |
-| `archive/zip` | `github.com/klauspost/compress/zip` | [zip](https://pkg.go.dev/github.com/klauspost/compress/zip?tab=doc) |
-| `compress/flate` | `github.com/klauspost/compress/flate` | [flate](https://pkg.go.dev/github.com/klauspost/compress/flate?tab=doc) |
-
-You may also be interested in [pgzip](https://github.com/klauspost/pgzip), which is a drop-in replacement for gzip, which support multithreaded compression on big files and the optimized [crc32](https://github.com/klauspost/crc32) package used by these packages.
-
-The packages implement the same API as the standard library, so you can use the original godoc documentation: [gzip](http://golang.org/pkg/compress/gzip/), [zip](http://golang.org/pkg/archive/zip/), [zlib](http://golang.org/pkg/compress/zlib/), [flate](http://golang.org/pkg/compress/flate/).
-
-Currently there is only minor speedup on decompression (mostly CRC32 calculation).
-
-Memory usage is typically 1MB for a Writer. stdlib is in the same range.
-If you expect to have a lot of concurrently allocated Writers consider using
-the stateless compression described below.
-
-For compression performance, see: [this spreadsheet](https://docs.google.com/spreadsheets/d/1nuNE2nPfuINCZJRMt6wFWhKpToF95I47XjSsc-1rbPQ/edit?usp=sharing).
-
-To disable all assembly add `-tags=noasm`. This works across all packages.
-
-# Stateless compression
-
-This package offers stateless compression as a special option for gzip/deflate.
-It will do compression but without maintaining any state between Write calls.
-
-This means there will be no memory kept between Write calls, but compression and speed will be suboptimal.
-
-This is only relevant in cases where you expect to run many thousands of compressors concurrently,
-but with very little activity. This is *not* intended for regular web servers serving individual requests.
-
-Because of this, the size of actual Write calls will affect output size.
-
-In gzip, specify level `-3` / `gzip.StatelessCompression` to enable.
-
-For direct deflate use, NewStatelessWriter and StatelessDeflate are available. See [documentation](https://godoc.org/github.com/klauspost/compress/flate#NewStatelessWriter)
-
-A `bufio.Writer` can of course be used to control write sizes. For example, to use a 4KB buffer:
-
-```go
- // replace 'ioutil.Discard' with your output.
- gzw, err := gzip.NewWriterLevel(ioutil.Discard, gzip.StatelessCompression)
- if err != nil {
- return err
- }
- defer gzw.Close()
-
- w := bufio.NewWriterSize(gzw, 4096)
- defer w.Flush()
-
- // Write to 'w'
-```
-
-This will only use up to 4KB in memory when the writer is idle.
-
-Compression is almost always worse than the fastest compression level
-and each write will allocate (a little) memory.
-
-
-# Other packages
-
-Here are other packages of good quality and pure Go (no cgo wrappers or autoconverted code):
-
-* [github.com/pierrec/lz4](https://github.com/pierrec/lz4) - strong multithreaded LZ4 compression.
-* [github.com/cosnicolaou/pbzip2](https://github.com/cosnicolaou/pbzip2) - multithreaded bzip2 decompression.
-* [github.com/dsnet/compress](https://github.com/dsnet/compress) - brotli decompression, bzip2 writer.
-* [github.com/ronanh/intcomp](https://github.com/ronanh/intcomp) - Integer compression.
-* [github.com/spenczar/fpc](https://github.com/spenczar/fpc) - Float compression.
-* [github.com/minio/zipindex](https://github.com/minio/zipindex) - External ZIP directory index.
-* [github.com/ybirader/pzip](https://github.com/ybirader/pzip) - Fast concurrent zip archiver and extractor.
-
-# license
-
-This code is licensed under the same conditions as the original Go code. See LICENSE file.
-
-
-
-
-
+# compress
+
+This package provides various compression algorithms.
+
+* [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and decompression in pure Go.
+* [S2](https://github.com/klauspost/compress/tree/master/s2#s2-compression) is a high performance replacement for Snappy.
+* Optimized [deflate](https://godoc.org/github.com/klauspost/compress/flate) packages which can be used as a dropin replacement for [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip) and [zlib](https://godoc.org/github.com/klauspost/compress/zlib).
+* [snappy](https://github.com/klauspost/compress/tree/master/snappy) is a drop-in replacement for `github.com/golang/snappy` offering better compression and concurrent streams.
+* [huff0](https://github.com/klauspost/compress/tree/master/huff0) and [FSE](https://github.com/klauspost/compress/tree/master/fse) implementations for raw entropy encoding.
+* [gzhttp](https://github.com/klauspost/compress/tree/master/gzhttp) Provides client and server wrappers for handling gzipped/zstd HTTP requests efficiently.
+* [pgzip](https://github.com/klauspost/pgzip) is a separate package that provides a very fast parallel gzip implementation.
+
+[](https://pkg.go.dev/github.com/klauspost/compress?tab=subdirectories)
+[](https://github.com/klauspost/compress/actions/workflows/go.yml)
+[](https://sourcegraph.com/github.com/klauspost/compress?badge)
+
+# package usage
+
+Use `go get github.com/klauspost/compress@latest` to add it to your project.
+
+This package will support the current Go version and 2 versions back.
+
+* Use the `nounsafe` tag to disable all use of the "unsafe" package.
+* Use the `noasm` tag to disable all assembly across packages.
+
+Use the links above for more information on each.
+
+# changelog
+
+* Feb 9th, 2026 [1.18.4](https://github.com/klauspost/compress/releases/tag/v1.18.4)
+ * gzhttp: Add zstandard to server handler wrapper https://github.com/klauspost/compress/pull/1121
+ * zstd: Add ResetWithOptions to encoder/decoder https://github.com/klauspost/compress/pull/1122
+ * gzhttp: preserve qvalue when extra parameters follow in Accept-Encoding by @analytically in https://github.com/klauspost/compress/pull/1116
+
+* Jan 16th, 2026 [1.18.3](https://github.com/klauspost/compress/releases/tag/v1.18.3)
+ * Downstream CVE-2025-61728. See [golang/go#77102](https://github.com/golang/go/issues/77102).
+
+* Dec 1st, 2025 - [1.18.2](https://github.com/klauspost/compress/releases/tag/v1.18.2)
+ * flate: Fix invalid encoding on level 9 with single value input in https://github.com/klauspost/compress/pull/1115
+ * flate: reduce stateless allocations by @RXamzin in https://github.com/klauspost/compress/pull/1106
+
+* Oct 20, 2025 - [1.18.1](https://github.com/klauspost/compress/releases/tag/v1.18.1) - RETRACTED
+ * zstd: Add simple zstd EncodeTo/DecodeTo functions https://github.com/klauspost/compress/pull/1079
+ * zstd: Fix incorrect buffer size in dictionary encodes https://github.com/klauspost/compress/pull/1059
+ * s2: check for cap, not len of buffer in EncodeBetter/Best by @vdarulis in https://github.com/klauspost/compress/pull/1080
+ * zlib: Avoiding extra allocation in zlib.reader.Reset by @travelpolicy in https://github.com/klauspost/compress/pull/1086
+ * gzhttp: remove redundant err check in zstdReader by @ryanfowler in https://github.com/klauspost/compress/pull/1090
+ * flate: Faster load+store https://github.com/klauspost/compress/pull/1104
+ * flate: Simplify matchlen https://github.com/klauspost/compress/pull/1101
+ * flate: Use exact sizes for huffman tables https://github.com/klauspost/compress/pull/1103
+
+* Feb 19th, 2025 - [1.18.0](https://github.com/klauspost/compress/releases/tag/v1.18.0)
+ * Add unsafe little endian loaders https://github.com/klauspost/compress/pull/1036
+ * fix: check `r.err != nil` but return a nil value error `err` by @alingse in https://github.com/klauspost/compress/pull/1028
+ * flate: Simplify L4-6 loading https://github.com/klauspost/compress/pull/1043
+ * flate: Simplify matchlen (remove asm) https://github.com/klauspost/compress/pull/1045
+ * s2: Improve small block compression speed w/o asm https://github.com/klauspost/compress/pull/1048
+ * flate: Fix matchlen L5+L6 https://github.com/klauspost/compress/pull/1049
+ * flate: Cleanup & reduce casts https://github.com/klauspost/compress/pull/1050
+
+
+ See changes to v1.17.x
+
+* Oct 11th, 2024 - [1.17.11](https://github.com/klauspost/compress/releases/tag/v1.17.11)
+ * zstd: Fix extra CRC written with multiple Close calls https://github.com/klauspost/compress/pull/1017
+ * s2: Don't use stack for index tables https://github.com/klauspost/compress/pull/1014
+ * gzhttp: No content-type on no body response code by @juliens in https://github.com/klauspost/compress/pull/1011
+ * gzhttp: Do not set the content-type when response has no body by @kevinpollet in https://github.com/klauspost/compress/pull/1013
+
+* Sep 23rd, 2024 - [1.17.10](https://github.com/klauspost/compress/releases/tag/v1.17.10)
+ * gzhttp: Add TransportAlwaysDecompress option. https://github.com/klauspost/compress/pull/978
+ * gzhttp: Add supported decompress request body by @mirecl in https://github.com/klauspost/compress/pull/1002
+ * s2: Add EncodeBuffer buffer recycling callback https://github.com/klauspost/compress/pull/982
+ * zstd: Improve memory usage on small streaming encodes https://github.com/klauspost/compress/pull/1007
+ * flate: read data written with partial flush by @vajexal in https://github.com/klauspost/compress/pull/996
+
+* Jun 12th, 2024 - [1.17.9](https://github.com/klauspost/compress/releases/tag/v1.17.9)
+ * s2: Reduce ReadFrom temporary allocations https://github.com/klauspost/compress/pull/949
+ * flate, zstd: Shave some bytes off amd64 matchLen by @greatroar in https://github.com/klauspost/compress/pull/963
+ * Upgrade zip/zlib to 1.22.4 upstream https://github.com/klauspost/compress/pull/970 https://github.com/klauspost/compress/pull/971
+ * zstd: BuildDict fails with RLE table https://github.com/klauspost/compress/pull/951
+
+* Apr 9th, 2024 - [1.17.8](https://github.com/klauspost/compress/releases/tag/v1.17.8)
+ * zstd: Reject blocks where reserved values are not 0 https://github.com/klauspost/compress/pull/885
+ * zstd: Add RLE detection+encoding https://github.com/klauspost/compress/pull/938
+
+* Feb 21st, 2024 - [1.17.7](https://github.com/klauspost/compress/releases/tag/v1.17.7)
+ * s2: Add AsyncFlush method: Complete the block without flushing by @Jille in https://github.com/klauspost/compress/pull/927
+ * s2: Fix literal+repeat exceeds dst crash https://github.com/klauspost/compress/pull/930
+
+* Feb 5th, 2024 - [1.17.6](https://github.com/klauspost/compress/releases/tag/v1.17.6)
+ * zstd: Fix incorrect repeat coding in best mode https://github.com/klauspost/compress/pull/923
+ * s2: Fix DecodeConcurrent deadlock on errors https://github.com/klauspost/compress/pull/925
+
+* Jan 26th, 2024 - [v1.17.5](https://github.com/klauspost/compress/releases/tag/v1.17.5)
+ * flate: Fix reset with dictionary on custom window encodes https://github.com/klauspost/compress/pull/912
+ * zstd: Add Frame header encoding and stripping https://github.com/klauspost/compress/pull/908
+ * zstd: Limit better/best default window to 8MB https://github.com/klauspost/compress/pull/913
+ * zstd: Speed improvements by @greatroar in https://github.com/klauspost/compress/pull/896 https://github.com/klauspost/compress/pull/910
+ * s2: Fix callbacks for skippable blocks and disallow 0xfe (Padding) by @Jille in https://github.com/klauspost/compress/pull/916 https://github.com/klauspost/compress/pull/917
+https://github.com/klauspost/compress/pull/919 https://github.com/klauspost/compress/pull/918
+
+* Dec 1st, 2023 - [v1.17.4](https://github.com/klauspost/compress/releases/tag/v1.17.4)
+ * huff0: Speed up symbol counting by @greatroar in https://github.com/klauspost/compress/pull/887
+ * huff0: Remove byteReader by @greatroar in https://github.com/klauspost/compress/pull/886
+ * gzhttp: Allow overriding decompression on transport https://github.com/klauspost/compress/pull/892
+ * gzhttp: Clamp compression level https://github.com/klauspost/compress/pull/890
+ * gzip: Error out if reserved bits are set https://github.com/klauspost/compress/pull/891
+
+* Nov 15th, 2023 - [v1.17.3](https://github.com/klauspost/compress/releases/tag/v1.17.3)
+ * fse: Fix max header size https://github.com/klauspost/compress/pull/881
+ * zstd: Improve better/best compression https://github.com/klauspost/compress/pull/877
+ * gzhttp: Fix missing content type on Close https://github.com/klauspost/compress/pull/883
+
+* Oct 22nd, 2023 - [v1.17.2](https://github.com/klauspost/compress/releases/tag/v1.17.2)
+ * zstd: Fix rare *CORRUPTION* output in "best" mode. See https://github.com/klauspost/compress/pull/876
+
+* Oct 14th, 2023 - [v1.17.1](https://github.com/klauspost/compress/releases/tag/v1.17.1)
+ * s2: Fix S2 "best" dictionary wrong encoding https://github.com/klauspost/compress/pull/871
+ * flate: Reduce allocations in decompressor and minor code improvements by @fakefloordiv in https://github.com/klauspost/compress/pull/869
+ * s2: Fix EstimateBlockSize on 6&7 length input https://github.com/klauspost/compress/pull/867
+
+* Sept 19th, 2023 - [v1.17.0](https://github.com/klauspost/compress/releases/tag/v1.17.0)
+ * Add experimental dictionary builder https://github.com/klauspost/compress/pull/853
+ * Add xerial snappy read/writer https://github.com/klauspost/compress/pull/838
+ * flate: Add limited window compression https://github.com/klauspost/compress/pull/843
+ * s2: Do 2 overlapping match checks https://github.com/klauspost/compress/pull/839
+ * flate: Add amd64 assembly matchlen https://github.com/klauspost/compress/pull/837
+ * gzip: Copy bufio.Reader on Reset by @thatguystone in https://github.com/klauspost/compress/pull/860
+
+
+
+ See changes to v1.16.x
+
+
+* July 1st, 2023 - [v1.16.7](https://github.com/klauspost/compress/releases/tag/v1.16.7)
+ * zstd: Fix default level first dictionary encode https://github.com/klauspost/compress/pull/829
+ * s2: add GetBufferCapacity() method by @GiedriusS in https://github.com/klauspost/compress/pull/832
+
+* June 13, 2023 - [v1.16.6](https://github.com/klauspost/compress/releases/tag/v1.16.6)
+ * zstd: correctly ignore WithEncoderPadding(1) by @ianlancetaylor in https://github.com/klauspost/compress/pull/806
+ * zstd: Add amd64 match length assembly https://github.com/klauspost/compress/pull/824
+ * gzhttp: Handle informational headers by @rtribotte in https://github.com/klauspost/compress/pull/815
+ * s2: Improve Better compression slightly https://github.com/klauspost/compress/pull/663
+
+* Apr 16, 2023 - [v1.16.5](https://github.com/klauspost/compress/releases/tag/v1.16.5)
+ * zstd: readByte needs to use io.ReadFull by @jnoxon in https://github.com/klauspost/compress/pull/802
+ * gzip: Fix WriterTo after initial read https://github.com/klauspost/compress/pull/804
+
+* Apr 5, 2023 - [v1.16.4](https://github.com/klauspost/compress/releases/tag/v1.16.4)
+ * zstd: Improve zstd best efficiency by @greatroar and @klauspost in https://github.com/klauspost/compress/pull/784
+ * zstd: Respect WithAllLitEntropyCompression https://github.com/klauspost/compress/pull/792
+ * zstd: Fix amd64 not always detecting corrupt data https://github.com/klauspost/compress/pull/785
+ * zstd: Various minor improvements by @greatroar in https://github.com/klauspost/compress/pull/788 https://github.com/klauspost/compress/pull/794 https://github.com/klauspost/compress/pull/795
+ * s2: Fix huge block overflow https://github.com/klauspost/compress/pull/779
+ * s2: Allow CustomEncoder fallback https://github.com/klauspost/compress/pull/780
+ * gzhttp: Support ResponseWriter Unwrap() in gzhttp handler by @jgimenez in https://github.com/klauspost/compress/pull/799
+
+* Mar 13, 2023 - [v1.16.1](https://github.com/klauspost/compress/releases/tag/v1.16.1)
+ * zstd: Speed up + improve best encoder by @greatroar in https://github.com/klauspost/compress/pull/776
+ * gzhttp: Add optional [BREACH mitigation](https://github.com/klauspost/compress/tree/master/gzhttp#breach-mitigation). https://github.com/klauspost/compress/pull/762 https://github.com/klauspost/compress/pull/768 https://github.com/klauspost/compress/pull/769 https://github.com/klauspost/compress/pull/770 https://github.com/klauspost/compress/pull/767
+ * s2: Add Intel LZ4s converter https://github.com/klauspost/compress/pull/766
+ * zstd: Minor bug fixes https://github.com/klauspost/compress/pull/771 https://github.com/klauspost/compress/pull/772 https://github.com/klauspost/compress/pull/773
+ * huff0: Speed up compress1xDo by @greatroar in https://github.com/klauspost/compress/pull/774
+
+* Feb 26, 2023 - [v1.16.0](https://github.com/klauspost/compress/releases/tag/v1.16.0)
+ * s2: Add [Dictionary](https://github.com/klauspost/compress/tree/master/s2#dictionaries) support. https://github.com/klauspost/compress/pull/685
+ * s2: Add Compression Size Estimate. https://github.com/klauspost/compress/pull/752
+ * s2: Add support for custom stream encoder. https://github.com/klauspost/compress/pull/755
+ * s2: Add LZ4 block converter. https://github.com/klauspost/compress/pull/748
+ * s2: Support io.ReaderAt in ReadSeeker. https://github.com/klauspost/compress/pull/747
+ * s2c/s2sx: Use concurrent decoding. https://github.com/klauspost/compress/pull/746
+
+
+
+ See changes to v1.15.x
+
+* Jan 21st, 2023 (v1.15.15)
+ * deflate: Improve level 7-9 https://github.com/klauspost/compress/pull/739
+ * zstd: Add delta encoding support by @greatroar in https://github.com/klauspost/compress/pull/728
+ * zstd: Various speed improvements by @greatroar https://github.com/klauspost/compress/pull/741 https://github.com/klauspost/compress/pull/734 https://github.com/klauspost/compress/pull/736 https://github.com/klauspost/compress/pull/744 https://github.com/klauspost/compress/pull/743 https://github.com/klauspost/compress/pull/745
+ * gzhttp: Add SuffixETag() and DropETag() options to prevent ETag collisions on compressed responses by @willbicks in https://github.com/klauspost/compress/pull/740
+
+* Jan 3rd, 2023 (v1.15.14)
+
+ * flate: Improve speed in big stateless blocks https://github.com/klauspost/compress/pull/718
+ * zstd: Minor speed tweaks by @greatroar in https://github.com/klauspost/compress/pull/716 https://github.com/klauspost/compress/pull/720
+ * export NoGzipResponseWriter for custom ResponseWriter wrappers by @harshavardhana in https://github.com/klauspost/compress/pull/722
+ * s2: Add example for indexing and existing stream https://github.com/klauspost/compress/pull/723
+
+* Dec 11, 2022 (v1.15.13)
+ * zstd: Add [MaxEncodedSize](https://pkg.go.dev/github.com/klauspost/compress@v1.15.13/zstd#Encoder.MaxEncodedSize) to encoder https://github.com/klauspost/compress/pull/691
+ * zstd: Various tweaks and improvements https://github.com/klauspost/compress/pull/693 https://github.com/klauspost/compress/pull/695 https://github.com/klauspost/compress/pull/696 https://github.com/klauspost/compress/pull/701 https://github.com/klauspost/compress/pull/702 https://github.com/klauspost/compress/pull/703 https://github.com/klauspost/compress/pull/704 https://github.com/klauspost/compress/pull/705 https://github.com/klauspost/compress/pull/706 https://github.com/klauspost/compress/pull/707 https://github.com/klauspost/compress/pull/708
+
+* Oct 26, 2022 (v1.15.12)
+
+ * zstd: Tweak decoder allocs. https://github.com/klauspost/compress/pull/680
+ * gzhttp: Always delete `HeaderNoCompression` https://github.com/klauspost/compress/pull/683
+
+* Sept 26, 2022 (v1.15.11)
+
+ * flate: Improve level 1-3 compression https://github.com/klauspost/compress/pull/678
+ * zstd: Improve "best" compression by @nightwolfz in https://github.com/klauspost/compress/pull/677
+ * zstd: Fix+reduce decompression allocations https://github.com/klauspost/compress/pull/668
+ * zstd: Fix non-effective noescape tag https://github.com/klauspost/compress/pull/667
+
+* Sept 16, 2022 (v1.15.10)
+
+ * zstd: Add [WithDecodeAllCapLimit](https://pkg.go.dev/github.com/klauspost/compress@v1.15.10/zstd#WithDecodeAllCapLimit) https://github.com/klauspost/compress/pull/649
+ * Add Go 1.19 - deprecate Go 1.16 https://github.com/klauspost/compress/pull/651
+ * flate: Improve level 5+6 compression https://github.com/klauspost/compress/pull/656
+ * zstd: Improve "better" compression https://github.com/klauspost/compress/pull/657
+ * s2: Improve "best" compression https://github.com/klauspost/compress/pull/658
+ * s2: Improve "better" compression. https://github.com/klauspost/compress/pull/635
+ * s2: Slightly faster non-assembly decompression https://github.com/klauspost/compress/pull/646
+ * Use arrays for constant size copies https://github.com/klauspost/compress/pull/659
+
+* July 21, 2022 (v1.15.9)
+
+ * zstd: Fix decoder crash on amd64 (no BMI) on invalid input https://github.com/klauspost/compress/pull/645
+ * zstd: Disable decoder extended memory copies (amd64) due to possible crashes https://github.com/klauspost/compress/pull/644
+ * zstd: Allow single segments up to "max decoded size" https://github.com/klauspost/compress/pull/643
+
+* July 13, 2022 (v1.15.8)
+
+ * gzip: fix stack exhaustion bug in Reader.Read https://github.com/klauspost/compress/pull/641
+ * s2: Add Index header trim/restore https://github.com/klauspost/compress/pull/638
+ * zstd: Optimize seqdeq amd64 asm by @greatroar in https://github.com/klauspost/compress/pull/636
+ * zstd: Improve decoder memcopy https://github.com/klauspost/compress/pull/637
+ * huff0: Pass a single bitReader pointer to asm by @greatroar in https://github.com/klauspost/compress/pull/634
+ * zstd: Branchless getBits for amd64 w/o BMI2 by @greatroar in https://github.com/klauspost/compress/pull/640
+ * gzhttp: Remove header before writing https://github.com/klauspost/compress/pull/639
+
+* June 29, 2022 (v1.15.7)
+
+ * s2: Fix absolute forward seeks https://github.com/klauspost/compress/pull/633
+ * zip: Merge upstream https://github.com/klauspost/compress/pull/631
+ * zip: Re-add zip64 fix https://github.com/klauspost/compress/pull/624
+ * zstd: translate fseDecoder.buildDtable into asm by @WojciechMula in https://github.com/klauspost/compress/pull/598
+ * flate: Faster histograms https://github.com/klauspost/compress/pull/620
+ * deflate: Use compound hcode https://github.com/klauspost/compress/pull/622
+
+* June 3, 2022 (v1.15.6)
+ * s2: Improve coding for long, close matches https://github.com/klauspost/compress/pull/613
+ * s2c: Add Snappy/S2 stream recompression https://github.com/klauspost/compress/pull/611
+ * zstd: Always use configured block size https://github.com/klauspost/compress/pull/605
+ * zstd: Fix incorrect hash table placement for dict encoding in default https://github.com/klauspost/compress/pull/606
+ * zstd: Apply default config to ZipDecompressor without options https://github.com/klauspost/compress/pull/608
+ * gzhttp: Exclude more common archive formats https://github.com/klauspost/compress/pull/612
+ * s2: Add ReaderIgnoreCRC https://github.com/klauspost/compress/pull/609
+ * s2: Remove sanity load on index creation https://github.com/klauspost/compress/pull/607
+ * snappy: Use dedicated function for scoring https://github.com/klauspost/compress/pull/614
+ * s2c+s2d: Use official snappy framed extension https://github.com/klauspost/compress/pull/610
+
+* May 25, 2022 (v1.15.5)
+ * s2: Add concurrent stream decompression https://github.com/klauspost/compress/pull/602
+ * s2: Fix final emit oob read crash on amd64 https://github.com/klauspost/compress/pull/601
+ * huff0: asm implementation of Decompress1X by @WojciechMula https://github.com/klauspost/compress/pull/596
+ * zstd: Use 1 less goroutine for stream decoding https://github.com/klauspost/compress/pull/588
+ * zstd: Copy literal in 16 byte blocks when possible https://github.com/klauspost/compress/pull/592
+ * zstd: Speed up when WithDecoderLowmem(false) https://github.com/klauspost/compress/pull/599
+ * zstd: faster next state update in BMI2 version of decode by @WojciechMula in https://github.com/klauspost/compress/pull/593
+ * huff0: Do not check max size when reading table. https://github.com/klauspost/compress/pull/586
+ * flate: Inplace hashing for level 7-9 https://github.com/klauspost/compress/pull/590
+
+
+* May 11, 2022 (v1.15.4)
+ * huff0: decompress directly into output by @WojciechMula in [#577](https://github.com/klauspost/compress/pull/577)
+ * inflate: Keep dict on stack [#581](https://github.com/klauspost/compress/pull/581)
+ * zstd: Faster decoding memcopy in asm [#583](https://github.com/klauspost/compress/pull/583)
+ * zstd: Fix ignored crc [#580](https://github.com/klauspost/compress/pull/580)
+
+* May 5, 2022 (v1.15.3)
+ * zstd: Allow to ignore checksum checking by @WojciechMula [#572](https://github.com/klauspost/compress/pull/572)
+ * s2: Fix incorrect seek for io.SeekEnd in [#575](https://github.com/klauspost/compress/pull/575)
+
+* Apr 26, 2022 (v1.15.2)
+ * zstd: Add x86-64 assembly for decompression on streams and blocks. Contributed by [@WojciechMula](https://github.com/WojciechMula). Typically 2x faster. [#528](https://github.com/klauspost/compress/pull/528) [#531](https://github.com/klauspost/compress/pull/531) [#545](https://github.com/klauspost/compress/pull/545) [#537](https://github.com/klauspost/compress/pull/537)
+ * zstd: Add options to ZipDecompressor and fixes [#539](https://github.com/klauspost/compress/pull/539)
+ * s2: Use sorted search for index [#555](https://github.com/klauspost/compress/pull/555)
+ * Minimum version is Go 1.16, added CI test on 1.18.
+
+* Mar 11, 2022 (v1.15.1)
+ * huff0: Add x86 assembly of Decode4X by @WojciechMula in [#512](https://github.com/klauspost/compress/pull/512)
+ * zstd: Reuse zip decoders in [#514](https://github.com/klauspost/compress/pull/514)
+ * zstd: Detect extra block data and report as corrupted in [#520](https://github.com/klauspost/compress/pull/520)
+ * zstd: Handle zero sized frame content size stricter in [#521](https://github.com/klauspost/compress/pull/521)
+ * zstd: Add stricter block size checks in [#523](https://github.com/klauspost/compress/pull/523)
+
+* Mar 3, 2022 (v1.15.0)
+ * zstd: Refactor decoder [#498](https://github.com/klauspost/compress/pull/498)
+ * zstd: Add stream encoding without goroutines [#505](https://github.com/klauspost/compress/pull/505)
+ * huff0: Prevent single blocks exceeding 16 bits by @klauspost in[#507](https://github.com/klauspost/compress/pull/507)
+ * flate: Inline literal emission [#509](https://github.com/klauspost/compress/pull/509)
+ * gzhttp: Add zstd to transport [#400](https://github.com/klauspost/compress/pull/400)
+ * gzhttp: Make content-type optional [#510](https://github.com/klauspost/compress/pull/510)
+
+Both compression and decompression now supports "synchronous" stream operations. This means that whenever "concurrency" is set to 1, they will operate without spawning goroutines.
+
+Stream decompression is now faster on asynchronous, since the goroutine allocation much more effectively splits the workload. On typical streams this will typically use 2 cores fully for decompression. When a stream has finished decoding no goroutines will be left over, so decoders can now safely be pooled and still be garbage collected.
+
+While the release has been extensively tested, it is recommended to testing when upgrading.
+
+
+
+
+ See changes to v1.14.x
+
+* Feb 22, 2022 (v1.14.4)
+ * flate: Fix rare huffman only (-2) corruption. [#503](https://github.com/klauspost/compress/pull/503)
+ * zip: Update deprecated CreateHeaderRaw to correctly call CreateRaw by @saracen in [#502](https://github.com/klauspost/compress/pull/502)
+ * zip: don't read data descriptor early by @saracen in [#501](https://github.com/klauspost/compress/pull/501) #501
+ * huff0: Use static decompression buffer up to 30% faster [#499](https://github.com/klauspost/compress/pull/499) [#500](https://github.com/klauspost/compress/pull/500)
+
+* Feb 17, 2022 (v1.14.3)
+ * flate: Improve fastest levels compression speed ~10% more throughput. [#482](https://github.com/klauspost/compress/pull/482) [#489](https://github.com/klauspost/compress/pull/489) [#490](https://github.com/klauspost/compress/pull/490) [#491](https://github.com/klauspost/compress/pull/491) [#494](https://github.com/klauspost/compress/pull/494) [#478](https://github.com/klauspost/compress/pull/478)
+ * flate: Faster decompression speed, ~5-10%. [#483](https://github.com/klauspost/compress/pull/483)
+ * s2: Faster compression with Go v1.18 and amd64 microarch level 3+. [#484](https://github.com/klauspost/compress/pull/484) [#486](https://github.com/klauspost/compress/pull/486)
+
+* Jan 25, 2022 (v1.14.2)
+ * zstd: improve header decoder by @dsnet [#476](https://github.com/klauspost/compress/pull/476)
+ * zstd: Add bigger default blocks [#469](https://github.com/klauspost/compress/pull/469)
+ * zstd: Remove unused decompression buffer [#470](https://github.com/klauspost/compress/pull/470)
+ * zstd: Fix logically dead code by @ningmingxiao [#472](https://github.com/klauspost/compress/pull/472)
+ * flate: Improve level 7-9 [#471](https://github.com/klauspost/compress/pull/471) [#473](https://github.com/klauspost/compress/pull/473)
+ * zstd: Add noasm tag for xxhash [#475](https://github.com/klauspost/compress/pull/475)
+
+* Jan 11, 2022 (v1.14.1)
+ * s2: Add stream index in [#462](https://github.com/klauspost/compress/pull/462)
+ * flate: Speed and efficiency improvements in [#439](https://github.com/klauspost/compress/pull/439) [#461](https://github.com/klauspost/compress/pull/461) [#455](https://github.com/klauspost/compress/pull/455) [#452](https://github.com/klauspost/compress/pull/452) [#458](https://github.com/klauspost/compress/pull/458)
+ * zstd: Performance improvement in [#420]( https://github.com/klauspost/compress/pull/420) [#456](https://github.com/klauspost/compress/pull/456) [#437](https://github.com/klauspost/compress/pull/437) [#467](https://github.com/klauspost/compress/pull/467) [#468](https://github.com/klauspost/compress/pull/468)
+ * zstd: add arm64 xxhash assembly in [#464](https://github.com/klauspost/compress/pull/464)
+ * Add garbled for binaries for s2 in [#445](https://github.com/klauspost/compress/pull/445)
+
+
+
+ See changes to v1.13.x
+
+* Aug 30, 2021 (v1.13.5)
+ * gz/zlib/flate: Alias stdlib errors [#425](https://github.com/klauspost/compress/pull/425)
+ * s2: Add block support to commandline tools [#413](https://github.com/klauspost/compress/pull/413)
+ * zstd: pooledZipWriter should return Writers to the same pool [#426](https://github.com/klauspost/compress/pull/426)
+ * Removed golang/snappy as external dependency for tests [#421](https://github.com/klauspost/compress/pull/421)
+
+* Aug 12, 2021 (v1.13.4)
+ * Add [snappy replacement package](https://github.com/klauspost/compress/tree/master/snappy).
+ * zstd: Fix incorrect encoding in "best" mode [#415](https://github.com/klauspost/compress/pull/415)
+
+* Aug 3, 2021 (v1.13.3)
+ * zstd: Improve Best compression [#404](https://github.com/klauspost/compress/pull/404)
+ * zstd: Fix WriteTo error forwarding [#411](https://github.com/klauspost/compress/pull/411)
+ * gzhttp: Return http.HandlerFunc instead of http.Handler. Unlikely breaking change. [#406](https://github.com/klauspost/compress/pull/406)
+ * s2sx: Fix max size error [#399](https://github.com/klauspost/compress/pull/399)
+ * zstd: Add optional stream content size on reset [#401](https://github.com/klauspost/compress/pull/401)
+ * zstd: use SpeedBestCompression for level >= 10 [#410](https://github.com/klauspost/compress/pull/410)
+
+* Jun 14, 2021 (v1.13.1)
+ * s2: Add full Snappy output support [#396](https://github.com/klauspost/compress/pull/396)
+ * zstd: Add configurable [Decoder window](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithDecoderMaxWindow) size [#394](https://github.com/klauspost/compress/pull/394)
+ * gzhttp: Add header to skip compression [#389](https://github.com/klauspost/compress/pull/389)
+ * s2: Improve speed with bigger output margin [#395](https://github.com/klauspost/compress/pull/395)
+
+* Jun 3, 2021 (v1.13.0)
+ * Added [gzhttp](https://github.com/klauspost/compress/tree/master/gzhttp#gzip-handler) which allows wrapping HTTP servers and clients with GZIP compressors.
+ * zstd: Detect short invalid signatures [#382](https://github.com/klauspost/compress/pull/382)
+ * zstd: Spawn decoder goroutine only if needed. [#380](https://github.com/klauspost/compress/pull/380)
+
+
+
+
+ See changes to v1.12.x
+
+* May 25, 2021 (v1.12.3)
+ * deflate: Better/faster Huffman encoding [#374](https://github.com/klauspost/compress/pull/374)
+ * deflate: Allocate less for history. [#375](https://github.com/klauspost/compress/pull/375)
+ * zstd: Forward read errors [#373](https://github.com/klauspost/compress/pull/373)
+
+* Apr 27, 2021 (v1.12.2)
+ * zstd: Improve better/best compression [#360](https://github.com/klauspost/compress/pull/360) [#364](https://github.com/klauspost/compress/pull/364) [#365](https://github.com/klauspost/compress/pull/365)
+ * zstd: Add helpers to compress/decompress zstd inside zip files [#363](https://github.com/klauspost/compress/pull/363)
+ * deflate: Improve level 5+6 compression [#367](https://github.com/klauspost/compress/pull/367)
+ * s2: Improve better/best compression [#358](https://github.com/klauspost/compress/pull/358) [#359](https://github.com/klauspost/compress/pull/358)
+ * s2: Load after checking src limit on amd64. [#362](https://github.com/klauspost/compress/pull/362)
+ * s2sx: Limit max executable size [#368](https://github.com/klauspost/compress/pull/368)
+
+* Apr 14, 2021 (v1.12.1)
+ * snappy package removed. Upstream added as dependency.
+ * s2: Better compression in "best" mode [#353](https://github.com/klauspost/compress/pull/353)
+ * s2sx: Add stdin input and detect pre-compressed from signature [#352](https://github.com/klauspost/compress/pull/352)
+ * s2c/s2d: Add http as possible input [#348](https://github.com/klauspost/compress/pull/348)
+ * s2c/s2d/s2sx: Always truncate when writing files [#352](https://github.com/klauspost/compress/pull/352)
+ * zstd: Reduce memory usage further when using [WithLowerEncoderMem](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithLowerEncoderMem) [#346](https://github.com/klauspost/compress/pull/346)
+ * s2: Fix potential problem with amd64 assembly and profilers [#349](https://github.com/klauspost/compress/pull/349)
+
+
+
+ See changes to v1.11.x
+
+* Mar 26, 2021 (v1.11.13)
+ * zstd: Big speedup on small dictionary encodes [#344](https://github.com/klauspost/compress/pull/344) [#345](https://github.com/klauspost/compress/pull/345)
+ * zstd: Add [WithLowerEncoderMem](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithLowerEncoderMem) encoder option [#336](https://github.com/klauspost/compress/pull/336)
+ * deflate: Improve entropy compression [#338](https://github.com/klauspost/compress/pull/338)
+ * s2: Clean up and minor performance improvement in best [#341](https://github.com/klauspost/compress/pull/341)
+
+* Mar 5, 2021 (v1.11.12)
+ * s2: Add `s2sx` binary that creates [self extracting archives](https://github.com/klauspost/compress/tree/master/s2#s2sx-self-extracting-archives).
+ * s2: Speed up decompression on non-assembly platforms [#328](https://github.com/klauspost/compress/pull/328)
+
+* Mar 1, 2021 (v1.11.9)
+ * s2: Add ARM64 decompression assembly. Around 2x output speed. [#324](https://github.com/klauspost/compress/pull/324)
+ * s2: Improve "better" speed and efficiency. [#325](https://github.com/klauspost/compress/pull/325)
+ * s2: Fix binaries.
+
+* Feb 25, 2021 (v1.11.8)
+ * s2: Fixed occasional out-of-bounds write on amd64. Upgrade recommended.
+ * s2: Add AMD64 assembly for better mode. 25-50% faster. [#315](https://github.com/klauspost/compress/pull/315)
+ * s2: Less upfront decoder allocation. [#322](https://github.com/klauspost/compress/pull/322)
+ * zstd: Faster "compression" of incompressible data. [#314](https://github.com/klauspost/compress/pull/314)
+ * zip: Fix zip64 headers. [#313](https://github.com/klauspost/compress/pull/313)
+
+* Jan 14, 2021 (v1.11.7)
+ * Use Bytes() interface to get bytes across packages. [#309](https://github.com/klauspost/compress/pull/309)
+ * s2: Add 'best' compression option. [#310](https://github.com/klauspost/compress/pull/310)
+ * s2: Add ReaderMaxBlockSize, changes `s2.NewReader` signature to include varargs. [#311](https://github.com/klauspost/compress/pull/311)
+ * s2: Fix crash on small better buffers. [#308](https://github.com/klauspost/compress/pull/308)
+ * s2: Clean up decoder. [#312](https://github.com/klauspost/compress/pull/312)
+
+* Jan 7, 2021 (v1.11.6)
+ * zstd: Make decoder allocations smaller [#306](https://github.com/klauspost/compress/pull/306)
+ * zstd: Free Decoder resources when Reset is called with a nil io.Reader [#305](https://github.com/klauspost/compress/pull/305)
+
+* Dec 20, 2020 (v1.11.4)
+ * zstd: Add Best compression mode [#304](https://github.com/klauspost/compress/pull/304)
+ * Add header decoder [#299](https://github.com/klauspost/compress/pull/299)
+ * s2: Add uncompressed stream option [#297](https://github.com/klauspost/compress/pull/297)
+ * Simplify/speed up small blocks with known max size. [#300](https://github.com/klauspost/compress/pull/300)
+ * zstd: Always reset literal dict encoder [#303](https://github.com/klauspost/compress/pull/303)
+
+* Nov 15, 2020 (v1.11.3)
+ * inflate: 10-15% faster decompression [#293](https://github.com/klauspost/compress/pull/293)
+ * zstd: Tweak DecodeAll default allocation [#295](https://github.com/klauspost/compress/pull/295)
+
+* Oct 11, 2020 (v1.11.2)
+ * s2: Fix out of bounds read in "better" block compression [#291](https://github.com/klauspost/compress/pull/291)
+
+* Oct 1, 2020 (v1.11.1)
+ * zstd: Set allLitEntropy true in default configuration [#286](https://github.com/klauspost/compress/pull/286)
+
+* Sept 8, 2020 (v1.11.0)
+ * zstd: Add experimental compression [dictionaries](https://github.com/klauspost/compress/tree/master/zstd#dictionaries) [#281](https://github.com/klauspost/compress/pull/281)
+ * zstd: Fix mixed Write and ReadFrom calls [#282](https://github.com/klauspost/compress/pull/282)
+ * inflate/gz: Limit variable shifts, ~5% faster decompression [#274](https://github.com/klauspost/compress/pull/274)
+
+
+
+ See changes to v1.10.x
+
+* July 8, 2020 (v1.10.11)
+ * zstd: Fix extra block when compressing with ReadFrom. [#278](https://github.com/klauspost/compress/pull/278)
+ * huff0: Also populate compression table when reading decoding table. [#275](https://github.com/klauspost/compress/pull/275)
+
+* June 23, 2020 (v1.10.10)
+ * zstd: Skip entropy compression in fastest mode when no matches. [#270](https://github.com/klauspost/compress/pull/270)
+
+* June 16, 2020 (v1.10.9):
+ * zstd: API change for specifying dictionaries. See [#268](https://github.com/klauspost/compress/pull/268)
+ * zip: update CreateHeaderRaw to handle zip64 fields. [#266](https://github.com/klauspost/compress/pull/266)
+ * Fuzzit tests removed. The service has been purchased and is no longer available.
+
+* June 5, 2020 (v1.10.8):
+ * 1.15x faster zstd block decompression. [#265](https://github.com/klauspost/compress/pull/265)
+
+* June 1, 2020 (v1.10.7):
+ * Added zstd decompression [dictionary support](https://github.com/klauspost/compress/tree/master/zstd#dictionaries)
+ * Increase zstd decompression speed up to 1.19x. [#259](https://github.com/klauspost/compress/pull/259)
+ * Remove internal reset call in zstd compression and reduce allocations. [#263](https://github.com/klauspost/compress/pull/263)
+
+* May 21, 2020: (v1.10.6)
+ * zstd: Reduce allocations while decoding. [#258](https://github.com/klauspost/compress/pull/258), [#252](https://github.com/klauspost/compress/pull/252)
+ * zstd: Stricter decompression checks.
+
+* April 12, 2020: (v1.10.5)
+ * s2-commands: Flush output when receiving SIGINT. [#239](https://github.com/klauspost/compress/pull/239)
+
+* Apr 8, 2020: (v1.10.4)
+ * zstd: Minor/special case optimizations. [#251](https://github.com/klauspost/compress/pull/251), [#250](https://github.com/klauspost/compress/pull/250), [#249](https://github.com/klauspost/compress/pull/249), [#247](https://github.com/klauspost/compress/pull/247)
+* Mar 11, 2020: (v1.10.3)
+ * s2: Use S2 encoder in pure Go mode for Snappy output as well. [#245](https://github.com/klauspost/compress/pull/245)
+ * s2: Fix pure Go block encoder. [#244](https://github.com/klauspost/compress/pull/244)
+ * zstd: Added "better compression" mode. [#240](https://github.com/klauspost/compress/pull/240)
+ * zstd: Improve speed of fastest compression mode by 5-10% [#241](https://github.com/klauspost/compress/pull/241)
+ * zstd: Skip creating encoders when not needed. [#238](https://github.com/klauspost/compress/pull/238)
+
+* Feb 27, 2020: (v1.10.2)
+ * Close to 50% speedup in inflate (gzip/zip decompression). [#236](https://github.com/klauspost/compress/pull/236) [#234](https://github.com/klauspost/compress/pull/234) [#232](https://github.com/klauspost/compress/pull/232)
+ * Reduce deflate level 1-6 memory usage up to 59%. [#227](https://github.com/klauspost/compress/pull/227)
+
+* Feb 18, 2020: (v1.10.1)
+ * Fix zstd crash when resetting multiple times without sending data. [#226](https://github.com/klauspost/compress/pull/226)
+ * deflate: Fix dictionary use on level 1-6. [#224](https://github.com/klauspost/compress/pull/224)
+ * Remove deflate writer reference when closing. [#224](https://github.com/klauspost/compress/pull/224)
+
+* Feb 4, 2020: (v1.10.0)
+ * Add optional dictionary to [stateless deflate](https://pkg.go.dev/github.com/klauspost/compress/flate?tab=doc#StatelessDeflate). Breaking change, send `nil` for previous behaviour. [#216](https://github.com/klauspost/compress/pull/216)
+ * Fix buffer overflow on repeated small block deflate. [#218](https://github.com/klauspost/compress/pull/218)
+ * Allow copying content from an existing ZIP file without decompressing+compressing. [#214](https://github.com/klauspost/compress/pull/214)
+ * Added [S2](https://github.com/klauspost/compress/tree/master/s2#s2-compression) AMD64 assembler and various optimizations. Stream speed >10GB/s. [#186](https://github.com/klauspost/compress/pull/186)
+
+
+
+
+ See changes prior to v1.10.0
+
+* Jan 20,2020 (v1.9.8) Optimize gzip/deflate with better size estimates and faster table generation. [#207](https://github.com/klauspost/compress/pull/207) by [luyu6056](https://github.com/luyu6056), [#206](https://github.com/klauspost/compress/pull/206).
+* Jan 11, 2020: S2 Encode/Decode will use provided buffer if capacity is big enough. [#204](https://github.com/klauspost/compress/pull/204)
+* Jan 5, 2020: (v1.9.7) Fix another zstd regression in v1.9.5 - v1.9.6 removed.
+* Jan 4, 2020: (v1.9.6) Regression in v1.9.5 fixed causing corrupt zstd encodes in rare cases.
+* Jan 4, 2020: Faster IO in [s2c + s2d commandline tools](https://github.com/klauspost/compress/tree/master/s2#commandline-tools) compression/decompression. [#192](https://github.com/klauspost/compress/pull/192)
+* Dec 29, 2019: Removed v1.9.5 since fuzz tests showed a compatibility problem with the reference zstandard decoder.
+* Dec 29, 2019: (v1.9.5) zstd: 10-20% faster block compression. [#199](https://github.com/klauspost/compress/pull/199)
+* Dec 29, 2019: [zip](https://godoc.org/github.com/klauspost/compress/zip) package updated with latest Go features
+* Dec 29, 2019: zstd: Single segment flag condintions tweaked. [#197](https://github.com/klauspost/compress/pull/197)
+* Dec 18, 2019: s2: Faster compression when ReadFrom is used. [#198](https://github.com/klauspost/compress/pull/198)
+* Dec 10, 2019: s2: Fix repeat length output when just above at 16MB limit.
+* Dec 10, 2019: zstd: Add function to get decoder as io.ReadCloser. [#191](https://github.com/klauspost/compress/pull/191)
+* Dec 3, 2019: (v1.9.4) S2: limit max repeat length. [#188](https://github.com/klauspost/compress/pull/188)
+* Dec 3, 2019: Add [WithNoEntropyCompression](https://godoc.org/github.com/klauspost/compress/zstd#WithNoEntropyCompression) to zstd [#187](https://github.com/klauspost/compress/pull/187)
+* Dec 3, 2019: Reduce memory use for tests. Check for leaked goroutines.
+* Nov 28, 2019 (v1.9.3) Less allocations in stateless deflate.
+* Nov 28, 2019: 5-20% Faster huff0 decode. Impacts zstd as well. [#184](https://github.com/klauspost/compress/pull/184)
+* Nov 12, 2019 (v1.9.2) Added [Stateless Compression](#stateless-compression) for gzip/deflate.
+* Nov 12, 2019: Fixed zstd decompression of large single blocks. [#180](https://github.com/klauspost/compress/pull/180)
+* Nov 11, 2019: Set default [s2c](https://github.com/klauspost/compress/tree/master/s2#commandline-tools) block size to 4MB.
+* Nov 11, 2019: Reduce inflate memory use by 1KB.
+* Nov 10, 2019: Less allocations in deflate bit writer.
+* Nov 10, 2019: Fix inconsistent error returned by zstd decoder.
+* Oct 28, 2019 (v1.9.1) ztsd: Fix crash when compressing blocks. [#174](https://github.com/klauspost/compress/pull/174)
+* Oct 24, 2019 (v1.9.0) zstd: Fix rare data corruption [#173](https://github.com/klauspost/compress/pull/173)
+* Oct 24, 2019 zstd: Fix huff0 out of buffer write [#171](https://github.com/klauspost/compress/pull/171) and always return errors [#172](https://github.com/klauspost/compress/pull/172)
+* Oct 10, 2019: Big deflate rewrite, 30-40% faster with better compression [#105](https://github.com/klauspost/compress/pull/105)
+
+
+
+
+ See changes prior to v1.9.0
+
+* Oct 10, 2019: (v1.8.6) zstd: Allow partial reads to get flushed data. [#169](https://github.com/klauspost/compress/pull/169)
+* Oct 3, 2019: Fix inconsistent results on broken zstd streams.
+* Sep 25, 2019: Added `-rm` (remove source files) and `-q` (no output except errors) to `s2c` and `s2d` [commands](https://github.com/klauspost/compress/tree/master/s2#commandline-tools)
+* Sep 16, 2019: (v1.8.4) Add `s2c` and `s2d` [commandline tools](https://github.com/klauspost/compress/tree/master/s2#commandline-tools).
+* Sep 10, 2019: (v1.8.3) Fix s2 decoder [Skip](https://godoc.org/github.com/klauspost/compress/s2#Reader.Skip).
+* Sep 7, 2019: zstd: Added [WithWindowSize](https://godoc.org/github.com/klauspost/compress/zstd#WithWindowSize), contributed by [ianwilkes](https://github.com/ianwilkes).
+* Sep 5, 2019: (v1.8.2) Add [WithZeroFrames](https://godoc.org/github.com/klauspost/compress/zstd#WithZeroFrames) which adds full zero payload block encoding option.
+* Sep 5, 2019: Lazy initialization of zstandard predefined en/decoder tables.
+* Aug 26, 2019: (v1.8.1) S2: 1-2% compression increase in "better" compression mode.
+* Aug 26, 2019: zstd: Check maximum size of Huffman 1X compressed literals while decoding.
+* Aug 24, 2019: (v1.8.0) Added [S2 compression](https://github.com/klauspost/compress/tree/master/s2#s2-compression), a high performance replacement for Snappy.
+* Aug 21, 2019: (v1.7.6) Fixed minor issues found by fuzzer. One could lead to zstd not decompressing.
+* Aug 18, 2019: Add [fuzzit](https://fuzzit.dev/) continuous fuzzing.
+* Aug 14, 2019: zstd: Skip incompressible data 2x faster. [#147](https://github.com/klauspost/compress/pull/147)
+* Aug 4, 2019 (v1.7.5): Better literal compression. [#146](https://github.com/klauspost/compress/pull/146)
+* Aug 4, 2019: Faster zstd compression. [#143](https://github.com/klauspost/compress/pull/143) [#144](https://github.com/klauspost/compress/pull/144)
+* Aug 4, 2019: Faster zstd decompression. [#145](https://github.com/klauspost/compress/pull/145) [#143](https://github.com/klauspost/compress/pull/143) [#142](https://github.com/klauspost/compress/pull/142)
+* July 15, 2019 (v1.7.4): Fix double EOF block in rare cases on zstd encoder.
+* July 15, 2019 (v1.7.3): Minor speedup/compression increase in default zstd encoder.
+* July 14, 2019: zstd decoder: Fix decompression error on multiple uses with mixed content.
+* July 7, 2019 (v1.7.2): Snappy update, zstd decoder potential race fix.
+* June 17, 2019: zstd decompression bugfix.
+* June 17, 2019: fix 32 bit builds.
+* June 17, 2019: Easier use in modules (less dependencies).
+* June 9, 2019: New stronger "default" [zstd](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression mode. Matches zstd default compression ratio.
+* June 5, 2019: 20-40% throughput in [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and better compression.
+* June 5, 2019: deflate/gzip compression: Reduce memory usage of lower compression levels.
+* June 2, 2019: Added [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression!
+* May 25, 2019: deflate/gzip: 10% faster bit writer, mostly visible in lower levels.
+* Apr 22, 2019: [zstd](https://github.com/klauspost/compress/tree/master/zstd#zstd) decompression added.
+* Aug 1, 2018: Added [huff0 README](https://github.com/klauspost/compress/tree/master/huff0#huff0-entropy-compression).
+* Jul 8, 2018: Added [Performance Update 2018](#performance-update-2018) below.
+* Jun 23, 2018: Merged [Go 1.11 inflate optimizations](https://go-review.googlesource.com/c/go/+/102235). Go 1.9 is now required. Backwards compatible version tagged with [v1.3.0](https://github.com/klauspost/compress/releases/tag/v1.3.0).
+* Apr 2, 2018: Added [huff0](https://godoc.org/github.com/klauspost/compress/huff0) en/decoder. Experimental for now, API may change.
+* Mar 4, 2018: Added [FSE Entropy](https://godoc.org/github.com/klauspost/compress/fse) en/decoder. Experimental for now, API may change.
+* Nov 3, 2017: Add compression [Estimate](https://godoc.org/github.com/klauspost/compress#Estimate) function.
+* May 28, 2017: Reduce allocations when resetting decoder.
+* Apr 02, 2017: Change back to official crc32, since changes were merged in Go 1.7.
+* Jan 14, 2017: Reduce stack pressure due to array copies. See [Issue #18625](https://github.com/golang/go/issues/18625).
+* Oct 25, 2016: Level 2-4 have been rewritten and now offers significantly better performance than before.
+* Oct 20, 2016: Port zlib changes from Go 1.7 to fix zlib writer issue. Please update.
+* Oct 16, 2016: Go 1.7 changes merged. Apples to apples this package is a few percent faster, but has a significantly better balance between speed and compression per level.
+* Mar 24, 2016: Always attempt Huffman encoding on level 4-7. This improves base 64 encoded data compression.
+* Mar 24, 2016: Small speedup for level 1-3.
+* Feb 19, 2016: Faster bit writer, level -2 is 15% faster, level 1 is 4% faster.
+* Feb 19, 2016: Handle small payloads faster in level 1-3.
+* Feb 19, 2016: Added faster level 2 + 3 compression modes.
+* Feb 19, 2016: [Rebalanced compression levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so there is a more even progression in terms of compression. New default level is 5.
+* Feb 14, 2016: Snappy: Merge upstream changes.
+* Feb 14, 2016: Snappy: Fix aggressive skipping.
+* Feb 14, 2016: Snappy: Update benchmark.
+* Feb 13, 2016: Deflate: Fixed assembler problem that could lead to sub-optimal compression.
+* Feb 12, 2016: Snappy: Added AMD64 SSE 4.2 optimizations to matching, which makes easy to compress material run faster. Typical speedup is around 25%.
+* Feb 9, 2016: Added Snappy package fork. This version is 5-7% faster, much more on hard to compress content.
+* Jan 30, 2016: Optimize level 1 to 3 by not considering static dictionary or storing uncompressed. ~4-5% speedup.
+* Jan 16, 2016: Optimization on deflate level 1,2,3 compression.
+* Jan 8 2016: Merge [CL 18317](https://go-review.googlesource.com/#/c/18317): fix reading, writing of zip64 archives.
+* Dec 8 2015: Make level 1 and -2 deterministic even if write size differs.
+* Dec 8 2015: Split encoding functions, so hashing and matching can potentially be inlined. 1-3% faster on AMD64. 5% faster on other platforms.
+* Dec 8 2015: Fixed rare [one byte out-of bounds read](https://github.com/klauspost/compress/issues/20). Please update!
+* Nov 23 2015: Optimization on token writer. ~2-4% faster. Contributed by [@dsnet](https://github.com/dsnet).
+* Nov 20 2015: Small optimization to bit writer on 64 bit systems.
+* Nov 17 2015: Fixed out-of-bound errors if the underlying Writer returned an error. See [#15](https://github.com/klauspost/compress/issues/15).
+* Nov 12 2015: Added [io.WriterTo](https://golang.org/pkg/io/#WriterTo) support to gzip/inflate.
+* Nov 11 2015: Merged [CL 16669](https://go-review.googlesource.com/#/c/16669/4): archive/zip: enable overriding (de)compressors per file
+* Oct 15 2015: Added skipping on uncompressible data. Random data speed up >5x.
+
+
+
+# deflate usage
+
+The packages are drop-in replacements for standard library [deflate](https://godoc.org/github.com/klauspost/compress/flate), [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip), and [zlib](https://godoc.org/github.com/klauspost/compress/zlib). Simply replace the import path to use them:
+
+Typical speed is about 2x of the standard library packages.
+
+| old import | new import | Documentation |
+|------------------|---------------------------------------|-------------------------------------------------------------------------|
+| `compress/gzip` | `github.com/klauspost/compress/gzip` | [gzip](https://pkg.go.dev/github.com/klauspost/compress/gzip?tab=doc) |
+| `compress/zlib` | `github.com/klauspost/compress/zlib` | [zlib](https://pkg.go.dev/github.com/klauspost/compress/zlib?tab=doc) |
+| `archive/zip` | `github.com/klauspost/compress/zip` | [zip](https://pkg.go.dev/github.com/klauspost/compress/zip?tab=doc) |
+| `compress/flate` | `github.com/klauspost/compress/flate` | [flate](https://pkg.go.dev/github.com/klauspost/compress/flate?tab=doc) |
+
+You may also be interested in [pgzip](https://github.com/klauspost/pgzip), which is a drop-in replacement for gzip, which support multithreaded compression on big files and the optimized [crc32](https://github.com/klauspost/crc32) package used by these packages.
+
+The packages implement the same API as the standard library, so you can use the original godoc documentation: [gzip](http://golang.org/pkg/compress/gzip/), [zip](http://golang.org/pkg/archive/zip/), [zlib](http://golang.org/pkg/compress/zlib/), [flate](http://golang.org/pkg/compress/flate/).
+
+Currently there is only minor speedup on decompression (mostly CRC32 calculation).
+
+Memory usage is typically 1MB for a Writer. stdlib is in the same range.
+If you expect to have a lot of concurrently allocated Writers consider using
+the stateless compression described below.
+
+For compression performance, see: [this spreadsheet](https://docs.google.com/spreadsheets/d/1nuNE2nPfuINCZJRMt6wFWhKpToF95I47XjSsc-1rbPQ/edit?usp=sharing).
+
+To disable all assembly add `-tags=noasm`. This works across all packages.
+
+# Stateless compression
+
+This package offers stateless compression as a special option for gzip/deflate.
+It will do compression but without maintaining any state between Write calls.
+
+This means there will be no memory kept between Write calls, but compression and speed will be suboptimal.
+
+This is only relevant in cases where you expect to run many thousands of compressors concurrently,
+but with very little activity. This is *not* intended for regular web servers serving individual requests.
+
+Because of this, the size of actual Write calls will affect output size.
+
+In gzip, specify level `-3` / `gzip.StatelessCompression` to enable.
+
+For direct deflate use, NewStatelessWriter and StatelessDeflate are available. See [documentation](https://godoc.org/github.com/klauspost/compress/flate#NewStatelessWriter)
+
+A `bufio.Writer` can of course be used to control write sizes. For example, to use a 4KB buffer:
+
+```go
+ // replace 'ioutil.Discard' with your output.
+ gzw, err := gzip.NewWriterLevel(ioutil.Discard, gzip.StatelessCompression)
+ if err != nil {
+ return err
+ }
+ defer gzw.Close()
+
+ w := bufio.NewWriterSize(gzw, 4096)
+ defer w.Flush()
+
+ // Write to 'w'
+```
+
+This will only use up to 4KB in memory when the writer is idle.
+
+Compression is almost always worse than the fastest compression level
+and each write will allocate (a little) memory.
+
+
+# Other packages
+
+Here are other packages of good quality and pure Go (no cgo wrappers or autoconverted code):
+
+* [github.com/pierrec/lz4](https://github.com/pierrec/lz4) - strong multithreaded LZ4 compression.
+* [github.com/cosnicolaou/pbzip2](https://github.com/cosnicolaou/pbzip2) - multithreaded bzip2 decompression.
+* [github.com/dsnet/compress](https://github.com/dsnet/compress) - brotli decompression, bzip2 writer.
+* [github.com/ronanh/intcomp](https://github.com/ronanh/intcomp) - Integer compression.
+* [github.com/spenczar/fpc](https://github.com/spenczar/fpc) - Float compression.
+* [github.com/minio/zipindex](https://github.com/minio/zipindex) - External ZIP directory index.
+* [github.com/ybirader/pzip](https://github.com/ybirader/pzip) - Fast concurrent zip archiver and extractor.
+
+# license
+
+This code is licensed under the same conditions as the original Go code. See LICENSE file.
+
+
+
+
+
diff --git a/vendor/github.com/klauspost/compress/fse/README.md b/vendor/github.com/klauspost/compress/fse/README.md
index ea7324da..27d8ed56 100644
--- a/vendor/github.com/klauspost/compress/fse/README.md
+++ b/vendor/github.com/klauspost/compress/fse/README.md
@@ -1,79 +1,79 @@
-# Finite State Entropy
-
-This package provides Finite State Entropy encoding and decoding.
-
-Finite State Entropy (also referenced as [tANS](https://en.wikipedia.org/wiki/Asymmetric_numeral_systems#tANS))
-encoding provides a fast near-optimal symbol encoding/decoding
-for byte blocks as implemented in [zstandard](https://github.com/facebook/zstd).
-
-This can be used for compressing input with a lot of similar input values to the smallest number of bytes.
-This does not perform any multi-byte [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder) as LZ coders,
-but it can be used as a secondary step to compressors (like Snappy) that does not do entropy encoding.
-
-* [Godoc documentation](https://godoc.org/github.com/klauspost/compress/fse)
-
-## News
-
- * Feb 2018: First implementation released. Consider this beta software for now.
-
-# Usage
-
-This package provides a low level interface that allows to compress single independent blocks.
-
-Each block is separate, and there is no built in integrity checks.
-This means that the caller should keep track of block sizes and also do checksums if needed.
-
-Compressing a block is done via the [`Compress`](https://godoc.org/github.com/klauspost/compress/fse#Compress) function.
-You must provide input and will receive the output and maybe an error.
-
-These error values can be returned:
-
-| Error | Description |
-|---------------------|-----------------------------------------------------------------------------|
-| `` | Everything ok, output is returned |
-| `ErrIncompressible` | Returned when input is judged to be too hard to compress |
-| `ErrUseRLE` | Returned from the compressor when the input is a single byte value repeated |
-| `(error)` | An internal error occurred. |
-
-As can be seen above there are errors that will be returned even under normal operation so it is important to handle these.
-
-To reduce allocations you can provide a [`Scratch`](https://godoc.org/github.com/klauspost/compress/fse#Scratch) object
-that can be re-used for successive calls. Both compression and decompression accepts a `Scratch` object, and the same
-object can be used for both.
-
-Be aware, that when re-using a `Scratch` object that the *output* buffer is also re-used, so if you are still using this
-you must set the `Out` field in the scratch to nil. The same buffer is used for compression and decompression output.
-
-Decompressing is done by calling the [`Decompress`](https://godoc.org/github.com/klauspost/compress/fse#Decompress) function.
-You must provide the output from the compression stage, at exactly the size you got back. If you receive an error back
-your input was likely corrupted.
-
-It is important to note that a successful decoding does *not* mean your output matches your original input.
-There are no integrity checks, so relying on errors from the decompressor does not assure your data is valid.
-
-For more detailed usage, see examples in the [godoc documentation](https://godoc.org/github.com/klauspost/compress/fse#pkg-examples).
-
-# Performance
-
-A lot of factors are affecting speed. Block sizes and compressibility of the material are primary factors.
-All compression functions are currently only running on the calling goroutine so only one core will be used per block.
-
-The compressor is significantly faster if symbols are kept as small as possible. The highest byte value of the input
-is used to reduce some of the processing, so if all your input is above byte value 64 for instance, it may be
-beneficial to transpose all your input values down by 64.
-
-With moderate block sizes around 64k speed are typically 200MB/s per core for compression and
-around 300MB/s decompression speed.
-
-The same hardware typically does Huffman (deflate) encoding at 125MB/s and decompression at 100MB/s.
-
-# Plans
-
-At one point, more internals will be exposed to facilitate more "expert" usage of the components.
-
-A streaming interface is also likely to be implemented. Likely compatible with [FSE stream format](https://github.com/Cyan4973/FiniteStateEntropy/blob/dev/programs/fileio.c#L261).
-
-# Contributing
-
-Contributions are always welcome. Be aware that adding public functions will require good justification and breaking
+# Finite State Entropy
+
+This package provides Finite State Entropy encoding and decoding.
+
+Finite State Entropy (also referenced as [tANS](https://en.wikipedia.org/wiki/Asymmetric_numeral_systems#tANS))
+encoding provides a fast near-optimal symbol encoding/decoding
+for byte blocks as implemented in [zstandard](https://github.com/facebook/zstd).
+
+This can be used for compressing input with a lot of similar input values to the smallest number of bytes.
+This does not perform any multi-byte [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder) as LZ coders,
+but it can be used as a secondary step to compressors (like Snappy) that does not do entropy encoding.
+
+* [Godoc documentation](https://godoc.org/github.com/klauspost/compress/fse)
+
+## News
+
+ * Feb 2018: First implementation released. Consider this beta software for now.
+
+# Usage
+
+This package provides a low level interface that allows to compress single independent blocks.
+
+Each block is separate, and there is no built in integrity checks.
+This means that the caller should keep track of block sizes and also do checksums if needed.
+
+Compressing a block is done via the [`Compress`](https://godoc.org/github.com/klauspost/compress/fse#Compress) function.
+You must provide input and will receive the output and maybe an error.
+
+These error values can be returned:
+
+| Error | Description |
+|---------------------|-----------------------------------------------------------------------------|
+| `` | Everything ok, output is returned |
+| `ErrIncompressible` | Returned when input is judged to be too hard to compress |
+| `ErrUseRLE` | Returned from the compressor when the input is a single byte value repeated |
+| `(error)` | An internal error occurred. |
+
+As can be seen above there are errors that will be returned even under normal operation so it is important to handle these.
+
+To reduce allocations you can provide a [`Scratch`](https://godoc.org/github.com/klauspost/compress/fse#Scratch) object
+that can be re-used for successive calls. Both compression and decompression accepts a `Scratch` object, and the same
+object can be used for both.
+
+Be aware, that when re-using a `Scratch` object that the *output* buffer is also re-used, so if you are still using this
+you must set the `Out` field in the scratch to nil. The same buffer is used for compression and decompression output.
+
+Decompressing is done by calling the [`Decompress`](https://godoc.org/github.com/klauspost/compress/fse#Decompress) function.
+You must provide the output from the compression stage, at exactly the size you got back. If you receive an error back
+your input was likely corrupted.
+
+It is important to note that a successful decoding does *not* mean your output matches your original input.
+There are no integrity checks, so relying on errors from the decompressor does not assure your data is valid.
+
+For more detailed usage, see examples in the [godoc documentation](https://godoc.org/github.com/klauspost/compress/fse#pkg-examples).
+
+# Performance
+
+A lot of factors are affecting speed. Block sizes and compressibility of the material are primary factors.
+All compression functions are currently only running on the calling goroutine so only one core will be used per block.
+
+The compressor is significantly faster if symbols are kept as small as possible. The highest byte value of the input
+is used to reduce some of the processing, so if all your input is above byte value 64 for instance, it may be
+beneficial to transpose all your input values down by 64.
+
+With moderate block sizes around 64k speed are typically 200MB/s per core for compression and
+around 300MB/s decompression speed.
+
+The same hardware typically does Huffman (deflate) encoding at 125MB/s and decompression at 100MB/s.
+
+# Plans
+
+At one point, more internals will be exposed to facilitate more "expert" usage of the components.
+
+A streaming interface is also likely to be implemented. Likely compatible with [FSE stream format](https://github.com/Cyan4973/FiniteStateEntropy/blob/dev/programs/fileio.c#L261).
+
+# Contributing
+
+Contributions are always welcome. Be aware that adding public functions will require good justification and breaking
changes will likely not be accepted. If in doubt open an issue before writing the PR.
\ No newline at end of file
diff --git a/vendor/github.com/klauspost/compress/huff0/README.md b/vendor/github.com/klauspost/compress/huff0/README.md
index 8b6e5c66..26d5101b 100644
--- a/vendor/github.com/klauspost/compress/huff0/README.md
+++ b/vendor/github.com/klauspost/compress/huff0/README.md
@@ -1,89 +1,89 @@
-# Huff0 entropy compression
-
-This package provides Huff0 encoding and decoding as used in zstd.
-
-[Huff0](https://github.com/Cyan4973/FiniteStateEntropy#new-generation-entropy-coders),
-a Huffman codec designed for modern CPU, featuring OoO (Out of Order) operations on multiple ALU
-(Arithmetic Logic Unit), achieving extremely fast compression and decompression speeds.
-
-This can be used for compressing input with a lot of similar input values to the smallest number of bytes.
-This does not perform any multi-byte [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder) as LZ coders,
-but it can be used as a secondary step to compressors (like Snappy) that does not do entropy encoding.
-
-* [Godoc documentation](https://godoc.org/github.com/klauspost/compress/huff0)
-
-## News
-
-This is used as part of the [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and decompression package.
-
-This ensures that most functionality is well tested.
-
-# Usage
-
-This package provides a low level interface that allows to compress single independent blocks.
-
-Each block is separate, and there is no built in integrity checks.
-This means that the caller should keep track of block sizes and also do checksums if needed.
-
-Compressing a block is done via the [`Compress1X`](https://godoc.org/github.com/klauspost/compress/huff0#Compress1X) and
-[`Compress4X`](https://godoc.org/github.com/klauspost/compress/huff0#Compress4X) functions.
-You must provide input and will receive the output and maybe an error.
-
-These error values can be returned:
-
-| Error | Description |
-|---------------------|-----------------------------------------------------------------------------|
-| `` | Everything ok, output is returned |
-| `ErrIncompressible` | Returned when input is judged to be too hard to compress |
-| `ErrUseRLE` | Returned from the compressor when the input is a single byte value repeated |
-| `ErrTooBig` | Returned if the input block exceeds the maximum allowed size (128 Kib) |
-| `(error)` | An internal error occurred. |
-
-
-As can be seen above some of there are errors that will be returned even under normal operation so it is important to handle these.
-
-To reduce allocations you can provide a [`Scratch`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch) object
-that can be re-used for successive calls. Both compression and decompression accepts a `Scratch` object, and the same
-object can be used for both.
-
-Be aware, that when re-using a `Scratch` object that the *output* buffer is also re-used, so if you are still using this
-you must set the `Out` field in the scratch to nil. The same buffer is used for compression and decompression output.
-
-The `Scratch` object will retain state that allows to re-use previous tables for encoding and decoding.
-
-## Tables and re-use
-
-Huff0 allows for reusing tables from the previous block to save space if that is expected to give better/faster results.
-
-The Scratch object allows you to set a [`ReusePolicy`](https://godoc.org/github.com/klauspost/compress/huff0#ReusePolicy)
-that controls this behaviour. See the documentation for details. This can be altered between each block.
-
-Do however note that this information is *not* stored in the output block and it is up to the users of the package to
-record whether [`ReadTable`](https://godoc.org/github.com/klauspost/compress/huff0#ReadTable) should be called,
-based on the boolean reported back from the CompressXX call.
-
-If you want to store the table separate from the data, you can access them as `OutData` and `OutTable` on the
-[`Scratch`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch) object.
-
-## Decompressing
-
-The first part of decoding is to initialize the decoding table through [`ReadTable`](https://godoc.org/github.com/klauspost/compress/huff0#ReadTable).
-This will initialize the decoding tables.
-You can supply the complete block to `ReadTable` and it will return the data part of the block
-which can be given to the decompressor.
-
-Decompressing is done by calling the [`Decompress1X`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch.Decompress1X)
-or [`Decompress4X`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch.Decompress4X) function.
-
-For concurrently decompressing content with a fixed table a stateless [`Decoder`](https://godoc.org/github.com/klauspost/compress/huff0#Decoder) can be requested which will remain correct as long as the scratch is unchanged. The capacity of the provided slice indicates the expected output size.
-
-You must provide the output from the compression stage, at exactly the size you got back. If you receive an error back
-your input was likely corrupted.
-
-It is important to note that a successful decoding does *not* mean your output matches your original input.
-There are no integrity checks, so relying on errors from the decompressor does not assure your data is valid.
-
-# Contributing
-
-Contributions are always welcome. Be aware that adding public functions will require good justification and breaking
-changes will likely not be accepted. If in doubt open an issue before writing the PR.
+# Huff0 entropy compression
+
+This package provides Huff0 encoding and decoding as used in zstd.
+
+[Huff0](https://github.com/Cyan4973/FiniteStateEntropy#new-generation-entropy-coders),
+a Huffman codec designed for modern CPU, featuring OoO (Out of Order) operations on multiple ALU
+(Arithmetic Logic Unit), achieving extremely fast compression and decompression speeds.
+
+This can be used for compressing input with a lot of similar input values to the smallest number of bytes.
+This does not perform any multi-byte [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder) as LZ coders,
+but it can be used as a secondary step to compressors (like Snappy) that does not do entropy encoding.
+
+* [Godoc documentation](https://godoc.org/github.com/klauspost/compress/huff0)
+
+## News
+
+This is used as part of the [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and decompression package.
+
+This ensures that most functionality is well tested.
+
+# Usage
+
+This package provides a low level interface that allows to compress single independent blocks.
+
+Each block is separate, and there is no built in integrity checks.
+This means that the caller should keep track of block sizes and also do checksums if needed.
+
+Compressing a block is done via the [`Compress1X`](https://godoc.org/github.com/klauspost/compress/huff0#Compress1X) and
+[`Compress4X`](https://godoc.org/github.com/klauspost/compress/huff0#Compress4X) functions.
+You must provide input and will receive the output and maybe an error.
+
+These error values can be returned:
+
+| Error | Description |
+|---------------------|-----------------------------------------------------------------------------|
+| `` | Everything ok, output is returned |
+| `ErrIncompressible` | Returned when input is judged to be too hard to compress |
+| `ErrUseRLE` | Returned from the compressor when the input is a single byte value repeated |
+| `ErrTooBig` | Returned if the input block exceeds the maximum allowed size (128 Kib) |
+| `(error)` | An internal error occurred. |
+
+
+As can be seen above some of there are errors that will be returned even under normal operation so it is important to handle these.
+
+To reduce allocations you can provide a [`Scratch`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch) object
+that can be re-used for successive calls. Both compression and decompression accepts a `Scratch` object, and the same
+object can be used for both.
+
+Be aware, that when re-using a `Scratch` object that the *output* buffer is also re-used, so if you are still using this
+you must set the `Out` field in the scratch to nil. The same buffer is used for compression and decompression output.
+
+The `Scratch` object will retain state that allows to re-use previous tables for encoding and decoding.
+
+## Tables and re-use
+
+Huff0 allows for reusing tables from the previous block to save space if that is expected to give better/faster results.
+
+The Scratch object allows you to set a [`ReusePolicy`](https://godoc.org/github.com/klauspost/compress/huff0#ReusePolicy)
+that controls this behaviour. See the documentation for details. This can be altered between each block.
+
+Do however note that this information is *not* stored in the output block and it is up to the users of the package to
+record whether [`ReadTable`](https://godoc.org/github.com/klauspost/compress/huff0#ReadTable) should be called,
+based on the boolean reported back from the CompressXX call.
+
+If you want to store the table separate from the data, you can access them as `OutData` and `OutTable` on the
+[`Scratch`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch) object.
+
+## Decompressing
+
+The first part of decoding is to initialize the decoding table through [`ReadTable`](https://godoc.org/github.com/klauspost/compress/huff0#ReadTable).
+This will initialize the decoding tables.
+You can supply the complete block to `ReadTable` and it will return the data part of the block
+which can be given to the decompressor.
+
+Decompressing is done by calling the [`Decompress1X`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch.Decompress1X)
+or [`Decompress4X`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch.Decompress4X) function.
+
+For concurrently decompressing content with a fixed table a stateless [`Decoder`](https://godoc.org/github.com/klauspost/compress/huff0#Decoder) can be requested which will remain correct as long as the scratch is unchanged. The capacity of the provided slice indicates the expected output size.
+
+You must provide the output from the compression stage, at exactly the size you got back. If you receive an error back
+your input was likely corrupted.
+
+It is important to note that a successful decoding does *not* mean your output matches your original input.
+There are no integrity checks, so relying on errors from the decompressor does not assure your data is valid.
+
+# Contributing
+
+Contributions are always welcome. Be aware that adding public functions will require good justification and breaking
+changes will likely not be accepted. If in doubt open an issue before writing the PR.
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
index 6dcf1b5b..83c6ae24 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
@@ -364,7 +364,9 @@ func (n HTTPServer) MetricAttributes(server string, req *http.Request, statusCod
if statusCode > 0 {
num++
}
-
+ if route == "" && req.Pattern != "" {
+ route = httpRoute(req.Pattern)
+ }
if route != "" {
num++
}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
index 1d90fc26..835ec5aa 100644
--- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
@@ -4,4 +4,4 @@
package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
// Version is the current release version of the otelhttp instrumentation.
-const Version = "0.67.0"
+const Version = "0.68.0"
diff --git a/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/golang.org/x/crypto/ssh/certs.go
index 139fa31e..6f75d77e 100644
--- a/vendor/golang.org/x/crypto/ssh/certs.go
+++ b/vendor/golang.org/x/crypto/ssh/certs.go
@@ -348,6 +348,9 @@ func (c *CertChecker) CheckHostKey(addr string, remote net.Addr, key PublicKey)
if cert.CertType != HostCert {
return fmt.Errorf("ssh: certificate presented as a host key has type %d", cert.CertType)
}
+ if c.IsHostAuthority == nil {
+ return errors.New("ssh: cannot verify certificate, IsHostAuthority not set")
+ }
if !c.IsHostAuthority(cert.SignatureKey, addr) {
return fmt.Errorf("ssh: no authorities for hostname: %v", addr)
}
@@ -375,6 +378,9 @@ func (c *CertChecker) Authenticate(conn ConnMetadata, pubKey PublicKey) (*Permis
if cert.CertType != UserCert {
return nil, fmt.Errorf("ssh: cert has type %d", cert.CertType)
}
+ if c.IsUserAuthority == nil {
+ return nil, errors.New("ssh: cannot verify certificate, IsUserAuthority not set")
+ }
if !c.IsUserAuthority(cert.SignatureKey) {
return nil, fmt.Errorf("ssh: certificate signed by unrecognized authority")
}
@@ -438,7 +444,17 @@ func (c *CertChecker) CheckCert(principal string, cert *Certificate) error {
if before := int64(cert.ValidBefore); cert.ValidBefore != uint64(CertTimeInfinity) && (unixNow >= before || before < 0) {
return fmt.Errorf("ssh: cert has expired")
}
- if err := cert.SignatureKey.Verify(cert.bytesForSigning(), cert.Signature); err != nil {
+ // Match OpenSSH: the SK user-presence flag is never enforced on a
+ // certificate's CA signature. OpenSSH calls sshkey_verify with
+ // detailsp==NULL in sshkey.c:cert_parse, so the UP/UV flags are
+ // not even extracted. The UP bit on a CA signature reflects the
+ // CA operator's presence at signing time, which has no bearing on
+ // whether the user being authenticated is present now; enforcing
+ // it here would only break interop with certificates issued by
+ // non-interactive SK CAs. skKeyWithoutUP is a no-op for non-SK
+ // keys (the common case).
+ caKey := skKeyWithoutUP(cert.SignatureKey)
+ if err := caKey.Verify(cert.bytesForSigning(), cert.Signature); err != nil {
return fmt.Errorf("ssh: certificate signature does not verify")
}
diff --git a/vendor/golang.org/x/crypto/ssh/channel.go b/vendor/golang.org/x/crypto/ssh/channel.go
index cc0bb7ab..67379966 100644
--- a/vendor/golang.org/x/crypto/ssh/channel.go
+++ b/vendor/golang.org/x/crypto/ssh/channel.go
@@ -11,6 +11,7 @@ import (
"io"
"log"
"sync"
+ "sync/atomic"
)
const (
@@ -131,11 +132,17 @@ func (r RejectionReason) String() string {
return fmt.Sprintf("unknown reason %d", int(r))
}
-func min(a uint32, b int) uint32 {
- if a < uint32(b) {
- return a
+// minPayloadSize returns min(limit, length) clamped to a uint32. It is used
+// to compute the size of the next channel data packet from the remaining
+// payload. The comparison is done in int64 because length is an int — on
+// 64-bit systems len(data) can exceed 2^32, and a direct uint32(length)
+// cast would silently truncate to 0 at every multiple of 2^32, causing
+// WriteExtended's loop to spin without making progress.
+func minPayloadSize(limit uint32, length int) uint32 {
+ if int64(length) > int64(limit) {
+ return limit
}
- return uint32(b)
+ return uint32(length)
}
type channelDirection uint8
@@ -177,6 +184,12 @@ type channel struct {
// with WantReply=true outstanding. This lock is held by a
// goroutine that has such an outgoing request pending.
sentRequestMu sync.Mutex
+ // sentRequestPending is set to true while a SendRequest call with
+ // WantReply=true is in flight. handlePacket uses it as a gate: responses
+ // arriving while no request is pending are dropped to prevent a
+ // misbehaving peer from stalling the mux read loop by filling ch.msg
+ // with unsolicited channelRequestSuccess/Failure messages.
+ sentRequestPending atomic.Bool
incomingRequests chan *Request
@@ -251,7 +264,7 @@ func (ch *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err e
ch.writeMu.Unlock()
for len(data) > 0 {
- space := min(ch.maxRemotePayload, len(data))
+ space := minPayloadSize(ch.maxRemotePayload, len(data))
if space, err = ch.remoteWin.reserve(space); err != nil {
return n, err
}
@@ -460,6 +473,18 @@ func (ch *channel) handlePacket(packet []byte) error {
}
ch.incomingRequests <- &req
+ case *channelRequestSuccessMsg, *channelRequestFailureMsg:
+ // Drop responses that arrive when no SendRequest is waiting, to
+ // prevent a malicious peer from filling ch.msg and stalling the
+ // mux read loop. The non-blocking send additionally protects the
+ // loop if a well-behaved caller is slow to read.
+ if !ch.sentRequestPending.Load() {
+ return nil
+ }
+ select {
+ case ch.msg <- msg:
+ default:
+ }
default:
ch.msg <- msg
}
@@ -530,7 +555,17 @@ func (ch *channel) Reject(reason RejectionReason, message string) error {
Language: "en",
}
ch.decided = true
- return ch.sendMessage(reject)
+ err := ch.sendMessage(reject)
+
+ // Remove the channel from the mux to prevent memory leaks.
+ // Do not call ch.close() here: no goroutine holds a reference to a
+ // rejected channel's internal channels (msg, incomingRequests), so
+ // removing it from chanList is sufficient for GC. Calling close()
+ // would race with the mux loop goroutine (handlePacket or dropAll),
+ // causing a panic from closing an already-closed channel.
+ ch.mux.chanList.remove(ch.localId)
+
+ return err
}
func (ch *channel) Read(data []byte) (int, error) {
@@ -586,6 +621,24 @@ func (ch *channel) SendRequest(name string, wantReply bool, payload []byte) (boo
if wantReply {
ch.sentRequestMu.Lock()
defer ch.sentRequestMu.Unlock()
+
+ // Open the gate so that responses arriving while this request is in
+ // flight are allowed to reach ch.msg. Responses arriving while no
+ // request is pending are dropped by handlePacket.
+ ch.sentRequestPending.Store(true)
+ defer ch.sentRequestPending.Store(false)
+
+ // Drain any spurious responses that may have been buffered. This
+ // prevents a previously buffered unexpected response from being
+ // consumed instead of the actual response for this request.
+ drain:
+ for {
+ select {
+ case <-ch.msg:
+ default:
+ break drain
+ }
+ }
}
msg := channelRequestMsg{
diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go
index ad2b3705..48d01995 100644
--- a/vendor/golang.org/x/crypto/ssh/cipher.go
+++ b/vendor/golang.org/x/crypto/ssh/cipher.go
@@ -407,7 +407,7 @@ func (c *gcmCipher) readCipherPacket(seqNum uint32, r io.Reader) ([]byte, error)
return nil, fmt.Errorf("ssh: illegal padding %d", padding)
}
- if int(padding+1) >= len(plain) {
+ if int(padding)+1 >= len(plain) {
return nil, fmt.Errorf("ssh: padding %d too large", padding)
}
plain = plain[1 : length-uint32(padding)]
diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go
index 47a07539..3482c4d2 100644
--- a/vendor/golang.org/x/crypto/ssh/keys.go
+++ b/vendor/golang.org/x/crypto/ssh/keys.go
@@ -469,6 +469,12 @@ func parseRSA(in []byte) (out PublicKey, rest []byte, err error) {
return nil, nil, err
}
+ // 8192 bits is also the maximum RSA key size accepted by crypto/tls for
+ // signature verification:
+ // https://github.com/golang/go/blob/69801b25/src/crypto/tls/handshake_client.go#L1096
+ if w.N.BitLen() > 8192 {
+ return nil, nil, errors.New("ssh: rsa modulus too large")
+ }
if w.E.BitLen() > 24 {
return nil, nil, errors.New("ssh: exponent too large")
}
@@ -574,6 +580,24 @@ func checkDSAParams(param *dsa.Parameters) error {
return fmt.Errorf("ssh: unsupported DSA key size %d", l)
}
+ // FIPS 186-2 specifies that Q must be exactly 160 bits. We must enforce
+ // this to prevent DoS attacks where an attacker sends a huge Q which makes
+ // verification slow.
+ if l := param.Q.BitLen(); l != 160 {
+ return fmt.Errorf("ssh: unsupported DSA sub-prime size %d", l)
+ }
+
+ // The generator G is an element of the group, so it must be strictly less
+ // than the modulus P.
+ if param.G.Cmp(param.P) >= 0 {
+ return errors.New("ssh: DSA generator larger than modulus")
+ }
+
+ // G must be positive.
+ if param.G.Sign() <= 0 {
+ return errors.New("ssh: DSA generator must be positive")
+ }
+
return nil
}
@@ -596,6 +620,14 @@ func parseDSA(in []byte) (out PublicKey, rest []byte, err error) {
return nil, nil, err
}
+ // The public value Y must be a non-zero element of the group, i.e.
+ // strictly between 0 and P. crypto/dsa.Verify does not range-check Y,
+ // so we reject out-of-range values here to prevent a maliciously
+ // oversized Y from slowing verification.
+ if w.Y.Sign() <= 0 || w.Y.Cmp(w.P) >= 0 {
+ return nil, nil, errors.New("ssh: DSA public value Y out of range")
+ }
+
key := &dsaPublicKey{
Parameters: param,
Y: w.Y,
@@ -869,11 +901,25 @@ type skFields struct {
Counter uint32
}
+// flagUserPresence is the "user present" bit (UP) in the SK signature
+// flags, matching the FIDO CTAP2 authenticatorData UP flag. See
+// openssh/PROTOCOL.u2f.
+const flagUserPresence = 0x01
+
+// errSKMissingUserPresence is returned by SK key Verify methods when
+// the signature does not assert user presence and the key was not
+// marked as no-touch-required.
+var errSKMissingUserPresence = errors.New("ssh: signature missing required user presence flag")
+
type skECDSAPublicKey struct {
// application is a URL-like string, typically "ssh:" for SSH.
// see openssh/PROTOCOL.u2f for details.
application string
ecdsa.PublicKey
+ // noTouchRequired, when true, disables the default user-presence
+ // check in Verify. It is set by skKeyWithoutUP on a clone of the
+ // key, never on an instance shared across authentication attempts.
+ noTouchRequired bool
}
func (k *skECDSAPublicKey) Type() string {
@@ -959,6 +1005,10 @@ func (k *skECDSAPublicKey) Verify(data []byte, sig *Signature) error {
return err
}
+ if skf.Flags&flagUserPresence == 0 && !k.noTouchRequired {
+ return errSKMissingUserPresence
+ }
+
blob := struct {
ApplicationDigest []byte `ssh:"rest"`
Flags byte
@@ -992,6 +1042,10 @@ type skEd25519PublicKey struct {
// see openssh/PROTOCOL.u2f for details.
application string
ed25519.PublicKey
+ // noTouchRequired, when true, disables the default user-presence
+ // check in Verify. It is set by skKeyWithoutUP on a clone of the
+ // key, never on an instance shared across authentication attempts.
+ noTouchRequired bool
}
func (k *skEd25519PublicKey) Type() string {
@@ -1066,6 +1120,10 @@ func (k *skEd25519PublicKey) Verify(data []byte, sig *Signature) error {
return err
}
+ if skf.Flags&flagUserPresence == 0 && !k.noTouchRequired {
+ return errSKMissingUserPresence
+ }
+
blob := struct {
ApplicationDigest []byte `ssh:"rest"`
Flags byte
diff --git a/vendor/golang.org/x/crypto/ssh/mux.go b/vendor/golang.org/x/crypto/ssh/mux.go
index d2d24c63..3bc4afbd 100644
--- a/vendor/golang.org/x/crypto/ssh/mux.go
+++ b/vendor/golang.org/x/crypto/ssh/mux.go
@@ -91,9 +91,10 @@ type mux struct {
incomingChannels chan NewChannel
- globalSentMu sync.Mutex
- globalResponses chan interface{}
- incomingRequests chan *Request
+ globalSentMu sync.Mutex
+ globalSentPending atomic.Bool
+ globalResponses chan interface{}
+ incomingRequests chan *Request
errCond *sync.Cond
err error
@@ -141,6 +142,24 @@ func (m *mux) SendRequest(name string, wantReply bool, payload []byte) (bool, []
if wantReply {
m.globalSentMu.Lock()
defer m.globalSentMu.Unlock()
+
+ // Open the gate so that responses arriving while this request is in
+ // flight are allowed to reach globalResponses. Any response arriving
+ // while no request is pending is dropped by handleGlobalPacket.
+ m.globalSentPending.Store(true)
+ defer m.globalSentPending.Store(false)
+
+ // Drain any spurious responses that may have been buffered. This prevents
+ // a previously buffered unexpected response from being consumed instead
+ // of the actual response for this request.
+ drain:
+ for {
+ select {
+ case <-m.globalResponses:
+ default:
+ break drain
+ }
+ }
}
if err := m.sendMessage(globalRequestMsg{
@@ -267,7 +286,16 @@ func (m *mux) handleGlobalPacket(packet []byte) error {
mux: m,
}
case *globalRequestSuccessMsg, *globalRequestFailureMsg:
- m.globalResponses <- msg
+ // Drop responses that arrive when no SendRequest is waiting, to
+ // prevent a malicious peer from staging responses for a future
+ // caller.
+ if !m.globalSentPending.Load() {
+ return nil
+ }
+ select {
+ case m.globalResponses <- msg:
+ default:
+ }
default:
panic(fmt.Sprintf("not a global message %#v", msg))
}
diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go
index 064dcbaf..0192a675 100644
--- a/vendor/golang.org/x/crypto/ssh/server.go
+++ b/vendor/golang.org/x/crypto/ssh/server.go
@@ -34,15 +34,20 @@ type Permissions struct {
// or not supported.
CriticalOptions map[string]string
- // Extensions are extra functionality that the server may
- // offer on authenticated connections. Lack of support for an
- // extension does not preclude authenticating a user. Common
- // extensions are "permit-agent-forwarding",
- // "permit-X11-forwarding". The Go SSH library currently does
- // not act on any extension, and it is up to server
- // implementations to honor them. Extensions can be used to
- // pass data from the authentication callbacks to the server
- // application layer.
+ // Extensions are extra functionality that the server may offer on
+ // authenticated connections. Lack of support for an extension does not
+ // preclude authenticating a user. Common extensions are
+ // "permit-agent-forwarding", "permit-X11-forwarding". In general the Go
+ // SSH library does not act on extensions and it is up to server
+ // implementations to honor them; extensions can also be used to pass data
+ // from the authentication callbacks to the server application layer.
+ //
+ // The one extension acted upon by this library is "no-touch-required",
+ // which applies only to security-key public keys
+ // (sk-ecdsa-sha2-nistp256@openssh.com and sk-ssh-ed25519@openssh.com).
+ // When present, it waives the default requirement that SK signatures
+ // assert user presence (i.e. a physical touch of the authenticator)
+ // during signature verification.
Extensions map[string]string
// ExtraData allows to store user defined data.
@@ -84,6 +89,79 @@ type ServerPreAuthConn interface {
SendAuthBanner(string) error
}
+// noTouchRequiredExtension is the extension name used by OpenSSH in
+// authorized_keys options and certificate extensions to mark keys
+// whose signatures do not need to assert user presence (touch). See
+// ssh-keygen(1) and sshd(8).
+const noTouchRequiredExtension = "no-touch-required"
+
+// noTouchAllowed reports whether the user presence requirement on
+// SK signatures should be waived for this authentication attempt. The
+// requirement is waived when the "no-touch-required" extension is
+// present either in the Permissions returned by the auth callback
+// (authorized_keys-level opt-out) or in the certificate's own
+// Extensions (CA-level opt-out), matching OpenSSH behavior. OpenSSH
+// reads the per-key opt-out only from cert Extensions and
+// authorized_keys options (never from CriticalOptions); we follow the
+// same rule.
+func noTouchAllowed(pubKey PublicKey, perms *Permissions) bool {
+ if perms != nil {
+ if _, ok := perms.Extensions[noTouchRequiredExtension]; ok {
+ return true
+ }
+ }
+ if cert, ok := pubKey.(*Certificate); ok {
+ if _, ok := cert.Extensions[noTouchRequiredExtension]; ok {
+ return true
+ }
+ }
+ return false
+}
+
+// skKeyWithoutUP returns a PublicKey equivalent to pubKey but whose
+// Verify accepts SK signatures with the user-presence flag clear. If
+// pubKey is not (and does not wrap) an SK key, pubKey is returned
+// unchanged. The returned value never mutates pubKey: for SK keys a
+// shallow copy is made so that the noTouchRequired flag is set only on
+// the clone.
+//
+// The implementation is iterative rather than recursive. When pubKey
+// is a *Certificate we unwrap exactly one level to look at the inner
+// key. The SSH cert format forbids Certificate.Key from being another
+// Certificate (parseCert rejects it), but nothing stops callers from
+// constructing such a value directly in Go; a recursive descent could
+// otherwise be driven to unbounded depth by a hand-crafted or cyclic
+// Certificate. A malformed input of that shape simply returns
+// unchanged here.
+func skKeyWithoutUP(pubKey PublicKey) PublicKey {
+ cert, isCert := pubKey.(*Certificate)
+ target := pubKey
+ if isCert {
+ target = cert.Key
+ }
+ var cloned PublicKey
+ switch k := target.(type) {
+ case *skECDSAPublicKey:
+ c := *k
+ c.noTouchRequired = true
+ cloned = &c
+ case *skEd25519PublicKey:
+ c := *k
+ c.noTouchRequired = true
+ cloned = &c
+ default:
+ // Not an SK key (or a pathological *Certificate wrapping
+ // another *Certificate): pubKey is already usable for Verify.
+ return pubKey
+ }
+ if !isCert {
+ return cloned
+ }
+ c := *cert
+ c.Key = cloned
+ return &c
+}
+
// ServerConfig holds server specific configuration data.
type ServerConfig struct {
// Config contains configuration shared between client and server.
@@ -242,8 +320,10 @@ func (c *pubKeyCache) add(candidate cachedPubKey) {
type ServerConn struct {
Conn
- // If the succeeding authentication callback returned a
- // non-nil Permissions pointer, it is stored here.
+ // If the succeeding authentication callback returned a non-nil Permissions
+ // pointer, it is stored here. These are the permissions from the final,
+ // successful authentication method. Permissions returned by callbacks that
+ // return PartialSuccessError are not preserved and must be nil.
Permissions *Permissions
}
@@ -737,8 +817,15 @@ userAuthLoop:
}
signedData := buildDataSignedForAuth(sessionID, userAuthReq, algo, pubKeyData)
-
- if err := pubKey.Verify(signedData, sig); err != nil {
+ // pubKey is reused below for VerifiedPublicKeyCallback and
+ // must remain the key as presented by the client; derive a
+ // separate value for Verify that carries any applicable
+ // no-touch-required opt-out.
+ pubKeyForVerify := pubKey
+ if noTouchAllowed(pubKey, candidate.perms) {
+ pubKeyForVerify = skKeyWithoutUP(pubKey)
+ }
+ if err := pubKeyForVerify.Verify(signedData, sig); err != nil {
return nil, err
}
@@ -750,6 +837,13 @@ userAuthLoop:
// considered verified and the callback must not run.
perms, authErr = config.VerifiedPublicKeyCallback(s, pubKey, perms, algo)
}
+ if authErr == nil && perms != nil && perms.CriticalOptions != nil {
+ if saco := perms.CriticalOptions[sourceAddressCriticalOption]; saco != "" {
+ if err := checkSourceAddress(s.RemoteAddr(), saco); err != nil {
+ authErr = err
+ }
+ }
+ }
}
case "gssapi-with-mic":
if authConfig.GSSAPIWithMICConfig == nil {
@@ -824,6 +918,13 @@ userAuthLoop:
var failureMsg userAuthFailureMsg
if partialSuccess, ok := authErr.(*PartialSuccessError); ok {
+ // Permissions are not preserved between authentication steps. To
+ // avoid confusion about the final state of the connection, we
+ // disallow returning non-nil Permissions combined with
+ // PartialSuccessError.
+ if perms != nil {
+ return nil, errors.New("ssh: permissions must be nil when returning PartialSuccessError")
+ }
// After a partial success error we don't allow changing the user
// name and execute the NoClientAuthCallback.
partialSuccessReturned = true
diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go
index 63541994..f1ce515d 100644
--- a/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/vendor/golang.org/x/sys/cpu/cpu.go
@@ -152,13 +152,17 @@ var ARM struct {
// The booleans in Loong64 contain the correspondingly named cpu feature bit.
// The struct is padded to avoid false sharing.
var Loong64 struct {
- _ CacheLinePad
- HasLSX bool // support 128-bit vector extension
- HasLASX bool // support 256-bit vector extension
- HasCRC32 bool // support CRC instruction
- HasLAM_BH bool // support AM{SWAP/ADD}[_DB].{B/H} instruction
- HasLAMCAS bool // support AMCAS[_DB].{B/H/W/D} instruction
- _ CacheLinePad
+ _ CacheLinePad
+ HasLSX bool // support 128-bit vector extension
+ HasLASX bool // support 256-bit vector extension
+ HasCRC32 bool // support CRC instruction
+ HasLAMCAS bool // support AMCAS[_DB].{B/H/W/D}
+ HasLAM_BH bool // support AM{SWAP/ADD}[_DB].{B/H} instruction
+ HasLLACQ_SCREL bool // support LLACQ.{W/D}, SCREL.{W/D} instruction
+ HasSCQ bool // support SC.Q instruction
+ HasDBAR_HINTS bool // supports finer-grained DBAR hints
+
+ _ CacheLinePad
}
// MIPS64X contains the supported CPU features of the current mips64/mips64le
@@ -232,6 +236,7 @@ var RISCV64 struct {
HasZba bool // Address generation instructions extension
HasZbb bool // Basic bit-manipulation extension
HasZbs bool // Single-bit instructions extension
+ HasZbc bool // Carryless multiplication extension
HasZvbb bool // Vector Basic Bit-manipulation
HasZvbc bool // Vector Carryless Multiplication
HasZvkb bool // Vector Cryptography Bit-manipulation
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
index ad741536..f4fb52ee 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
@@ -58,6 +58,7 @@ const (
riscv_HWPROBE_EXT_ZBA = 0x8
riscv_HWPROBE_EXT_ZBB = 0x10
riscv_HWPROBE_EXT_ZBS = 0x20
+ riscv_HWPROBE_EXT_ZBC = 0x80
riscv_HWPROBE_EXT_ZVBB = 0x20000
riscv_HWPROBE_EXT_ZVBC = 0x40000
riscv_HWPROBE_EXT_ZVKB = 0x80000
@@ -108,6 +109,7 @@ func doinit() {
RISCV64.HasZba = isSet(v, riscv_HWPROBE_EXT_ZBA)
RISCV64.HasZbb = isSet(v, riscv_HWPROBE_EXT_ZBB)
RISCV64.HasZbs = isSet(v, riscv_HWPROBE_EXT_ZBS)
+ RISCV64.HasZbc = isSet(v, riscv_HWPROBE_EXT_ZBC)
RISCV64.HasZvbb = isSet(v, riscv_HWPROBE_EXT_ZVBB)
RISCV64.HasZvbc = isSet(v, riscv_HWPROBE_EXT_ZVBC)
RISCV64.HasZvkb = isSet(v, riscv_HWPROBE_EXT_ZVKB)
diff --git a/vendor/golang.org/x/sys/cpu/cpu_loong64.go b/vendor/golang.org/x/sys/cpu/cpu_loong64.go
index 45ecb29a..8c234b44 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_loong64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_loong64.go
@@ -15,8 +15,13 @@ const (
cpucfg1_CRC32 = 1 << 25
// CPUCFG2 bits
- cpucfg2_LAM_BH = 1 << 27
- cpucfg2_LAMCAS = 1 << 28
+ cpucfg2_LAM_BH = 1 << 27
+ cpucfg2_LAMCAS = 1 << 28
+ cpucfg2_LLACQ_SCREL = 1 << 29
+ cpucfg2_SCQ = 1 << 30
+
+ // CPUCFG3 bits
+ cpucfg3_DBAR_HINTS = 1 << 17
)
func initOptions() {
@@ -26,6 +31,9 @@ func initOptions() {
{Name: "crc32", Feature: &Loong64.HasCRC32},
{Name: "lam_bh", Feature: &Loong64.HasLAM_BH},
{Name: "lamcas", Feature: &Loong64.HasLAMCAS},
+ {Name: "llacq_screl", Feature: &Loong64.HasLLACQ_SCREL},
+ {Name: "scq", Feature: &Loong64.HasSCQ},
+ {Name: "dbar_hints", Feature: &Loong64.HasDBAR_HINTS},
}
// The CPUCFG data on Loong64 only reflects the hardware capabilities,
@@ -37,10 +45,14 @@ func initOptions() {
// through CPUCFG
cfg1 := get_cpucfg(1)
cfg2 := get_cpucfg(2)
+ cfg3 := get_cpucfg(3)
Loong64.HasCRC32 = cfgIsSet(cfg1, cpucfg1_CRC32)
Loong64.HasLAMCAS = cfgIsSet(cfg2, cpucfg2_LAMCAS)
Loong64.HasLAM_BH = cfgIsSet(cfg2, cpucfg2_LAM_BH)
+ Loong64.HasLLACQ_SCREL = cfgIsSet(cfg2, cpucfg2_LLACQ_SCREL)
+ Loong64.HasSCQ = cfgIsSet(cfg2, cpucfg2_SCQ)
+ Loong64.HasDBAR_HINTS = cfgIsSet(cfg3, cpucfg3_DBAR_HINTS)
}
func get_cpucfg(reg uint32) uint32
diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
index 0f617aef..d4e9885f 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
@@ -16,6 +16,7 @@ func initOptions() {
{Name: "zba", Feature: &RISCV64.HasZba},
{Name: "zbb", Feature: &RISCV64.HasZbb},
{Name: "zbs", Feature: &RISCV64.HasZbs},
+ {Name: "zbc", Feature: &RISCV64.HasZbc},
// RISC-V Cryptography Extensions
{Name: "zvbb", Feature: &RISCV64.HasZvbb},
{Name: "zvbc", Feature: &RISCV64.HasZvbc},
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index fd39be4e..fa74cfe9 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -354,6 +354,9 @@ struct ltchars {
// Renamed in v6.16, commit c6d732c38f93 ("net: ethtool: remove duplicate defines for family info")
#define ETHTOOL_FAMILY_NAME ETHTOOL_GENL_NAME
#define ETHTOOL_FAMILY_VERSION ETHTOOL_GENL_VERSION
+
+// Removed in v6.17, commit 760e6f7befba ("futex: Remove support for IMMUTABLE")
+#define PR_FUTEX_HASH_GET_IMMUTABLE 3
'
includes_NetBSD='
diff --git a/vendor/golang.org/x/sys/unix/readv_unix.go b/vendor/golang.org/x/sys/unix/readv_unix.go
new file mode 100644
index 00000000..38a2be93
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/readv_unix.go
@@ -0,0 +1,103 @@
+// Copyright 2026 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 darwin || linux || openbsd
+
+package unix
+
+import "unsafe"
+
+// minIovec is the size of the small initial allocation used by
+// Readv, Writev, etc.
+//
+// This small allocation gets stack allocated, which lets the
+// common use case of len(iovs) <= minIovec avoid more expensive
+// heap allocations.
+const minIovec = 8
+
+// appendBytes converts bs to Iovecs and appends them to vecs.
+func appendBytes(vecs []Iovec, bs [][]byte) []Iovec {
+ for _, b := range bs {
+ var v Iovec
+ v.SetLen(len(b))
+ if len(b) > 0 {
+ v.Base = &b[0]
+ } else {
+ v.Base = (*byte)(unsafe.Pointer(&_zero))
+ }
+ vecs = append(vecs, v)
+ }
+ return vecs
+}
+
+// writevRaceDetect tells the race detector that the program
+// has read the first n bytes stored in iovecs.
+func writevRaceDetect(iovecs []Iovec, n int) {
+ if !raceenabled {
+ return
+ }
+ for i := 0; n > 0 && i < len(iovecs); i++ {
+ m := min(int(iovecs[i].Len), n)
+ n -= m
+ if m > 0 {
+ raceReadRange(unsafe.Pointer(iovecs[i].Base), m)
+ }
+ }
+}
+
+// readvRaceDetect tells the race detector that the program
+// has written to the first n bytes stored in iovecs.
+func readvRaceDetect(iovecs []Iovec, n int, err error) {
+ if !raceenabled {
+ return
+ }
+ for i := 0; n > 0 && i < len(iovecs); i++ {
+ m := min(int(iovecs[i].Len), n)
+ n -= m
+ if m > 0 {
+ raceWriteRange(unsafe.Pointer(iovecs[i].Base), m)
+ }
+ }
+ if err == nil {
+ raceAcquire(unsafe.Pointer(&ioSync))
+ }
+}
+
+func Readv(fd int, iovs [][]byte) (n int, err error) {
+ iovecs := make([]Iovec, 0, minIovec)
+ iovecs = appendBytes(iovecs, iovs)
+ n, err = readv(fd, iovecs)
+ readvRaceDetect(iovecs, n, err)
+ return n, err
+}
+
+func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {
+ iovecs := make([]Iovec, 0, minIovec)
+ iovecs = appendBytes(iovecs, iovs)
+ n, err = preadv(fd, iovecs, offset)
+ readvRaceDetect(iovecs, n, err)
+ return n, err
+}
+
+func Writev(fd int, iovs [][]byte) (n int, err error) {
+ iovecs := make([]Iovec, 0, minIovec)
+ iovecs = appendBytes(iovecs, iovs)
+ if raceenabled {
+ raceReleaseMerge(unsafe.Pointer(&ioSync))
+ }
+ n, err = writev(fd, iovecs)
+ writevRaceDetect(iovecs, n)
+ return n, err
+}
+
+func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) {
+ iovecs := make([]Iovec, 0, minIovec)
+ iovecs = appendBytes(iovecs, iovs)
+ if raceenabled {
+ raceReleaseMerge(unsafe.Pointer(&ioSync))
+ }
+ n, err = pwritev(fd, iovecs, offset)
+ writevRaceDetect(iovecs, n)
+ return n, err
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 7838ca5d..38590ca8 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -602,95 +602,6 @@ func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocI
return
}
-const minIovec = 8
-
-func Readv(fd int, iovs [][]byte) (n int, err error) {
- iovecs := make([]Iovec, 0, minIovec)
- iovecs = appendBytes(iovecs, iovs)
- n, err = readv(fd, iovecs)
- readvRacedetect(iovecs, n, err)
- return n, err
-}
-
-func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {
- iovecs := make([]Iovec, 0, minIovec)
- iovecs = appendBytes(iovecs, iovs)
- n, err = preadv(fd, iovecs, offset)
- readvRacedetect(iovecs, n, err)
- return n, err
-}
-
-func Writev(fd int, iovs [][]byte) (n int, err error) {
- iovecs := make([]Iovec, 0, minIovec)
- iovecs = appendBytes(iovecs, iovs)
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- n, err = writev(fd, iovecs)
- writevRacedetect(iovecs, n)
- return n, err
-}
-
-func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) {
- iovecs := make([]Iovec, 0, minIovec)
- iovecs = appendBytes(iovecs, iovs)
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- n, err = pwritev(fd, iovecs, offset)
- writevRacedetect(iovecs, n)
- return n, err
-}
-
-func appendBytes(vecs []Iovec, bs [][]byte) []Iovec {
- for _, b := range bs {
- var v Iovec
- v.SetLen(len(b))
- if len(b) > 0 {
- v.Base = &b[0]
- } else {
- v.Base = (*byte)(unsafe.Pointer(&_zero))
- }
- vecs = append(vecs, v)
- }
- return vecs
-}
-
-func writevRacedetect(iovecs []Iovec, n int) {
- if !raceenabled {
- return
- }
- for i := 0; n > 0 && i < len(iovecs); i++ {
- m := int(iovecs[i].Len)
- if m > n {
- m = n
- }
- n -= m
- if m > 0 {
- raceReadRange(unsafe.Pointer(iovecs[i].Base), m)
- }
- }
-}
-
-func readvRacedetect(iovecs []Iovec, n int, err error) {
- if !raceenabled {
- return
- }
- for i := 0; n > 0 && i < len(iovecs); i++ {
- m := int(iovecs[i].Len)
- if m > n {
- m = n
- }
- n -= m
- if m > 0 {
- raceWriteRange(unsafe.Pointer(iovecs[i].Base), m)
- }
- }
- if err == nil {
- raceAcquire(unsafe.Pointer(&ioSync))
- }
-}
-
//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error)
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index f7b82bcc..ce4d7ab1 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -2150,33 +2150,10 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
//sys exitThread(code int) (err error) = SYS_EXIT
//sys readv(fd int, iovs []Iovec) (n int, err error) = SYS_READV
//sys writev(fd int, iovs []Iovec) (n int, err error) = SYS_WRITEV
-//sys preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PREADV
-//sys pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PWRITEV
-//sys preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2
-//sys pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2
-
-// minIovec is the size of the small initial allocation used by
-// Readv, Writev, etc.
-//
-// This small allocation gets stack allocated, which lets the
-// common use case of len(iovs) <= minIovs avoid more expensive
-// heap allocations.
-const minIovec = 8
-
-// appendBytes converts bs to Iovecs and appends them to vecs.
-func appendBytes(vecs []Iovec, bs [][]byte) []Iovec {
- for _, b := range bs {
- var v Iovec
- v.SetLen(len(b))
- if len(b) > 0 {
- v.Base = &b[0]
- } else {
- v.Base = (*byte)(unsafe.Pointer(&_zero))
- }
- vecs = append(vecs, v)
- }
- return vecs
-}
+//sys preadvSyscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PREADV
+//sys pwritevSyscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PWRITEV
+//sys preadv2Syscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2
+//sys pwritev2Syscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2
// offs2lohi splits offs into its low and high order bits.
func offs2lohi(offs int64) (lo, hi uintptr) {
@@ -2184,69 +2161,23 @@ func offs2lohi(offs int64) (lo, hi uintptr) {
return uintptr(offs), uintptr(uint64(offs) >> (longBits - 1) >> 1) // two shifts to avoid false positive in vet
}
-func Readv(fd int, iovs [][]byte) (n int, err error) {
- iovecs := make([]Iovec, 0, minIovec)
- iovecs = appendBytes(iovecs, iovs)
- n, err = readv(fd, iovecs)
- readvRacedetect(iovecs, n, err)
- return n, err
-}
-
-func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) {
- iovecs := make([]Iovec, 0, minIovec)
- iovecs = appendBytes(iovecs, iovs)
+func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
lo, hi := offs2lohi(offset)
- n, err = preadv(fd, iovecs, lo, hi)
- readvRacedetect(iovecs, n, err)
- return n, err
+ return preadvSyscall(fd, iovecs, lo, hi)
}
func Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) {
iovecs := make([]Iovec, 0, minIovec)
iovecs = appendBytes(iovecs, iovs)
lo, hi := offs2lohi(offset)
- n, err = preadv2(fd, iovecs, lo, hi, flags)
- readvRacedetect(iovecs, n, err)
- return n, err
-}
-
-func readvRacedetect(iovecs []Iovec, n int, err error) {
- if !raceenabled {
- return
- }
- for i := 0; n > 0 && i < len(iovecs); i++ {
- m := min(int(iovecs[i].Len), n)
- n -= m
- if m > 0 {
- raceWriteRange(unsafe.Pointer(iovecs[i].Base), m)
- }
- }
- if err == nil {
- raceAcquire(unsafe.Pointer(&ioSync))
- }
-}
-
-func Writev(fd int, iovs [][]byte) (n int, err error) {
- iovecs := make([]Iovec, 0, minIovec)
- iovecs = appendBytes(iovecs, iovs)
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- n, err = writev(fd, iovecs)
- writevRacedetect(iovecs, n)
+ n, err = preadv2Syscall(fd, iovecs, lo, hi, flags)
+ readvRaceDetect(iovecs, n, err)
return n, err
}
-func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) {
- iovecs := make([]Iovec, 0, minIovec)
- iovecs = appendBytes(iovecs, iovs)
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
+func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
lo, hi := offs2lohi(offset)
- n, err = pwritev(fd, iovecs, lo, hi)
- writevRacedetect(iovecs, n)
- return n, err
+ return pwritevSyscall(fd, iovecs, lo, hi)
}
func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) {
@@ -2256,24 +2187,11 @@ func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error)
raceReleaseMerge(unsafe.Pointer(&ioSync))
}
lo, hi := offs2lohi(offset)
- n, err = pwritev2(fd, iovecs, lo, hi, flags)
- writevRacedetect(iovecs, n)
+ n, err = pwritev2Syscall(fd, iovecs, lo, hi, flags)
+ writevRaceDetect(iovecs, n)
return n, err
}
-func writevRacedetect(iovecs []Iovec, n int) {
- if !raceenabled {
- return
- }
- for i := 0; n > 0 && i < len(iovecs); i++ {
- m := min(int(iovecs[i].Len), n)
- n -= m
- if m > 0 {
- raceReadRange(unsafe.Pointer(iovecs[i].Base), m)
- }
- }
-}
-
// mmap varies by architecture; see syscall_linux_*.go.
//sys munmap(addr uintptr, length uintptr) (err error)
//sys mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index b86ded54..7b0ef8e1 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -300,6 +300,10 @@ func Uname(uname *Utsname) error {
//sys Pathconf(path string, name int) (val int, err error)
//sys pread(fd int, p []byte, offset int64) (n int, err error)
//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
+//sys readv(fd int, iovecs []Iovec) (n int, err error)
+//sys writev(fd int, iovecs []Iovec) (n int, err error)
+//sys preadv(fd int, iovecs []Iovec, offset int64) (n int, err error)
+//sys pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index 120a7b35..9d72a6b7 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -353,8 +353,10 @@ const (
AUDIT_MAC_IPSEC_EVENT = 0x587
AUDIT_MAC_MAP_ADD = 0x581
AUDIT_MAC_MAP_DEL = 0x582
+ AUDIT_MAC_OBJ_CONTEXTS = 0x592
AUDIT_MAC_POLICY_LOAD = 0x57b
AUDIT_MAC_STATUS = 0x57c
+ AUDIT_MAC_TASK_CONTEXTS = 0x591
AUDIT_MAC_UNLBL_ALLOW = 0x57e
AUDIT_MAC_UNLBL_STCADD = 0x588
AUDIT_MAC_UNLBL_STCDEL = 0x589
@@ -591,8 +593,13 @@ const (
CAN_CTRLMODE_LOOPBACK = 0x1
CAN_CTRLMODE_ONE_SHOT = 0x8
CAN_CTRLMODE_PRESUME_ACK = 0x40
+ CAN_CTRLMODE_RESTRICTED = 0x800
CAN_CTRLMODE_TDC_AUTO = 0x200
CAN_CTRLMODE_TDC_MANUAL = 0x400
+ CAN_CTRLMODE_XL = 0x1000
+ CAN_CTRLMODE_XL_TDC_AUTO = 0x2000
+ CAN_CTRLMODE_XL_TDC_MANUAL = 0x4000
+ CAN_CTRLMODE_XL_TMS = 0x8000
CAN_EFF_FLAG = 0x80000000
CAN_EFF_ID_BITS = 0x1d
CAN_EFF_MASK = 0x1fffffff
@@ -800,6 +807,8 @@ const (
DEVLINK_PORT_FN_CAP_IPSEC_PACKET = 0x8
DEVLINK_PORT_FN_CAP_MIGRATABLE = 0x2
DEVLINK_PORT_FN_CAP_ROCE = 0x1
+ DEVLINK_RATE_TCS_MAX = 0x8
+ DEVLINK_RATE_TC_INDEX_MAX = 0x7
DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS = 0x3
DEVMEM_MAGIC = 0x454d444d
@@ -1186,6 +1195,7 @@ const (
ETH_P_MPLS_UC = 0x8847
ETH_P_MRP = 0x88e3
ETH_P_MVRP = 0x88f5
+ ETH_P_MXLGSW = 0x88c3
ETH_P_NCSI = 0x88f8
ETH_P_NSH = 0x894f
ETH_P_PAE = 0x888e
@@ -1218,6 +1228,7 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
+ ETH_P_YT921X = 0x9988
ET_CORE = 0x4
ET_DYN = 0x3
ET_EXEC = 0x2
@@ -1258,6 +1269,7 @@ const (
FALLOC_FL_NO_HIDE_STALE = 0x4
FALLOC_FL_PUNCH_HOLE = 0x2
FALLOC_FL_UNSHARE_RANGE = 0x40
+ FALLOC_FL_WRITE_ZEROES = 0x80
FALLOC_FL_ZERO_RANGE = 0x10
FANOTIFY_METADATA_VERSION = 0x3
FAN_ACCESS = 0x1
@@ -1477,6 +1489,7 @@ const (
GRND_INSECURE = 0x4
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
+ GUEST_MEMFD_MAGIC = 0x474d454d
HDIO_DRIVE_CMD = 0x31f
HDIO_DRIVE_CMD_AEB = 0x31e
HDIO_DRIVE_CMD_HDR_SIZE = 0x4
@@ -1517,6 +1530,7 @@ const (
HDIO_SET_XFER = 0x306
HDIO_TRISTATE_HWIF = 0x31b
HDIO_UNREGISTER_HWIF = 0x32a
+ HIDIOCTL_LAST = 0xd
HID_MAX_DESCRIPTOR_SIZE = 0x1000
HOSTFS_SUPER_MAGIC = 0xc0ffee
HPFS_SUPER_MAGIC = 0xf995e849
@@ -1809,6 +1823,8 @@ const (
KEXEC_ARCH_X86_64 = 0x3e0000
KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8
KEXEC_FILE_DEBUG = 0x8
+ KEXEC_FILE_FORCE_DTB = 0x20
+ KEXEC_FILE_NO_CMA = 0x10
KEXEC_FILE_NO_INITRAMFS = 0x4
KEXEC_FILE_ON_CRASH = 0x2
KEXEC_FILE_UNLOAD = 0x1
@@ -1905,6 +1921,7 @@ const (
LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON = 0x2
LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF = 0x1
LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF = 0x4
+ LANDLOCK_RESTRICT_SELF_TSYNC = 0x8
LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET = 0x1
LANDLOCK_SCOPE_SIGNAL = 0x2
LINUX_REBOOT_CMD_CAD_OFF = 0x0
@@ -2412,6 +2429,7 @@ const (
NN_PRXFPREG = "LINUX"
NN_RISCV_CSR = "LINUX"
NN_RISCV_TAGGED_ADDR_CTRL = "LINUX"
+ NN_RISCV_USER_CFI = "LINUX"
NN_RISCV_VECTOR = "LINUX"
NN_S390_CTRS = "LINUX"
NN_S390_GS_BC = "LINUX"
@@ -2493,6 +2511,7 @@ const (
NT_PRXFPREG = 0x46e62b7f
NT_RISCV_CSR = 0x900
NT_RISCV_TAGGED_ADDR_CTRL = 0x902
+ NT_RISCV_USER_CFI = 0x903
NT_RISCV_VECTOR = 0x901
NT_S390_CTRS = 0x304
NT_S390_GS_BC = 0x30c
@@ -2515,6 +2534,7 @@ const (
NT_X86_SHSTK = 0x204
NT_X86_XSAVE_LAYOUT = 0x205
NT_X86_XSTATE = 0x202
+ NULL_FS_MAGIC = 0x4e554c4c
OCFS2_SUPER_MAGIC = 0x7461636f
OCRNL = 0x8
OFDEL = 0x80
@@ -2594,6 +2614,7 @@ const (
PERF_ATTR_SIZE_VER6 = 0x78
PERF_ATTR_SIZE_VER7 = 0x80
PERF_ATTR_SIZE_VER8 = 0x88
+ PERF_ATTR_SIZE_VER9 = 0x90
PERF_AUX_FLAG_COLLISION = 0x8
PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT = 0x0
PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW = 0x100
@@ -2629,6 +2650,7 @@ const (
PERF_MEM_LVLNUM_ANY_CACHE = 0xb
PERF_MEM_LVLNUM_CXL = 0x9
PERF_MEM_LVLNUM_IO = 0xa
+ PERF_MEM_LVLNUM_L0 = 0x7
PERF_MEM_LVLNUM_L1 = 0x1
PERF_MEM_LVLNUM_L2 = 0x2
PERF_MEM_LVLNUM_L2_MHB = 0x5
@@ -2662,6 +2684,23 @@ const (
PERF_MEM_OP_PFETCH = 0x8
PERF_MEM_OP_SHIFT = 0x0
PERF_MEM_OP_STORE = 0x4
+ PERF_MEM_REGION_L_NON_SHARE = 0x3
+ PERF_MEM_REGION_L_SHARE = 0x2
+ PERF_MEM_REGION_MEM0 = 0x8
+ PERF_MEM_REGION_MEM1 = 0x9
+ PERF_MEM_REGION_MEM2 = 0xa
+ PERF_MEM_REGION_MEM3 = 0xb
+ PERF_MEM_REGION_MEM4 = 0xc
+ PERF_MEM_REGION_MEM5 = 0xd
+ PERF_MEM_REGION_MEM6 = 0xe
+ PERF_MEM_REGION_MEM7 = 0xf
+ PERF_MEM_REGION_MMIO = 0x7
+ PERF_MEM_REGION_NA = 0x0
+ PERF_MEM_REGION_O_IO = 0x4
+ PERF_MEM_REGION_O_NON_SHARE = 0x6
+ PERF_MEM_REGION_O_SHARE = 0x5
+ PERF_MEM_REGION_RSVD = 0x1
+ PERF_MEM_REGION_SHIFT = 0x2e
PERF_MEM_REMOTE_REMOTE = 0x1
PERF_MEM_REMOTE_SHIFT = 0x25
PERF_MEM_SNOOPX_FWD = 0x1
@@ -2776,6 +2815,10 @@ const (
PR_CAP_AMBIENT_IS_SET = 0x1
PR_CAP_AMBIENT_LOWER = 0x3
PR_CAP_AMBIENT_RAISE = 0x2
+ PR_CFI_BRANCH_LANDING_PADS = 0x0
+ PR_CFI_DISABLE = 0x2
+ PR_CFI_ENABLE = 0x1
+ PR_CFI_LOCK = 0x4
PR_ENDIAN_BIG = 0x0
PR_ENDIAN_LITTLE = 0x1
PR_ENDIAN_PPC_LITTLE = 0x2
@@ -2798,6 +2841,7 @@ const (
PR_FUTEX_HASH_GET_SLOTS = 0x2
PR_FUTEX_HASH_SET_SLOTS = 0x1
PR_GET_AUXV = 0x41555856
+ PR_GET_CFI = 0x50
PR_GET_CHILD_SUBREAPER = 0x25
PR_GET_DUMPABLE = 0x3
PR_GET_ENDIAN = 0x13
@@ -2834,6 +2878,7 @@ const (
PR_MDWE_REFUSE_EXEC_GAIN = 0x1
PR_MPX_DISABLE_MANAGEMENT = 0x2c
PR_MPX_ENABLE_MANAGEMENT = 0x2b
+ PR_MTE_STORE_ONLY = 0x80000
PR_MTE_TAG_MASK = 0x7fff8
PR_MTE_TAG_SHIFT = 0x3
PR_MTE_TCF_ASYNC = 0x4
@@ -2877,6 +2922,10 @@ const (
PR_RISCV_V_VSTATE_CTRL_NEXT_MASK = 0xc
PR_RISCV_V_VSTATE_CTRL_OFF = 0x1
PR_RISCV_V_VSTATE_CTRL_ON = 0x2
+ PR_RSEQ_SLICE_EXTENSION = 0x4f
+ PR_RSEQ_SLICE_EXTENSION_GET = 0x1
+ PR_RSEQ_SLICE_EXTENSION_SET = 0x2
+ PR_RSEQ_SLICE_EXT_ENABLE = 0x1
PR_SCHED_CORE = 0x3e
PR_SCHED_CORE_CREATE = 0x1
PR_SCHED_CORE_GET = 0x0
@@ -2886,6 +2935,7 @@ const (
PR_SCHED_CORE_SCOPE_THREAD_GROUP = 0x1
PR_SCHED_CORE_SHARE_FROM = 0x3
PR_SCHED_CORE_SHARE_TO = 0x2
+ PR_SET_CFI = 0x51
PR_SET_CHILD_SUBREAPER = 0x24
PR_SET_DUMPABLE = 0x4
PR_SET_ENDIAN = 0x14
@@ -2951,11 +3001,14 @@ const (
PR_SVE_SET_VL_ONEXEC = 0x40000
PR_SVE_VL_INHERIT = 0x20000
PR_SVE_VL_LEN_MASK = 0xffff
+ PR_SYS_DISPATCH_EXCLUSIVE_ON = 0x1
+ PR_SYS_DISPATCH_INCLUSIVE_ON = 0x2
PR_SYS_DISPATCH_OFF = 0x0
PR_SYS_DISPATCH_ON = 0x1
PR_TAGGED_ADDR_ENABLE = 0x1
PR_TASK_PERF_EVENTS_DISABLE = 0x1f
PR_TASK_PERF_EVENTS_ENABLE = 0x20
+ PR_THP_DISABLE_EXCEPT_ADVISED = 0x2
PR_TIMER_CREATE_RESTORE_IDS = 0x4d
PR_TIMER_CREATE_RESTORE_IDS_GET = 0x2
PR_TIMER_CREATE_RESTORE_IDS_OFF = 0x0
@@ -2987,8 +3040,10 @@ const (
PTP_STRICT_FLAGS = 0x8
PTP_SYS_OFFSET_EXTENDED = 0xc4c03d09
PTP_SYS_OFFSET_EXTENDED2 = 0xc4c03d12
+ PTP_SYS_OFFSET_EXTENDED_CYCLES = 0xc4c03d16
PTP_SYS_OFFSET_PRECISE = 0xc0403d08
PTP_SYS_OFFSET_PRECISE2 = 0xc0403d11
+ PTP_SYS_OFFSET_PRECISE_CYCLES = 0xc0403d15
PTRACE_ATTACH = 0x10
PTRACE_CONT = 0x7
PTRACE_DETACH = 0x11
@@ -3330,8 +3385,9 @@ const (
RWF_DSYNC = 0x2
RWF_HIPRI = 0x1
RWF_NOAPPEND = 0x20
+ RWF_NOSIGNAL = 0x100
RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0xff
+ RWF_SUPPORTED = 0x1ff
RWF_SYNC = 0x4
RWF_WRITE_LIFE_NOT_SET = 0x0
SCHED_BATCH = 0x3
@@ -3714,7 +3770,7 @@ const (
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x10
+ TASKSTATS_VERSION = 0x11
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
@@ -4052,6 +4108,7 @@ const (
XDP_FLAGS_REPLACE = 0x10
XDP_FLAGS_SKB_MODE = 0x2
XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MAX_TX_SKB_BUDGET = 0x9
XDP_MMAP_OFFSETS = 0x1
XDP_OPTIONS = 0x8
XDP_OPTIONS_ZEROCOPY = 0x1
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index 97a61fc5..c0a8ea1d 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -159,6 +159,7 @@ const (
NFDBITS = 0x20
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x8008b70d
NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
@@ -305,6 +306,7 @@ const (
RTC_WKALM_SET = 0x4028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -352,6 +354,7 @@ const (
SO_ERROR = 0x4
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@@ -596,6 +599,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -819,7 +824,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index a0d6d498..ff927c83 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -159,6 +159,7 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x8008b70d
NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
@@ -306,6 +307,7 @@ const (
RTC_WKALM_SET = 0x4028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -353,6 +355,7 @@ const (
SO_ERROR = 0x4
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@@ -596,6 +599,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -819,7 +824,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index dd9c903f..55294eda 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -156,6 +156,7 @@ const (
NFDBITS = 0x20
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x8008b70d
NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
@@ -311,6 +312,7 @@ const (
RTC_WKALM_SET = 0x4028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -358,6 +360,7 @@ const (
SO_ERROR = 0x4
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@@ -601,6 +604,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -824,7 +829,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index 384c61ca..5dac54c3 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -161,6 +161,7 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x8008b70d
NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
@@ -304,6 +305,7 @@ const (
RTC_WKALM_SET = 0x4028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -351,6 +353,7 @@ const (
SO_ERROR = 0x4
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@@ -598,6 +601,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -821,7 +826,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
index 6384c983..46ac1fcb 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
@@ -160,6 +160,7 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x8008b70d
NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
@@ -298,6 +299,7 @@ const (
RTC_WKALM_SET = 0x4028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -345,6 +347,7 @@ const (
SO_ERROR = 0x4
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@@ -588,6 +591,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -811,7 +816,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index 553c1c6f..b55483e8 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -156,6 +156,7 @@ const (
NFDBITS = 0x20
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x4008b70d
NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
@@ -304,6 +305,7 @@ const (
RTC_WKALM_SET = 0x8028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -351,6 +353,7 @@ const (
SO_ERROR = 0x1007
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x8
SO_LINGER = 0x80
SO_LOCK_FILTER = 0x2c
@@ -597,6 +600,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x60)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
+ EFSBADCRC = syscall.Errno(0x4d)
+ EFSCORRUPTED = syscall.Errno(0x87)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -814,7 +819,7 @@ var errorList = [...]struct {
{132, "ENOBUFS", "no buffer space available"},
{133, "EISCONN", "transport endpoint is already connected"},
{134, "ENOTCONN", "transport endpoint is not connected"},
- {135, "EUCLEAN", "structure needs cleaning"},
+ {135, "EFSCORRUPTED", "structure needs cleaning"},
{137, "ENOTNAM", "not a XENIX named type file"},
{138, "ENAVAIL", "no XENIX semaphores available"},
{139, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index b3339f20..71890c98 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -156,6 +156,7 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x4008b70d
NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
@@ -304,6 +305,7 @@ const (
RTC_WKALM_SET = 0x8028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -351,6 +353,7 @@ const (
SO_ERROR = 0x1007
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x8
SO_LINGER = 0x80
SO_LOCK_FILTER = 0x2c
@@ -597,6 +600,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x60)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
+ EFSBADCRC = syscall.Errno(0x4d)
+ EFSCORRUPTED = syscall.Errno(0x87)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -814,7 +819,7 @@ var errorList = [...]struct {
{132, "ENOBUFS", "no buffer space available"},
{133, "EISCONN", "transport endpoint is already connected"},
{134, "ENOTCONN", "transport endpoint is not connected"},
- {135, "EUCLEAN", "structure needs cleaning"},
+ {135, "EFSCORRUPTED", "structure needs cleaning"},
{137, "ENOTNAM", "not a XENIX named type file"},
{138, "ENAVAIL", "no XENIX semaphores available"},
{139, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 177091d2..a78b6cc1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -156,6 +156,7 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x4008b70d
NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
@@ -304,6 +305,7 @@ const (
RTC_WKALM_SET = 0x8028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -351,6 +353,7 @@ const (
SO_ERROR = 0x1007
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x8
SO_LINGER = 0x80
SO_LOCK_FILTER = 0x2c
@@ -597,6 +600,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x60)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
+ EFSBADCRC = syscall.Errno(0x4d)
+ EFSCORRUPTED = syscall.Errno(0x87)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -814,7 +819,7 @@ var errorList = [...]struct {
{132, "ENOBUFS", "no buffer space available"},
{133, "EISCONN", "transport endpoint is already connected"},
{134, "ENOTCONN", "transport endpoint is not connected"},
- {135, "EUCLEAN", "structure needs cleaning"},
+ {135, "EFSCORRUPTED", "structure needs cleaning"},
{137, "ENOTNAM", "not a XENIX named type file"},
{138, "ENAVAIL", "no XENIX semaphores available"},
{139, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index c5abf156..d0e38ca7 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -156,6 +156,7 @@ const (
NFDBITS = 0x20
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x4008b70d
NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
@@ -304,6 +305,7 @@ const (
RTC_WKALM_SET = 0x8028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -351,6 +353,7 @@ const (
SO_ERROR = 0x1007
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x8
SO_LINGER = 0x80
SO_LOCK_FILTER = 0x2c
@@ -597,6 +600,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x60)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
+ EFSBADCRC = syscall.Errno(0x4d)
+ EFSCORRUPTED = syscall.Errno(0x87)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -814,7 +819,7 @@ var errorList = [...]struct {
{132, "ENOBUFS", "no buffer space available"},
{133, "EISCONN", "transport endpoint is already connected"},
{134, "ENOTCONN", "transport endpoint is not connected"},
- {135, "EUCLEAN", "structure needs cleaning"},
+ {135, "EFSCORRUPTED", "structure needs cleaning"},
{137, "ENOTNAM", "not a XENIX named type file"},
{138, "ENAVAIL", "no XENIX semaphores available"},
{139, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
index f1f3fadf..c883e14c 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -158,6 +158,7 @@ const (
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000
+ NS_GET_ID = 0x4008b70d
NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
@@ -359,6 +360,7 @@ const (
RTC_WKALM_SET = 0x8028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -406,6 +408,7 @@ const (
SO_ERROR = 0x4
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@@ -653,6 +656,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -877,7 +882,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index 203ad9c5..1834273d 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -158,6 +158,7 @@ const (
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000
+ NS_GET_ID = 0x4008b70d
NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
@@ -363,6 +364,7 @@ const (
RTC_WKALM_SET = 0x8028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -410,6 +412,7 @@ const (
SO_ERROR = 0x4
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@@ -657,6 +660,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -881,7 +886,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index 4b9abcb2..39945dd9 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -158,6 +158,7 @@ const (
NL3 = 0x300
NLDLY = 0x300
NOFLSH = 0x80000000
+ NS_GET_ID = 0x4008b70d
NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
@@ -363,6 +364,7 @@ const (
RTC_WKALM_SET = 0x8028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -410,6 +412,7 @@ const (
SO_ERROR = 0x4
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@@ -657,6 +660,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -881,7 +886,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index f8798303..bc0f3724 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -11,553 +11,569 @@ package unix
import "syscall"
const (
- B1000000 = 0x1008
- B115200 = 0x1002
- B1152000 = 0x1009
- B1500000 = 0x100a
- B2000000 = 0x100b
- B230400 = 0x1003
- B2500000 = 0x100c
- B3000000 = 0x100d
- B3500000 = 0x100e
- B4000000 = 0x100f
- B460800 = 0x1004
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B921600 = 0x1007
- BLKALIGNOFF = 0x127a
- BLKBSZGET = 0x80081270
- BLKBSZSET = 0x40081271
- BLKDISCARD = 0x1277
- BLKDISCARDZEROES = 0x127c
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETDISKSEQ = 0x80081280
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80081272
- BLKIOMIN = 0x1278
- BLKIOOPT = 0x1279
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKROTATIONAL = 0x127e
- BLKRRPART = 0x125f
- BLKSECDISCARD = 0x127d
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BLKZEROOUT = 0x127f
- BOTHER = 0x1000
- BS1 = 0x2000
- BSDLY = 0x2000
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRDLY = 0x600
- CREAD = 0x80
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIZE = 0x30
- CSTOPB = 0x40
- DM_MPATH_PROBE_PATHS = 0xfd12
- ECCGETLAYOUT = 0x81484d11
- ECCGETSTATS = 0x80104d12
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EPIOCGPARAMS = 0x80088a02
- EPIOCSPARAMS = 0x40088a01
- EPOLL_CLOEXEC = 0x80000
- EXTPROC = 0x10000
- FF1 = 0x8000
- FFDLY = 0x8000
- FICLONE = 0x40049409
- FICLONERANGE = 0x4020940d
- FLUSHO = 0x1000
- FS_IOC_ENABLE_VERITY = 0x40806685
- FS_IOC_GETFLAGS = 0x80086601
- FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_SETFLAGS = 0x40086602
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_RDLCK = 0x0
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- HIDIOCGRAWINFO = 0x80084803
- HIDIOCGRDESC = 0x90044802
- HIDIOCGRDESCSIZE = 0x80044801
- HIDIOCREVOKE = 0x4004480d
- HUPCL = 0x400
- ICANON = 0x2
- IEXTEN = 0x8000
- IN_CLOEXEC = 0x80000
- IN_NONBLOCK = 0x800
- IOCTL_MEI_NOTIFY_GET = 0x80044803
- IOCTL_MEI_NOTIFY_SET = 0x40044802
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- ISIG = 0x1
- IUCLC = 0x200
- IXOFF = 0x1000
- IXON = 0x400
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MEMERASE = 0x40084d02
- MEMERASE64 = 0x40104d14
- MEMGETBADBLOCK = 0x40084d0b
- MEMGETINFO = 0x80204d01
- MEMGETOOBSEL = 0x80c84d0a
- MEMGETREGIONCOUNT = 0x80044d07
- MEMISLOCKED = 0x80084d17
- MEMLOCK = 0x40084d05
- MEMREAD = 0xc0404d1a
- MEMREADOOB = 0xc0104d04
- MEMSETBADBLOCK = 0x40084d0c
- MEMUNLOCK = 0x40084d06
- MEMWRITEOOB = 0xc0104d03
- MTDFILEMODE = 0x4d13
- NFDBITS = 0x40
- NLDLY = 0x100
- NOFLSH = 0x80
- NS_GET_MNTNS_ID = 0x8008b705
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_PID_FROM_PIDNS = 0x8004b706
- NS_GET_PID_IN_PIDNS = 0x8004b708
- NS_GET_TGID_FROM_PIDNS = 0x8004b707
- NS_GET_TGID_IN_PIDNS = 0x8004b709
- NS_GET_USERNS = 0xb701
- OLCUC = 0x2
- ONLCR = 0x4
- OTPERASE = 0x400c4d19
- OTPGETREGIONCOUNT = 0x40044d0e
- OTPGETREGIONINFO = 0x400c4d0f
- OTPLOCK = 0x800c4d10
- OTPSELECT = 0x80044d0d
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- PARENB = 0x100
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCBRIDGECHAN = 0x40047435
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8010743f
- PPPIOCGIDLE32 = 0x8008743f
- PPPIOCGIDLE64 = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCSACTIVE = 0x40107446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x4010744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40107447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCUNBRIDGECHAN = 0x7434
- PPPIOCXFERUNIT = 0x744e
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PTP_CLOCK_GETCAPS = 0x80503d01
- PTP_CLOCK_GETCAPS2 = 0x80503d0a
- PTP_ENABLE_PPS = 0x40043d04
- PTP_ENABLE_PPS2 = 0x40043d0d
- PTP_EXTTS_REQUEST = 0x40103d02
- PTP_EXTTS_REQUEST2 = 0x40103d0b
- PTP_MASK_CLEAR_ALL = 0x3d13
- PTP_MASK_EN_SINGLE = 0x40043d14
- PTP_PEROUT_REQUEST = 0x40383d03
- PTP_PEROUT_REQUEST2 = 0x40383d0c
- PTP_PIN_SETFUNC = 0x40603d07
- PTP_PIN_SETFUNC2 = 0x40603d10
- PTP_SYS_OFFSET = 0x43403d05
- PTP_SYS_OFFSET2 = 0x43403d0e
- PTRACE_GETFDPIC = 0x21
- PTRACE_GETFDPIC_EXEC = 0x0
- PTRACE_GETFDPIC_INTERP = 0x1
- RLIMIT_AS = 0x9
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8008700d
- RTC_EPOCH_SET = 0x4008700e
- RTC_IRQP_READ = 0x8008700b
- RTC_IRQP_SET = 0x4008700c
- RTC_PARAM_GET = 0x40187013
- RTC_PARAM_SET = 0x40187014
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x80207011
- RTC_PLL_SET = 0x40207012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- SCM_DEVMEM_DMABUF = 0x4f
- SCM_DEVMEM_LINEAR = 0x4e
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TS_OPT_ID = 0x51
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
- SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102
- SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SIOCATMARK = 0x8905
- SIOCGPGRP = 0x8904
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCSPGRP = 0x8902
- SOCK_CLOEXEC = 0x80000
- SOCK_DGRAM = 0x2
- SOCK_NONBLOCK = 0x800
- SOCK_STREAM = 0x1
- SOL_SOCKET = 0x1
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUF_LOCK = 0x48
- SO_BUSY_POLL = 0x2e
- SO_BUSY_POLL_BUDGET = 0x46
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DEVMEM_DMABUF = 0x4f
- SO_DEVMEM_DONTNEED = 0x50
- SO_DEVMEM_LINEAR = 0x4e
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_ERROR = 0x4
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NETNS_COOKIE = 0x47
- SO_NOFCS = 0x2b
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSPIDFD = 0x4c
- SO_PASSRIGHTS = 0x53
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERPIDFD = 0x4d
- SO_PEERSEC = 0x1f
- SO_PREFER_BUSY_POLL = 0x45
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVMARK = 0x4b
- SO_RCVPRIORITY = 0x52
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_RESERVE_MEM = 0x49
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TXREHASH = 0x4a
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TFD_CLOEXEC = 0x80000
- TFD_NONBLOCK = 0x800
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TOSTOP = 0x100
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VMIN = 0x6
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WORDSIZE = 0x40
- XCASE = 0x4
- XTABS = 0x1800
- _HIDIOCGRAWNAME = 0x80804804
- _HIDIOCGRAWPHYS = 0x80404805
- _HIDIOCGRAWUNIQ = 0x80404808
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKALIGNOFF = 0x127a
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKDISCARD = 0x1277
+ BLKDISCARDZEROES = 0x127c
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETDISKSEQ = 0x80081280
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKIOMIN = 0x1278
+ BLKIOOPT = 0x1279
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKROTATIONAL = 0x127e
+ BLKRRPART = 0x125f
+ BLKSECDISCARD = 0x127d
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BLKZEROOUT = 0x127f
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ DM_MPATH_PROBE_PATHS = 0xfd12
+ ECCGETLAYOUT = 0x81484d11
+ ECCGETSTATS = 0x80104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPIOCGPARAMS = 0x80088a02
+ EPIOCSPARAMS = 0x40088a01
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HIDIOCREVOKE = 0x4004480d
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_MEI_NOTIFY_GET = 0x80044803
+ IOCTL_MEI_NOTIFY_SET = 0x40044802
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x40084d02
+ MEMERASE64 = 0x40104d14
+ MEMGETBADBLOCK = 0x40084d0b
+ MEMGETINFO = 0x80204d01
+ MEMGETOOBSEL = 0x80c84d0a
+ MEMGETREGIONCOUNT = 0x80044d07
+ MEMISLOCKED = 0x80084d17
+ MEMLOCK = 0x40084d05
+ MEMREAD = 0xc0404d1a
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x40084d0c
+ MEMUNLOCK = 0x40084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x4d13
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_ID = 0x8008b70d
+ NS_GET_MNTNS_ID = 0x8008b705
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_PID_FROM_PIDNS = 0x8004b706
+ NS_GET_PID_IN_PIDNS = 0x8004b708
+ NS_GET_TGID_FROM_PIDNS = 0x8004b707
+ NS_GET_TGID_IN_PIDNS = 0x8004b709
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x400c4d19
+ OTPGETREGIONCOUNT = 0x40044d0e
+ OTPGETREGIONINFO = 0x400c4d0f
+ OTPLOCK = 0x800c4d10
+ OTPSELECT = 0x80044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTP_CLOCK_GETCAPS = 0x80503d01
+ PTP_CLOCK_GETCAPS2 = 0x80503d0a
+ PTP_ENABLE_PPS = 0x40043d04
+ PTP_ENABLE_PPS2 = 0x40043d0d
+ PTP_EXTTS_REQUEST = 0x40103d02
+ PTP_EXTTS_REQUEST2 = 0x40103d0b
+ PTP_MASK_CLEAR_ALL = 0x3d13
+ PTP_MASK_EN_SINGLE = 0x40043d14
+ PTP_PEROUT_REQUEST = 0x40383d03
+ PTP_PEROUT_REQUEST2 = 0x40383d0c
+ PTP_PIN_SETFUNC = 0x40603d07
+ PTP_PIN_SETFUNC2 = 0x40603d10
+ PTP_SYS_OFFSET = 0x43403d05
+ PTP_SYS_OFFSET2 = 0x43403d0e
+ PTRACE_CFI_BRANCH_EXPECTED_LANDING_PAD_BIT = 0x2
+ PTRACE_CFI_BRANCH_EXPECTED_LANDING_PAD_STATE = 0x4
+ PTRACE_CFI_BRANCH_LANDING_PAD_EN_BIT = 0x0
+ PTRACE_CFI_BRANCH_LANDING_PAD_EN_STATE = 0x1
+ PTRACE_CFI_BRANCH_LANDING_PAD_LOCK_BIT = 0x1
+ PTRACE_CFI_BRANCH_LANDING_PAD_LOCK_STATE = 0x2
+ PTRACE_CFI_SHADOW_STACK_EN_BIT = 0x3
+ PTRACE_CFI_SHADOW_STACK_EN_STATE = 0x8
+ PTRACE_CFI_SHADOW_STACK_LOCK_BIT = 0x4
+ PTRACE_CFI_SHADOW_STACK_LOCK_STATE = 0x10
+ PTRACE_CFI_SHADOW_STACK_PTR_BIT = 0x5
+ PTRACE_CFI_SHADOW_STACK_PTR_STATE = 0x20
+ PTRACE_CFI_STATE_INVALID_MASK = 0xffffffffffffffc0
+ PTRACE_GETFDPIC = 0x21
+ PTRACE_GETFDPIC_EXEC = 0x0
+ PTRACE_GETFDPIC_INTERP = 0x1
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PARAM_GET = 0x40187013
+ RTC_PARAM_SET = 0x40187014
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_DEVMEM_DMABUF = 0x4f
+ SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
+ SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102
+ SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DEVMEM_DMABUF = 0x4f
+ SO_DEVMEM_DONTNEED = 0x50
+ SO_DEVMEM_LINEAR = 0x4e
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSPIDFD = 0x4c
+ SO_PASSRIGHTS = 0x53
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERPIDFD = 0x4d
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVMARK = 0x4b
+ SO_RCVPRIORITY = 0x52
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_RESERVE_MEM = 0x49
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXREHASH = 0x4a
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
@@ -585,6 +601,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -808,7 +826,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index 64347eb3..6e87bd65 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -156,6 +156,7 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x8008b70d
NS_GET_MNTNS_ID = 0x8008b705
NS_GET_NSTYPE = 0xb703
NS_GET_OWNER_UID = 0xb704
@@ -367,6 +368,7 @@ const (
RTC_WKALM_SET = 0x4028700f
SCM_DEVMEM_DMABUF = 0x4f
SCM_DEVMEM_LINEAR = 0x4e
+ SCM_INQ = 0x54
SCM_TIMESTAMPING = 0x25
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
@@ -414,6 +416,7 @@ const (
SO_ERROR = 0x4
SO_INCOMING_CPU = 0x31
SO_INCOMING_NAPI_ID = 0x38
+ SO_INQ = 0x54
SO_KEEPALIVE = 0x9
SO_LINGER = 0xd
SO_LOCK_FILTER = 0x2c
@@ -657,6 +660,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x59)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
+ EFSBADCRC = syscall.Errno(0x4a)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
@@ -880,7 +885,7 @@ var errorList = [...]struct {
{114, "EALREADY", "operation already in progress"},
{115, "EINPROGRESS", "operation now in progress"},
{116, "ESTALE", "stale file handle"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index 7d719117..7e2b2e8a 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -161,6 +161,7 @@ const (
NFDBITS = 0x40
NLDLY = 0x100
NOFLSH = 0x80
+ NS_GET_ID = 0x4008b70d
NS_GET_MNTNS_ID = 0x4008b705
NS_GET_NSTYPE = 0x2000b703
NS_GET_OWNER_UID = 0x2000b704
@@ -358,6 +359,7 @@ const (
RTC_WKALM_SET = 0x8028700f
SCM_DEVMEM_DMABUF = 0x58
SCM_DEVMEM_LINEAR = 0x57
+ SCM_INQ = 0x5d
SCM_TIMESTAMPING = 0x23
SCM_TIMESTAMPING_OPT_STATS = 0x38
SCM_TIMESTAMPING_PKTINFO = 0x3c
@@ -453,6 +455,7 @@ const (
SO_ERROR = 0x1007
SO_INCOMING_CPU = 0x33
SO_INCOMING_NAPI_ID = 0x3a
+ SO_INQ = 0x5d
SO_KEEPALIVE = 0x8
SO_LINGER = 0x80
SO_LOCK_FILTER = 0x28
@@ -694,6 +697,8 @@ const (
EDESTADDRREQ = syscall.Errno(0x27)
EDOTDOT = syscall.Errno(0x58)
EDQUOT = syscall.Errno(0x45)
+ EFSBADCRC = syscall.Errno(0x4c)
+ EFSCORRUPTED = syscall.Errno(0x75)
EHOSTDOWN = syscall.Errno(0x40)
EHOSTUNREACH = syscall.Errno(0x41)
EHWPOISON = syscall.Errno(0x87)
@@ -921,7 +926,7 @@ var errorList = [...]struct {
{114, "ELIBACC", "can not access a needed shared library"},
{115, "ENOTUNIQ", "name not unique on network"},
{116, "ERESTART", "interrupted system call should be restarted"},
- {117, "EUCLEAN", "structure needs cleaning"},
+ {117, "EFSCORRUPTED", "structure needs cleaning"},
{118, "ENOTNAM", "not a XENIX named type file"},
{119, "ENAVAIL", "no XENIX semaphores available"},
{120, "EISNAM", "is a named type file"},
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 886f5de5..80f40e40 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -1785,7 +1785,7 @@ func writev(fd int, iovs []Iovec) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
+func preadvSyscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
var _p0 unsafe.Pointer
if len(iovs) > 0 {
_p0 = unsafe.Pointer(&iovs[0])
@@ -1802,7 +1802,7 @@ func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err er
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
+func pwritevSyscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
var _p0 unsafe.Pointer
if len(iovs) > 0 {
_p0 = unsafe.Pointer(&iovs[0])
@@ -1819,7 +1819,7 @@ func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
+func preadv2Syscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
var _p0 unsafe.Pointer
if len(iovs) > 0 {
_p0 = unsafe.Pointer(&iovs[0])
@@ -1836,7 +1836,7 @@ func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
+func pwritev2Syscall(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
var _p0 unsafe.Pointer
if len(iovs) > 0 {
_p0 = unsafe.Pointer(&iovs[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index 1851df14..6487475f 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func readv(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readv readv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writev(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_writev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_writev writev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), uintptr(offset>>32), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_preadv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_preadv preadv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), uintptr(offset>>32), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwritev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
index 0b43c693..f10201da 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
@@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4
DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB)
+TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readv(SB)
+GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readv_trampoline_addr(SB)/4, $libc_readv_trampoline<>(SB)
+
+TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_writev(SB)
+GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $4
+DATA ·libc_writev_trampoline_addr(SB)/4, $libc_writev_trampoline<>(SB)
+
+TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_preadv(SB)
+GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $4
+DATA ·libc_preadv_trampoline_addr(SB)/4, $libc_preadv_trampoline<>(SB)
+
+TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwritev(SB)
+GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pwritev_trampoline_addr(SB)/4, $libc_pwritev_trampoline<>(SB)
+
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index e1ec0dbe..50980475 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func readv(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readv readv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writev(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_writev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_writev writev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_preadv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_preadv preadv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwritev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
index 880c6d6e..9de2cbaa 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
@@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readv(SB)
+GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB)
+
+TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_writev(SB)
+GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB)
+
+TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_preadv(SB)
+GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB)
+
+TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwritev(SB)
+GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB)
+
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index 7c8452a6..33c9c3a4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func readv(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readv readv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writev(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_writev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_writev writev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), 0, uintptr(offset), uintptr(offset>>32))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_preadv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_preadv preadv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), 0, uintptr(offset), uintptr(offset>>32))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwritev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
index b8ef95b0..c6b9175a 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
@@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4
DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB)
+TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readv(SB)
+GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readv_trampoline_addr(SB)/4, $libc_readv_trampoline<>(SB)
+
+TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_writev(SB)
+GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $4
+DATA ·libc_writev_trampoline_addr(SB)/4, $libc_writev_trampoline<>(SB)
+
+TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_preadv(SB)
+GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $4
+DATA ·libc_preadv_trampoline_addr(SB)/4, $libc_preadv_trampoline<>(SB)
+
+TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwritev(SB)
+GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pwritev_trampoline_addr(SB)/4, $libc_pwritev_trampoline<>(SB)
+
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index 2ffdf861..d3410262 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func readv(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readv readv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writev(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_writev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_writev writev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_preadv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_preadv preadv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwritev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
index 2af3b5c7..1be10bb4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
@@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readv(SB)
+GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB)
+
+TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_writev(SB)
+GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB)
+
+TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_preadv(SB)
+GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB)
+
+TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwritev(SB)
+GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB)
+
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
index 1da08d52..dea19d54 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
@@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func readv(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readv readv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writev(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_writev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_writev writev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_preadv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_preadv preadv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwritev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
index b7a25135..a9fec24d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
@@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readv(SB)
+GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB)
+
+TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_writev(SB)
+GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB)
+
+TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_preadv(SB)
+GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB)
+
+TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwritev(SB)
+GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB)
+
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
index 6e85b0aa..436efb58 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
@@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func readv(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readv readv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writev(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_writev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_writev writev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_preadv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_preadv preadv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwritev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
index f15dadf0..441ed4e4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
@@ -597,6 +597,30 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_readv(SB)
+ RET
+GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB)
+
+TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_writev(SB)
+ RET
+GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB)
+
+TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_preadv(SB)
+ RET
+GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB)
+
+TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pwritev(SB)
+ RET
+GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB)
+
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
CALL libc_read(SB)
RET
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
index 28b487df..d801e4b4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
@@ -1633,6 +1633,90 @@ var libc_pwrite_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func readv(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readv readv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writev(fd int, iovecs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_writev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_writev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_writev writev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func preadv(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_preadv_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_preadv_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_preadv preadv "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwritev(fd int, iovecs []Iovec, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovecs) > 0 {
+ _p0 = unsafe.Pointer(&iovecs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwritev_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(iovecs)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwritev_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
index 1e7f321e..b15cc017 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
@@ -498,6 +498,26 @@ TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+TEXT libc_readv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readv(SB)
+GLOBL ·libc_readv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readv_trampoline_addr(SB)/8, $libc_readv_trampoline<>(SB)
+
+TEXT libc_writev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_writev(SB)
+GLOBL ·libc_writev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_writev_trampoline_addr(SB)/8, $libc_writev_trampoline<>(SB)
+
+TEXT libc_preadv_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_preadv(SB)
+GLOBL ·libc_preadv_trampoline_addr(SB), RODATA, $8
+DATA ·libc_preadv_trampoline_addr(SB)/8, $libc_preadv_trampoline<>(SB)
+
+TEXT libc_pwritev_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwritev(SB)
+GLOBL ·libc_pwritev_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwritev_trampoline_addr(SB)/8, $libc_pwritev_trampoline<>(SB)
+
TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_read(SB)
GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index aca56ee4..49d1b880 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -463,4 +463,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index 2ea1ef58..f11f1de7 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -342,6 +342,7 @@ const (
SYS_IO_PGETEVENTS = 333
SYS_RSEQ = 334
SYS_URETPROBE = 335
+ SYS_UPROBE = 336
SYS_PIDFD_SEND_SIGNAL = 424
SYS_IO_URING_SETUP = 425
SYS_IO_URING_ENTER = 426
@@ -386,4 +387,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index d22c8af3..bad740b7 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -427,4 +427,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 5ee264ae..fe646d18 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -330,4 +330,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
index f9f03ebf..4362f6d5 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
@@ -306,6 +306,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 444
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_MEMFD_SECRET = 447
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
SYS_SET_MEMPOLICY_HOME_NODE = 450
@@ -326,4 +327,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index 87c2118e..b63d155a 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -447,4 +447,8 @@ const (
SYS_LISTXATTRAT = 4465
SYS_REMOVEXATTRAT = 4466
SYS_OPEN_TREE_ATTR = 4467
+ SYS_FILE_GETATTR = 4468
+ SYS_FILE_SETATTR = 4469
+ SYS_LISTNS = 4470
+ SYS_RSEQ_SLICE_YIELD = 4471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 391ad102..435d4331 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -377,4 +377,8 @@ const (
SYS_LISTXATTRAT = 5465
SYS_REMOVEXATTRAT = 5466
SYS_OPEN_TREE_ATTR = 5467
+ SYS_FILE_GETATTR = 5468
+ SYS_FILE_SETATTR = 5469
+ SYS_LISTNS = 5470
+ SYS_RSEQ_SLICE_YIELD = 5471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index 56561577..dcc0468d 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -377,4 +377,8 @@ const (
SYS_LISTXATTRAT = 5465
SYS_REMOVEXATTRAT = 5466
SYS_OPEN_TREE_ATTR = 5467
+ SYS_FILE_GETATTR = 5468
+ SYS_FILE_SETATTR = 5469
+ SYS_LISTNS = 5470
+ SYS_RSEQ_SLICE_YIELD = 5471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index 0482b52e..b96f85eb 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -447,4 +447,8 @@ const (
SYS_LISTXATTRAT = 4465
SYS_REMOVEXATTRAT = 4466
SYS_OPEN_TREE_ATTR = 4467
+ SYS_FILE_GETATTR = 4468
+ SYS_FILE_SETATTR = 4469
+ SYS_LISTNS = 4470
+ SYS_RSEQ_SLICE_YIELD = 4471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
index 71806f08..bffa2bd1 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -454,4 +454,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index e35a7105..57bfc6b2 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -426,4 +426,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index 2aea4767..750f706d 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -426,4 +426,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index 6c9bb4e5..303ccbf4 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -331,4 +331,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index 680bc991..5e5dd4cc 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -392,4 +392,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index 620f2710..f7c4fb3d 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -374,6 +374,7 @@ const (
SYS_FSMOUNT = 432
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
SYS_CLOSE_RANGE = 436
SYS_OPENAT2 = 437
SYS_PIDFD_GETFD = 438
@@ -405,4 +406,8 @@ const (
SYS_LISTXATTRAT = 465
SYS_REMOVEXATTRAT = 466
SYS_OPEN_TREE_ATTR = 467
+ SYS_FILE_GETATTR = 468
+ SYS_FILE_SETATTR = 469
+ SYS_LISTNS = 470
+ SYS_RSEQ_SLICE_YIELD = 471
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
index 45476a73..d11d5b96 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -18,6 +18,11 @@ type (
_C_long_long int64
)
+type KernelTimespec struct {
+ Sec int64
+ Nsec int64
+}
+
type ItimerSpec struct {
Interval Timespec
Value Timespec
@@ -521,6 +526,14 @@ type TCPInfo struct {
Total_rto uint16
Total_rto_recoveries uint16
Total_rto_time uint32
+ Received_ce uint32
+ Delivered_e1_bytes uint32
+ Delivered_e0_bytes uint32
+ Delivered_ce_bytes uint32
+ Received_e1_bytes uint32
+ Received_e0_bytes uint32
+ Received_ce_bytes uint32
+ _ [4]byte
}
type TCPVegasInfo struct {
@@ -586,7 +599,7 @@ const (
SizeofIPv6MTUInfo = 0x20
SizeofICMPv6Filter = 0x20
SizeofUcred = 0xc
- SizeofTCPInfo = 0xf8
+ SizeofTCPInfo = 0x118
SizeofTCPCCInfo = 0x14
SizeofCanFilter = 0x8
SizeofTCPRepairOpt = 0x8
@@ -1324,7 +1337,7 @@ const (
PERF_RECORD_CGROUP = 0x13
PERF_RECORD_TEXT_POKE = 0x14
PERF_RECORD_AUX_OUTPUT_HW_ID = 0x15
- PERF_RECORD_MAX = 0x16
+ PERF_RECORD_MAX = 0x17
PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0x0
PERF_RECORD_KSYMBOL_TYPE_BPF = 0x1
PERF_RECORD_KSYMBOL_TYPE_OOL = 0x2
@@ -3566,7 +3579,7 @@ const (
DEVLINK_ATTR_LINECARD_SUPPORTED_TYPES = 0xae
DEVLINK_ATTR_NESTED_DEVLINK = 0xaf
DEVLINK_ATTR_SELFTESTS = 0xb0
- DEVLINK_ATTR_MAX = 0xb3
+ DEVLINK_ATTR_MAX = 0xb7
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
@@ -3888,7 +3901,7 @@ const (
ETHTOOL_MSG_PHY_GET = 0x2d
ETHTOOL_MSG_TSCONFIG_GET = 0x2e
ETHTOOL_MSG_TSCONFIG_SET = 0x2f
- ETHTOOL_MSG_USER_MAX = 0x2f
+ ETHTOOL_MSG_USER_MAX = 0x33
ETHTOOL_MSG_KERNEL_NONE = 0x0
ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
@@ -3938,7 +3951,7 @@ const (
ETHTOOL_MSG_PHY_NTF = 0x2e
ETHTOOL_MSG_TSCONFIG_GET_REPLY = 0x2f
ETHTOOL_MSG_TSCONFIG_SET_REPLY = 0x30
- ETHTOOL_MSG_KERNEL_MAX = 0x30
+ ETHTOOL_MSG_KERNEL_MAX = 0x36
ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
ETHTOOL_FLAG_OMIT_REPLY = 0x2
ETHTOOL_FLAG_STATS = 0x4
@@ -4867,7 +4880,7 @@ const (
NL80211_ATTR_MAC_HINT = 0xc8
NL80211_ATTR_MAC_MASK = 0xd7
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
- NL80211_ATTR_MAX = 0x151
+ NL80211_ATTR_MAX = 0x15c
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS = 0x143
@@ -5082,12 +5095,12 @@ const (
NL80211_ATTR_WOWLAN_TRIGGERS = 0x75
NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED = 0x76
NL80211_ATTR_WPA_VERSIONS = 0x4b
- NL80211_AUTHTYPE_AUTOMATIC = 0x8
+ NL80211_AUTHTYPE_AUTOMATIC = 0x9
NL80211_AUTHTYPE_FILS_PK = 0x7
NL80211_AUTHTYPE_FILS_SK = 0x5
NL80211_AUTHTYPE_FILS_SK_PFS = 0x6
NL80211_AUTHTYPE_FT = 0x2
- NL80211_AUTHTYPE_MAX = 0x7
+ NL80211_AUTHTYPE_MAX = 0x8
NL80211_AUTHTYPE_NETWORK_EAP = 0x3
NL80211_AUTHTYPE_OPEN_SYSTEM = 0x0
NL80211_AUTHTYPE_SAE = 0x4
@@ -5120,7 +5133,7 @@ const (
NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY = 0x3
NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE = 0x5
NL80211_BAND_IFTYPE_ATTR_IFTYPES = 0x1
- NL80211_BAND_IFTYPE_ATTR_MAX = 0xb
+ NL80211_BAND_IFTYPE_ATTR_MAX = 0xd
NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS = 0x7
NL80211_BAND_LC = 0x5
NL80211_BAND_S1GHZ = 0x4
@@ -5255,7 +5268,7 @@ const (
NL80211_CMD_LEAVE_MESH = 0x45
NL80211_CMD_LEAVE_OCB = 0x6d
NL80211_CMD_LINKS_REMOVED = 0x9a
- NL80211_CMD_MAX = 0x9d
+ NL80211_CMD_MAX = 0x9f
NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
NL80211_CMD_MODIFY_LINK_STA = 0x97
NL80211_CMD_NAN_MATCH = 0x78
@@ -5501,7 +5514,7 @@ const (
NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf
NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe
NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf
- NL80211_FREQUENCY_ATTR_MAX = 0x22
+ NL80211_FREQUENCY_ATTR_MAX = 0x27
NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6
NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11
NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
@@ -5766,7 +5779,7 @@ const (
NL80211_PMSR_FTM_CAPA_ATTR_ASAP = 0x1
NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS = 0x6
NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT = 0x7
- NL80211_PMSR_FTM_CAPA_ATTR_MAX = 0xa
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX = 0x12
NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST = 0x8
NL80211_PMSR_FTM_CAPA_ATTR_NON_ASAP = 0x2
NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED = 0xa
@@ -5788,7 +5801,7 @@ const (
NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD = 0x4
NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST = 0x6
NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK = 0xc
- NL80211_PMSR_FTM_REQ_ATTR_MAX = 0xd
+ NL80211_PMSR_FTM_REQ_ATTR_MAX = 0xe
NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED = 0xb
NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP = 0x3
NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES = 0x7
@@ -5806,7 +5819,7 @@ const (
NL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON = 0x1
NL80211_PMSR_FTM_RESP_ATTR_FTMS_PER_BURST = 0x8
NL80211_PMSR_FTM_RESP_ATTR_LCI = 0x13
- NL80211_PMSR_FTM_RESP_ATTR_MAX = 0x15
+ NL80211_PMSR_FTM_RESP_ATTR_MAX = 0x16
NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP = 0x6
NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS = 0x3
NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES = 0x4
@@ -5913,7 +5926,7 @@ const (
NL80211_RATE_INFO_HE_RU_ALLOC_52 = 0x1
NL80211_RATE_INFO_HE_RU_ALLOC_996 = 0x5
NL80211_RATE_INFO_HE_RU_ALLOC = 0x11
- NL80211_RATE_INFO_MAX = 0x1d
+ NL80211_RATE_INFO_MAX = 0x20
NL80211_RATE_INFO_MCS = 0x2
NL80211_RATE_INFO_S1G_MCS = 0x17
NL80211_RATE_INFO_S1G_NSS = 0x18
@@ -6167,7 +6180,7 @@ const (
NL80211_TXRATE_HT = 0x2
NL80211_TXRATE_LEGACY = 0x1
NL80211_TX_RATE_LIMITED = 0x1
- NL80211_TXRATE_MAX = 0x7
+ NL80211_TXRATE_MAX = 0xa
NL80211_TXRATE_MCS = 0x2
NL80211_TXRATE_VHT = 0x3
NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT = 0x1
@@ -6183,7 +6196,7 @@ const (
NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE = 0x2
NL80211_WIPHY_RADIO_ATTR_INDEX = 0x1
NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION = 0x3
- NL80211_WIPHY_RADIO_ATTR_MAX = 0x4
+ NL80211_WIPHY_RADIO_ATTR_MAX = 0x5
NL80211_WIPHY_RADIO_FREQ_ATTR_END = 0x2
NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = 0x2
NL80211_WIPHY_RADIO_FREQ_ATTR_START = 0x1
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index 485f2d3a..97ef790d 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -354,6 +354,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index ecbd1ad8..90b50da6 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -367,6 +367,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 02f0463a..acda1368 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -345,6 +345,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index 6f4d400d..ef7a99e1 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -346,6 +346,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
index cd532cfa..966063df 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
@@ -347,6 +347,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 41336208..dc53b20b 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -350,6 +350,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index eaa37eb7..9ad0aa8c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -349,6 +349,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index 98ae6a1e..29d55493 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -349,6 +349,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index cae19615..a4d9e158 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -350,6 +350,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
index 6ce3b4e0..f8a29777 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -357,6 +357,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index c7429c6a..4158d6c4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -356,6 +356,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 4bf4baf4..1035af49 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -356,6 +356,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index e9709d70..2297125d 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -374,6 +374,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index fb44268c..8481e9bd 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -369,6 +369,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 9c38265c..a6828a03 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -351,6 +351,14 @@ type Taskstats struct {
Wpcopy_delay_min uint64
Irq_delay_max uint64
Irq_delay_min uint64
+ Cpu_delay_max_ts KernelTimespec
+ Blkio_delay_max_ts KernelTimespec
+ Swapin_delay_max_ts KernelTimespec
+ Freepages_delay_max_ts KernelTimespec
+ Thrashing_delay_max_ts KernelTimespec
+ Compact_delay_max_ts KernelTimespec
+ Wpcopy_delay_max_ts KernelTimespec
+ Irq_delay_max_ts KernelTimespec
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index 453a7b97..9755bca9 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -452,6 +452,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString
//sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile
//sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile
+//sys NtQueryInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, outBuffer *byte, outBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtQueryInformationFile
//sys NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile
//sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus
//sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus
@@ -460,6 +461,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess
//sys NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation
//sys NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation
+//sys NtQueryEaFile(handle Handle, iosb *IO_STATUS_BLOCK, outBuffer *byte, outBufferLen uint32, returnSingleEntry bool, eaList *byte, eaListLen uint32, eaIndex *uint32, restartScan bool) (ntstatus error) = ntdll.NtQueryEaFile
+//sys NtSetEaFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32) (ntstatus error) = ntdll.NtSetEaFile
//sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
//sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index d82299e3..d2574a73 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -3043,8 +3043,10 @@ const (
)
const (
- // FileInformationClass for NtSetInformationFile
+ // FileInformationClass for NtSetInformationFile/NtQueryInformationFile, see
+ // https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ne-wdm-_file_information_class
FileBasicInformation = 4
+ FileEaInformation = 7
FileRenameInformation = 10
FileDispositionInformation = 13
FilePositionInformation = 14
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index a506ac0f..192d1930 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -428,8 +428,11 @@ var (
procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
procNtCreateFile = modntdll.NewProc("NtCreateFile")
procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
+ procNtQueryEaFile = modntdll.NewProc("NtQueryEaFile")
+ procNtQueryInformationFile = modntdll.NewProc("NtQueryInformationFile")
procNtQueryInformationProcess = modntdll.NewProc("NtQueryInformationProcess")
procNtQuerySystemInformation = modntdll.NewProc("NtQuerySystemInformation")
+ procNtSetEaFile = modntdll.NewProc("NtSetEaFile")
procNtSetInformationFile = modntdll.NewProc("NtSetInformationFile")
procNtSetInformationProcess = modntdll.NewProc("NtSetInformationProcess")
procNtSetSystemInformation = modntdll.NewProc("NtSetSystemInformation")
@@ -3740,6 +3743,30 @@ func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, i
return
}
+func NtQueryEaFile(handle Handle, iosb *IO_STATUS_BLOCK, outBuffer *byte, outBufferLen uint32, returnSingleEntry bool, eaList *byte, eaListLen uint32, eaIndex *uint32, restartScan bool) (ntstatus error) {
+ var _p0 uint32
+ if returnSingleEntry {
+ _p0 = 1
+ }
+ var _p1 uint32
+ if restartScan {
+ _p1 = 1
+ }
+ r0, _, _ := syscall.SyscallN(procNtQueryEaFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), uintptr(_p0), uintptr(unsafe.Pointer(eaList)), uintptr(eaListLen), uintptr(unsafe.Pointer(eaIndex)), uintptr(_p1))
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
+ }
+ return
+}
+
+func NtQueryInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, outBuffer *byte, outBufferLen uint32, class uint32) (ntstatus error) {
+ r0, _, _ := syscall.SyscallN(procNtQueryInformationFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), uintptr(class))
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
+ }
+ return
+}
+
func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) {
r0, _, _ := syscall.SyscallN(procNtQueryInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen)))
if r0 != 0 {
@@ -3756,6 +3783,14 @@ func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInf
return
}
+func NtSetEaFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32) (ntstatus error) {
+ r0, _, _ := syscall.SyscallN(procNtSetEaFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen))
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
+ }
+ return
+}
+
func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) {
r0, _, _ := syscall.SyscallN(procNtSetInformationFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class))
if r0 != 0 {
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go b/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go
index f1465f73..36076cd4 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/errorsas/errorsas.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// The errorsas package defines an Analyzer that checks that the second argument to
-// errors.As is a pointer to a type implementing error.
+// Package errorsas defines an Analyzer that checks that the second argument to
+// [errors.As] is a pointer to a type implementing error.
package errorsas
import (
@@ -19,7 +19,12 @@ import (
const Doc = `report passing non-pointer or non-error values to errors.As
The errorsas analyzer reports calls to errors.As where the type
-of the second argument is not a pointer to a type implementing error.`
+of the second argument is not a pointer to a type implementing error.
+For example:
+
+ var unwrappedErr net.DNSError
+ errors.As(err, unwrappedErr) // should use &unwrappedErr, DNSError.Error has a pointer reciever
+`
var Analyzer = &analysis.Analyzer{
Name: "errorsas",
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go b/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go
index 37ecb652..22539dea 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go
@@ -9,6 +9,7 @@ package httpresponse
import (
"go/ast"
"go/types"
+ "slices"
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/analysis/passes/inspect"
@@ -144,8 +145,8 @@ func isHTTPFuncOrMethodOnClient(info *types.Info, expr *ast.CallExpr) bool {
// node, along with the number of call expressions encountered.
func restOfBlock(stack []ast.Node) ([]ast.Stmt, int) {
var ncalls int
- for i := len(stack) - 1; i >= 0; i-- {
- if b, ok := stack[i].(*ast.BlockStmt); ok {
+ for i, n := range slices.Backward(stack) {
+ if b, ok := n.(*ast.BlockStmt); ok {
for j, v := range b.List {
if v == stack[i+1] {
return b.List[j:], ncalls
@@ -154,7 +155,7 @@ func restOfBlock(stack []ast.Node) ([]ast.Stmt, int) {
break
}
- if _, ok := stack[i].(*ast.CallExpr); ok {
+ if _, ok := n.(*ast.CallExpr); ok {
ncalls++
}
}
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/atomictypes.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/atomictypes.go
index ec0044b3..9df39fb2 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/atomictypes.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/atomictypes.go
@@ -19,14 +19,13 @@ import (
"golang.org/x/tools/internal/analysis/analyzerutil"
typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex"
"golang.org/x/tools/internal/astutil"
- "golang.org/x/tools/internal/goplsexport"
"golang.org/x/tools/internal/refactor"
"golang.org/x/tools/internal/typesinternal"
"golang.org/x/tools/internal/typesinternal/typeindex"
"golang.org/x/tools/internal/versions"
)
-var atomicTypesAnalyzer = &analysis.Analyzer{
+var AtomicTypesAnalyzer = &analysis.Analyzer{
Name: "atomictypes",
Doc: analyzerutil.MustExtractDoc(doc, "atomictypes"),
Requires: []*analysis.Analyzer{
@@ -37,11 +36,6 @@ var atomicTypesAnalyzer = &analysis.Analyzer{
URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#atomictypes",
}
-func init() {
- // Export to gopls until this is a published modernizer.
- goplsexport.AtomicTypesModernizer = atomicTypesAnalyzer
-}
-
// TODO(mkalil): support the Pointer variants.
// Consider the following function signatures for pointer loading:
// func LoadPointer(addr *unsafe.Pointer) (val unsafe.Pointer)
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go
index e9a3a0d9..260dd509 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/doc.go
@@ -111,6 +111,31 @@ The any analyzer suggests replacing uses of the empty interface type,
`interface{}`, with the `any` alias, which was introduced in Go 1.18.
This is a purely stylistic change that makes code more readable.
+# Analyzer embedlit
+
+embedlit: simplify references to embedded fields in composite literals
+
+The embedlit analyzer suggests removing redundant embedded field type specifiers
+from composite literals. Go1.27 introduced the ability to directly initialize
+fields promoted from embedded struct types without a nested literal. For
+example, given the following structs:
+
+ type T struct {
+ U
+ }
+
+ type U struct {
+ x int
+ }
+
+A composite literal such as
+
+ t := T{U: U{x: 1}}
+
+would become
+
+ t := T{x: 1}
+
# Analyzer errorsastype
errorsastype: replace errors.As with errors.AsType[T]
@@ -142,6 +167,9 @@ The fmtappendf analyzer suggests replacing `[]byte(fmt.Sprintf(...))` with
by Sprintf, making the code more efficient. The suggestion also applies to
fmt.Sprint and fmt.Sprintln.
+Since its fix is not a Pareto improvement, fmtappendf is disabled by default in
+the `go fix` analyzer suite; see golang/go#77581.
+
# Analyzer forvar
forvar: remove redundant re-declaration of loop variables
@@ -424,6 +452,16 @@ It also handles variants using [strings.IndexByte] instead of Index, or the byte
Fixes are offered only in cases in which there are no potential modifications of the idx, s, or substr expressions between their definition and use.
+It also replaces [strings.SplitN](s, sep, 2)[0] and [strings.Split](s, sep)[0] with the "before" result of strings.Cut, when sep is a non-empty string constant:
+
+ x := strings.SplitN(s, sep, 2)[0]
+
+is replaced by:
+
+ x, _, _ := strings.Cut(s, sep)
+
+The fix is only offered when sep is a non-empty string literal. When sep is a variable or the empty string, the semantics differ (strings.Split(s, "")[0] returns the first character of s, but strings.Cut(s, "").before is ""), so no fix is suggested.
+
# Analyzer stringscutprefix
stringscutprefix: replace HasPrefix/TrimPrefix with CutPrefix
@@ -506,6 +544,9 @@ is replaced by:
This avoids quadratic memory allocation and improves performance.
+No diagnostics are issued in tests, where data sizes are often
+small and asymptotic performance is not a security concern.
+
The analyzer requires that all references to s before the final uses
are += operations. To avoid warning about trivial cases, at least one
must appear within a loop. The variable s must be a local
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/embedlit.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/embedlit.go
new file mode 100644
index 00000000..f6872397
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/embedlit.go
@@ -0,0 +1,170 @@
+// Copyright 2026 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.
+
+package modernize
+
+import (
+ "fmt"
+ "go/ast"
+ "go/types"
+ "strings"
+
+ "golang.org/x/tools/go/analysis"
+ "golang.org/x/tools/go/analysis/passes/inspect"
+ "golang.org/x/tools/go/ast/edge"
+ "golang.org/x/tools/go/ast/inspector"
+ "golang.org/x/tools/internal/analysis/analyzerutil"
+ "golang.org/x/tools/internal/astutil"
+ "golang.org/x/tools/internal/moreiters"
+ "golang.org/x/tools/internal/versions"
+)
+
+var EmbedLitAnalyzer = &analysis.Analyzer{
+ Name: "embedlit",
+ Doc: analyzerutil.MustExtractDoc(doc, "embedlit"),
+ Requires: []*analysis.Analyzer{
+ inspect.Analyzer,
+ },
+ Run: runEmbedLit,
+ URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#embedlit",
+}
+
+// TODO(mkalil): Handle other patterns such as:
+// t := T{...}
+// t.x = x
+// ...
+// =>
+// t := T{..., x: x, ...}
+func runEmbedLit(pass *analysis.Pass) (any, error) {
+ var (
+ inspect = pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
+ info = pass.TypesInfo
+ )
+ for curLit := range inspect.Root().Preorder((*ast.CompositeLit)(nil)) {
+ var (
+ edits []analysis.TextEdit
+ names []string // names of the embedded field types that can be removed
+ compLit = curLit.Node().(*ast.CompositeLit)
+ compLitType = info.TypeOf(compLit)
+ check func(*ast.CompositeLit)
+ )
+ check = func(lit *ast.CompositeLit) {
+ for _, elt := range lit.Elts {
+ // Can't promote an unkeyed field; would result in a syntax error.
+ if kv, ok := elt.(*ast.KeyValueExpr); ok {
+ if innerLit := isEmbeddedFieldLit(info, compLitType, kv); innerLit != nil {
+ // Emit edits to delete the unnecessary embedded field type specifier
+ // and its closing brace.
+ closingPos := innerLit.Rbrace
+ if len(innerLit.Elts) > 0 {
+ // Delete any inner trailing commas or white space. Extra trailing commas
+ // would result in invalid code.
+ closingPos = innerLit.Elts[len(innerLit.Elts)-1].End()
+ }
+ file := astutil.EnclosingFile(curLit)
+ // Enable modernizer only for Go1.27.
+ if !analyzerutil.FileUsesGoVersion(pass, file, versions.Go1_27) {
+ return
+ }
+ // If any comments overlap with the range to delete, don't suggest a fix.
+ if !moreiters.Empty(astutil.Comments(file, closingPos, innerLit.Rbrace+1)) {
+ continue
+ }
+ edits = append(edits, []analysis.TextEdit{
+ // T{U: U{f: v, ...}}
+ // ----- -
+ {
+ // Delete the key and the opening brace of the inner struct literal.
+ Pos: kv.Pos(),
+ End: innerLit.Lbrace + 1,
+ },
+ {
+ // Delete the corresponding closing brace, including preceding
+ // white space or commas. Failing to delete trailing commas may
+ // result in invalid code.
+ Pos: closingPos,
+ End: innerLit.Rbrace + 1,
+ },
+ }...)
+ names = append(names, kv.Key.(*ast.Ident).Name)
+ check(innerLit)
+ }
+ }
+ }
+ }
+
+ if curLit.ParentEdgeKind() != edge.KeyValueExpr_Value {
+ compLit := curLit.Node().(*ast.CompositeLit)
+ check(compLit) // non-nested comp lit
+ }
+ if len(edits) > 0 {
+ pass.Report(analysis.Diagnostic{
+ Pos: curLit.Node().Pos(),
+ End: curLit.Node().End(),
+ Message: "embedded field type can be removed from struct literal",
+ SuggestedFixes: []analysis.SuggestedFix{
+ {
+ Message: fmt.Sprintf("Remove embedded field type%s %s", cond(len(names) == 1, "", "s"), strings.Join(names, ", ")),
+ TextEdits: edits,
+ },
+ },
+ })
+ }
+ }
+ return nil, nil
+}
+
+// isEmbeddedFieldLit determines whether elt is a KeyValueExpr "T: T{...}" for
+// an embedded field for which we can safely remove its type.
+// If so, it returns the corresponding CompositeLit.
+// If elt contains an unkeyed field or ambiguous type, it returns nil.
+func isEmbeddedFieldLit(info *types.Info, topLevelType types.Type, kv *ast.KeyValueExpr) *ast.CompositeLit {
+ obj := keyedField(info, kv)
+ if obj == nil || !obj.Embedded() {
+ return nil
+ }
+ lit, ok := kv.Value.(*ast.CompositeLit)
+ if !ok {
+ return nil
+ }
+ // We cannot remove this type if any of its nested composite elements have
+ // unkeyed fields or are ambiguous, so we check for those conditions before
+ // returning.
+ for _, elt := range lit.Elts {
+ kv, ok := elt.(*ast.KeyValueExpr)
+ if !ok {
+ return nil
+ }
+ obj := keyedField(info, kv)
+ if obj == nil {
+ return nil
+ }
+ k := kv.Key.(*ast.Ident) // can't fail
+ // Cannot promote an ambiguous type, for example:
+ // type T struct { A; B }
+ // type A struct { x int }
+ // type B struct { x int }
+ // _ = T{A: A{x: 1}}
+ // cannot be simplified to T{x: 1} because T has two different embedded fields called "x".
+ parentObj, _, _ := types.LookupFieldOrMethod(topLevelType, true, obj.Pkg(), k.Name)
+ if parentObj != obj {
+ return nil
+ }
+ }
+ return lit
+}
+
+// keyedField reports whether the key of kv is an embedded field type. If so, it
+// returns the type of the embedded field, otherwise it returns nil.
+func keyedField(info *types.Info, kv *ast.KeyValueExpr) *types.Var {
+ k, ok := kv.Key.(*ast.Ident)
+ if !ok {
+ return nil
+ }
+ obj, ok := info.ObjectOf(k).(*types.Var)
+ if !ok || !obj.IsField() {
+ return nil
+ }
+ return obj
+}
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go
index 8603d547..c5d30634 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/errorsastype.go
@@ -17,14 +17,13 @@ import (
"golang.org/x/tools/internal/analysis/analyzerutil"
typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex"
"golang.org/x/tools/internal/astutil"
- "golang.org/x/tools/internal/goplsexport"
"golang.org/x/tools/internal/refactor"
"golang.org/x/tools/internal/typesinternal"
"golang.org/x/tools/internal/typesinternal/typeindex"
"golang.org/x/tools/internal/versions"
)
-var errorsastypeAnalyzer = &analysis.Analyzer{
+var ErrorsAsTypeAnalyzer = &analysis.Analyzer{
Name: "errorsastype",
Doc: analyzerutil.MustExtractDoc(doc, "errorsastype"),
URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#errorsastype",
@@ -32,11 +31,6 @@ var errorsastypeAnalyzer = &analysis.Analyzer{
Run: errorsastype,
}
-func init() {
- // Export to gopls until this is a published modernizer.
- goplsexport.ErrorsAsTypeModernizer = errorsastypeAnalyzer
-}
-
// errorsastype offers a fix to replace error.As with the newer
// errors.AsType[T] following this pattern:
//
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/minmax.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/minmax.go
index 93aadf04..9fd86575 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/minmax.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/minmax.go
@@ -19,6 +19,7 @@ import (
typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex"
"golang.org/x/tools/internal/astutil"
"golang.org/x/tools/internal/typeparams"
+ "golang.org/x/tools/internal/typesinternal"
"golang.org/x/tools/internal/typesinternal/typeindex"
"golang.org/x/tools/internal/versions"
)
@@ -230,6 +231,7 @@ func minmax(pass *analysis.Pass) (any, error) {
if compare, ok := ifStmt.Cond.(*ast.BinaryExpr); ok &&
ifStmt.Init == nil &&
isInequality(compare.Op) != 0 &&
+ typesinternal.NoEffects(info, compare) &&
isAssignBlock(ifStmt.Body) {
// a blank var has no type.
if tLHS := info.TypeOf(ifStmt.Body.List[0].(*ast.AssignStmt).Lhs[0]); tLHS != nil && !maybeNaN(tLHS) {
@@ -361,18 +363,18 @@ func canUseBuiltinMinMax(fn *types.Func, body *ast.BlockStmt) bool {
return false
}
- return hasMinMaxLogic(body, fn.Name())
+ return hasMinMaxLogic(body, fn.Name(), sig.Params().At(0).Name(), sig.Params().At(1).Name())
}
// hasMinMaxLogic checks if the function body implements simple min/max logic.
-func hasMinMaxLogic(body *ast.BlockStmt, funcName string) bool {
+func hasMinMaxLogic(body *ast.BlockStmt, funcName, param0, param1 string) bool {
// Pattern 1: Single if/else statement
if len(body.List) == 1 {
if ifStmt, ok := body.List[0].(*ast.IfStmt); ok {
// Get the "false" result from the else block
if elseBlock, ok := ifStmt.Else.(*ast.BlockStmt); ok && len(elseBlock.List) == 1 {
if elseRet, ok := elseBlock.List[0].(*ast.ReturnStmt); ok && len(elseRet.Results) == 1 {
- return checkMinMaxPattern(ifStmt, elseRet.Results[0], funcName)
+ return checkMinMaxPattern(ifStmt, elseRet.Results[0], funcName, param0, param1)
}
}
}
@@ -382,7 +384,7 @@ func hasMinMaxLogic(body *ast.BlockStmt, funcName string) bool {
if len(body.List) == 2 {
if ifStmt, ok := body.List[0].(*ast.IfStmt); ok && ifStmt.Else == nil {
if retStmt, ok := body.List[1].(*ast.ReturnStmt); ok && len(retStmt.Results) == 1 {
- return checkMinMaxPattern(ifStmt, retStmt.Results[0], funcName)
+ return checkMinMaxPattern(ifStmt, retStmt.Results[0], funcName, param0, param1)
}
}
}
@@ -394,7 +396,8 @@ func hasMinMaxLogic(body *ast.BlockStmt, funcName string) bool {
// ifStmt: the if statement to check
// falseResult: the expression returned when the condition is false
// funcName: "min" or "max"
-func checkMinMaxPattern(ifStmt *ast.IfStmt, falseResult ast.Expr, funcName string) bool {
+// param0, param1: the two parameter names for the function.
+func checkMinMaxPattern(ifStmt *ast.IfStmt, falseResult ast.Expr, funcName, param0, param1 string) bool {
// Must have condition with comparison
cmp, ok := ifStmt.Cond.(*ast.BinaryExpr)
if !ok {
@@ -417,10 +420,24 @@ func checkMinMaxPattern(ifStmt *ast.IfStmt, falseResult ast.Expr, funcName strin
return false // Not a comparison operator
}
- t := thenRet.Results[0] // "true" result
- f := falseResult // "false" result
- x := cmp.X // left operand
- y := cmp.Y // right operand
+ t := thenRet.Results[0] // "true" result
+ f := falseResult // "false" result
+ x, ok := cmp.X.(*ast.Ident) // left operand
+ if !ok {
+ return false // Not a basic min/max comparison
+ }
+ y, ok := cmp.Y.(*ast.Ident) // right operand
+ if !ok {
+ return false // Not a basic min/max comparison
+ }
+
+ // Check that the min max algorithm uses the function's params
+ // Which param corresponds to which part of the operation doesn't matter,
+ // so we have to try both.
+ if !(param0 == x.Name && param1 == y.Name ||
+ param0 == y.Name && param1 == x.Name) {
+ return false
+ }
// Check operand order and adjust sign accordingly
if astutil.EqualSyntax(t, x) && astutil.EqualSyntax(f, y) {
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go
index db3b86fb..80491273 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/modernize.go
@@ -17,7 +17,6 @@ import (
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/analysis/passes/inspect"
- "golang.org/x/tools/go/ast/edge"
"golang.org/x/tools/go/ast/inspector"
"golang.org/x/tools/internal/analysis/analyzerutil"
"golang.org/x/tools/internal/refactor"
@@ -35,24 +34,26 @@ var doc string
// Suite lists all modernize analyzers.
var Suite = []*analysis.Analyzer{
AnyAnalyzer,
- atomicTypesAnalyzer,
+ AtomicTypesAnalyzer,
// AppendClippedAnalyzer, // not nil-preserving!
// BLoopAnalyzer, // may skew benchmark results, see golang/go#74967
- FmtAppendfAnalyzer,
+ EmbedLitAnalyzer,
+ ErrorsAsTypeAnalyzer,
+ // FmtAppendfAnalyzer, // makes code less clear, see golang/go#77581
ForVarAnalyzer,
MapsLoopAnalyzer,
MinMaxAnalyzer,
NewExprAnalyzer,
OmitZeroAnalyzer,
- plusBuildAnalyzer,
+ PlusBuildAnalyzer,
RangeIntAnalyzer,
ReflectTypeForAnalyzer,
- slicesbackwardAnalyzer,
+ slicesBackwardAnalyzer,
SlicesContainsAnalyzer,
// SlicesDeleteAnalyzer, // not nil-preserving!
SlicesSortAnalyzer,
- stditeratorsAnalyzer,
- stringscutAnalyzer,
+ StdIteratorsAnalyzer,
+ StringsCutAnalyzer,
StringsCutPrefixAnalyzer,
StringsSeqAnalyzer,
StringsBuilderAnalyzer,
@@ -121,15 +122,6 @@ func within(pass *analysis.Pass, pkgs ...string) bool {
moreiters.Contains(stdlib.Dependencies(pkgs...), path)
}
-// unparenEnclosing removes enclosing parens from cur in
-// preparation for a call to [Cursor.ParentEdge].
-func unparenEnclosing(cur inspector.Cursor) inspector.Cursor {
- for cur.ParentEdgeKind() == edge.ParenExpr_X {
- cur = cur.Parent()
- }
- return cur
-}
-
var (
builtinAny = types.Universe.Lookup("any")
builtinAppend = types.Universe.Lookup("append")
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/plusbuild.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/plusbuild.go
index ff6c9055..574ce0a8 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/plusbuild.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/plusbuild.go
@@ -11,22 +11,16 @@ import (
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/internal/analysis/analyzerutil"
- "golang.org/x/tools/internal/goplsexport"
"golang.org/x/tools/internal/versions"
)
-var plusBuildAnalyzer = &analysis.Analyzer{
+var PlusBuildAnalyzer = &analysis.Analyzer{
Name: "plusbuild",
Doc: analyzerutil.MustExtractDoc(doc, "plusbuild"),
URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#plusbuild",
Run: plusbuild,
}
-func init() {
- // Export to gopls until this is a published modernizer.
- goplsexport.PlusBuildModernizer = plusBuildAnalyzer
-}
-
func plusbuild(pass *analysis.Pass) (any, error) {
check := func(f *ast.File) {
// "//go:build" directives were added in go1.17, but
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go
index 7c529c97..f7cb965f 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/rangeint.go
@@ -356,16 +356,9 @@ func isScalarLvalue(info *types.Info, curId inspector.Cursor) bool {
// as it is always true for a variable even when that variable is
// used only as an r-value. So we must inspect enclosing syntax.
- cur := curId
+ cur := astutil.UnparenEnclosingCursor(curId)
- // Strip enclosing parens.
- ek := cur.ParentEdgeKind()
- for ek == edge.ParenExpr_X {
- cur = cur.Parent()
- ek = cur.ParentEdgeKind()
- }
-
- switch ek {
+ switch cur.ParentEdgeKind() {
case edge.AssignStmt_Lhs:
assign := cur.Parent().Node().(*ast.AssignStmt)
if assign.Tok != token.DEFINE {
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go
index fb1f2e2e..959939b5 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/reflect.go
@@ -65,9 +65,9 @@ func reflecttypefor(pass *analysis.Pass) (any, error) {
// Special cases for TypeOf((*T)(nil)).Elem(), and
// TypeOf([]T(nil)).Elem(), needed when T is an interface type.
if curCall.ParentEdgeKind() == edge.SelectorExpr_X {
- curSel := unparenEnclosing(curCall).Parent()
+ curSel := astutil.UnparenEnclosingCursor(curCall).Parent()
if curSel.ParentEdgeKind() == edge.CallExpr_Fun {
- call2 := unparenEnclosing(curSel).Parent().Node().(*ast.CallExpr) // potentially .Elem()
+ call2 := astutil.UnparenEnclosingCursor(curSel).Parent().Node().(*ast.CallExpr) // potentially .Elem()
obj := typeutil.Callee(info, call2)
if typesinternal.IsMethodNamed(obj, "reflect", "Type", "Elem") {
// reflect.TypeOf(expr).Elem()
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicesbackward.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicesbackward.go
index 293a7c0c..305b5e5b 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicesbackward.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/slicesbackward.go
@@ -9,6 +9,7 @@ import (
"go/ast"
"go/token"
"go/types"
+ "strings"
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/analysis/passes/inspect"
@@ -23,7 +24,7 @@ import (
"golang.org/x/tools/internal/versions"
)
-var slicesbackwardAnalyzer = &analysis.Analyzer{
+var slicesBackwardAnalyzer = &analysis.Analyzer{
Name: "slicesbackward",
Doc: analyzerutil.MustExtractDoc(doc, "slicesbackward"),
Requires: []*analysis.Analyzer{
@@ -36,7 +37,7 @@ var slicesbackwardAnalyzer = &analysis.Analyzer{
func init() {
// Export to gopls until this is a published modernizer.
- goplsexport.SlicesBackwardModernizer = slicesbackwardAnalyzer
+ goplsexport.SlicesBackwardModernizer = slicesBackwardAnalyzer
}
// slicesbackward offers a fix to replace a manually-written backward loop:
@@ -147,18 +148,47 @@ func slicesbackward(pass *analysis.Pass) (any, error) {
// s[i] — pure element accesses that can be replaced by the value var
// other — index used for non-indexing purposes
var (
- sliceIndexes []*ast.IndexExpr
- otherUses int
+ // First assignment in the loop body of the form "name := s[i]"; or nil.
+ firstSliceIdxAssign *ast.AssignStmt
+ // List of s[i] expressions to replace by the value var (excludes firstSliceIdxAssign, which will be entirely removed).
+ sliceIdxsReplace []*ast.IndexExpr
+ // Total count of s[i] usages.
+ sliceIdxs int
+ // Non-indexing uses of i.
+ otherUses int
)
for curUse := range index.Uses(indexObj) {
if !bodyCur.Contains(curUse) {
continue
}
// Is i in the Index position of an s[i] expression?
+ // If so, we also need to check whether s[i] is an lvalue. If we're
+ // mutating the slice or taking an element's address, a fix will not
+ // be offered.
if curUse.ParentEdgeKind() == edge.IndexExpr_Index {
- idxExpr := curUse.Parent().Node().(*ast.IndexExpr)
+ if isScalarLvalue(pass.TypesInfo, curUse.Parent()) {
+ continue nextLoop
+ }
+ idxCur := curUse.Parent()
+ idxExpr := idxCur.Node().(*ast.IndexExpr)
if astutil.EqualSyntax(idxExpr.X, sliceExpr) {
- sliceIndexes = append(sliceIndexes, idxExpr)
+ sliceIdxs++
+ // If the current statement is the first in the body of the form
+ // "name := s[i]", save it so we can use "name" as the value
+ // variable in slices.Backward. We can also remove the entire assign
+ // statement.
+ if firstSliceIdxAssign == nil && idxCur.ParentEdgeKind() == edge.AssignStmt_Rhs {
+ assignStmt := idxCur.Parent().Node().(*ast.AssignStmt)
+ if len(assignStmt.Lhs) == 1 && assignStmt.Tok == token.DEFINE {
+ // The condition above implies that assignStmt.Lhs[0] is a valid
+ // identifier.
+ firstSliceIdxAssign = assignStmt
+ // We don't need to replace the index expr with the value variable
+ // name if we are going to remove the entire assignment.
+ continue
+ }
+ }
+ sliceIdxsReplace = append(sliceIdxsReplace, idxExpr)
continue
}
}
@@ -167,15 +197,18 @@ func slicesbackward(pass *analysis.Pass) (any, error) {
// Build the suggested fix.
//
- // for i := len(s) - 1; i >= 0; i-- { ... s[i] ... }
- // ---------------------------- ----
- // _, v := range slices.Backward(s) v
+ // for i := len(s) - 1; i >= 0; i-- { ... s[i] ... }
+ // -------------------------------- ----
+ // for _, v := range slices.Backward(s) { ... v ... }
sliceStr := astutil.Format(pass.Fset, sliceExpr)
prefix, edits := refactor.AddImport(info, file, "slices", "slices", "Backward", loop.Pos())
- elemName := freshName(info, index, info.Scopes[loop], loop.Pos(), bodyCur, bodyCur, token.NoPos, "v")
+ elemName := chooseValueName(firstSliceIdxAssign, sliceStr)
+ elemName = freshName(info, index, info.Scopes[loop], loop.Pos(), bodyCur, bodyCur, token.NoPos, elemName)
- // Replace each s[i] with elemName.
- for _, sx := range sliceIndexes {
+ // Replace each s[i] with elemName (except for in the statement of the
+ // form "name := s[i]" where we might have gotten elemName from - we will
+ // delete this entire statement instead).
+ for _, sx := range sliceIdxsReplace {
edits = append(edits, analysis.TextEdit{
Pos: sx.Pos(),
End: sx.End(),
@@ -183,17 +216,27 @@ func slicesbackward(pass *analysis.Pass) (any, error) {
})
}
- // Replace the loop header with a range over slices.Backward.
- var header string
- if otherUses == 0 && len(sliceIndexes) > 0 {
+ if firstSliceIdxAssign != nil {
+ edits = append(edits, analysis.TextEdit{
+ Pos: firstSliceIdxAssign.Pos(),
+ End: firstSliceIdxAssign.End(),
+ })
+ }
+
+ // Replace the loop header with a range over slices.Backward. In
+ // well-typed code, at least one of the index or value variables must be
+ // referenced inside the loop body (otherUses + sliceIndexes > 0).
+ var vars string
+ if otherUses == 0 { // sliceIdxs > 0
// All uses of i are s[i]; drop the index variable.
- header = fmt.Sprintf("_, %s := range %sBackward(%s)",
- elemName, prefix, sliceStr)
- } else {
- // i is used for other purposes; keep both index and value.
- header = fmt.Sprintf("%s, %s := range %sBackward(%s)",
- indexIdent.Name, elemName, prefix, sliceStr)
+ vars = fmt.Sprintf("_, %s", elemName)
+ } else if sliceIdxs == 0 { // otherUses > 0
+ // Index i is not used in any s[i] expressions; drop the value variable.
+ vars = indexIdent.Name
+ } else { // otherUses > 0 && sliceIdxs > 0, keep both variables.
+ vars = fmt.Sprintf("%s, %s", indexIdent.Name, elemName)
}
+ header := fmt.Sprintf("%s := range %sBackward(%s)", vars, prefix, sliceStr)
edits = append(edits, analysis.TextEdit{
Pos: loop.Init.Pos(),
End: loop.Post.End(),
@@ -213,3 +256,20 @@ func slicesbackward(pass *analysis.Pass) (any, error) {
}
return nil, nil
}
+
+// chooseValueName uses a heuristic to generate a name for the value variable in
+// the call to slices.Backward.
+func chooseValueName(assign *ast.AssignStmt, sliceStr string) string {
+ if assign != nil {
+ return assign.Lhs[0].(*ast.Ident).Name
+ }
+ // Heuristic: remove plural s suffix from slice var
+ // if present, otherwise use first letter.
+ if token.IsIdentifier(sliceStr) && len(sliceStr) > 1 {
+ if single, ok := strings.CutSuffix(sliceStr, "s"); ok {
+ return single
+ }
+ return sliceStr[:1] // first letter (assuming ASCII)
+ }
+ return "v"
+}
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go
index 86e1c8fd..19532686 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stditerators.go
@@ -17,12 +17,11 @@ import (
"golang.org/x/tools/internal/analysis/analyzerutil"
typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex"
"golang.org/x/tools/internal/astutil"
- "golang.org/x/tools/internal/goplsexport"
"golang.org/x/tools/internal/stdlib"
"golang.org/x/tools/internal/typesinternal/typeindex"
)
-var stditeratorsAnalyzer = &analysis.Analyzer{
+var StdIteratorsAnalyzer = &analysis.Analyzer{
Name: "stditerators",
Doc: analyzerutil.MustExtractDoc(doc, "stditerators"),
Requires: []*analysis.Analyzer{
@@ -32,11 +31,6 @@ var stditeratorsAnalyzer = &analysis.Analyzer{
URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#stditerators",
}
-func init() {
- // Export to gopls until this is a published modernizer.
- goplsexport.StdIteratorsModernizer = stditeratorsAnalyzer
-}
-
// stditeratorsTable records std types that have legacy T.{Len,At}
// iteration methods as well as a newer T.All method that returns an
// iter.Seq.
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringsbuilder.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringsbuilder.go
index e89baa9b..6aa9c881 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringsbuilder.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringsbuilder.go
@@ -13,6 +13,7 @@ import (
"go/types"
"maps"
"slices"
+ "strings"
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/analysis/passes/inspect"
@@ -47,6 +48,7 @@ func stringsbuilder(pass *analysis.Pass) (any, error) {
var (
inspect = pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
index = pass.ResultOf[typeindexanalyzer.Analyzer].(*typeindex.Index)
+ info = pass.TypesInfo
)
// Gather all local string variables that appear on the
@@ -55,7 +57,7 @@ func stringsbuilder(pass *analysis.Pass) (any, error) {
for curAssign := range inspect.Root().Preorder((*ast.AssignStmt)(nil)) {
assign := curAssign.Node().(*ast.AssignStmt)
if assign.Tok == token.ADD_ASSIGN && is[*ast.Ident](assign.Lhs[0]) {
- if v, ok := pass.TypesInfo.Uses[assign.Lhs[0].(*ast.Ident)].(*types.Var); ok &&
+ if v, ok := info.Uses[assign.Lhs[0].(*ast.Ident)].(*types.Var); ok &&
v.Kind() == types.LocalVar &&
types.Identical(v.Type(), builtinString.Type()) {
candidates[v] = true
@@ -75,7 +77,7 @@ func stringsbuilder(pass *analysis.Pass) (any, error) {
// Now check each candidate variable's decl and uses.
nextcand:
for _, v := range slices.SortedFunc(maps.Keys(candidates), lexicalOrder) {
- var edits []analysis.TextEdit
+ var edits, postEdits []analysis.TextEdit // postEdits are emitted last
// Check declaration of s has one of these forms:
//
@@ -100,6 +102,13 @@ nextcand:
if file == lastEditFile && v.Pos() < lastEditEnd {
continue
}
+ filename := pass.Fset.File(file.FileStart).Name()
+ // Suppress diagnostics in test files, where suggested fixes may increase
+ // verbosity, and performance doesn't matter as much.
+ // See https://go.dev/issue/78613
+ if strings.HasSuffix(filename, "_test.go") {
+ continue
+ }
ek := def.ParentEdgeKind()
if ek == edge.AssignStmt_Lhs &&
@@ -121,10 +130,10 @@ nextcand:
// Add strings import.
prefix, importEdits := refactor.AddImport(
- pass.TypesInfo, astutil.EnclosingFile(def), "strings", "strings", "Builder", v.Pos())
+ info, astutil.EnclosingFile(def), "strings", "strings", "Builder", v.Pos())
edits = append(edits, importEdits...)
- if isEmptyString(pass.TypesInfo, assign.Rhs[0]) {
+ if isEmptyString(info, assign.Rhs[0]) {
// s := ""
// ---------------------
// var s strings.Builder
@@ -171,7 +180,7 @@ nextcand:
// Add strings import.
prefix, importEdits := refactor.AddImport(
- pass.TypesInfo, astutil.EnclosingFile(def), "strings", "strings", "Builder", v.Pos())
+ info, astutil.EnclosingFile(def), "strings", "strings", "Builder", v.Pos())
edits = append(edits, importEdits...)
spec := def.Parent().Node().(*ast.ValueSpec)
@@ -193,7 +202,7 @@ nextcand:
NewText: fmt.Appendf(nil, " %sBuilder", prefix),
})
- if len(spec.Values) > 0 && !isEmptyString(pass.TypesInfo, spec.Values[0]) {
+ if len(spec.Values) > 0 && !isEmptyString(info, spec.Values[0]) {
if decl.Rparen.IsValid() {
// var decl with explicit parens:
//
@@ -273,11 +282,8 @@ nextcand:
)
for curUse := range index.Uses(v) {
// Strip enclosing parens around Ident.
+ curUse = astutil.UnparenEnclosingCursor(curUse)
ek := curUse.ParentEdgeKind()
- for ek == edge.ParenExpr_X {
- curUse = curUse.Parent()
- ek = curUse.ParentEdgeKind()
- }
// intervening reports whether cur has an ancestor of
// one of the given types that is within the scope of v.
@@ -315,20 +321,21 @@ nextcand:
// s += expr
// ------------- -
// s.WriteString(expr)
- edits = append(edits, []analysis.TextEdit{
+ edits = append(edits, analysis.TextEdit{
// replace " += " with ".WriteString("
- {
- Pos: assign.Lhs[0].End(),
- End: assign.Rhs[0].Pos(),
- NewText: []byte(".WriteString("),
- },
+ Pos: assign.Lhs[0].End(),
+ End: assign.Rhs[0].Pos(),
+ NewText: []byte(".WriteString("),
+ })
+
+ // Delay inserting the closing parenthesis, in case it overlaps with a
+ // .String() edit, since it would need to come after.
+ postEdits = append(postEdits, analysis.TextEdit{
// insert ")"
- {
- Pos: assign.End(),
- End: assign.End(),
- NewText: []byte(")"),
- },
- }...)
+ Pos: assign.End(),
+ End: assign.End(),
+ NewText: []byte(")"),
+ })
} else if ek == edge.UnaryExpr_X &&
curUse.Parent().Node().(*ast.UnaryExpr).Op == token.AND {
@@ -357,6 +364,8 @@ nextcand:
continue nextcand // no += in a loop; reject
}
+ edits = append(edits, postEdits...)
+
lastEditFile = file
lastEditEnd = edits[len(edits)-1].End
diff --git a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go
index 6192c56f..ae93d4d3 100644
--- a/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go
+++ b/vendor/golang.org/x/tools/go/analysis/passes/modernize/stringscut.go
@@ -21,14 +21,13 @@ import (
"golang.org/x/tools/internal/analysis/analyzerutil"
typeindexanalyzer "golang.org/x/tools/internal/analysis/typeindex"
"golang.org/x/tools/internal/astutil"
- "golang.org/x/tools/internal/goplsexport"
"golang.org/x/tools/internal/moreiters"
"golang.org/x/tools/internal/typesinternal"
"golang.org/x/tools/internal/typesinternal/typeindex"
"golang.org/x/tools/internal/versions"
)
-var stringscutAnalyzer = &analysis.Analyzer{
+var StringsCutAnalyzer = &analysis.Analyzer{
Name: "stringscut",
Doc: analyzerutil.MustExtractDoc(doc, "stringscut"),
Requires: []*analysis.Analyzer{
@@ -39,11 +38,6 @@ var stringscutAnalyzer = &analysis.Analyzer{
URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize#stringscut",
}
-func init() {
- // Export to gopls until this is a published modernizer.
- goplsexport.StringsCutModernizer = stringscutAnalyzer
-}
-
// stringscut offers a fix to replace an occurrence of strings.Index{,Byte} with
// strings.{Cut,Contains}, and similar fixes for functions in the bytes package.
// Consider some candidate for replacement i := strings.Index(s, substr).
@@ -92,7 +86,7 @@ func init() {
// }
//
// If the condition involving `i` is equivalent to i >= 0, then we replace it with
-// `if ok“.
+// `if ok`.
// If the condition is negated (e.g. equivalent to `i < 0`), we use `if !ok` instead.
// If the slices of `s` match `s[:i]` or `s[i+len(substr):]` or their variants listed above,
// then we replace them with before and after.
@@ -124,6 +118,8 @@ func stringscut(pass *analysis.Pass) (any, error) {
bytesIndexByte = index.Object("bytes", "IndexByte")
)
+ stringsplitCut(pass, index)
+
scopeFixCount := make(map[*types.Scope]int) // the number of times we have offered a fix within a given scope in the current pass
for _, obj := range []types.Object{
@@ -149,11 +145,20 @@ func stringscut(pass *analysis.Pass) (any, error) {
switch ek, idx := curCall.ParentEdge(); ek {
case edge.ValueSpec_Values:
// Have: var i = strings.Index(...)
+ // If the call occurs in a multi-value declaration or assignment, don't suggest a fix because it would produce invalid code (See golang/go#78643).
+ spec := curCall.Parent().Node().(*ast.ValueSpec)
+ if len(spec.Names) != 1 {
+ continue
+ }
curName := curCall.Parent().ChildAt(edge.ValueSpec_Names, idx)
iIdent = curName.Node().(*ast.Ident)
case edge.AssignStmt_Rhs:
// Have: i := strings.Index(...)
// (Must be i's definition.)
+ assign := curCall.Parent().Node().(*ast.AssignStmt)
+ if len(assign.Lhs) != 1 {
+ continue
+ }
curLhs := curCall.Parent().ChildAt(edge.AssignStmt_Lhs, idx)
iIdent, _ = curLhs.Node().(*ast.Ident) // may be nil
}
@@ -367,6 +372,129 @@ func stringscut(pass *analysis.Pass) (any, error) {
return nil, nil
}
+// stringsplitCut reports patterns where strings.Split or strings.SplitN with
+// n=2 is immediately indexed at [0], which can be simplified to strings.Cut,
+// when sep is a non-empty string constant. The transformation is
+// semantics-preserving only for non-empty sep: strings.Split(s, "")[0]
+// returns the first character of s, but strings.Cut(s, "").before is "".
+// For variable sep the value is unknown at analysis time, so we conservatively
+// skip those cases too.
+//
+// For example:
+//
+// x := strings.SplitN(s, ",", 2)[0]
+// ------ --
+// x, _, _ := strings.Cut(s, ",")
+//
+// Requires Go 1.18 (when strings.Cut was added).
+func stringsplitCut(pass *analysis.Pass, index *typeindex.Index) {
+ info := pass.TypesInfo
+
+ stringsSplit := index.Object("strings", "Split")
+ stringsSplitN := index.Object("strings", "SplitN")
+
+ for _, obj := range []types.Object{stringsSplit, stringsSplitN} {
+ for curCall := range index.Calls(obj) {
+ callExpr := curCall.Node().(*ast.CallExpr)
+
+ // For SplitN, the third argument must be the integer constant 2.
+ if obj.Name() == "SplitN" && !isIntLiteral(info, callExpr.Args[2], 2) {
+ continue
+ }
+
+ // Sep must be a non-empty constant string.
+ // strings.Split(s, "")[0] returns the first character of s, but
+ // strings.Cut(s, "").before is "", so the semantics differ for
+ // an empty sep. For a variable sep we cannot rule out "" at
+ // analysis time, so we conservatively skip those cases too.
+ sepTV := info.Types[callExpr.Args[1]]
+ if sepTV.Value == nil || constant.StringVal(sepTV.Value) == "" {
+ continue
+ }
+
+ // The call must be the X of an IndexExpr.
+ if curCall.ParentEdgeKind() != edge.IndexExpr_X {
+ continue
+ }
+ parent := curCall.Parent()
+ indexExpr := parent.Node().(*ast.IndexExpr)
+
+ // The index must be the integer constant 0.
+ if !isZeroIntConst(info, indexExpr.Index) {
+ continue
+ }
+
+ // The IndexExpr must be the sole RHS of an assignment statement.
+ if parent.ParentEdgeKind() != edge.AssignStmt_Rhs {
+ continue
+ }
+ assign := parent.Parent().Node().(*ast.AssignStmt)
+ if assign.Tok != token.DEFINE || len(assign.Lhs) != 1 {
+ continue
+ }
+
+ // The LHS must be a single non-blank identifier.
+ lhsIdent, ok := assign.Lhs[0].(*ast.Ident)
+ if !ok || lhsIdent.Name == "_" {
+ continue
+ }
+
+ // strings.Cut requires Go 1.18.
+ if !analyzerutil.FileUsesGoVersion(pass, astutil.EnclosingFile(curCall), versions.Go1_18) {
+ continue
+ }
+
+ // Build the fix.
+ //
+ // x := strings.SplitN(s, sep, 2)[0]
+ // --- ------ ---
+ // x, _, _ := strings.Cut(s, sep)
+ callFunIdent := typesinternal.UsedIdent(info, callExpr.Fun)
+
+ var edits []analysis.TextEdit
+
+ // LHS: insert ", _, _" after x
+ edits = append(edits, analysis.TextEdit{
+ Pos: lhsIdent.End(),
+ End: lhsIdent.End(),
+ NewText: []byte(", _, _"),
+ })
+
+ // Function name: Split/SplitN → Cut
+ edits = append(edits, analysis.TextEdit{
+ Pos: callFunIdent.Pos(),
+ End: callFunIdent.End(),
+ NewText: []byte("Cut"),
+ })
+
+ // For SplitN: remove the ", 2" third argument.
+ if obj.Name() == "SplitN" {
+ edits = append(edits, analysis.TextEdit{
+ Pos: callExpr.Args[1].End(), // after sep
+ End: callExpr.Rparen, // before )
+ })
+ }
+
+ // Remove the "[0]" index expression.
+ edits = append(edits, analysis.TextEdit{
+ Pos: indexExpr.Lbrack,
+ End: indexExpr.End(),
+ })
+
+ pass.Report(analysis.Diagnostic{
+ Pos: callExpr.Fun.Pos(),
+ End: callExpr.Fun.End(),
+ Message: fmt.Sprintf("strings.%s call can be simplified using strings.Cut", obj.Name()),
+ Category: "stringscut",
+ SuggestedFixes: []analysis.SuggestedFix{{
+ Message: fmt.Sprintf("Simplify strings.%s call using strings.Cut", obj.Name()),
+ TextEdits: edits,
+ }},
+ })
+ }
+ }
+}
+
// indexArgValid reports whether expr is a valid strings.Index(_, _) arg
// for the transformation. An arg is valid iff it is:
// - constant;
@@ -387,10 +515,10 @@ func indexArgValid(info *types.Info, index *typeindex.Index, expr ast.Expr, afte
case *ast.Ident:
sObj := info.Uses[expr]
sUses := index.Uses(sObj)
- return !hasModifyingUses(info, sUses, afterPos)
+ return !hasModifyingUses(sUses, afterPos)
default:
// For now, skip instances where s or substr are not
- // identifers, basic lits, or call expressions of the form
+ // identifiers, basic lits, or call expressions of the form
// []byte(s).
// TODO(mkalil): Handle s and substr being expressions like ptr.field[i].
// From adonovan: We'd need to analyze s and substr to see
@@ -487,18 +615,15 @@ func checkIdxUses(info *types.Info, uses iter.Seq[inspector.Cursor], s, substr a
// hasModifyingUses reports whether any of the uses involve potential
// modifications. Uses involving assignments before the "afterPos" won't be
// considered.
-func hasModifyingUses(info *types.Info, uses iter.Seq[inspector.Cursor], afterPos token.Pos) bool {
+func hasModifyingUses(uses iter.Seq[inspector.Cursor], afterPos token.Pos) bool {
for curUse := range uses {
ek := curUse.ParentEdgeKind()
if ek == edge.AssignStmt_Lhs {
if curUse.Node().Pos() <= afterPos {
continue
}
- assign := curUse.Parent().Node().(*ast.AssignStmt)
- if sameObject(info, assign.Lhs[0], curUse.Node().(*ast.Ident)) {
- // Modifying use because we are reassigning the value of the object.
- return true
- }
+ // Any use on the LHS is a modifying use.
+ return true
} else if ek == edge.UnaryExpr_X &&
curUse.Parent().Node().(*ast.UnaryExpr).Op == token.AND {
// Modifying use because we might be passing the object by reference (an explicit &).
diff --git a/vendor/golang.org/x/tools/go/ast/edge/edge.go b/vendor/golang.org/x/tools/go/ast/edge/edge.go
index 4f6ccfd6..8dc4dd15 100644
--- a/vendor/golang.org/x/tools/go/ast/edge/edge.go
+++ b/vendor/golang.org/x/tools/go/ast/edge/edge.go
@@ -12,7 +12,7 @@ import (
"reflect"
)
-// A Kind describes a field of an ast.Node struct.
+// A Kind describes a field of an [ast.Node] struct.
type Kind uint8
// String returns a description of the edge kind.
@@ -41,21 +41,25 @@ func (k Kind) Get(n ast.Node, idx int) ast.Node {
panic(fmt.Sprintf("%v.Get(%T): invalid node type", k, n))
}
v := reflect.ValueOf(n).Elem().Field(fieldInfos[k].index)
- if idx != -1 {
- v = v.Index(idx) // asserts valid index
- } else {
- // (The type assertion below asserts that v is not a slice.)
+
+ if v.Kind() == reflect.Slice {
+ v = v.Index(idx) // asserts valid idx
+ } else if idx != -1 {
+ panic(fmt.Sprintf("%v, Get(%T, %d): cannot index non-slice", v, n, idx))
}
- return v.Interface().(ast.Node) // may be nil
+
+ out, _ := v.Interface().(ast.Node) // may be nil
+ return out
}
+// Each [Kind] is named Type_Field, where Type is the
+// [ast.Node] struct type and Field is the name of the field
const (
Invalid Kind = iota // for nodes at the root of the traversal
- // Kinds are sorted alphabetically.
- // Numbering is not stable.
- // Each is named Type_Field, where Type is the
- // ast.Node struct type and Field is the name of the field
+ // As of Go1.26 these kinds are sorted alphabetically, but
+ // numbering must be stable, so any new addition of const should
+ // use a new value (be added at the end of the list).
ArrayType_Elt
ArrayType_Len
diff --git a/vendor/golang.org/x/tools/go/buildutil/allpackages.go b/vendor/golang.org/x/tools/go/buildutil/allpackages.go
index 8a7f0fcc..1a77435e 100644
--- a/vendor/golang.org/x/tools/go/buildutil/allpackages.go
+++ b/vendor/golang.org/x/tools/go/buildutil/allpackages.go
@@ -52,11 +52,9 @@ func ForEachPackage(ctxt *build.Context, found func(importPath string, err error
var wg sync.WaitGroup
for _, root := range ctxt.SrcDirs() {
- wg.Add(1)
- go func() {
+ wg.Go(func() {
allPackages(ctxt, root, ch)
- wg.Done()
- }()
+ })
}
go func() {
wg.Wait()
@@ -107,11 +105,9 @@ func allPackages(ctxt *build.Context, root string, ch chan<- item) {
}
for _, fi := range files {
if fi.IsDir() {
- wg.Add(1)
- go func() {
+ wg.Go(func() {
walkDir(filepath.Join(dir, fi.Name()))
- wg.Done()
- }()
+ })
}
}
}
diff --git a/vendor/golang.org/x/tools/go/packages/golist.go b/vendor/golang.org/x/tools/go/packages/golist.go
index a6c17cf6..8e60cbbe 100644
--- a/vendor/golang.org/x/tools/go/packages/golist.go
+++ b/vendor/golang.org/x/tools/go/packages/golist.go
@@ -207,11 +207,10 @@ func goListDriver(cfg *Config, runner *gocommand.Runner, overlay string, pattern
// doesn't exist.
extractQueries:
for _, pattern := range patterns {
- eqidx := strings.Index(pattern, "=")
- if eqidx < 0 {
+ query, value, ok := strings.Cut(pattern, "=")
+ if !ok {
restPatterns = append(restPatterns, pattern)
} else {
- query, value := pattern[:eqidx], pattern[eqidx+len("="):]
switch query {
case "file":
containFiles = append(containFiles, value)
@@ -563,8 +562,18 @@ func (state *golistState) createDriverResponse(words ...string) (*DriverResponse
} else {
// golang/go#38990: go list silently fails to do cgo processing
pkg.CompiledGoFiles = nil
+
+ var msg strings.Builder
+ fmt.Fprintf(&msg, "go list failed to return CompiledGoFiles for %q.\n", p.Name)
+
+ for _, err := range p.DepsErrors {
+ msg.WriteString(strings.TrimSpace(err.Err))
+ msg.WriteByte('\n')
+ }
+
+ msg.WriteString("This may indicate failure to perform cgo processing; try building at the command line. See https://golang.org/issue/38990.")
pkg.Errors = append(pkg.Errors, Error{
- Msg: "go list failed to return CompiledGoFiles. This may indicate failure to perform cgo processing; try building at the command line. See https://golang.org/issue/38990.",
+ Msg: msg.String(),
Kind: ListError,
})
}
diff --git a/vendor/golang.org/x/tools/go/packages/packages.go b/vendor/golang.org/x/tools/go/packages/packages.go
index 412ba06b..de683684 100644
--- a/vendor/golang.org/x/tools/go/packages/packages.go
+++ b/vendor/golang.org/x/tools/go/packages/packages.go
@@ -539,6 +539,11 @@ type Package struct {
// depsErrors is the DepsErrors field from the go list response, if any.
depsErrors []*packagesinternal.PackageError
+
+ // exportDataError is the error encountered reading export data, if any.
+ // Decoding export data should ordinarily be infallible, so this typically
+ // indicates a producer/consumer version skew.
+ exportDataError error
}
// Module provides module information for a package.
@@ -1073,10 +1078,11 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
}
// TODO(adonovan): this condition looks wrong:
- // I think it should be lpkg.needtypes && !lpg.needsrc,
+ // I think it should be lpkg.needtypes && !lpkg.needsrc,
// so that NeedSyntax without NeedTypes can be satisfied by export data.
if !lpkg.needsrc {
if err := ld.loadFromExportData(lpkg); err != nil {
+ lpkg.exportDataError = err
lpkg.Errors = append(lpkg.Errors, Error{
Pos: "-",
Msg: err.Error(),
@@ -1215,7 +1221,13 @@ func (ld *loader) loadPackage(lpkg *loaderPackage) {
if ipkg.Types != nil && ipkg.Types.Complete() {
return ipkg.Types, nil
}
- log.Fatalf("internal error: package %q without types was imported from %q", path, lpkg)
+
+ // If types are unavailable, there must be an export data error.
+ if ipkg.exportDataError != nil {
+ return nil, ipkg.exportDataError
+ }
+
+ log.Fatalf("internal error: expected complete types for package %q", path)
panic("unreachable")
})
diff --git a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
index 77aad553..0d6d0bce 100644
--- a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
+++ b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go
@@ -24,8 +24,10 @@
package objectpath
import (
+ "encoding/binary"
"fmt"
"go/types"
+ "slices"
"strconv"
"strings"
@@ -124,7 +126,66 @@ func For(obj types.Object) (Path, error) {
// An Encoder amortizes the cost of encoding the paths of multiple objects.
// The zero value of an Encoder is ready to use.
type Encoder struct {
- scopeMemo map[*types.Scope][]types.Object // memoization of scopeObjects
+ pkgIndex map[*types.Package]*pkgIndex
+}
+
+// A traversal encapsulates the state of a single traversal of the object/type graph.
+type traversal struct {
+ pkg *types.Package
+ ix *pkgIndex // non-nil if we are building the index
+
+ target types.Object // the sought symbol (if ix == nil)
+ found Path // the found path (if ix == nil)
+
+ // These maps are used to short circuit cycles through
+ // interface methods, such as occur in the following example:
+ //
+ // type I interface { f() interface{I} }
+ //
+ // See golang/go#68046 for details.
+ seenTParamNames map[*types.TypeName]bool // global cycle breaking through type parameters
+ seenMethods map[*types.Func]bool // global cycle breaking through recursive interfaces
+}
+
+// A pkgIndex holds a compressed index of objectpaths of all symbols
+// (fields, methods, params) requiring search for an entire package.
+//
+// The first time a search for a given package is requested, we simply
+// traverse the type graph for the target object, maintaining the
+// current object path as a stack. If we find the target object, we
+// save the path and terminate the main loop (but it's not worth
+// breaking out of the current recursion).
+//
+// On the second search (a pkgIndex exists but its data is nil), we
+// build an index of the traversal, which we use for all subsequent
+// searches.
+//
+// The traversal index is encoded in the data field as a list of records,
+// one per node, in preorder. Records are of two types:
+//
+// - A record for a package-level object consists of a pair
+// (parent, nameIndex uvarint), where parent is zero and
+// nameIndex is the index of the object's name in the sorted
+// pkg.Scope().Names() slice.
+//
+// - A record for a nested node (a segment of an object path)
+// consists of (parent uvarint, op byte, index uvarint), where
+// parent is the index of the record for the parent node,
+// op is the destructuring operator, and index (if op = [AFMTr])
+// is its integer operand.
+//
+// Since data[0] = 0 all nodes have positive offsets. In effect the
+// encoding is a trie in which each node stores one path segment
+// and points to the node for its prefix.
+//
+// TODO(adonovan): opt: evaluate an only 2-level tree with nodes for
+// package-level objects and the-rest-of-the-path. One calculation
+// suggested that it might be similar speed but 30% more compact.
+type pkgIndex struct {
+ pkg *types.Package
+ data []byte // encoding of traversal; nil if not yet constructed
+ scopeNames []string // memo of pkg.Scope().Names() to avoid O(n) alloc/sort at lookup
+ offsets map[types.Object]uint32 // each object's node offset within encoded traversal data
}
// For returns the path to an object relative to its package,
@@ -211,10 +272,9 @@ func (enc *Encoder) For(obj types.Object) (Path, error) {
if pkg == nil {
return "", fmt.Errorf("predeclared %s has no path", obj)
}
- scope := pkg.Scope()
// 2. package-level object?
- if scope.Lookup(obj.Name()) == obj {
+ if pkg.Scope().Lookup(obj.Name()) == obj {
// Only exported objects (and non-exported types) have a path.
// Non-exported types may be referenced by other objects.
if _, ok := obj.(*types.TypeName); !ok && !obj.Exported() {
@@ -232,19 +292,18 @@ func (enc *Encoder) For(obj types.Object) (Path, error) {
// have a path.
return "", fmt.Errorf("no path for %v", obj)
}
+
case *types.Const, // Only package-level constants have a path.
*types.Label, // Labels are function-local.
*types.PkgName: // PkgNames are file-local.
return "", fmt.Errorf("no path for %v", obj)
case *types.Var:
- // Could be:
- // - a field (obj.IsField())
- // - a func parameter or result
- // - a local var.
- // Sadly there is no way to distinguish
- // a param/result from a local
- // so we must proceed to the find.
+ // A var, if not package-level, must be a
+ // parameter (incl. receiver) or result, or a struct field.
+ if obj.Kind() == types.LocalVar {
+ return "", fmt.Errorf("no path for local %v", obj)
+ }
case *types.Func:
// A func, if not package-level, must be a method.
@@ -261,89 +320,311 @@ func (enc *Encoder) For(obj types.Object) (Path, error) {
panic(obj)
}
- // 4. Search the API for the path to the var (field/param/result) or method.
+ // 4. Search the object/type graph for the path to
+ // the var (field/param/result) or method.
+ ix, ok := enc.pkgIndex[pkg]
+ if !ok {
+ // First search: don't build an index, just traverse.
+ // This avoids allocation in [For], whose Encoder
+ // lives for a single call.
+ ix = &pkgIndex{pkg: pkg}
+
+ if enc.pkgIndex == nil {
+ enc.pkgIndex = make(map[*types.Package]*pkgIndex)
+ }
+ enc.pkgIndex[pkg] = ix // build the index next time
+
+ f := traversal{pkg: pkg, target: obj}
+ f.traverse()
+
+ if f.found != "" {
+ return f.found, nil
+ }
+ } else {
+ // Second search: build an index while traversing.
+ if ix.data == nil {
+ ix.offsets = make(map[types.Object]uint32)
+ ix.data = []byte{0} // offset 0 is sentinel
+ (&traversal{pkg: pkg, ix: ix}).traverse()
+ }
+
+ // Second and later searches: consult the index.
+ if offset, ok := ix.offsets[obj]; ok {
+ return ix.path(offset), nil
+ }
+ }
+
+ return "", fmt.Errorf("can't find path for %v in %s", obj, pkg.Path())
+}
+
+// traverse performs a complete traversal of all symbols reachable from the package.
+func (tr *traversal) traverse() {
+ scope := tr.pkg.Scope()
+ names := scope.Names()
+ if tr.ix != nil {
+ tr.ix.scopeNames = names
+ }
+
+ empty := make([]byte, 0, 48) // initial space for stack (ix == nil)
- // First inspect package-level named types.
+ // First inspect package-level type names.
// In the presence of path aliases, these give
// the best paths because non-types may
// refer to types, but not the reverse.
- empty := make([]byte, 0, 48) // initial space
- objs := enc.scopeObjects(scope)
- for _, o := range objs {
- tname, ok := o.(*types.TypeName)
- if !ok {
- continue // handle non-types in second pass
+ for i, name := range names {
+ if tr.found != "" {
+ return // found (ix == nil)
}
- path := append(empty, o.Name()...)
- path = append(path, opType)
-
- T := o.Type()
- if alias, ok := T.(*types.Alias); ok {
- if r := findTypeParam(obj, alias.TypeParams(), path, opTypeParam); r != nil {
- return Path(r), nil
- }
- if r := find(obj, alias.Rhs(), append(path, opRhs)); r != nil {
- return Path(r), nil
- }
+ obj := scope.Lookup(name)
+ if _, ok := obj.(*types.TypeName); !ok {
+ continue // handle non-types in second pass
+ }
- } else if tname.IsAlias() {
- // legacy alias
- if r := find(obj, T, path); r != nil {
- return Path(r), nil
- }
+ // emit (name, opType)
+ var path []byte
+ var offset uint32
+ if tr.ix == nil {
+ path = append(empty, name...)
+ path = append(path, opType)
+ } else {
+ offset = tr.ix.emitPackageLevel(i)
+ tr.ix.offsets[obj] = offset
+ offset = tr.ix.emitPathSegment(offset, opType, -1)
+ }
- } else if named, ok := T.(*types.Named); ok {
- // defined (named) type
- if r := findTypeParam(obj, named.TypeParams(), path, opTypeParam); r != nil {
- return Path(r), nil
- }
- if r := find(obj, named.Underlying(), append(path, opUnderlying)); r != nil {
- return Path(r), nil
- }
+ // A TypeName (for Named or Alias) may have type parameters.
+ switch t := obj.Type().(type) {
+ case *types.Alias:
+ tr.tparams(t.TypeParams(), path, offset, opTypeParam)
+ tr.typ(path, offset, opRhs, -1, t.Rhs())
+ case *types.Named:
+ tr.tparams(t.TypeParams(), path, offset, opTypeParam)
+ tr.typ(path, offset, opUnderlying, -1, t.Underlying())
}
}
// Then inspect everything else:
- // non-types, and declared methods of defined types.
- for _, o := range objs {
- path := append(empty, o.Name()...)
- if _, ok := o.(*types.TypeName); !ok {
- if o.Exported() {
+ // exported non-types, and declared methods of defined types.
+ for i, name := range names {
+ if tr.found != "" {
+ return // found (ix == nil)
+ }
+
+ obj := scope.Lookup(name)
+
+ if tname, ok := obj.(*types.TypeName); !ok {
+ if obj.Exported() {
// exported non-type (const, var, func)
- if r := find(obj, o.Type(), append(path, opType)); r != nil {
- return Path(r), nil
+ var path []byte
+ var offset uint32
+ if tr.ix == nil {
+ path = append(empty, name...)
+ } else {
+ offset = tr.ix.emitPackageLevel(i)
+ tr.ix.offsets[obj] = offset
}
+ tr.typ(path, offset, opType, -1, obj.Type())
}
- continue
- }
- // Inspect declared methods of defined types.
- if T, ok := types.Unalias(o.Type()).(*types.Named); ok {
- path = append(path, opType)
+ } else if T, ok := types.Unalias(tname.Type()).(*types.Named); ok {
+ // defined type
+ var path []byte
+ var offset uint32
+ if tr.ix == nil {
+ path = append(empty, name...)
+ path = append(path, opType)
+ } else {
+ // Inv: map entry for obj was populated in first pass.
+ offset = tr.ix.emitPathSegment(tr.ix.offsets[obj], opType, -1)
+ }
+
+ // Inspect declared methods of defined types.
+ //
// The method index here is always with respect
// to the underlying go/types data structures,
// which ultimately derives from source order
// and must be preserved by export data.
for i := 0; i < T.NumMethods(); i++ {
m := T.Method(i)
- path2 := appendOpArg(path, opMethod, i)
- if m == obj {
- return Path(path2), nil // found declared method
- }
- if r := find(obj, m.Type(), append(path2, opType)); r != nil {
- return Path(r), nil
+ tr.object(path, offset, opMethod, i, m)
+ }
+ }
+ }
+}
+
+func (tr *traversal) visitType(path []byte, offset uint32, T types.Type) {
+ switch T := T.(type) {
+ case *types.Alias:
+ tr.typ(path, offset, opRhs, -1, T.Rhs())
+
+ case *types.Basic, *types.Named:
+ // Named types belonging to pkg were handled already,
+ // so T must belong to another package. No path.
+ return
+
+ case *types.Pointer, *types.Slice, *types.Array, *types.Chan:
+ type hasElem interface{ Elem() types.Type } // note: includes Map
+ tr.typ(path, offset, opElem, -1, T.(hasElem).Elem())
+
+ case *types.Map:
+ tr.typ(path, offset, opKey, -1, T.Key())
+ tr.typ(path, offset, opElem, -1, T.Elem())
+
+ case *types.Signature:
+ tr.tparams(T.RecvTypeParams(), path, offset, opRecvTypeParam)
+ tr.tparams(T.TypeParams(), path, offset, opTypeParam)
+ tr.typ(path, offset, opParams, -1, T.Params())
+ tr.typ(path, offset, opResults, -1, T.Results())
+
+ case *types.Struct:
+ for i := 0; i < T.NumFields(); i++ {
+ tr.object(path, offset, opField, i, T.Field(i))
+ }
+
+ case *types.Tuple:
+ for i := 0; i < T.Len(); i++ {
+ tr.object(path, offset, opAt, i, T.At(i))
+ }
+
+ case *types.Interface:
+ for i := 0; i < T.NumMethods(); i++ {
+ m := T.Method(i)
+ if m.Pkg() != nil && m.Pkg() != tr.pkg {
+ continue // embedded method from another package
+ }
+ if !tr.seenMethods[m] {
+ if tr.seenMethods == nil {
+ tr.seenMethods = make(map[*types.Func]bool)
}
+ tr.seenMethods[m] = true
+ tr.object(path, offset, opMethod, i, m)
}
}
+
+ case *types.TypeParam:
+ tname := T.Obj()
+ if tname.Pkg() != nil && tname.Pkg() != tr.pkg {
+ return // type parameter from another package
+ }
+ if !tr.seenTParamNames[tname] {
+ if tr.seenTParamNames == nil {
+ tr.seenTParamNames = make(map[*types.TypeName]bool)
+ }
+ tr.seenTParamNames[tname] = true
+ tr.object(path, offset, opObj, -1, tname)
+ tr.typ(path, offset, opConstraint, -1, T.Constraint())
+ }
}
+}
- return "", fmt.Errorf("can't find path for %v in %s", obj, pkg.Path())
+func (tr *traversal) tparams(list *types.TypeParamList, path []byte, offset uint32, op byte) {
+ for i := 0; i < list.Len(); i++ {
+ tr.typ(path, offset, op, i, list.At(i))
+ }
+}
+
+// typ descends the type graph edge (op, index), then proceeds to traverse type t.
+func (tr *traversal) typ(path []byte, offset uint32, op byte, index int, t types.Type) {
+ if tr.ix == nil {
+ path = appendOpArg(path, op, index)
+ } else {
+ offset = tr.ix.emitPathSegment(offset, op, index)
+ }
+ tr.visitType(path, offset, t)
+}
+
+// object descends the type graph edge (op, index), records object
+// obj, then proceeds to traverse its type.
+func (tr *traversal) object(path []byte, offset uint32, op byte, index int, obj types.Object) {
+ if tr.ix == nil {
+ path = appendOpArg(path, op, index)
+ if obj == tr.target && tr.found == "" {
+ tr.found = Path(path)
+ }
+ path = append(path, opType)
+ } else {
+ offset = tr.ix.emitPathSegment(offset, op, index)
+ if _, ok := tr.ix.offsets[obj]; !ok {
+ tr.ix.offsets[obj] = offset
+ }
+ offset = tr.ix.emitPathSegment(offset, opType, -1)
+ }
+ tr.visitType(path, offset, obj.Type())
+}
+
+// emitPackageLevel encodes a record for a package-level symbol,
+// identified by its index in ix.scopeNames.
+func (p *pkgIndex) emitPackageLevel(index int) uint32 {
+ off := uint32(len(p.data))
+ p.data = append(p.data, 0) // zero varint => no parent
+ p.data = binary.AppendUvarint(p.data, uint64(index))
+ return off
+}
+
+// emitPathSegment emits a record for a non-initial object path segment.
+func (p *pkgIndex) emitPathSegment(parent uint32, op byte, index int) uint32 {
+ off := uint32(len(p.data))
+ p.data = binary.AppendUvarint(p.data, uint64(parent))
+ p.data = append(p.data, op)
+ switch op {
+ case opAt, opField, opMethod, opTypeParam, opRecvTypeParam:
+ p.data = binary.AppendUvarint(p.data, uint64(index))
+ }
+ return off
+}
+
+// path returns the Path for the encoded node at the specified offset.
+func (p *pkgIndex) path(offset uint32) Path {
+ var elems []string // path elements in reverse
+ for {
+ // Read parent index.
+ parent, n := binary.Uvarint(p.data[offset:])
+ offset += uint32(n)
+
+ if parent == 0 {
+ break // root (end of path)
+ }
+
+ op := p.data[offset]
+ offset++
+
+ // The [AFMTr] operators have a numeric operand.
+ switch op {
+ case opAt, opField, opMethod, opTypeParam, opRecvTypeParam:
+ val, n := binary.Uvarint(p.data[offset:])
+ offset += uint32(n)
+ elems = append(elems, strconv.Itoa(int(val)))
+ }
+
+ elems = append(elems, string([]byte{op}))
+
+ offset = uint32(parent)
+ }
+ idx, _ := binary.Uvarint(p.data[offset:])
+
+ // Convert index to Path string.
+ name := p.scopeNames[idx]
+ sz := len(name)
+ for _, elem := range elems {
+ sz += len(elem)
+ }
+ var buf strings.Builder
+ buf.Grow(sz)
+ buf.WriteString(name)
+ for _, elem := range slices.Backward(elems) {
+ buf.WriteString(elem)
+ }
+ return Path(buf.String())
}
-func appendOpArg(path []byte, op byte, arg int) []byte {
+// appendOpArg appends (op, index) to the object path.
+// A negative index is ignored.
+func appendOpArg(path []byte, op byte, index int) []byte {
path = append(path, op)
- path = strconv.AppendInt(path, int64(arg), 10)
+ if index >= 0 {
+ path = strconv.AppendInt(path, int64(index), 10)
+ }
return path
}
@@ -442,138 +723,6 @@ func (enc *Encoder) concreteMethod(meth *types.Func) (Path, bool) {
// panic(fmt.Sprintf("couldn't find method %s on type %s; methods: %#v", meth, named, enc.namedMethods(named)))
}
-// find finds obj within type T, returning the path to it, or nil if not found.
-//
-// The seen map is used to short circuit cycles through type parameters. If
-// nil, it will be allocated as necessary.
-//
-// The seenMethods map is used internally to short circuit cycles through
-// interface methods, such as occur in the following example:
-//
-// type I interface { f() interface{I} }
-//
-// See golang/go#68046 for details.
-func find(obj types.Object, T types.Type, path []byte) []byte {
- return (&finder{obj: obj}).find(T, path)
-}
-
-// finder closes over search state for a call to find.
-type finder struct {
- obj types.Object // the sought object
- seenTParamNames map[*types.TypeName]bool // for cycle breaking through type parameters
- seenMethods map[*types.Func]bool // for cycle breaking through recursive interfaces
-}
-
-func (f *finder) find(T types.Type, path []byte) []byte {
- switch T := T.(type) {
- case *types.Alias:
- return f.find(types.Unalias(T), path)
- case *types.Basic, *types.Named:
- // Named types belonging to pkg were handled already,
- // so T must belong to another package. No path.
- return nil
- case *types.Pointer:
- return f.find(T.Elem(), append(path, opElem))
- case *types.Slice:
- return f.find(T.Elem(), append(path, opElem))
- case *types.Array:
- return f.find(T.Elem(), append(path, opElem))
- case *types.Chan:
- return f.find(T.Elem(), append(path, opElem))
- case *types.Map:
- if r := f.find(T.Key(), append(path, opKey)); r != nil {
- return r
- }
- return f.find(T.Elem(), append(path, opElem))
- case *types.Signature:
- if r := f.findTypeParam(T.RecvTypeParams(), path, opRecvTypeParam); r != nil {
- return r
- }
- if r := f.findTypeParam(T.TypeParams(), path, opTypeParam); r != nil {
- return r
- }
- if r := f.find(T.Params(), append(path, opParams)); r != nil {
- return r
- }
- return f.find(T.Results(), append(path, opResults))
- case *types.Struct:
- for i := 0; i < T.NumFields(); i++ {
- fld := T.Field(i)
- path2 := appendOpArg(path, opField, i)
- if fld == f.obj {
- return path2 // found field var
- }
- if r := f.find(fld.Type(), append(path2, opType)); r != nil {
- return r
- }
- }
- return nil
- case *types.Tuple:
- for i := 0; i < T.Len(); i++ {
- v := T.At(i)
- path2 := appendOpArg(path, opAt, i)
- if v == f.obj {
- return path2 // found param/result var
- }
- if r := f.find(v.Type(), append(path2, opType)); r != nil {
- return r
- }
- }
- return nil
- case *types.Interface:
- for i := 0; i < T.NumMethods(); i++ {
- m := T.Method(i)
- if f.seenMethods[m] {
- continue // break cycles (see TestIssue70418)
- }
- path2 := appendOpArg(path, opMethod, i)
- if m == f.obj {
- return path2 // found interface method
- }
- if f.seenMethods == nil {
- f.seenMethods = make(map[*types.Func]bool)
- }
- f.seenMethods[m] = true
- if r := f.find(m.Type(), append(path2, opType)); r != nil {
- return r
- }
- }
- return nil
- case *types.TypeParam:
- name := T.Obj()
- if f.seenTParamNames[name] {
- return nil
- }
- if name == f.obj {
- return append(path, opObj)
- }
- if f.seenTParamNames == nil {
- f.seenTParamNames = make(map[*types.TypeName]bool)
- }
- f.seenTParamNames[name] = true
- if r := f.find(T.Constraint(), append(path, opConstraint)); r != nil {
- return r
- }
- return nil
- }
- panic(T)
-}
-
-func findTypeParam(obj types.Object, list *types.TypeParamList, path []byte, op byte) []byte {
- return (&finder{obj: obj}).findTypeParam(list, path, op)
-}
-
-func (f *finder) findTypeParam(list *types.TypeParamList, path []byte, op byte) []byte {
- for i := 0; i < list.Len(); i++ {
- tparam := list.At(i)
- path2 := appendOpArg(path, op, i)
- if r := f.find(tparam, path2); r != nil {
- return r
- }
- }
- return nil
-}
-
// Object returns the object denoted by path p within the package pkg.
func Object(pkg *types.Package, p Path) (types.Object, error) {
pathstr := string(p)
@@ -708,7 +857,7 @@ func Object(pkg *types.Package, p Path) (types.Object, error) {
}
tparams := hasTypeParams.TypeParams()
if n := tparams.Len(); index >= n {
- return nil, fmt.Errorf("tuple index %d out of range [0-%d)", index, n)
+ return nil, fmt.Errorf("type parameter index %d out of range [0-%d)", index, n)
}
t = tparams.At(index)
@@ -719,7 +868,7 @@ func Object(pkg *types.Package, p Path) (types.Object, error) {
}
rtparams := sig.RecvTypeParams()
if n := rtparams.Len(); index >= n {
- return nil, fmt.Errorf("tuple index %d out of range [0-%d)", index, n)
+ return nil, fmt.Errorf("receiver type parameter index %d out of range [0-%d)", index, n)
}
t = rtparams.At(index)
@@ -794,23 +943,3 @@ func Object(pkg *types.Package, p Path) (types.Object, error) {
return obj, nil // success
}
-
-// scopeObjects is a memoization of scope objects.
-// Callers must not modify the result.
-func (enc *Encoder) scopeObjects(scope *types.Scope) []types.Object {
- m := enc.scopeMemo
- if m == nil {
- m = make(map[*types.Scope][]types.Object)
- enc.scopeMemo = m
- }
- objs, ok := m[scope]
- if !ok {
- names := scope.Names() // allocates and sorts
- objs = make([]types.Object, len(names))
- for i, name := range names {
- objs[i] = scope.Lookup(name)
- }
- m[scope] = objs
- }
- return objs
-}
diff --git a/vendor/golang.org/x/tools/internal/astutil/comment.go b/vendor/golang.org/x/tools/internal/astutil/comment.go
index 5ed4765c..40a34721 100644
--- a/vendor/golang.org/x/tools/internal/astutil/comment.go
+++ b/vendor/golang.org/x/tools/internal/astutil/comment.go
@@ -8,6 +8,7 @@ import (
"go/ast"
"go/token"
"iter"
+ "sort"
"strings"
)
@@ -114,18 +115,25 @@ func Directives(g *ast.CommentGroup) (res []*Directive) {
}
// Comments returns an iterator over the comments overlapping the specified interval.
+// Comments are sorted by position in the file, so we can use binary search.
func Comments(file *ast.File, start, end token.Pos) iter.Seq[*ast.Comment] {
- // TODO(adonovan): optimize use binary O(log n) instead of linear O(n) search.
return func(yield func(*ast.Comment) bool) {
- for _, cg := range file.Comments {
- for _, co := range cg.List {
+ // Find the first comment group that overlaps the range.
+ i := sort.Search(len(file.Comments), func(i int) bool {
+ return file.Comments[i].End() >= start
+ })
+ for _, cg := range file.Comments[i:] {
+ if cg.Pos() > end {
+ return
+ }
+ // Find the first comment in the group that overlaps the range.
+ j := sort.Search(len(cg.List), func(j int) bool {
+ return cg.List[j].End() >= start
+ })
+ for _, co := range cg.List[j:] {
if co.Pos() > end {
return
}
- if co.End() < start {
- continue
- }
-
if !yield(co) {
return
}
diff --git a/vendor/golang.org/x/tools/internal/astutil/cursor.go b/vendor/golang.org/x/tools/internal/astutil/cursor.go
new file mode 100644
index 00000000..74e75d14
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/astutil/cursor.go
@@ -0,0 +1,38 @@
+// Copyright 2026 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.
+
+package astutil
+
+import (
+ "go/ast"
+
+ "golang.org/x/tools/go/ast/edge"
+ "golang.org/x/tools/go/ast/inspector"
+)
+
+// UnparenCursor returns the cursor for an expression with any
+// enclosing parentheses removed, similar to [ast.Unparen].
+// It is often prudent to call this before switching on the
+// type of cur.Node().
+//
+// See also [UnparenEnclosingCursor].
+func UnparenCursor(cur inspector.Cursor) inspector.Cursor {
+ for is[*ast.ParenExpr](cur) {
+ cur, _ = cur.FirstChild()
+ }
+ return cur
+}
+
+// UnparenEnclosingCursor returns the first element of
+// the [Cursor.Enclosing] sequence that is not itself enclosed
+// in parens. It is often prudent to call this before switching on
+// cur.ParentEdge().
+//
+// See also [UnparenCursor].
+func UnparenEnclosingCursor(cur inspector.Cursor) inspector.Cursor {
+ for cur.ParentEdgeKind() == edge.ParenExpr_X {
+ cur = cur.Parent()
+ }
+ return cur
+}
diff --git a/vendor/golang.org/x/tools/internal/astutil/purge.go b/vendor/golang.org/x/tools/internal/astutil/purge.go
index 81ac46a0..d0a39415 100644
--- a/vendor/golang.org/x/tools/internal/astutil/purge.go
+++ b/vendor/golang.org/x/tools/internal/astutil/purge.go
@@ -12,9 +12,14 @@ import (
)
// PurgeFuncBodies returns a copy of src in which the contents of each
-// outermost {...} region except struct and interface types have been
-// deleted. This reduces the amount of work required to parse the
-// top-level declarations.
+// outermost {...} region have been deleted, except for struct and
+// interface type bodies and the bodies of length-elided array
+// literals ([...]T), whose element count is part of the type. It
+// includes function bodies, function-literal bodies, and the bodies
+// of slice, map, and explicitly-sized array composite literals (whose
+// contents don't affect the type of the enclosing declaration). This
+// reduces the amount of work required to parse the top-level
+// declarations.
//
// PurgeFuncBodies does not preserve newlines or position information.
// Also, if the input is invalid, parsing the output of
@@ -22,11 +27,12 @@ import (
// on parser error recovery.
func PurgeFuncBodies(src []byte) []byte {
// Destroy the content of any {...}-bracketed regions that are
- // not immediately preceded by a "struct" or "interface"
- // token. That includes function bodies, composite literals,
- // switch/select bodies, and all blocks of statements.
- // This will lead to non-void functions that don't have return
- // statements, which of course is a type error, but that's ok.
+ // not immediately preceded by a "struct" or "interface" token,
+ // and that are not the body of a length-elided array literal.
+ // That includes function bodies, switch/select bodies, and most
+ // composite literals; this will lead to non-void functions that
+ // don't have return statements, which of course is a type error,
+ // but that's ok.
var out bytes.Buffer
file := token.NewFileSet().AddFile("", -1, len(src))
@@ -34,7 +40,8 @@ func PurgeFuncBodies(src []byte) []byte {
sc.Init(file, src, nil, 0)
var prev token.Token
var cursor int // last consumed src offset
- var braces []token.Pos // stack of unclosed braces or -1 for struct/interface type
+ var braces []token.Pos // stack of unclosed braces, or -1 for a region we preserve
+ var ellipsis bool // saw "[...]" not yet consumed by a literal-body "{"
for {
pos, tok, _ := sc.Scan()
if tok == token.EOF {
@@ -44,9 +51,23 @@ func PurgeFuncBodies(src []byte) []byte {
case token.COMMENT:
// TODO(adonovan): opt: skip, to save an estimated 20% of time.
+ case token.SEMICOLON:
+ ellipsis = false
+
+ case token.RBRACK:
+ // "...]" occurs only in the array-type prefix of a
+ // composite literal; variadic "..." is followed by
+ // a type or ")", never "]".
+ if prev == token.ELLIPSIS {
+ ellipsis = true
+ }
+
case token.LBRACE:
if prev == token.STRUCT || prev == token.INTERFACE {
- pos = -1
+ pos = -1 // type body: preserve (don't consume ellipsis)
+ } else if ellipsis {
+ pos = -1 // [...]T literal body: preserve
+ ellipsis = false
}
braces = append(braces, pos)
@@ -55,7 +76,7 @@ func PurgeFuncBodies(src []byte) []byte {
top := braces[last]
braces = braces[:last]
if top < 0 {
- // struct/interface type: leave alone
+ // preserve
} else if len(braces) == 0 { // toplevel only
// Delete {...} body.
start := file.Offset(top)
diff --git a/vendor/golang.org/x/tools/internal/astutil/util.go b/vendor/golang.org/x/tools/internal/astutil/util.go
index b855a560..58fc8bb4 100644
--- a/vendor/golang.org/x/tools/internal/astutil/util.go
+++ b/vendor/golang.org/x/tools/internal/astutil/util.go
@@ -254,3 +254,8 @@ func needsParens(parentNode ast.Node, old, new ast.Expr) bool {
}
return false
}
+
+func is[T any](n any) bool {
+ _, ok := n.(T)
+ return ok
+}
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/ureader.go b/vendor/golang.org/x/tools/internal/gcimporter/ureader.go
index 3db62b89..5d3b7c86 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/ureader.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/ureader.go
@@ -11,6 +11,7 @@ import (
"go/token"
"go/types"
"sort"
+ "strings"
"golang.org/x/tools/internal/aliases"
"golang.org/x/tools/internal/pkgbits"
@@ -523,6 +524,12 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) {
return objPkg, objName
}
+ // TODO(mark): This, like the above splitVargenSuffix, is not ideal.
+ // Ignore generic methods promoted to global scope.
+ if strings.Contains(objName, ".") {
+ return objPkg, objName
+ }
+
if objPkg.Scope().Lookup(objName) == nil {
dict := pr.objDictIdx(idx)
@@ -554,15 +561,11 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) {
case pkgbits.ObjFunc:
pos := r.pos()
- var rtparams []*types.TypeParam
- var recv *types.Var
- if r.Version().Has(pkgbits.GenericMethods) && r.Bool() {
- r.selector()
- rtparams = r.typeParamNames(true)
- recv = r.param()
+ if r.Version().Has(pkgbits.GenericMethods) {
+ assert(!r.Bool()) // generic methods are read in their defining type
}
tparams := r.typeParamNames(false)
- sig := r.signature(recv, rtparams, tparams)
+ sig := r.signature(nil, nil, tparams)
declare(types.NewFunc(pos, objPkg, objName, sig))
case pkgbits.ObjType:
@@ -630,6 +633,29 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) {
named.AddMethod(r.method())
}
+ if r.Version().Has(pkgbits.GenericMethods) {
+ for range r.Len() {
+ // Careful: objIdx is used to read in package-scoped declarations, which
+ // methods are not. Instead, decode it here. This makes it easier to
+ // associate it with the type and avoids the main objIdx loop.
+ idx := r.Reloc(pkgbits.RelocObj)
+
+ r := pr.tempReader(pkgbits.RelocObj, idx, pkgbits.SyncObject1)
+ r.dict = pr.objDictIdx(idx)
+
+ pos := r.pos()
+ assert(r.Bool()) // generic method
+ pkg, name := r.selector()
+ rtparams := r.typeParamNames(true)
+ recv := r.param()
+ tparams := r.typeParamNames(false)
+ sig := r.signature(recv, rtparams, tparams)
+
+ pr.retireReader(r)
+ named.AddMethod(types.NewFunc(pos, pkg, name, sig))
+ }
+ }
+
case pkgbits.ObjVar:
pos := r.pos()
typ := r.typ()
@@ -653,7 +679,7 @@ func (pr *pkgReader) objDictIdx(idx pkgbits.Index) *readerDict {
}
nreceivers := 0
- if r.Version().Has(pkgbits.GenericMethods) && r.Bool() {
+ if r.Version().Has(pkgbits.GenericMethods) {
nreceivers = r.Len()
}
nexplicits := r.Len()
diff --git a/vendor/golang.org/x/tools/internal/gocommand/version.go b/vendor/golang.org/x/tools/internal/gocommand/version.go
index cce290c4..d82f13a7 100644
--- a/vendor/golang.org/x/tools/internal/gocommand/version.go
+++ b/vendor/golang.org/x/tools/internal/gocommand/version.go
@@ -8,6 +8,7 @@ import (
"context"
"fmt"
"regexp"
+ "slices"
"strings"
)
@@ -41,9 +42,9 @@ func GoVersion(ctx context.Context, inv Invocation, r *Runner) (int, error) {
}
// Split up "[go1.1 go1.15]" and return highest go1.X value.
tags := strings.Fields(stdout[1 : len(stdout)-2])
- for i := len(tags) - 1; i >= 0; i-- {
+ for _, tag := range slices.Backward(tags) {
var version int
- if _, err := fmt.Sscanf(tags[i], "go1.%d", &version); err != nil {
+ if _, err := fmt.Sscanf(tag, "go1.%d", &version); err != nil {
continue
}
return version, nil
diff --git a/vendor/golang.org/x/tools/internal/goplsexport/export.go b/vendor/golang.org/x/tools/internal/goplsexport/export.go
index 57c15c41..414c9cb0 100644
--- a/vendor/golang.org/x/tools/internal/goplsexport/export.go
+++ b/vendor/golang.org/x/tools/internal/goplsexport/export.go
@@ -9,11 +9,12 @@ package goplsexport
import "golang.org/x/tools/go/analysis"
var (
- ErrorsAsTypeModernizer *analysis.Analyzer // = modernize.errorsastypeAnalyzer
+ ErrorsAsTypeModernizer *analysis.Analyzer // = modernize.errorsastypeAnalyzer
SlicesBackwardModernizer *analysis.Analyzer // = modernize.slicesbackwardAnalyzer
- StdIteratorsModernizer *analysis.Analyzer // = modernize.stditeratorsAnalyzer
- PlusBuildModernizer *analysis.Analyzer // = modernize.plusbuildAnalyzer
- StringsCutModernizer *analysis.Analyzer // = modernize.stringscutAnalyzer
- UnsafeFuncsModernizer *analysis.Analyzer // = modernize.unsafeFuncsAnalyzer
- AtomicTypesModernizer *analysis.Analyzer // = modernize.atomicTypesAnalyzer
+ StdIteratorsModernizer *analysis.Analyzer // = modernize.stditeratorsAnalyzer
+ PlusBuildModernizer *analysis.Analyzer // = modernize.plusbuildAnalyzer
+ StringsCutModernizer *analysis.Analyzer // = modernize.stringscutAnalyzer
+ UnsafeFuncsModernizer *analysis.Analyzer // = modernize.unsafeFuncsAnalyzer
+ AtomicTypesModernizer *analysis.Analyzer // = modernize.atomicTypesAnalyzer
+ EmbedLitModernizer *analysis.Analyzer // = modernize.embedLitAnalyzer
)
diff --git a/vendor/golang.org/x/tools/internal/imports/fix.go b/vendor/golang.org/x/tools/internal/imports/fix.go
index 1b4dc0cb..d29ecfb0 100644
--- a/vendor/golang.org/x/tools/internal/imports/fix.go
+++ b/vendor/golang.org/x/tools/internal/imports/fix.go
@@ -1650,9 +1650,7 @@ func (s *symbolSearcher) search(ctx context.Context, candidates []pkgDistance, p
}()
// Start the search.
- wg.Add(1)
- go func() {
- defer wg.Done()
+ wg.Go(func() {
for i, c := range candidates {
select {
case loadExportsSem <- struct{}{}:
@@ -1681,7 +1679,7 @@ func (s *symbolSearcher) search(ctx context.Context, candidates []pkgDistance, p
rescv[i] <- pkg // may be nil
}()
}
- }()
+ })
// Await the first (best) result.
for _, resc := range rescv {
diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go
index df94ec81..76fae6a7 100644
--- a/vendor/golang.org/x/tools/internal/imports/mod.go
+++ b/vendor/golang.org/x/tools/internal/imports/mod.go
@@ -679,11 +679,11 @@ func modRelevance(mod *gocommand.ModuleJSON) float64 {
_, versionString, ok := module.SplitPathVersion(mod.Path)
if ok {
- index := strings.Index(versionString, "v")
- if index == -1 {
+ _, after, ok := strings.Cut(versionString, "v")
+ if !ok {
return relevance
}
- if versionNumber, err := strconv.ParseFloat(versionString[index+1:], 64); err == nil {
+ if versionNumber, err := strconv.ParseFloat(after, 64); err == nil {
relevance += versionNumber / 1000
}
}
diff --git a/vendor/golang.org/x/tools/internal/moreiters/iters.go b/vendor/golang.org/x/tools/internal/moreiters/iters.go
index 9e4aaf94..3dc81c4d 100644
--- a/vendor/golang.org/x/tools/internal/moreiters/iters.go
+++ b/vendor/golang.org/x/tools/internal/moreiters/iters.go
@@ -53,3 +53,11 @@ func Len[T any](seq iter.Seq[T]) (n int) {
}
return
}
+
+// Empty reports whether the sequence contains no elements.
+func Empty[T any](seq iter.Seq[T]) bool {
+ for range seq {
+ return false
+ }
+ return true
+}
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/typeindex/typeindex.go b/vendor/golang.org/x/tools/internal/typesinternal/typeindex/typeindex.go
index 222ada55..e9ea0c4c 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/typeindex/typeindex.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/typeindex/typeindex.go
@@ -17,6 +17,7 @@ import (
"golang.org/x/tools/go/ast/edge"
"golang.org/x/tools/go/ast/inspector"
"golang.org/x/tools/go/types/typeutil"
+ "golang.org/x/tools/internal/astutil"
"golang.org/x/tools/internal/typesinternal"
)
@@ -217,10 +218,9 @@ func (ix *Index) Selection(path, typename, name string) types.Object {
func (ix *Index) Calls(callee types.Object) iter.Seq[inspector.Cursor] {
return func(yield func(inspector.Cursor) bool) {
for cur := range ix.Uses(callee) {
- ek := cur.ParentEdgeKind()
-
// The call may be of the form f() or x.f(),
// optionally with parens; ascend from f to call.
+ // See logic in [typesinternal.UsedIdent], to which this is dual.
//
// It is tempting but wrong to use the first
// CallExpr ancestor: we have to make sure the
@@ -229,25 +229,20 @@ func (ix *Index) Calls(callee types.Object) iter.Seq[inspector.Cursor] {
// Avoiding Enclosing is also significantly faster.
// inverse unparen: f -> (f)
- for ek == edge.ParenExpr_X {
- cur = cur.Parent()
- ek = cur.ParentEdgeKind()
- }
+ cur = astutil.UnparenEnclosingCursor(cur)
- // ascend selector: f -> x.f
- if ek == edge.SelectorExpr_Sel {
- cur = cur.Parent()
- ek = cur.ParentEdgeKind()
+ // ascend selector (or qualified identifier): f -> x.f
+ if cur.ParentEdgeKind() == edge.SelectorExpr_Sel {
+ cur = astutil.UnparenEnclosingCursor(cur.Parent())
}
- // inverse unparen again
- for ek == edge.ParenExpr_X {
- cur = cur.Parent()
- ek = cur.ParentEdgeKind()
+ // ascend typeparams: f -> f[T]; f -> f[T1, T2]
+ if ek := cur.ParentEdgeKind(); ek == edge.IndexExpr_X || ek == edge.IndexListExpr_X {
+ cur = astutil.UnparenEnclosingCursor(cur.Parent())
}
// ascend from f or x.f to call
- if ek == edge.CallExpr_Fun {
+ if cur.ParentEdgeKind() == edge.CallExpr_Fun {
curCall := cur.Parent()
call := curCall.Node().(*ast.CallExpr)
if typeutil.Callee(ix.info, call) == callee {
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 40cbba9d..63de39bc 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -313,8 +313,8 @@ github.com/buildpacks/imgutil/layout
github.com/buildpacks/imgutil/layout/sparse
github.com/buildpacks/imgutil/local
github.com/buildpacks/imgutil/remote
-# github.com/buildpacks/lifecycle v0.21.9
-## explicit; go 1.26.3
+# github.com/buildpacks/lifecycle v0.21.12
+## explicit; go 1.26.4
github.com/buildpacks/lifecycle/api
github.com/buildpacks/lifecycle/archive
github.com/buildpacks/lifecycle/auth
@@ -481,7 +481,7 @@ github.com/distribution/reference
## explicit; go 1.13
github.com/dlclark/regexp2
github.com/dlclark/regexp2/syntax
-# github.com/docker/cli v29.4.3+incompatible
+# github.com/docker/cli v29.5.0+incompatible
## explicit
github.com/docker/cli/cli/config
github.com/docker/cli/cli/config/configfile
@@ -510,7 +510,7 @@ github.com/docker/docker/pkg/homedir
github.com/docker/docker/pkg/ioutils
github.com/docker/docker/pkg/jsonmessage
github.com/docker/docker/registry
-# github.com/docker/docker-credential-helpers v0.9.6
+# github.com/docker/docker-credential-helpers v0.9.7
## explicit; go 1.21
github.com/docker/docker-credential-helpers/client
github.com/docker/docker-credential-helpers/credentials
@@ -964,7 +964,7 @@ github.com/kisielk/errcheck/errcheck
# github.com/kkHAIKE/contextcheck v1.1.6
## explicit; go 1.23.0
github.com/kkHAIKE/contextcheck
-# github.com/klauspost/compress v1.18.5
+# github.com/klauspost/compress v1.18.6
## explicit; go 1.24
github.com/klauspost/compress
github.com/klauspost/compress/fse
@@ -1065,7 +1065,7 @@ github.com/mitchellh/ioprogress
# github.com/mitchellh/mapstructure v1.5.0
## explicit; go 1.14
github.com/mitchellh/mapstructure
-# github.com/moby/buildkit v0.29.0
+# github.com/moby/buildkit v0.30.0
## explicit; go 1.25.5
github.com/moby/buildkit/frontend/dockerfile/command
github.com/moby/buildkit/frontend/dockerfile/instructions
@@ -1513,7 +1513,7 @@ go.augendre.info/fatcontext/pkg/analyzer
## explicit; go 1.24.0
go.opentelemetry.io/auto/sdk
go.opentelemetry.io/auto/sdk/internal/telemetry
-# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0
+# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0
## explicit; go 1.25.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request
@@ -1538,10 +1538,6 @@ go.opentelemetry.io/otel/semconv/v1.40.0/httpconv
go.opentelemetry.io/otel/metric
go.opentelemetry.io/otel/metric/embedded
go.opentelemetry.io/otel/metric/noop
-# go.opentelemetry.io/otel/sdk v1.43.0
-## explicit; go 1.25.0
-# go.opentelemetry.io/otel/sdk/metric v1.43.0
-## explicit; go 1.25.0
# go.opentelemetry.io/otel/trace v1.43.0
## explicit; go 1.25.0
go.opentelemetry.io/otel/trace
@@ -1573,7 +1569,7 @@ go.yaml.in/yaml/v2
# go.yaml.in/yaml/v3 v3.0.4
## explicit; go 1.16
go.yaml.in/yaml/v3
-# golang.org/x/crypto v0.51.0
+# golang.org/x/crypto v0.52.0
## explicit; go 1.25.0
golang.org/x/crypto/blowfish
golang.org/x/crypto/chacha20
@@ -1600,7 +1596,7 @@ golang.org/x/mod/modfile
golang.org/x/mod/module
golang.org/x/mod/semver
golang.org/x/mod/sumdb/dirhash
-# golang.org/x/net v0.53.0
+# golang.org/x/net v0.54.0
## explicit; go 1.25.0
golang.org/x/net/context
golang.org/x/net/html
@@ -1612,7 +1608,7 @@ golang.org/x/net/proxy
## explicit; go 1.25.0
golang.org/x/sync/errgroup
golang.org/x/sync/semaphore
-# golang.org/x/sys v0.44.0
+# golang.org/x/sys v0.45.0
## explicit; go 1.25.0
golang.org/x/sys/cpu
golang.org/x/sys/plan9
@@ -1651,7 +1647,7 @@ golang.org/x/text/runes
golang.org/x/text/transform
golang.org/x/text/unicode/norm
golang.org/x/text/width
-# golang.org/x/tools v0.44.0
+# golang.org/x/tools v0.45.0
## explicit; go 1.25.0
golang.org/x/tools/cover
golang.org/x/tools/go/analysis