mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-05-24 16:26:41 +00:00
DFBUGS-1158: [release-4.16] Misuse of ServerConfig.PublicKeyCallback (CVE-2024-45337)
Update `golang.org.crypto` to `0.32.0` Signed-off-by: Niraj Yadav <niryadav@redhat.com>
This commit is contained in:
parent
a3424872fb
commit
1dabe902c6
14
go.mod
14
go.mod
@ -27,9 +27,9 @@ require (
|
|||||||
github.com/pkg/xattr v0.4.9
|
github.com/pkg/xattr v0.4.9
|
||||||
github.com/prometheus/client_golang v1.18.0
|
github.com/prometheus/client_golang v1.18.0
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
golang.org/x/crypto v0.21.0
|
golang.org/x/crypto v0.32.0
|
||||||
golang.org/x/net v0.22.0
|
golang.org/x/net v0.25.0
|
||||||
golang.org/x/sys v0.20.0
|
golang.org/x/sys v0.29.0
|
||||||
google.golang.org/grpc v1.62.1
|
google.golang.org/grpc v1.62.1
|
||||||
google.golang.org/protobuf v1.33.0
|
google.golang.org/protobuf v1.33.0
|
||||||
//
|
//
|
||||||
@ -161,11 +161,11 @@ require (
|
|||||||
go.uber.org/zap v1.26.0 // indirect
|
go.uber.org/zap v1.26.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
|
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
|
||||||
golang.org/x/oauth2 v0.16.0 // indirect
|
golang.org/x/oauth2 v0.16.0 // indirect
|
||||||
golang.org/x/sync v0.6.0 // indirect
|
golang.org/x/sync v0.10.0 // indirect
|
||||||
golang.org/x/term v0.18.0 // indirect
|
golang.org/x/term v0.28.0 // indirect
|
||||||
golang.org/x/text v0.14.0 // indirect
|
golang.org/x/text v0.21.0 // indirect
|
||||||
golang.org/x/time v0.3.0 // indirect
|
golang.org/x/time v0.3.0 // indirect
|
||||||
golang.org/x/tools v0.16.1 // indirect
|
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
|
||||||
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
|
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
|
||||||
google.golang.org/appengine v1.6.8 // indirect
|
google.golang.org/appengine v1.6.8 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
|
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
|
||||||
|
26
go.sum
26
go.sum
@ -1759,8 +1759,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY
|
|||||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||||
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||||
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
|
||||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
|
||||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
@ -1906,8 +1906,8 @@ golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
|
|||||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||||
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
||||||
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
|
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
||||||
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
@ -1961,8 +1961,8 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|||||||
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||||
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
|
||||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@ -2075,8 +2075,8 @@ 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.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.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
||||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
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.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
@ -2095,8 +2095,8 @@ golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
|
|||||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
||||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||||
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
|
golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
|
||||||
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
|
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
|
||||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
@ -2117,8 +2117,9 @@ golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
|||||||
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
|
||||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
|
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
||||||
|
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
@ -2211,8 +2212,9 @@ golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
|
|||||||
golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM=
|
golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM=
|
||||||
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
|
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
|
||||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||||
golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA=
|
|
||||||
golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
|
golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
|
||||||
|
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
|
||||||
|
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
4
vendor/golang.org/x/crypto/LICENSE
generated
vendored
4
vendor/golang.org/x/crypto/LICENSE
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
|||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
2972
vendor/golang.org/x/crypto/argon2/blamka_amd64.s
generated
vendored
2972
vendor/golang.org/x/crypto/argon2/blamka_amd64.s
generated
vendored
File diff suppressed because it is too large
Load Diff
5089
vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s
generated
vendored
5089
vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s
generated
vendored
File diff suppressed because it is too large
Load Diff
1601
vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s
generated
vendored
1601
vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s
generated
vendored
File diff suppressed because it is too large
Load Diff
2
vendor/golang.org/x/crypto/blowfish/cipher.go
generated
vendored
2
vendor/golang.org/x/crypto/blowfish/cipher.go
generated
vendored
@ -11,7 +11,7 @@
|
|||||||
// Deprecated: any new system should use AES (from crypto/aes, if necessary in
|
// Deprecated: any new system should use AES (from crypto/aes, if necessary in
|
||||||
// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
|
// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
|
||||||
// golang.org/x/crypto/chacha20poly1305).
|
// golang.org/x/crypto/chacha20poly1305).
|
||||||
package blowfish // import "golang.org/x/crypto/blowfish"
|
package blowfish
|
||||||
|
|
||||||
// The code is a port of Bruce Schneier's C implementation.
|
// The code is a port of Bruce Schneier's C implementation.
|
||||||
// See https://www.schneier.com/blowfish.html.
|
// See https://www.schneier.com/blowfish.html.
|
||||||
|
2
vendor/golang.org/x/crypto/chacha20/chacha_noasm.go
generated
vendored
2
vendor/golang.org/x/crypto/chacha20/chacha_noasm.go
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (!arm64 && !s390x && !ppc64le) || !gc || purego
|
//go:build (!arm64 && !s390x && !ppc64 && !ppc64le) || !gc || purego
|
||||||
|
|
||||||
package chacha20
|
package chacha20
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build gc && !purego
|
//go:build gc && !purego && (ppc64 || ppc64le)
|
||||||
|
|
||||||
package chacha20
|
package chacha20
|
||||||
|
|
@ -19,7 +19,7 @@
|
|||||||
// The differences in this and the original implementation are
|
// The differences in this and the original implementation are
|
||||||
// due to the calling conventions and initialization of constants.
|
// due to the calling conventions and initialization of constants.
|
||||||
|
|
||||||
//go:build gc && !purego
|
//go:build gc && !purego && (ppc64 || ppc64le)
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
@ -33,27 +33,70 @@
|
|||||||
#define CONSTBASE R16
|
#define CONSTBASE R16
|
||||||
#define BLOCKS R17
|
#define BLOCKS R17
|
||||||
|
|
||||||
DATA consts<>+0x00(SB)/8, $0x3320646e61707865
|
// for VPERMXOR
|
||||||
DATA consts<>+0x08(SB)/8, $0x6b20657479622d32
|
#define MASK R18
|
||||||
DATA consts<>+0x10(SB)/8, $0x0000000000000001
|
|
||||||
DATA consts<>+0x18(SB)/8, $0x0000000000000000
|
DATA consts<>+0x00(SB)/4, $0x61707865
|
||||||
DATA consts<>+0x20(SB)/8, $0x0000000000000004
|
DATA consts<>+0x04(SB)/4, $0x3320646e
|
||||||
DATA consts<>+0x28(SB)/8, $0x0000000000000000
|
DATA consts<>+0x08(SB)/4, $0x79622d32
|
||||||
DATA consts<>+0x30(SB)/8, $0x0a0b08090e0f0c0d
|
DATA consts<>+0x0c(SB)/4, $0x6b206574
|
||||||
DATA consts<>+0x38(SB)/8, $0x0203000106070405
|
DATA consts<>+0x10(SB)/4, $0x00000001
|
||||||
DATA consts<>+0x40(SB)/8, $0x090a0b080d0e0f0c
|
DATA consts<>+0x14(SB)/4, $0x00000000
|
||||||
DATA consts<>+0x48(SB)/8, $0x0102030005060704
|
DATA consts<>+0x18(SB)/4, $0x00000000
|
||||||
DATA consts<>+0x50(SB)/8, $0x6170786561707865
|
DATA consts<>+0x1c(SB)/4, $0x00000000
|
||||||
DATA consts<>+0x58(SB)/8, $0x6170786561707865
|
DATA consts<>+0x20(SB)/4, $0x00000004
|
||||||
DATA consts<>+0x60(SB)/8, $0x3320646e3320646e
|
DATA consts<>+0x24(SB)/4, $0x00000000
|
||||||
DATA consts<>+0x68(SB)/8, $0x3320646e3320646e
|
DATA consts<>+0x28(SB)/4, $0x00000000
|
||||||
DATA consts<>+0x70(SB)/8, $0x79622d3279622d32
|
DATA consts<>+0x2c(SB)/4, $0x00000000
|
||||||
DATA consts<>+0x78(SB)/8, $0x79622d3279622d32
|
DATA consts<>+0x30(SB)/4, $0x0e0f0c0d
|
||||||
DATA consts<>+0x80(SB)/8, $0x6b2065746b206574
|
DATA consts<>+0x34(SB)/4, $0x0a0b0809
|
||||||
DATA consts<>+0x88(SB)/8, $0x6b2065746b206574
|
DATA consts<>+0x38(SB)/4, $0x06070405
|
||||||
DATA consts<>+0x90(SB)/8, $0x0000000100000000
|
DATA consts<>+0x3c(SB)/4, $0x02030001
|
||||||
DATA consts<>+0x98(SB)/8, $0x0000000300000002
|
DATA consts<>+0x40(SB)/4, $0x0d0e0f0c
|
||||||
GLOBL consts<>(SB), RODATA, $0xa0
|
DATA consts<>+0x44(SB)/4, $0x090a0b08
|
||||||
|
DATA consts<>+0x48(SB)/4, $0x05060704
|
||||||
|
DATA consts<>+0x4c(SB)/4, $0x01020300
|
||||||
|
DATA consts<>+0x50(SB)/4, $0x61707865
|
||||||
|
DATA consts<>+0x54(SB)/4, $0x61707865
|
||||||
|
DATA consts<>+0x58(SB)/4, $0x61707865
|
||||||
|
DATA consts<>+0x5c(SB)/4, $0x61707865
|
||||||
|
DATA consts<>+0x60(SB)/4, $0x3320646e
|
||||||
|
DATA consts<>+0x64(SB)/4, $0x3320646e
|
||||||
|
DATA consts<>+0x68(SB)/4, $0x3320646e
|
||||||
|
DATA consts<>+0x6c(SB)/4, $0x3320646e
|
||||||
|
DATA consts<>+0x70(SB)/4, $0x79622d32
|
||||||
|
DATA consts<>+0x74(SB)/4, $0x79622d32
|
||||||
|
DATA consts<>+0x78(SB)/4, $0x79622d32
|
||||||
|
DATA consts<>+0x7c(SB)/4, $0x79622d32
|
||||||
|
DATA consts<>+0x80(SB)/4, $0x6b206574
|
||||||
|
DATA consts<>+0x84(SB)/4, $0x6b206574
|
||||||
|
DATA consts<>+0x88(SB)/4, $0x6b206574
|
||||||
|
DATA consts<>+0x8c(SB)/4, $0x6b206574
|
||||||
|
DATA consts<>+0x90(SB)/4, $0x00000000
|
||||||
|
DATA consts<>+0x94(SB)/4, $0x00000001
|
||||||
|
DATA consts<>+0x98(SB)/4, $0x00000002
|
||||||
|
DATA consts<>+0x9c(SB)/4, $0x00000003
|
||||||
|
DATA consts<>+0xa0(SB)/4, $0x11223300
|
||||||
|
DATA consts<>+0xa4(SB)/4, $0x55667744
|
||||||
|
DATA consts<>+0xa8(SB)/4, $0x99aabb88
|
||||||
|
DATA consts<>+0xac(SB)/4, $0xddeeffcc
|
||||||
|
DATA consts<>+0xb0(SB)/4, $0x22330011
|
||||||
|
DATA consts<>+0xb4(SB)/4, $0x66774455
|
||||||
|
DATA consts<>+0xb8(SB)/4, $0xaabb8899
|
||||||
|
DATA consts<>+0xbc(SB)/4, $0xeeffccdd
|
||||||
|
GLOBL consts<>(SB), RODATA, $0xc0
|
||||||
|
|
||||||
|
#ifdef GOARCH_ppc64
|
||||||
|
#define BE_XXBRW_INIT() \
|
||||||
|
LVSL (R0)(R0), V24 \
|
||||||
|
VSPLTISB $3, V25 \
|
||||||
|
VXOR V24, V25, V24 \
|
||||||
|
|
||||||
|
#define BE_XXBRW(vr) VPERM vr, vr, V24, vr
|
||||||
|
#else
|
||||||
|
#define BE_XXBRW_INIT()
|
||||||
|
#define BE_XXBRW(vr)
|
||||||
|
#endif
|
||||||
|
|
||||||
//func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32)
|
//func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32)
|
||||||
TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
|
TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
|
||||||
@ -70,6 +113,9 @@ TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
|
|||||||
MOVD $48, R10
|
MOVD $48, R10
|
||||||
MOVD $64, R11
|
MOVD $64, R11
|
||||||
SRD $6, LEN, BLOCKS
|
SRD $6, LEN, BLOCKS
|
||||||
|
// for VPERMXOR
|
||||||
|
MOVD $consts<>+0xa0(SB), MASK
|
||||||
|
MOVD $16, R20
|
||||||
// V16
|
// V16
|
||||||
LXVW4X (CONSTBASE)(R0), VS48
|
LXVW4X (CONSTBASE)(R0), VS48
|
||||||
ADD $80,CONSTBASE
|
ADD $80,CONSTBASE
|
||||||
@ -84,9 +130,15 @@ TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
|
|||||||
// Clear V27
|
// Clear V27
|
||||||
VXOR V27, V27, V27
|
VXOR V27, V27, V27
|
||||||
|
|
||||||
|
BE_XXBRW_INIT()
|
||||||
|
|
||||||
// V28
|
// V28
|
||||||
LXVW4X (CONSTBASE)(R11), VS60
|
LXVW4X (CONSTBASE)(R11), VS60
|
||||||
|
|
||||||
|
// Load mask constants for VPERMXOR
|
||||||
|
LXVW4X (MASK)(R0), V20
|
||||||
|
LXVW4X (MASK)(R20), V21
|
||||||
|
|
||||||
// splat slot from V19 -> V26
|
// splat slot from V19 -> V26
|
||||||
VSPLTW $0, V19, V26
|
VSPLTW $0, V19, V26
|
||||||
|
|
||||||
@ -97,7 +149,7 @@ TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40
|
|||||||
|
|
||||||
MOVD $10, R14
|
MOVD $10, R14
|
||||||
MOVD R14, CTR
|
MOVD R14, CTR
|
||||||
|
PCALIGN $16
|
||||||
loop_outer_vsx:
|
loop_outer_vsx:
|
||||||
// V0, V1, V2, V3
|
// V0, V1, V2, V3
|
||||||
LXVW4X (R0)(CONSTBASE), VS32
|
LXVW4X (R0)(CONSTBASE), VS32
|
||||||
@ -128,22 +180,17 @@ loop_outer_vsx:
|
|||||||
VSPLTISW $12, V28
|
VSPLTISW $12, V28
|
||||||
VSPLTISW $8, V29
|
VSPLTISW $8, V29
|
||||||
VSPLTISW $7, V30
|
VSPLTISW $7, V30
|
||||||
|
PCALIGN $16
|
||||||
loop_vsx:
|
loop_vsx:
|
||||||
VADDUWM V0, V4, V0
|
VADDUWM V0, V4, V0
|
||||||
VADDUWM V1, V5, V1
|
VADDUWM V1, V5, V1
|
||||||
VADDUWM V2, V6, V2
|
VADDUWM V2, V6, V2
|
||||||
VADDUWM V3, V7, V3
|
VADDUWM V3, V7, V3
|
||||||
|
|
||||||
VXOR V12, V0, V12
|
VPERMXOR V12, V0, V21, V12
|
||||||
VXOR V13, V1, V13
|
VPERMXOR V13, V1, V21, V13
|
||||||
VXOR V14, V2, V14
|
VPERMXOR V14, V2, V21, V14
|
||||||
VXOR V15, V3, V15
|
VPERMXOR V15, V3, V21, V15
|
||||||
|
|
||||||
VRLW V12, V27, V12
|
|
||||||
VRLW V13, V27, V13
|
|
||||||
VRLW V14, V27, V14
|
|
||||||
VRLW V15, V27, V15
|
|
||||||
|
|
||||||
VADDUWM V8, V12, V8
|
VADDUWM V8, V12, V8
|
||||||
VADDUWM V9, V13, V9
|
VADDUWM V9, V13, V9
|
||||||
@ -165,15 +212,10 @@ loop_vsx:
|
|||||||
VADDUWM V2, V6, V2
|
VADDUWM V2, V6, V2
|
||||||
VADDUWM V3, V7, V3
|
VADDUWM V3, V7, V3
|
||||||
|
|
||||||
VXOR V12, V0, V12
|
VPERMXOR V12, V0, V20, V12
|
||||||
VXOR V13, V1, V13
|
VPERMXOR V13, V1, V20, V13
|
||||||
VXOR V14, V2, V14
|
VPERMXOR V14, V2, V20, V14
|
||||||
VXOR V15, V3, V15
|
VPERMXOR V15, V3, V20, V15
|
||||||
|
|
||||||
VRLW V12, V29, V12
|
|
||||||
VRLW V13, V29, V13
|
|
||||||
VRLW V14, V29, V14
|
|
||||||
VRLW V15, V29, V15
|
|
||||||
|
|
||||||
VADDUWM V8, V12, V8
|
VADDUWM V8, V12, V8
|
||||||
VADDUWM V9, V13, V9
|
VADDUWM V9, V13, V9
|
||||||
@ -195,15 +237,10 @@ loop_vsx:
|
|||||||
VADDUWM V2, V7, V2
|
VADDUWM V2, V7, V2
|
||||||
VADDUWM V3, V4, V3
|
VADDUWM V3, V4, V3
|
||||||
|
|
||||||
VXOR V15, V0, V15
|
VPERMXOR V15, V0, V21, V15
|
||||||
VXOR V12, V1, V12
|
VPERMXOR V12, V1, V21, V12
|
||||||
VXOR V13, V2, V13
|
VPERMXOR V13, V2, V21, V13
|
||||||
VXOR V14, V3, V14
|
VPERMXOR V14, V3, V21, V14
|
||||||
|
|
||||||
VRLW V15, V27, V15
|
|
||||||
VRLW V12, V27, V12
|
|
||||||
VRLW V13, V27, V13
|
|
||||||
VRLW V14, V27, V14
|
|
||||||
|
|
||||||
VADDUWM V10, V15, V10
|
VADDUWM V10, V15, V10
|
||||||
VADDUWM V11, V12, V11
|
VADDUWM V11, V12, V11
|
||||||
@ -225,15 +262,10 @@ loop_vsx:
|
|||||||
VADDUWM V2, V7, V2
|
VADDUWM V2, V7, V2
|
||||||
VADDUWM V3, V4, V3
|
VADDUWM V3, V4, V3
|
||||||
|
|
||||||
VXOR V15, V0, V15
|
VPERMXOR V15, V0, V20, V15
|
||||||
VXOR V12, V1, V12
|
VPERMXOR V12, V1, V20, V12
|
||||||
VXOR V13, V2, V13
|
VPERMXOR V13, V2, V20, V13
|
||||||
VXOR V14, V3, V14
|
VPERMXOR V14, V3, V20, V14
|
||||||
|
|
||||||
VRLW V15, V29, V15
|
|
||||||
VRLW V12, V29, V12
|
|
||||||
VRLW V13, V29, V13
|
|
||||||
VRLW V14, V29, V14
|
|
||||||
|
|
||||||
VADDUWM V10, V15, V10
|
VADDUWM V10, V15, V10
|
||||||
VADDUWM V11, V12, V11
|
VADDUWM V11, V12, V11
|
||||||
@ -249,48 +281,48 @@ loop_vsx:
|
|||||||
VRLW V6, V30, V6
|
VRLW V6, V30, V6
|
||||||
VRLW V7, V30, V7
|
VRLW V7, V30, V7
|
||||||
VRLW V4, V30, V4
|
VRLW V4, V30, V4
|
||||||
BC 16, LT, loop_vsx
|
BDNZ loop_vsx
|
||||||
|
|
||||||
VADDUWM V12, V26, V12
|
VADDUWM V12, V26, V12
|
||||||
|
|
||||||
WORD $0x13600F8C // VMRGEW V0, V1, V27
|
VMRGEW V0, V1, V27
|
||||||
WORD $0x13821F8C // VMRGEW V2, V3, V28
|
VMRGEW V2, V3, V28
|
||||||
|
|
||||||
WORD $0x10000E8C // VMRGOW V0, V1, V0
|
VMRGOW V0, V1, V0
|
||||||
WORD $0x10421E8C // VMRGOW V2, V3, V2
|
VMRGOW V2, V3, V2
|
||||||
|
|
||||||
WORD $0x13A42F8C // VMRGEW V4, V5, V29
|
VMRGEW V4, V5, V29
|
||||||
WORD $0x13C63F8C // VMRGEW V6, V7, V30
|
VMRGEW V6, V7, V30
|
||||||
|
|
||||||
XXPERMDI VS32, VS34, $0, VS33
|
XXPERMDI VS32, VS34, $0, VS33
|
||||||
XXPERMDI VS32, VS34, $3, VS35
|
XXPERMDI VS32, VS34, $3, VS35
|
||||||
XXPERMDI VS59, VS60, $0, VS32
|
XXPERMDI VS59, VS60, $0, VS32
|
||||||
XXPERMDI VS59, VS60, $3, VS34
|
XXPERMDI VS59, VS60, $3, VS34
|
||||||
|
|
||||||
WORD $0x10842E8C // VMRGOW V4, V5, V4
|
VMRGOW V4, V5, V4
|
||||||
WORD $0x10C63E8C // VMRGOW V6, V7, V6
|
VMRGOW V6, V7, V6
|
||||||
|
|
||||||
WORD $0x13684F8C // VMRGEW V8, V9, V27
|
VMRGEW V8, V9, V27
|
||||||
WORD $0x138A5F8C // VMRGEW V10, V11, V28
|
VMRGEW V10, V11, V28
|
||||||
|
|
||||||
XXPERMDI VS36, VS38, $0, VS37
|
XXPERMDI VS36, VS38, $0, VS37
|
||||||
XXPERMDI VS36, VS38, $3, VS39
|
XXPERMDI VS36, VS38, $3, VS39
|
||||||
XXPERMDI VS61, VS62, $0, VS36
|
XXPERMDI VS61, VS62, $0, VS36
|
||||||
XXPERMDI VS61, VS62, $3, VS38
|
XXPERMDI VS61, VS62, $3, VS38
|
||||||
|
|
||||||
WORD $0x11084E8C // VMRGOW V8, V9, V8
|
VMRGOW V8, V9, V8
|
||||||
WORD $0x114A5E8C // VMRGOW V10, V11, V10
|
VMRGOW V10, V11, V10
|
||||||
|
|
||||||
WORD $0x13AC6F8C // VMRGEW V12, V13, V29
|
VMRGEW V12, V13, V29
|
||||||
WORD $0x13CE7F8C // VMRGEW V14, V15, V30
|
VMRGEW V14, V15, V30
|
||||||
|
|
||||||
XXPERMDI VS40, VS42, $0, VS41
|
XXPERMDI VS40, VS42, $0, VS41
|
||||||
XXPERMDI VS40, VS42, $3, VS43
|
XXPERMDI VS40, VS42, $3, VS43
|
||||||
XXPERMDI VS59, VS60, $0, VS40
|
XXPERMDI VS59, VS60, $0, VS40
|
||||||
XXPERMDI VS59, VS60, $3, VS42
|
XXPERMDI VS59, VS60, $3, VS42
|
||||||
|
|
||||||
WORD $0x118C6E8C // VMRGOW V12, V13, V12
|
VMRGOW V12, V13, V12
|
||||||
WORD $0x11CE7E8C // VMRGOW V14, V15, V14
|
VMRGOW V14, V15, V14
|
||||||
|
|
||||||
VSPLTISW $4, V27
|
VSPLTISW $4, V27
|
||||||
VADDUWM V26, V27, V26
|
VADDUWM V26, V27, V26
|
||||||
@ -305,6 +337,11 @@ loop_vsx:
|
|||||||
VADDUWM V8, V18, V8
|
VADDUWM V8, V18, V8
|
||||||
VADDUWM V12, V19, V12
|
VADDUWM V12, V19, V12
|
||||||
|
|
||||||
|
BE_XXBRW(V0)
|
||||||
|
BE_XXBRW(V4)
|
||||||
|
BE_XXBRW(V8)
|
||||||
|
BE_XXBRW(V12)
|
||||||
|
|
||||||
CMPU LEN, $64
|
CMPU LEN, $64
|
||||||
BLT tail_vsx
|
BLT tail_vsx
|
||||||
|
|
||||||
@ -333,6 +370,11 @@ loop_vsx:
|
|||||||
VADDUWM V9, V18, V8
|
VADDUWM V9, V18, V8
|
||||||
VADDUWM V13, V19, V12
|
VADDUWM V13, V19, V12
|
||||||
|
|
||||||
|
BE_XXBRW(V0)
|
||||||
|
BE_XXBRW(V4)
|
||||||
|
BE_XXBRW(V8)
|
||||||
|
BE_XXBRW(V12)
|
||||||
|
|
||||||
CMPU LEN, $64
|
CMPU LEN, $64
|
||||||
BLT tail_vsx
|
BLT tail_vsx
|
||||||
|
|
||||||
@ -340,8 +382,8 @@ loop_vsx:
|
|||||||
LXVW4X (INP)(R8), VS60
|
LXVW4X (INP)(R8), VS60
|
||||||
LXVW4X (INP)(R9), VS61
|
LXVW4X (INP)(R9), VS61
|
||||||
LXVW4X (INP)(R10), VS62
|
LXVW4X (INP)(R10), VS62
|
||||||
VXOR V27, V0, V27
|
|
||||||
|
|
||||||
|
VXOR V27, V0, V27
|
||||||
VXOR V28, V4, V28
|
VXOR V28, V4, V28
|
||||||
VXOR V29, V8, V29
|
VXOR V29, V8, V29
|
||||||
VXOR V30, V12, V30
|
VXOR V30, V12, V30
|
||||||
@ -360,6 +402,11 @@ loop_vsx:
|
|||||||
VADDUWM V10, V18, V8
|
VADDUWM V10, V18, V8
|
||||||
VADDUWM V14, V19, V12
|
VADDUWM V14, V19, V12
|
||||||
|
|
||||||
|
BE_XXBRW(V0)
|
||||||
|
BE_XXBRW(V4)
|
||||||
|
BE_XXBRW(V8)
|
||||||
|
BE_XXBRW(V12)
|
||||||
|
|
||||||
CMPU LEN, $64
|
CMPU LEN, $64
|
||||||
BLT tail_vsx
|
BLT tail_vsx
|
||||||
|
|
||||||
@ -387,6 +434,11 @@ loop_vsx:
|
|||||||
VADDUWM V11, V18, V8
|
VADDUWM V11, V18, V8
|
||||||
VADDUWM V15, V19, V12
|
VADDUWM V15, V19, V12
|
||||||
|
|
||||||
|
BE_XXBRW(V0)
|
||||||
|
BE_XXBRW(V4)
|
||||||
|
BE_XXBRW(V8)
|
||||||
|
BE_XXBRW(V12)
|
||||||
|
|
||||||
CMPU LEN, $64
|
CMPU LEN, $64
|
||||||
BLT tail_vsx
|
BLT tail_vsx
|
||||||
|
|
||||||
@ -414,9 +466,9 @@ loop_vsx:
|
|||||||
|
|
||||||
done_vsx:
|
done_vsx:
|
||||||
// Increment counter by number of 64 byte blocks
|
// Increment counter by number of 64 byte blocks
|
||||||
MOVD (CNT), R14
|
MOVWZ (CNT), R14
|
||||||
ADD BLOCKS, R14
|
ADD BLOCKS, R14
|
||||||
MOVD R14, (CNT)
|
MOVWZ R14, (CNT)
|
||||||
RET
|
RET
|
||||||
|
|
||||||
tail_vsx:
|
tail_vsx:
|
||||||
@ -431,7 +483,7 @@ tail_vsx:
|
|||||||
ADD $-1, R11, R12
|
ADD $-1, R11, R12
|
||||||
ADD $-1, INP
|
ADD $-1, INP
|
||||||
ADD $-1, OUT
|
ADD $-1, OUT
|
||||||
|
PCALIGN $16
|
||||||
looptail_vsx:
|
looptail_vsx:
|
||||||
// Copying the result to OUT
|
// Copying the result to OUT
|
||||||
// in bytes.
|
// in bytes.
|
||||||
@ -439,7 +491,7 @@ looptail_vsx:
|
|||||||
MOVBZU 1(INP), TMP
|
MOVBZU 1(INP), TMP
|
||||||
XOR KEY, TMP, KEY
|
XOR KEY, TMP, KEY
|
||||||
MOVBU KEY, 1(OUT)
|
MOVBU KEY, 1(OUT)
|
||||||
BC 16, LT, looptail_vsx
|
BDNZ looptail_vsx
|
||||||
|
|
||||||
// Clear the stack values
|
// Clear the stack values
|
||||||
STXVW4X VS48, (R11)(R0)
|
STXVW4X VS48, (R11)(R0)
|
2
vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
generated
vendored
2
vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
generated
vendored
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
// Package asn1 contains supporting types for parsing and building ASN.1
|
// Package asn1 contains supporting types for parsing and building ASN.1
|
||||||
// messages with the cryptobyte package.
|
// messages with the cryptobyte package.
|
||||||
package asn1 // import "golang.org/x/crypto/cryptobyte/asn1"
|
package asn1
|
||||||
|
|
||||||
// Tag represents an ASN.1 identifier octet, consisting of a tag number
|
// Tag represents an ASN.1 identifier octet, consisting of a tag number
|
||||||
// (indicating a type) and class (such as context-specific or constructed).
|
// (indicating a type) and class (such as context-specific or constructed).
|
||||||
|
2
vendor/golang.org/x/crypto/cryptobyte/string.go
generated
vendored
2
vendor/golang.org/x/crypto/cryptobyte/string.go
generated
vendored
@ -15,7 +15,7 @@
|
|||||||
//
|
//
|
||||||
// See the documentation and examples for the Builder and String types to get
|
// See the documentation and examples for the Builder and String types to get
|
||||||
// started.
|
// started.
|
||||||
package cryptobyte // import "golang.org/x/crypto/cryptobyte"
|
package cryptobyte
|
||||||
|
|
||||||
// String represents a string of bytes. It provides methods for parsing
|
// String represents a string of bytes. It provides methods for parsing
|
||||||
// fixed-length and length-prefixed values from it.
|
// fixed-length and length-prefixed values from it.
|
||||||
|
39
vendor/golang.org/x/crypto/curve25519/curve25519.go
generated
vendored
39
vendor/golang.org/x/crypto/curve25519/curve25519.go
generated
vendored
@ -6,9 +6,11 @@
|
|||||||
// performs scalar multiplication on the elliptic curve known as Curve25519.
|
// performs scalar multiplication on the elliptic curve known as Curve25519.
|
||||||
// See RFC 7748.
|
// See RFC 7748.
|
||||||
//
|
//
|
||||||
// Starting in Go 1.20, this package is a wrapper for the X25519 implementation
|
// This package is a wrapper for the X25519 implementation
|
||||||
// in the crypto/ecdh package.
|
// in the crypto/ecdh package.
|
||||||
package curve25519 // import "golang.org/x/crypto/curve25519"
|
package curve25519
|
||||||
|
|
||||||
|
import "crypto/ecdh"
|
||||||
|
|
||||||
// ScalarMult sets dst to the product scalar * point.
|
// ScalarMult sets dst to the product scalar * point.
|
||||||
//
|
//
|
||||||
@ -16,7 +18,13 @@ package curve25519 // import "golang.org/x/crypto/curve25519"
|
|||||||
// zeroes, irrespective of the scalar. Instead, use the X25519 function, which
|
// zeroes, irrespective of the scalar. Instead, use the X25519 function, which
|
||||||
// will return an error.
|
// will return an error.
|
||||||
func ScalarMult(dst, scalar, point *[32]byte) {
|
func ScalarMult(dst, scalar, point *[32]byte) {
|
||||||
scalarMult(dst, scalar, point)
|
if _, err := x25519(dst, scalar[:], point[:]); err != nil {
|
||||||
|
// The only error condition for x25519 when the inputs are 32 bytes long
|
||||||
|
// is if the output would have been the all-zero value.
|
||||||
|
for i := range dst {
|
||||||
|
dst[i] = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScalarBaseMult sets dst to the product scalar * base where base is the
|
// ScalarBaseMult sets dst to the product scalar * base where base is the
|
||||||
@ -25,7 +33,12 @@ func ScalarMult(dst, scalar, point *[32]byte) {
|
|||||||
// It is recommended to use the X25519 function with Basepoint instead, as
|
// It is recommended to use the X25519 function with Basepoint instead, as
|
||||||
// copying into fixed size arrays can lead to unexpected bugs.
|
// copying into fixed size arrays can lead to unexpected bugs.
|
||||||
func ScalarBaseMult(dst, scalar *[32]byte) {
|
func ScalarBaseMult(dst, scalar *[32]byte) {
|
||||||
scalarBaseMult(dst, scalar)
|
curve := ecdh.X25519()
|
||||||
|
priv, err := curve.NewPrivateKey(scalar[:])
|
||||||
|
if err != nil {
|
||||||
|
panic("curve25519: internal error: scalarBaseMult was not 32 bytes")
|
||||||
|
}
|
||||||
|
copy(dst[:], priv.PublicKey().Bytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -57,3 +70,21 @@ func X25519(scalar, point []byte) ([]byte, error) {
|
|||||||
var dst [32]byte
|
var dst [32]byte
|
||||||
return x25519(&dst, scalar, point)
|
return x25519(&dst, scalar, point)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
|
||||||
|
curve := ecdh.X25519()
|
||||||
|
pub, err := curve.NewPublicKey(point)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
priv, err := curve.NewPrivateKey(scalar)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
out, err := priv.ECDH(pub)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
copy(dst[:], out)
|
||||||
|
return dst[:], nil
|
||||||
|
}
|
||||||
|
105
vendor/golang.org/x/crypto/curve25519/curve25519_compat.go
generated
vendored
105
vendor/golang.org/x/crypto/curve25519/curve25519_compat.go
generated
vendored
@ -1,105 +0,0 @@
|
|||||||
// Copyright 2019 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build !go1.20
|
|
||||||
|
|
||||||
package curve25519
|
|
||||||
|
|
||||||
import (
|
|
||||||
"crypto/subtle"
|
|
||||||
"errors"
|
|
||||||
"strconv"
|
|
||||||
|
|
||||||
"golang.org/x/crypto/curve25519/internal/field"
|
|
||||||
)
|
|
||||||
|
|
||||||
func scalarMult(dst, scalar, point *[32]byte) {
|
|
||||||
var e [32]byte
|
|
||||||
|
|
||||||
copy(e[:], scalar[:])
|
|
||||||
e[0] &= 248
|
|
||||||
e[31] &= 127
|
|
||||||
e[31] |= 64
|
|
||||||
|
|
||||||
var x1, x2, z2, x3, z3, tmp0, tmp1 field.Element
|
|
||||||
x1.SetBytes(point[:])
|
|
||||||
x2.One()
|
|
||||||
x3.Set(&x1)
|
|
||||||
z3.One()
|
|
||||||
|
|
||||||
swap := 0
|
|
||||||
for pos := 254; pos >= 0; pos-- {
|
|
||||||
b := e[pos/8] >> uint(pos&7)
|
|
||||||
b &= 1
|
|
||||||
swap ^= int(b)
|
|
||||||
x2.Swap(&x3, swap)
|
|
||||||
z2.Swap(&z3, swap)
|
|
||||||
swap = int(b)
|
|
||||||
|
|
||||||
tmp0.Subtract(&x3, &z3)
|
|
||||||
tmp1.Subtract(&x2, &z2)
|
|
||||||
x2.Add(&x2, &z2)
|
|
||||||
z2.Add(&x3, &z3)
|
|
||||||
z3.Multiply(&tmp0, &x2)
|
|
||||||
z2.Multiply(&z2, &tmp1)
|
|
||||||
tmp0.Square(&tmp1)
|
|
||||||
tmp1.Square(&x2)
|
|
||||||
x3.Add(&z3, &z2)
|
|
||||||
z2.Subtract(&z3, &z2)
|
|
||||||
x2.Multiply(&tmp1, &tmp0)
|
|
||||||
tmp1.Subtract(&tmp1, &tmp0)
|
|
||||||
z2.Square(&z2)
|
|
||||||
|
|
||||||
z3.Mult32(&tmp1, 121666)
|
|
||||||
x3.Square(&x3)
|
|
||||||
tmp0.Add(&tmp0, &z3)
|
|
||||||
z3.Multiply(&x1, &z2)
|
|
||||||
z2.Multiply(&tmp1, &tmp0)
|
|
||||||
}
|
|
||||||
|
|
||||||
x2.Swap(&x3, swap)
|
|
||||||
z2.Swap(&z3, swap)
|
|
||||||
|
|
||||||
z2.Invert(&z2)
|
|
||||||
x2.Multiply(&x2, &z2)
|
|
||||||
copy(dst[:], x2.Bytes())
|
|
||||||
}
|
|
||||||
|
|
||||||
func scalarBaseMult(dst, scalar *[32]byte) {
|
|
||||||
checkBasepoint()
|
|
||||||
scalarMult(dst, scalar, &basePoint)
|
|
||||||
}
|
|
||||||
|
|
||||||
func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
|
|
||||||
var in [32]byte
|
|
||||||
if l := len(scalar); l != 32 {
|
|
||||||
return nil, errors.New("bad scalar length: " + strconv.Itoa(l) + ", expected 32")
|
|
||||||
}
|
|
||||||
if l := len(point); l != 32 {
|
|
||||||
return nil, errors.New("bad point length: " + strconv.Itoa(l) + ", expected 32")
|
|
||||||
}
|
|
||||||
copy(in[:], scalar)
|
|
||||||
if &point[0] == &Basepoint[0] {
|
|
||||||
scalarBaseMult(dst, &in)
|
|
||||||
} else {
|
|
||||||
var base, zero [32]byte
|
|
||||||
copy(base[:], point)
|
|
||||||
scalarMult(dst, &in, &base)
|
|
||||||
if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 {
|
|
||||||
return nil, errors.New("bad input point: low order point")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return dst[:], nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func checkBasepoint() {
|
|
||||||
if subtle.ConstantTimeCompare(Basepoint, []byte{
|
|
||||||
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
||||||
}) != 1 {
|
|
||||||
panic("curve25519: global Basepoint value was modified")
|
|
||||||
}
|
|
||||||
}
|
|
46
vendor/golang.org/x/crypto/curve25519/curve25519_go120.go
generated
vendored
46
vendor/golang.org/x/crypto/curve25519/curve25519_go120.go
generated
vendored
@ -1,46 +0,0 @@
|
|||||||
// Copyright 2022 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build go1.20
|
|
||||||
|
|
||||||
package curve25519
|
|
||||||
|
|
||||||
import "crypto/ecdh"
|
|
||||||
|
|
||||||
func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
|
|
||||||
curve := ecdh.X25519()
|
|
||||||
pub, err := curve.NewPublicKey(point)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
priv, err := curve.NewPrivateKey(scalar)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
out, err := priv.ECDH(pub)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
copy(dst[:], out)
|
|
||||||
return dst[:], nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func scalarMult(dst, scalar, point *[32]byte) {
|
|
||||||
if _, err := x25519(dst, scalar[:], point[:]); err != nil {
|
|
||||||
// The only error condition for x25519 when the inputs are 32 bytes long
|
|
||||||
// is if the output would have been the all-zero value.
|
|
||||||
for i := range dst {
|
|
||||||
dst[i] = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func scalarBaseMult(dst, scalar *[32]byte) {
|
|
||||||
curve := ecdh.X25519()
|
|
||||||
priv, err := curve.NewPrivateKey(scalar[:])
|
|
||||||
if err != nil {
|
|
||||||
panic("curve25519: internal error: scalarBaseMult was not 32 bytes")
|
|
||||||
}
|
|
||||||
copy(dst[:], priv.PublicKey().Bytes())
|
|
||||||
}
|
|
7
vendor/golang.org/x/crypto/curve25519/internal/field/README
generated
vendored
7
vendor/golang.org/x/crypto/curve25519/internal/field/README
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
This package is kept in sync with crypto/ed25519/internal/edwards25519/field in
|
|
||||||
the standard library.
|
|
||||||
|
|
||||||
If there are any changes in the standard library that need to be synced to this
|
|
||||||
package, run sync.sh. It will not overwrite any local changes made since the
|
|
||||||
previous sync, so it's ok to land changes in this package first, and then sync
|
|
||||||
to the standard library later.
|
|
416
vendor/golang.org/x/crypto/curve25519/internal/field/fe.go
generated
vendored
416
vendor/golang.org/x/crypto/curve25519/internal/field/fe.go
generated
vendored
@ -1,416 +0,0 @@
|
|||||||
// Copyright (c) 2017 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 field implements fast arithmetic modulo 2^255-19.
|
|
||||||
package field
|
|
||||||
|
|
||||||
import (
|
|
||||||
"crypto/subtle"
|
|
||||||
"encoding/binary"
|
|
||||||
"math/bits"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Element represents an element of the field GF(2^255-19). Note that this
|
|
||||||
// is not a cryptographically secure group, and should only be used to interact
|
|
||||||
// with edwards25519.Point coordinates.
|
|
||||||
//
|
|
||||||
// This type works similarly to math/big.Int, and all arguments and receivers
|
|
||||||
// are allowed to alias.
|
|
||||||
//
|
|
||||||
// The zero value is a valid zero element.
|
|
||||||
type Element struct {
|
|
||||||
// An element t represents the integer
|
|
||||||
// t.l0 + t.l1*2^51 + t.l2*2^102 + t.l3*2^153 + t.l4*2^204
|
|
||||||
//
|
|
||||||
// Between operations, all limbs are expected to be lower than 2^52.
|
|
||||||
l0 uint64
|
|
||||||
l1 uint64
|
|
||||||
l2 uint64
|
|
||||||
l3 uint64
|
|
||||||
l4 uint64
|
|
||||||
}
|
|
||||||
|
|
||||||
const maskLow51Bits uint64 = (1 << 51) - 1
|
|
||||||
|
|
||||||
var feZero = &Element{0, 0, 0, 0, 0}
|
|
||||||
|
|
||||||
// Zero sets v = 0, and returns v.
|
|
||||||
func (v *Element) Zero() *Element {
|
|
||||||
*v = *feZero
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
var feOne = &Element{1, 0, 0, 0, 0}
|
|
||||||
|
|
||||||
// One sets v = 1, and returns v.
|
|
||||||
func (v *Element) One() *Element {
|
|
||||||
*v = *feOne
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
// reduce reduces v modulo 2^255 - 19 and returns it.
|
|
||||||
func (v *Element) reduce() *Element {
|
|
||||||
v.carryPropagate()
|
|
||||||
|
|
||||||
// After the light reduction we now have a field element representation
|
|
||||||
// v < 2^255 + 2^13 * 19, but need v < 2^255 - 19.
|
|
||||||
|
|
||||||
// If v >= 2^255 - 19, then v + 19 >= 2^255, which would overflow 2^255 - 1,
|
|
||||||
// generating a carry. That is, c will be 0 if v < 2^255 - 19, and 1 otherwise.
|
|
||||||
c := (v.l0 + 19) >> 51
|
|
||||||
c = (v.l1 + c) >> 51
|
|
||||||
c = (v.l2 + c) >> 51
|
|
||||||
c = (v.l3 + c) >> 51
|
|
||||||
c = (v.l4 + c) >> 51
|
|
||||||
|
|
||||||
// If v < 2^255 - 19 and c = 0, this will be a no-op. Otherwise, it's
|
|
||||||
// effectively applying the reduction identity to the carry.
|
|
||||||
v.l0 += 19 * c
|
|
||||||
|
|
||||||
v.l1 += v.l0 >> 51
|
|
||||||
v.l0 = v.l0 & maskLow51Bits
|
|
||||||
v.l2 += v.l1 >> 51
|
|
||||||
v.l1 = v.l1 & maskLow51Bits
|
|
||||||
v.l3 += v.l2 >> 51
|
|
||||||
v.l2 = v.l2 & maskLow51Bits
|
|
||||||
v.l4 += v.l3 >> 51
|
|
||||||
v.l3 = v.l3 & maskLow51Bits
|
|
||||||
// no additional carry
|
|
||||||
v.l4 = v.l4 & maskLow51Bits
|
|
||||||
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add sets v = a + b, and returns v.
|
|
||||||
func (v *Element) Add(a, b *Element) *Element {
|
|
||||||
v.l0 = a.l0 + b.l0
|
|
||||||
v.l1 = a.l1 + b.l1
|
|
||||||
v.l2 = a.l2 + b.l2
|
|
||||||
v.l3 = a.l3 + b.l3
|
|
||||||
v.l4 = a.l4 + b.l4
|
|
||||||
// Using the generic implementation here is actually faster than the
|
|
||||||
// assembly. Probably because the body of this function is so simple that
|
|
||||||
// the compiler can figure out better optimizations by inlining the carry
|
|
||||||
// propagation. TODO
|
|
||||||
return v.carryPropagateGeneric()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Subtract sets v = a - b, and returns v.
|
|
||||||
func (v *Element) Subtract(a, b *Element) *Element {
|
|
||||||
// We first add 2 * p, to guarantee the subtraction won't underflow, and
|
|
||||||
// then subtract b (which can be up to 2^255 + 2^13 * 19).
|
|
||||||
v.l0 = (a.l0 + 0xFFFFFFFFFFFDA) - b.l0
|
|
||||||
v.l1 = (a.l1 + 0xFFFFFFFFFFFFE) - b.l1
|
|
||||||
v.l2 = (a.l2 + 0xFFFFFFFFFFFFE) - b.l2
|
|
||||||
v.l3 = (a.l3 + 0xFFFFFFFFFFFFE) - b.l3
|
|
||||||
v.l4 = (a.l4 + 0xFFFFFFFFFFFFE) - b.l4
|
|
||||||
return v.carryPropagate()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Negate sets v = -a, and returns v.
|
|
||||||
func (v *Element) Negate(a *Element) *Element {
|
|
||||||
return v.Subtract(feZero, a)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Invert sets v = 1/z mod p, and returns v.
|
|
||||||
//
|
|
||||||
// If z == 0, Invert returns v = 0.
|
|
||||||
func (v *Element) Invert(z *Element) *Element {
|
|
||||||
// Inversion is implemented as exponentiation with exponent p − 2. It uses the
|
|
||||||
// same sequence of 255 squarings and 11 multiplications as [Curve25519].
|
|
||||||
var z2, z9, z11, z2_5_0, z2_10_0, z2_20_0, z2_50_0, z2_100_0, t Element
|
|
||||||
|
|
||||||
z2.Square(z) // 2
|
|
||||||
t.Square(&z2) // 4
|
|
||||||
t.Square(&t) // 8
|
|
||||||
z9.Multiply(&t, z) // 9
|
|
||||||
z11.Multiply(&z9, &z2) // 11
|
|
||||||
t.Square(&z11) // 22
|
|
||||||
z2_5_0.Multiply(&t, &z9) // 31 = 2^5 - 2^0
|
|
||||||
|
|
||||||
t.Square(&z2_5_0) // 2^6 - 2^1
|
|
||||||
for i := 0; i < 4; i++ {
|
|
||||||
t.Square(&t) // 2^10 - 2^5
|
|
||||||
}
|
|
||||||
z2_10_0.Multiply(&t, &z2_5_0) // 2^10 - 2^0
|
|
||||||
|
|
||||||
t.Square(&z2_10_0) // 2^11 - 2^1
|
|
||||||
for i := 0; i < 9; i++ {
|
|
||||||
t.Square(&t) // 2^20 - 2^10
|
|
||||||
}
|
|
||||||
z2_20_0.Multiply(&t, &z2_10_0) // 2^20 - 2^0
|
|
||||||
|
|
||||||
t.Square(&z2_20_0) // 2^21 - 2^1
|
|
||||||
for i := 0; i < 19; i++ {
|
|
||||||
t.Square(&t) // 2^40 - 2^20
|
|
||||||
}
|
|
||||||
t.Multiply(&t, &z2_20_0) // 2^40 - 2^0
|
|
||||||
|
|
||||||
t.Square(&t) // 2^41 - 2^1
|
|
||||||
for i := 0; i < 9; i++ {
|
|
||||||
t.Square(&t) // 2^50 - 2^10
|
|
||||||
}
|
|
||||||
z2_50_0.Multiply(&t, &z2_10_0) // 2^50 - 2^0
|
|
||||||
|
|
||||||
t.Square(&z2_50_0) // 2^51 - 2^1
|
|
||||||
for i := 0; i < 49; i++ {
|
|
||||||
t.Square(&t) // 2^100 - 2^50
|
|
||||||
}
|
|
||||||
z2_100_0.Multiply(&t, &z2_50_0) // 2^100 - 2^0
|
|
||||||
|
|
||||||
t.Square(&z2_100_0) // 2^101 - 2^1
|
|
||||||
for i := 0; i < 99; i++ {
|
|
||||||
t.Square(&t) // 2^200 - 2^100
|
|
||||||
}
|
|
||||||
t.Multiply(&t, &z2_100_0) // 2^200 - 2^0
|
|
||||||
|
|
||||||
t.Square(&t) // 2^201 - 2^1
|
|
||||||
for i := 0; i < 49; i++ {
|
|
||||||
t.Square(&t) // 2^250 - 2^50
|
|
||||||
}
|
|
||||||
t.Multiply(&t, &z2_50_0) // 2^250 - 2^0
|
|
||||||
|
|
||||||
t.Square(&t) // 2^251 - 2^1
|
|
||||||
t.Square(&t) // 2^252 - 2^2
|
|
||||||
t.Square(&t) // 2^253 - 2^3
|
|
||||||
t.Square(&t) // 2^254 - 2^4
|
|
||||||
t.Square(&t) // 2^255 - 2^5
|
|
||||||
|
|
||||||
return v.Multiply(&t, &z11) // 2^255 - 21
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set sets v = a, and returns v.
|
|
||||||
func (v *Element) Set(a *Element) *Element {
|
|
||||||
*v = *a
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetBytes sets v to x, which must be a 32-byte little-endian encoding.
|
|
||||||
//
|
|
||||||
// Consistent with RFC 7748, the most significant bit (the high bit of the
|
|
||||||
// last byte) is ignored, and non-canonical values (2^255-19 through 2^255-1)
|
|
||||||
// are accepted. Note that this is laxer than specified by RFC 8032.
|
|
||||||
func (v *Element) SetBytes(x []byte) *Element {
|
|
||||||
if len(x) != 32 {
|
|
||||||
panic("edwards25519: invalid field element input size")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bits 0:51 (bytes 0:8, bits 0:64, shift 0, mask 51).
|
|
||||||
v.l0 = binary.LittleEndian.Uint64(x[0:8])
|
|
||||||
v.l0 &= maskLow51Bits
|
|
||||||
// Bits 51:102 (bytes 6:14, bits 48:112, shift 3, mask 51).
|
|
||||||
v.l1 = binary.LittleEndian.Uint64(x[6:14]) >> 3
|
|
||||||
v.l1 &= maskLow51Bits
|
|
||||||
// Bits 102:153 (bytes 12:20, bits 96:160, shift 6, mask 51).
|
|
||||||
v.l2 = binary.LittleEndian.Uint64(x[12:20]) >> 6
|
|
||||||
v.l2 &= maskLow51Bits
|
|
||||||
// Bits 153:204 (bytes 19:27, bits 152:216, shift 1, mask 51).
|
|
||||||
v.l3 = binary.LittleEndian.Uint64(x[19:27]) >> 1
|
|
||||||
v.l3 &= maskLow51Bits
|
|
||||||
// Bits 204:251 (bytes 24:32, bits 192:256, shift 12, mask 51).
|
|
||||||
// Note: not bytes 25:33, shift 4, to avoid overread.
|
|
||||||
v.l4 = binary.LittleEndian.Uint64(x[24:32]) >> 12
|
|
||||||
v.l4 &= maskLow51Bits
|
|
||||||
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bytes returns the canonical 32-byte little-endian encoding of v.
|
|
||||||
func (v *Element) Bytes() []byte {
|
|
||||||
// This function is outlined to make the allocations inline in the caller
|
|
||||||
// rather than happen on the heap.
|
|
||||||
var out [32]byte
|
|
||||||
return v.bytes(&out)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (v *Element) bytes(out *[32]byte) []byte {
|
|
||||||
t := *v
|
|
||||||
t.reduce()
|
|
||||||
|
|
||||||
var buf [8]byte
|
|
||||||
for i, l := range [5]uint64{t.l0, t.l1, t.l2, t.l3, t.l4} {
|
|
||||||
bitsOffset := i * 51
|
|
||||||
binary.LittleEndian.PutUint64(buf[:], l<<uint(bitsOffset%8))
|
|
||||||
for i, bb := range buf {
|
|
||||||
off := bitsOffset/8 + i
|
|
||||||
if off >= len(out) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
out[off] |= bb
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return out[:]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Equal returns 1 if v and u are equal, and 0 otherwise.
|
|
||||||
func (v *Element) Equal(u *Element) int {
|
|
||||||
sa, sv := u.Bytes(), v.Bytes()
|
|
||||||
return subtle.ConstantTimeCompare(sa, sv)
|
|
||||||
}
|
|
||||||
|
|
||||||
// mask64Bits returns 0xffffffff if cond is 1, and 0 otherwise.
|
|
||||||
func mask64Bits(cond int) uint64 { return ^(uint64(cond) - 1) }
|
|
||||||
|
|
||||||
// Select sets v to a if cond == 1, and to b if cond == 0.
|
|
||||||
func (v *Element) Select(a, b *Element, cond int) *Element {
|
|
||||||
m := mask64Bits(cond)
|
|
||||||
v.l0 = (m & a.l0) | (^m & b.l0)
|
|
||||||
v.l1 = (m & a.l1) | (^m & b.l1)
|
|
||||||
v.l2 = (m & a.l2) | (^m & b.l2)
|
|
||||||
v.l3 = (m & a.l3) | (^m & b.l3)
|
|
||||||
v.l4 = (m & a.l4) | (^m & b.l4)
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
// Swap swaps v and u if cond == 1 or leaves them unchanged if cond == 0, and returns v.
|
|
||||||
func (v *Element) Swap(u *Element, cond int) {
|
|
||||||
m := mask64Bits(cond)
|
|
||||||
t := m & (v.l0 ^ u.l0)
|
|
||||||
v.l0 ^= t
|
|
||||||
u.l0 ^= t
|
|
||||||
t = m & (v.l1 ^ u.l1)
|
|
||||||
v.l1 ^= t
|
|
||||||
u.l1 ^= t
|
|
||||||
t = m & (v.l2 ^ u.l2)
|
|
||||||
v.l2 ^= t
|
|
||||||
u.l2 ^= t
|
|
||||||
t = m & (v.l3 ^ u.l3)
|
|
||||||
v.l3 ^= t
|
|
||||||
u.l3 ^= t
|
|
||||||
t = m & (v.l4 ^ u.l4)
|
|
||||||
v.l4 ^= t
|
|
||||||
u.l4 ^= t
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsNegative returns 1 if v is negative, and 0 otherwise.
|
|
||||||
func (v *Element) IsNegative() int {
|
|
||||||
return int(v.Bytes()[0] & 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Absolute sets v to |u|, and returns v.
|
|
||||||
func (v *Element) Absolute(u *Element) *Element {
|
|
||||||
return v.Select(new(Element).Negate(u), u, u.IsNegative())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Multiply sets v = x * y, and returns v.
|
|
||||||
func (v *Element) Multiply(x, y *Element) *Element {
|
|
||||||
feMul(v, x, y)
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
// Square sets v = x * x, and returns v.
|
|
||||||
func (v *Element) Square(x *Element) *Element {
|
|
||||||
feSquare(v, x)
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mult32 sets v = x * y, and returns v.
|
|
||||||
func (v *Element) Mult32(x *Element, y uint32) *Element {
|
|
||||||
x0lo, x0hi := mul51(x.l0, y)
|
|
||||||
x1lo, x1hi := mul51(x.l1, y)
|
|
||||||
x2lo, x2hi := mul51(x.l2, y)
|
|
||||||
x3lo, x3hi := mul51(x.l3, y)
|
|
||||||
x4lo, x4hi := mul51(x.l4, y)
|
|
||||||
v.l0 = x0lo + 19*x4hi // carried over per the reduction identity
|
|
||||||
v.l1 = x1lo + x0hi
|
|
||||||
v.l2 = x2lo + x1hi
|
|
||||||
v.l3 = x3lo + x2hi
|
|
||||||
v.l4 = x4lo + x3hi
|
|
||||||
// The hi portions are going to be only 32 bits, plus any previous excess,
|
|
||||||
// so we can skip the carry propagation.
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
// mul51 returns lo + hi * 2⁵¹ = a * b.
|
|
||||||
func mul51(a uint64, b uint32) (lo uint64, hi uint64) {
|
|
||||||
mh, ml := bits.Mul64(a, uint64(b))
|
|
||||||
lo = ml & maskLow51Bits
|
|
||||||
hi = (mh << 13) | (ml >> 51)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pow22523 set v = x^((p-5)/8), and returns v. (p-5)/8 is 2^252-3.
|
|
||||||
func (v *Element) Pow22523(x *Element) *Element {
|
|
||||||
var t0, t1, t2 Element
|
|
||||||
|
|
||||||
t0.Square(x) // x^2
|
|
||||||
t1.Square(&t0) // x^4
|
|
||||||
t1.Square(&t1) // x^8
|
|
||||||
t1.Multiply(x, &t1) // x^9
|
|
||||||
t0.Multiply(&t0, &t1) // x^11
|
|
||||||
t0.Square(&t0) // x^22
|
|
||||||
t0.Multiply(&t1, &t0) // x^31
|
|
||||||
t1.Square(&t0) // x^62
|
|
||||||
for i := 1; i < 5; i++ { // x^992
|
|
||||||
t1.Square(&t1)
|
|
||||||
}
|
|
||||||
t0.Multiply(&t1, &t0) // x^1023 -> 1023 = 2^10 - 1
|
|
||||||
t1.Square(&t0) // 2^11 - 2
|
|
||||||
for i := 1; i < 10; i++ { // 2^20 - 2^10
|
|
||||||
t1.Square(&t1)
|
|
||||||
}
|
|
||||||
t1.Multiply(&t1, &t0) // 2^20 - 1
|
|
||||||
t2.Square(&t1) // 2^21 - 2
|
|
||||||
for i := 1; i < 20; i++ { // 2^40 - 2^20
|
|
||||||
t2.Square(&t2)
|
|
||||||
}
|
|
||||||
t1.Multiply(&t2, &t1) // 2^40 - 1
|
|
||||||
t1.Square(&t1) // 2^41 - 2
|
|
||||||
for i := 1; i < 10; i++ { // 2^50 - 2^10
|
|
||||||
t1.Square(&t1)
|
|
||||||
}
|
|
||||||
t0.Multiply(&t1, &t0) // 2^50 - 1
|
|
||||||
t1.Square(&t0) // 2^51 - 2
|
|
||||||
for i := 1; i < 50; i++ { // 2^100 - 2^50
|
|
||||||
t1.Square(&t1)
|
|
||||||
}
|
|
||||||
t1.Multiply(&t1, &t0) // 2^100 - 1
|
|
||||||
t2.Square(&t1) // 2^101 - 2
|
|
||||||
for i := 1; i < 100; i++ { // 2^200 - 2^100
|
|
||||||
t2.Square(&t2)
|
|
||||||
}
|
|
||||||
t1.Multiply(&t2, &t1) // 2^200 - 1
|
|
||||||
t1.Square(&t1) // 2^201 - 2
|
|
||||||
for i := 1; i < 50; i++ { // 2^250 - 2^50
|
|
||||||
t1.Square(&t1)
|
|
||||||
}
|
|
||||||
t0.Multiply(&t1, &t0) // 2^250 - 1
|
|
||||||
t0.Square(&t0) // 2^251 - 2
|
|
||||||
t0.Square(&t0) // 2^252 - 4
|
|
||||||
return v.Multiply(&t0, x) // 2^252 - 3 -> x^(2^252-3)
|
|
||||||
}
|
|
||||||
|
|
||||||
// sqrtM1 is 2^((p-1)/4), which squared is equal to -1 by Euler's Criterion.
|
|
||||||
var sqrtM1 = &Element{1718705420411056, 234908883556509,
|
|
||||||
2233514472574048, 2117202627021982, 765476049583133}
|
|
||||||
|
|
||||||
// SqrtRatio sets r to the non-negative square root of the ratio of u and v.
|
|
||||||
//
|
|
||||||
// If u/v is square, SqrtRatio returns r and 1. If u/v is not square, SqrtRatio
|
|
||||||
// sets r according to Section 4.3 of draft-irtf-cfrg-ristretto255-decaf448-00,
|
|
||||||
// and returns r and 0.
|
|
||||||
func (r *Element) SqrtRatio(u, v *Element) (rr *Element, wasSquare int) {
|
|
||||||
var a, b Element
|
|
||||||
|
|
||||||
// r = (u * v3) * (u * v7)^((p-5)/8)
|
|
||||||
v2 := a.Square(v)
|
|
||||||
uv3 := b.Multiply(u, b.Multiply(v2, v))
|
|
||||||
uv7 := a.Multiply(uv3, a.Square(v2))
|
|
||||||
r.Multiply(uv3, r.Pow22523(uv7))
|
|
||||||
|
|
||||||
check := a.Multiply(v, a.Square(r)) // check = v * r^2
|
|
||||||
|
|
||||||
uNeg := b.Negate(u)
|
|
||||||
correctSignSqrt := check.Equal(u)
|
|
||||||
flippedSignSqrt := check.Equal(uNeg)
|
|
||||||
flippedSignSqrtI := check.Equal(uNeg.Multiply(uNeg, sqrtM1))
|
|
||||||
|
|
||||||
rPrime := b.Multiply(r, sqrtM1) // r_prime = SQRT_M1 * r
|
|
||||||
// r = CT_SELECT(r_prime IF flipped_sign_sqrt | flipped_sign_sqrt_i ELSE r)
|
|
||||||
r.Select(rPrime, r, flippedSignSqrt|flippedSignSqrtI)
|
|
||||||
|
|
||||||
r.Absolute(r) // Choose the nonnegative square root.
|
|
||||||
return r, correctSignSqrt | flippedSignSqrt
|
|
||||||
}
|
|
15
vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go
generated
vendored
15
vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
|
|
||||||
|
|
||||||
//go:build amd64 && gc && !purego
|
|
||||||
|
|
||||||
package field
|
|
||||||
|
|
||||||
// feMul sets out = a * b. It works like feMulGeneric.
|
|
||||||
//
|
|
||||||
//go:noescape
|
|
||||||
func feMul(out *Element, a *Element, b *Element)
|
|
||||||
|
|
||||||
// feSquare sets out = a * a. It works like feSquareGeneric.
|
|
||||||
//
|
|
||||||
//go:noescape
|
|
||||||
func feSquare(out *Element, a *Element)
|
|
378
vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s
generated
vendored
378
vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s
generated
vendored
@ -1,378 +0,0 @@
|
|||||||
// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
|
|
||||||
|
|
||||||
//go:build amd64 && gc && !purego
|
|
||||||
|
|
||||||
#include "textflag.h"
|
|
||||||
|
|
||||||
// func feMul(out *Element, a *Element, b *Element)
|
|
||||||
TEXT ·feMul(SB), NOSPLIT, $0-24
|
|
||||||
MOVQ a+8(FP), CX
|
|
||||||
MOVQ b+16(FP), BX
|
|
||||||
|
|
||||||
// r0 = a0×b0
|
|
||||||
MOVQ (CX), AX
|
|
||||||
MULQ (BX)
|
|
||||||
MOVQ AX, DI
|
|
||||||
MOVQ DX, SI
|
|
||||||
|
|
||||||
// r0 += 19×a1×b4
|
|
||||||
MOVQ 8(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 32(BX)
|
|
||||||
ADDQ AX, DI
|
|
||||||
ADCQ DX, SI
|
|
||||||
|
|
||||||
// r0 += 19×a2×b3
|
|
||||||
MOVQ 16(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 24(BX)
|
|
||||||
ADDQ AX, DI
|
|
||||||
ADCQ DX, SI
|
|
||||||
|
|
||||||
// r0 += 19×a3×b2
|
|
||||||
MOVQ 24(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 16(BX)
|
|
||||||
ADDQ AX, DI
|
|
||||||
ADCQ DX, SI
|
|
||||||
|
|
||||||
// r0 += 19×a4×b1
|
|
||||||
MOVQ 32(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 8(BX)
|
|
||||||
ADDQ AX, DI
|
|
||||||
ADCQ DX, SI
|
|
||||||
|
|
||||||
// r1 = a0×b1
|
|
||||||
MOVQ (CX), AX
|
|
||||||
MULQ 8(BX)
|
|
||||||
MOVQ AX, R9
|
|
||||||
MOVQ DX, R8
|
|
||||||
|
|
||||||
// r1 += a1×b0
|
|
||||||
MOVQ 8(CX), AX
|
|
||||||
MULQ (BX)
|
|
||||||
ADDQ AX, R9
|
|
||||||
ADCQ DX, R8
|
|
||||||
|
|
||||||
// r1 += 19×a2×b4
|
|
||||||
MOVQ 16(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 32(BX)
|
|
||||||
ADDQ AX, R9
|
|
||||||
ADCQ DX, R8
|
|
||||||
|
|
||||||
// r1 += 19×a3×b3
|
|
||||||
MOVQ 24(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 24(BX)
|
|
||||||
ADDQ AX, R9
|
|
||||||
ADCQ DX, R8
|
|
||||||
|
|
||||||
// r1 += 19×a4×b2
|
|
||||||
MOVQ 32(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 16(BX)
|
|
||||||
ADDQ AX, R9
|
|
||||||
ADCQ DX, R8
|
|
||||||
|
|
||||||
// r2 = a0×b2
|
|
||||||
MOVQ (CX), AX
|
|
||||||
MULQ 16(BX)
|
|
||||||
MOVQ AX, R11
|
|
||||||
MOVQ DX, R10
|
|
||||||
|
|
||||||
// r2 += a1×b1
|
|
||||||
MOVQ 8(CX), AX
|
|
||||||
MULQ 8(BX)
|
|
||||||
ADDQ AX, R11
|
|
||||||
ADCQ DX, R10
|
|
||||||
|
|
||||||
// r2 += a2×b0
|
|
||||||
MOVQ 16(CX), AX
|
|
||||||
MULQ (BX)
|
|
||||||
ADDQ AX, R11
|
|
||||||
ADCQ DX, R10
|
|
||||||
|
|
||||||
// r2 += 19×a3×b4
|
|
||||||
MOVQ 24(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 32(BX)
|
|
||||||
ADDQ AX, R11
|
|
||||||
ADCQ DX, R10
|
|
||||||
|
|
||||||
// r2 += 19×a4×b3
|
|
||||||
MOVQ 32(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 24(BX)
|
|
||||||
ADDQ AX, R11
|
|
||||||
ADCQ DX, R10
|
|
||||||
|
|
||||||
// r3 = a0×b3
|
|
||||||
MOVQ (CX), AX
|
|
||||||
MULQ 24(BX)
|
|
||||||
MOVQ AX, R13
|
|
||||||
MOVQ DX, R12
|
|
||||||
|
|
||||||
// r3 += a1×b2
|
|
||||||
MOVQ 8(CX), AX
|
|
||||||
MULQ 16(BX)
|
|
||||||
ADDQ AX, R13
|
|
||||||
ADCQ DX, R12
|
|
||||||
|
|
||||||
// r3 += a2×b1
|
|
||||||
MOVQ 16(CX), AX
|
|
||||||
MULQ 8(BX)
|
|
||||||
ADDQ AX, R13
|
|
||||||
ADCQ DX, R12
|
|
||||||
|
|
||||||
// r3 += a3×b0
|
|
||||||
MOVQ 24(CX), AX
|
|
||||||
MULQ (BX)
|
|
||||||
ADDQ AX, R13
|
|
||||||
ADCQ DX, R12
|
|
||||||
|
|
||||||
// r3 += 19×a4×b4
|
|
||||||
MOVQ 32(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 32(BX)
|
|
||||||
ADDQ AX, R13
|
|
||||||
ADCQ DX, R12
|
|
||||||
|
|
||||||
// r4 = a0×b4
|
|
||||||
MOVQ (CX), AX
|
|
||||||
MULQ 32(BX)
|
|
||||||
MOVQ AX, R15
|
|
||||||
MOVQ DX, R14
|
|
||||||
|
|
||||||
// r4 += a1×b3
|
|
||||||
MOVQ 8(CX), AX
|
|
||||||
MULQ 24(BX)
|
|
||||||
ADDQ AX, R15
|
|
||||||
ADCQ DX, R14
|
|
||||||
|
|
||||||
// r4 += a2×b2
|
|
||||||
MOVQ 16(CX), AX
|
|
||||||
MULQ 16(BX)
|
|
||||||
ADDQ AX, R15
|
|
||||||
ADCQ DX, R14
|
|
||||||
|
|
||||||
// r4 += a3×b1
|
|
||||||
MOVQ 24(CX), AX
|
|
||||||
MULQ 8(BX)
|
|
||||||
ADDQ AX, R15
|
|
||||||
ADCQ DX, R14
|
|
||||||
|
|
||||||
// r4 += a4×b0
|
|
||||||
MOVQ 32(CX), AX
|
|
||||||
MULQ (BX)
|
|
||||||
ADDQ AX, R15
|
|
||||||
ADCQ DX, R14
|
|
||||||
|
|
||||||
// First reduction chain
|
|
||||||
MOVQ $0x0007ffffffffffff, AX
|
|
||||||
SHLQ $0x0d, DI, SI
|
|
||||||
SHLQ $0x0d, R9, R8
|
|
||||||
SHLQ $0x0d, R11, R10
|
|
||||||
SHLQ $0x0d, R13, R12
|
|
||||||
SHLQ $0x0d, R15, R14
|
|
||||||
ANDQ AX, DI
|
|
||||||
IMUL3Q $0x13, R14, R14
|
|
||||||
ADDQ R14, DI
|
|
||||||
ANDQ AX, R9
|
|
||||||
ADDQ SI, R9
|
|
||||||
ANDQ AX, R11
|
|
||||||
ADDQ R8, R11
|
|
||||||
ANDQ AX, R13
|
|
||||||
ADDQ R10, R13
|
|
||||||
ANDQ AX, R15
|
|
||||||
ADDQ R12, R15
|
|
||||||
|
|
||||||
// Second reduction chain (carryPropagate)
|
|
||||||
MOVQ DI, SI
|
|
||||||
SHRQ $0x33, SI
|
|
||||||
MOVQ R9, R8
|
|
||||||
SHRQ $0x33, R8
|
|
||||||
MOVQ R11, R10
|
|
||||||
SHRQ $0x33, R10
|
|
||||||
MOVQ R13, R12
|
|
||||||
SHRQ $0x33, R12
|
|
||||||
MOVQ R15, R14
|
|
||||||
SHRQ $0x33, R14
|
|
||||||
ANDQ AX, DI
|
|
||||||
IMUL3Q $0x13, R14, R14
|
|
||||||
ADDQ R14, DI
|
|
||||||
ANDQ AX, R9
|
|
||||||
ADDQ SI, R9
|
|
||||||
ANDQ AX, R11
|
|
||||||
ADDQ R8, R11
|
|
||||||
ANDQ AX, R13
|
|
||||||
ADDQ R10, R13
|
|
||||||
ANDQ AX, R15
|
|
||||||
ADDQ R12, R15
|
|
||||||
|
|
||||||
// Store output
|
|
||||||
MOVQ out+0(FP), AX
|
|
||||||
MOVQ DI, (AX)
|
|
||||||
MOVQ R9, 8(AX)
|
|
||||||
MOVQ R11, 16(AX)
|
|
||||||
MOVQ R13, 24(AX)
|
|
||||||
MOVQ R15, 32(AX)
|
|
||||||
RET
|
|
||||||
|
|
||||||
// func feSquare(out *Element, a *Element)
|
|
||||||
TEXT ·feSquare(SB), NOSPLIT, $0-16
|
|
||||||
MOVQ a+8(FP), CX
|
|
||||||
|
|
||||||
// r0 = l0×l0
|
|
||||||
MOVQ (CX), AX
|
|
||||||
MULQ (CX)
|
|
||||||
MOVQ AX, SI
|
|
||||||
MOVQ DX, BX
|
|
||||||
|
|
||||||
// r0 += 38×l1×l4
|
|
||||||
MOVQ 8(CX), AX
|
|
||||||
IMUL3Q $0x26, AX, AX
|
|
||||||
MULQ 32(CX)
|
|
||||||
ADDQ AX, SI
|
|
||||||
ADCQ DX, BX
|
|
||||||
|
|
||||||
// r0 += 38×l2×l3
|
|
||||||
MOVQ 16(CX), AX
|
|
||||||
IMUL3Q $0x26, AX, AX
|
|
||||||
MULQ 24(CX)
|
|
||||||
ADDQ AX, SI
|
|
||||||
ADCQ DX, BX
|
|
||||||
|
|
||||||
// r1 = 2×l0×l1
|
|
||||||
MOVQ (CX), AX
|
|
||||||
SHLQ $0x01, AX
|
|
||||||
MULQ 8(CX)
|
|
||||||
MOVQ AX, R8
|
|
||||||
MOVQ DX, DI
|
|
||||||
|
|
||||||
// r1 += 38×l2×l4
|
|
||||||
MOVQ 16(CX), AX
|
|
||||||
IMUL3Q $0x26, AX, AX
|
|
||||||
MULQ 32(CX)
|
|
||||||
ADDQ AX, R8
|
|
||||||
ADCQ DX, DI
|
|
||||||
|
|
||||||
// r1 += 19×l3×l3
|
|
||||||
MOVQ 24(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 24(CX)
|
|
||||||
ADDQ AX, R8
|
|
||||||
ADCQ DX, DI
|
|
||||||
|
|
||||||
// r2 = 2×l0×l2
|
|
||||||
MOVQ (CX), AX
|
|
||||||
SHLQ $0x01, AX
|
|
||||||
MULQ 16(CX)
|
|
||||||
MOVQ AX, R10
|
|
||||||
MOVQ DX, R9
|
|
||||||
|
|
||||||
// r2 += l1×l1
|
|
||||||
MOVQ 8(CX), AX
|
|
||||||
MULQ 8(CX)
|
|
||||||
ADDQ AX, R10
|
|
||||||
ADCQ DX, R9
|
|
||||||
|
|
||||||
// r2 += 38×l3×l4
|
|
||||||
MOVQ 24(CX), AX
|
|
||||||
IMUL3Q $0x26, AX, AX
|
|
||||||
MULQ 32(CX)
|
|
||||||
ADDQ AX, R10
|
|
||||||
ADCQ DX, R9
|
|
||||||
|
|
||||||
// r3 = 2×l0×l3
|
|
||||||
MOVQ (CX), AX
|
|
||||||
SHLQ $0x01, AX
|
|
||||||
MULQ 24(CX)
|
|
||||||
MOVQ AX, R12
|
|
||||||
MOVQ DX, R11
|
|
||||||
|
|
||||||
// r3 += 2×l1×l2
|
|
||||||
MOVQ 8(CX), AX
|
|
||||||
IMUL3Q $0x02, AX, AX
|
|
||||||
MULQ 16(CX)
|
|
||||||
ADDQ AX, R12
|
|
||||||
ADCQ DX, R11
|
|
||||||
|
|
||||||
// r3 += 19×l4×l4
|
|
||||||
MOVQ 32(CX), AX
|
|
||||||
IMUL3Q $0x13, AX, AX
|
|
||||||
MULQ 32(CX)
|
|
||||||
ADDQ AX, R12
|
|
||||||
ADCQ DX, R11
|
|
||||||
|
|
||||||
// r4 = 2×l0×l4
|
|
||||||
MOVQ (CX), AX
|
|
||||||
SHLQ $0x01, AX
|
|
||||||
MULQ 32(CX)
|
|
||||||
MOVQ AX, R14
|
|
||||||
MOVQ DX, R13
|
|
||||||
|
|
||||||
// r4 += 2×l1×l3
|
|
||||||
MOVQ 8(CX), AX
|
|
||||||
IMUL3Q $0x02, AX, AX
|
|
||||||
MULQ 24(CX)
|
|
||||||
ADDQ AX, R14
|
|
||||||
ADCQ DX, R13
|
|
||||||
|
|
||||||
// r4 += l2×l2
|
|
||||||
MOVQ 16(CX), AX
|
|
||||||
MULQ 16(CX)
|
|
||||||
ADDQ AX, R14
|
|
||||||
ADCQ DX, R13
|
|
||||||
|
|
||||||
// First reduction chain
|
|
||||||
MOVQ $0x0007ffffffffffff, AX
|
|
||||||
SHLQ $0x0d, SI, BX
|
|
||||||
SHLQ $0x0d, R8, DI
|
|
||||||
SHLQ $0x0d, R10, R9
|
|
||||||
SHLQ $0x0d, R12, R11
|
|
||||||
SHLQ $0x0d, R14, R13
|
|
||||||
ANDQ AX, SI
|
|
||||||
IMUL3Q $0x13, R13, R13
|
|
||||||
ADDQ R13, SI
|
|
||||||
ANDQ AX, R8
|
|
||||||
ADDQ BX, R8
|
|
||||||
ANDQ AX, R10
|
|
||||||
ADDQ DI, R10
|
|
||||||
ANDQ AX, R12
|
|
||||||
ADDQ R9, R12
|
|
||||||
ANDQ AX, R14
|
|
||||||
ADDQ R11, R14
|
|
||||||
|
|
||||||
// Second reduction chain (carryPropagate)
|
|
||||||
MOVQ SI, BX
|
|
||||||
SHRQ $0x33, BX
|
|
||||||
MOVQ R8, DI
|
|
||||||
SHRQ $0x33, DI
|
|
||||||
MOVQ R10, R9
|
|
||||||
SHRQ $0x33, R9
|
|
||||||
MOVQ R12, R11
|
|
||||||
SHRQ $0x33, R11
|
|
||||||
MOVQ R14, R13
|
|
||||||
SHRQ $0x33, R13
|
|
||||||
ANDQ AX, SI
|
|
||||||
IMUL3Q $0x13, R13, R13
|
|
||||||
ADDQ R13, SI
|
|
||||||
ANDQ AX, R8
|
|
||||||
ADDQ BX, R8
|
|
||||||
ANDQ AX, R10
|
|
||||||
ADDQ DI, R10
|
|
||||||
ANDQ AX, R12
|
|
||||||
ADDQ R9, R12
|
|
||||||
ANDQ AX, R14
|
|
||||||
ADDQ R11, R14
|
|
||||||
|
|
||||||
// Store output
|
|
||||||
MOVQ out+0(FP), AX
|
|
||||||
MOVQ SI, (AX)
|
|
||||||
MOVQ R8, 8(AX)
|
|
||||||
MOVQ R10, 16(AX)
|
|
||||||
MOVQ R12, 24(AX)
|
|
||||||
MOVQ R14, 32(AX)
|
|
||||||
RET
|
|
11
vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go
generated
vendored
11
vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go
generated
vendored
@ -1,11 +0,0 @@
|
|||||||
// Copyright (c) 2019 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 !amd64 || !gc || purego
|
|
||||||
|
|
||||||
package field
|
|
||||||
|
|
||||||
func feMul(v, x, y *Element) { feMulGeneric(v, x, y) }
|
|
||||||
|
|
||||||
func feSquare(v, x *Element) { feSquareGeneric(v, x) }
|
|
15
vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go
generated
vendored
15
vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
// Copyright (c) 2020 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 arm64 && gc && !purego
|
|
||||||
|
|
||||||
package field
|
|
||||||
|
|
||||||
//go:noescape
|
|
||||||
func carryPropagate(v *Element)
|
|
||||||
|
|
||||||
func (v *Element) carryPropagate() *Element {
|
|
||||||
carryPropagate(v)
|
|
||||||
return v
|
|
||||||
}
|
|
42
vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s
generated
vendored
42
vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s
generated
vendored
@ -1,42 +0,0 @@
|
|||||||
// Copyright (c) 2020 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 arm64 && gc && !purego
|
|
||||||
|
|
||||||
#include "textflag.h"
|
|
||||||
|
|
||||||
// carryPropagate works exactly like carryPropagateGeneric and uses the
|
|
||||||
// same AND, ADD, and LSR+MADD instructions emitted by the compiler, but
|
|
||||||
// avoids loading R0-R4 twice and uses LDP and STP.
|
|
||||||
//
|
|
||||||
// See https://golang.org/issues/43145 for the main compiler issue.
|
|
||||||
//
|
|
||||||
// func carryPropagate(v *Element)
|
|
||||||
TEXT ·carryPropagate(SB),NOFRAME|NOSPLIT,$0-8
|
|
||||||
MOVD v+0(FP), R20
|
|
||||||
|
|
||||||
LDP 0(R20), (R0, R1)
|
|
||||||
LDP 16(R20), (R2, R3)
|
|
||||||
MOVD 32(R20), R4
|
|
||||||
|
|
||||||
AND $0x7ffffffffffff, R0, R10
|
|
||||||
AND $0x7ffffffffffff, R1, R11
|
|
||||||
AND $0x7ffffffffffff, R2, R12
|
|
||||||
AND $0x7ffffffffffff, R3, R13
|
|
||||||
AND $0x7ffffffffffff, R4, R14
|
|
||||||
|
|
||||||
ADD R0>>51, R11, R11
|
|
||||||
ADD R1>>51, R12, R12
|
|
||||||
ADD R2>>51, R13, R13
|
|
||||||
ADD R3>>51, R14, R14
|
|
||||||
// R4>>51 * 19 + R10 -> R10
|
|
||||||
LSR $51, R4, R21
|
|
||||||
MOVD $19, R22
|
|
||||||
MADD R22, R10, R21, R10
|
|
||||||
|
|
||||||
STP (R10, R11), 0(R20)
|
|
||||||
STP (R12, R13), 16(R20)
|
|
||||||
MOVD R14, 32(R20)
|
|
||||||
|
|
||||||
RET
|
|
11
vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go
generated
vendored
11
vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go
generated
vendored
@ -1,11 +0,0 @@
|
|||||||
// Copyright (c) 2021 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 !arm64 || !gc || purego
|
|
||||||
|
|
||||||
package field
|
|
||||||
|
|
||||||
func (v *Element) carryPropagate() *Element {
|
|
||||||
return v.carryPropagateGeneric()
|
|
||||||
}
|
|
264
vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go
generated
vendored
264
vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go
generated
vendored
@ -1,264 +0,0 @@
|
|||||||
// Copyright (c) 2017 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 field
|
|
||||||
|
|
||||||
import "math/bits"
|
|
||||||
|
|
||||||
// uint128 holds a 128-bit number as two 64-bit limbs, for use with the
|
|
||||||
// bits.Mul64 and bits.Add64 intrinsics.
|
|
||||||
type uint128 struct {
|
|
||||||
lo, hi uint64
|
|
||||||
}
|
|
||||||
|
|
||||||
// mul64 returns a * b.
|
|
||||||
func mul64(a, b uint64) uint128 {
|
|
||||||
hi, lo := bits.Mul64(a, b)
|
|
||||||
return uint128{lo, hi}
|
|
||||||
}
|
|
||||||
|
|
||||||
// addMul64 returns v + a * b.
|
|
||||||
func addMul64(v uint128, a, b uint64) uint128 {
|
|
||||||
hi, lo := bits.Mul64(a, b)
|
|
||||||
lo, c := bits.Add64(lo, v.lo, 0)
|
|
||||||
hi, _ = bits.Add64(hi, v.hi, c)
|
|
||||||
return uint128{lo, hi}
|
|
||||||
}
|
|
||||||
|
|
||||||
// shiftRightBy51 returns a >> 51. a is assumed to be at most 115 bits.
|
|
||||||
func shiftRightBy51(a uint128) uint64 {
|
|
||||||
return (a.hi << (64 - 51)) | (a.lo >> 51)
|
|
||||||
}
|
|
||||||
|
|
||||||
func feMulGeneric(v, a, b *Element) {
|
|
||||||
a0 := a.l0
|
|
||||||
a1 := a.l1
|
|
||||||
a2 := a.l2
|
|
||||||
a3 := a.l3
|
|
||||||
a4 := a.l4
|
|
||||||
|
|
||||||
b0 := b.l0
|
|
||||||
b1 := b.l1
|
|
||||||
b2 := b.l2
|
|
||||||
b3 := b.l3
|
|
||||||
b4 := b.l4
|
|
||||||
|
|
||||||
// Limb multiplication works like pen-and-paper columnar multiplication, but
|
|
||||||
// with 51-bit limbs instead of digits.
|
|
||||||
//
|
|
||||||
// a4 a3 a2 a1 a0 x
|
|
||||||
// b4 b3 b2 b1 b0 =
|
|
||||||
// ------------------------
|
|
||||||
// a4b0 a3b0 a2b0 a1b0 a0b0 +
|
|
||||||
// a4b1 a3b1 a2b1 a1b1 a0b1 +
|
|
||||||
// a4b2 a3b2 a2b2 a1b2 a0b2 +
|
|
||||||
// a4b3 a3b3 a2b3 a1b3 a0b3 +
|
|
||||||
// a4b4 a3b4 a2b4 a1b4 a0b4 =
|
|
||||||
// ----------------------------------------------
|
|
||||||
// r8 r7 r6 r5 r4 r3 r2 r1 r0
|
|
||||||
//
|
|
||||||
// We can then use the reduction identity (a * 2²⁵⁵ + b = a * 19 + b) to
|
|
||||||
// reduce the limbs that would overflow 255 bits. r5 * 2²⁵⁵ becomes 19 * r5,
|
|
||||||
// r6 * 2³⁰⁶ becomes 19 * r6 * 2⁵¹, etc.
|
|
||||||
//
|
|
||||||
// Reduction can be carried out simultaneously to multiplication. For
|
|
||||||
// example, we do not compute r5: whenever the result of a multiplication
|
|
||||||
// belongs to r5, like a1b4, we multiply it by 19 and add the result to r0.
|
|
||||||
//
|
|
||||||
// a4b0 a3b0 a2b0 a1b0 a0b0 +
|
|
||||||
// a3b1 a2b1 a1b1 a0b1 19×a4b1 +
|
|
||||||
// a2b2 a1b2 a0b2 19×a4b2 19×a3b2 +
|
|
||||||
// a1b3 a0b3 19×a4b3 19×a3b3 19×a2b3 +
|
|
||||||
// a0b4 19×a4b4 19×a3b4 19×a2b4 19×a1b4 =
|
|
||||||
// --------------------------------------
|
|
||||||
// r4 r3 r2 r1 r0
|
|
||||||
//
|
|
||||||
// Finally we add up the columns into wide, overlapping limbs.
|
|
||||||
|
|
||||||
a1_19 := a1 * 19
|
|
||||||
a2_19 := a2 * 19
|
|
||||||
a3_19 := a3 * 19
|
|
||||||
a4_19 := a4 * 19
|
|
||||||
|
|
||||||
// r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1)
|
|
||||||
r0 := mul64(a0, b0)
|
|
||||||
r0 = addMul64(r0, a1_19, b4)
|
|
||||||
r0 = addMul64(r0, a2_19, b3)
|
|
||||||
r0 = addMul64(r0, a3_19, b2)
|
|
||||||
r0 = addMul64(r0, a4_19, b1)
|
|
||||||
|
|
||||||
// r1 = a0×b1 + a1×b0 + 19×(a2×b4 + a3×b3 + a4×b2)
|
|
||||||
r1 := mul64(a0, b1)
|
|
||||||
r1 = addMul64(r1, a1, b0)
|
|
||||||
r1 = addMul64(r1, a2_19, b4)
|
|
||||||
r1 = addMul64(r1, a3_19, b3)
|
|
||||||
r1 = addMul64(r1, a4_19, b2)
|
|
||||||
|
|
||||||
// r2 = a0×b2 + a1×b1 + a2×b0 + 19×(a3×b4 + a4×b3)
|
|
||||||
r2 := mul64(a0, b2)
|
|
||||||
r2 = addMul64(r2, a1, b1)
|
|
||||||
r2 = addMul64(r2, a2, b0)
|
|
||||||
r2 = addMul64(r2, a3_19, b4)
|
|
||||||
r2 = addMul64(r2, a4_19, b3)
|
|
||||||
|
|
||||||
// r3 = a0×b3 + a1×b2 + a2×b1 + a3×b0 + 19×a4×b4
|
|
||||||
r3 := mul64(a0, b3)
|
|
||||||
r3 = addMul64(r3, a1, b2)
|
|
||||||
r3 = addMul64(r3, a2, b1)
|
|
||||||
r3 = addMul64(r3, a3, b0)
|
|
||||||
r3 = addMul64(r3, a4_19, b4)
|
|
||||||
|
|
||||||
// r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0
|
|
||||||
r4 := mul64(a0, b4)
|
|
||||||
r4 = addMul64(r4, a1, b3)
|
|
||||||
r4 = addMul64(r4, a2, b2)
|
|
||||||
r4 = addMul64(r4, a3, b1)
|
|
||||||
r4 = addMul64(r4, a4, b0)
|
|
||||||
|
|
||||||
// After the multiplication, we need to reduce (carry) the five coefficients
|
|
||||||
// to obtain a result with limbs that are at most slightly larger than 2⁵¹,
|
|
||||||
// to respect the Element invariant.
|
|
||||||
//
|
|
||||||
// Overall, the reduction works the same as carryPropagate, except with
|
|
||||||
// wider inputs: we take the carry for each coefficient by shifting it right
|
|
||||||
// by 51, and add it to the limb above it. The top carry is multiplied by 19
|
|
||||||
// according to the reduction identity and added to the lowest limb.
|
|
||||||
//
|
|
||||||
// The largest coefficient (r0) will be at most 111 bits, which guarantees
|
|
||||||
// that all carries are at most 111 - 51 = 60 bits, which fits in a uint64.
|
|
||||||
//
|
|
||||||
// r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1)
|
|
||||||
// r0 < 2⁵²×2⁵² + 19×(2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵²)
|
|
||||||
// r0 < (1 + 19 × 4) × 2⁵² × 2⁵²
|
|
||||||
// r0 < 2⁷ × 2⁵² × 2⁵²
|
|
||||||
// r0 < 2¹¹¹
|
|
||||||
//
|
|
||||||
// Moreover, the top coefficient (r4) is at most 107 bits, so c4 is at most
|
|
||||||
// 56 bits, and c4 * 19 is at most 61 bits, which again fits in a uint64 and
|
|
||||||
// allows us to easily apply the reduction identity.
|
|
||||||
//
|
|
||||||
// r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0
|
|
||||||
// r4 < 5 × 2⁵² × 2⁵²
|
|
||||||
// r4 < 2¹⁰⁷
|
|
||||||
//
|
|
||||||
|
|
||||||
c0 := shiftRightBy51(r0)
|
|
||||||
c1 := shiftRightBy51(r1)
|
|
||||||
c2 := shiftRightBy51(r2)
|
|
||||||
c3 := shiftRightBy51(r3)
|
|
||||||
c4 := shiftRightBy51(r4)
|
|
||||||
|
|
||||||
rr0 := r0.lo&maskLow51Bits + c4*19
|
|
||||||
rr1 := r1.lo&maskLow51Bits + c0
|
|
||||||
rr2 := r2.lo&maskLow51Bits + c1
|
|
||||||
rr3 := r3.lo&maskLow51Bits + c2
|
|
||||||
rr4 := r4.lo&maskLow51Bits + c3
|
|
||||||
|
|
||||||
// Now all coefficients fit into 64-bit registers but are still too large to
|
|
||||||
// be passed around as a Element. We therefore do one last carry chain,
|
|
||||||
// where the carries will be small enough to fit in the wiggle room above 2⁵¹.
|
|
||||||
*v = Element{rr0, rr1, rr2, rr3, rr4}
|
|
||||||
v.carryPropagate()
|
|
||||||
}
|
|
||||||
|
|
||||||
func feSquareGeneric(v, a *Element) {
|
|
||||||
l0 := a.l0
|
|
||||||
l1 := a.l1
|
|
||||||
l2 := a.l2
|
|
||||||
l3 := a.l3
|
|
||||||
l4 := a.l4
|
|
||||||
|
|
||||||
// Squaring works precisely like multiplication above, but thanks to its
|
|
||||||
// symmetry we get to group a few terms together.
|
|
||||||
//
|
|
||||||
// l4 l3 l2 l1 l0 x
|
|
||||||
// l4 l3 l2 l1 l0 =
|
|
||||||
// ------------------------
|
|
||||||
// l4l0 l3l0 l2l0 l1l0 l0l0 +
|
|
||||||
// l4l1 l3l1 l2l1 l1l1 l0l1 +
|
|
||||||
// l4l2 l3l2 l2l2 l1l2 l0l2 +
|
|
||||||
// l4l3 l3l3 l2l3 l1l3 l0l3 +
|
|
||||||
// l4l4 l3l4 l2l4 l1l4 l0l4 =
|
|
||||||
// ----------------------------------------------
|
|
||||||
// r8 r7 r6 r5 r4 r3 r2 r1 r0
|
|
||||||
//
|
|
||||||
// l4l0 l3l0 l2l0 l1l0 l0l0 +
|
|
||||||
// l3l1 l2l1 l1l1 l0l1 19×l4l1 +
|
|
||||||
// l2l2 l1l2 l0l2 19×l4l2 19×l3l2 +
|
|
||||||
// l1l3 l0l3 19×l4l3 19×l3l3 19×l2l3 +
|
|
||||||
// l0l4 19×l4l4 19×l3l4 19×l2l4 19×l1l4 =
|
|
||||||
// --------------------------------------
|
|
||||||
// r4 r3 r2 r1 r0
|
|
||||||
//
|
|
||||||
// With precomputed 2×, 19×, and 2×19× terms, we can compute each limb with
|
|
||||||
// only three Mul64 and four Add64, instead of five and eight.
|
|
||||||
|
|
||||||
l0_2 := l0 * 2
|
|
||||||
l1_2 := l1 * 2
|
|
||||||
|
|
||||||
l1_38 := l1 * 38
|
|
||||||
l2_38 := l2 * 38
|
|
||||||
l3_38 := l3 * 38
|
|
||||||
|
|
||||||
l3_19 := l3 * 19
|
|
||||||
l4_19 := l4 * 19
|
|
||||||
|
|
||||||
// r0 = l0×l0 + 19×(l1×l4 + l2×l3 + l3×l2 + l4×l1) = l0×l0 + 19×2×(l1×l4 + l2×l3)
|
|
||||||
r0 := mul64(l0, l0)
|
|
||||||
r0 = addMul64(r0, l1_38, l4)
|
|
||||||
r0 = addMul64(r0, l2_38, l3)
|
|
||||||
|
|
||||||
// r1 = l0×l1 + l1×l0 + 19×(l2×l4 + l3×l3 + l4×l2) = 2×l0×l1 + 19×2×l2×l4 + 19×l3×l3
|
|
||||||
r1 := mul64(l0_2, l1)
|
|
||||||
r1 = addMul64(r1, l2_38, l4)
|
|
||||||
r1 = addMul64(r1, l3_19, l3)
|
|
||||||
|
|
||||||
// r2 = l0×l2 + l1×l1 + l2×l0 + 19×(l3×l4 + l4×l3) = 2×l0×l2 + l1×l1 + 19×2×l3×l4
|
|
||||||
r2 := mul64(l0_2, l2)
|
|
||||||
r2 = addMul64(r2, l1, l1)
|
|
||||||
r2 = addMul64(r2, l3_38, l4)
|
|
||||||
|
|
||||||
// r3 = l0×l3 + l1×l2 + l2×l1 + l3×l0 + 19×l4×l4 = 2×l0×l3 + 2×l1×l2 + 19×l4×l4
|
|
||||||
r3 := mul64(l0_2, l3)
|
|
||||||
r3 = addMul64(r3, l1_2, l2)
|
|
||||||
r3 = addMul64(r3, l4_19, l4)
|
|
||||||
|
|
||||||
// r4 = l0×l4 + l1×l3 + l2×l2 + l3×l1 + l4×l0 = 2×l0×l4 + 2×l1×l3 + l2×l2
|
|
||||||
r4 := mul64(l0_2, l4)
|
|
||||||
r4 = addMul64(r4, l1_2, l3)
|
|
||||||
r4 = addMul64(r4, l2, l2)
|
|
||||||
|
|
||||||
c0 := shiftRightBy51(r0)
|
|
||||||
c1 := shiftRightBy51(r1)
|
|
||||||
c2 := shiftRightBy51(r2)
|
|
||||||
c3 := shiftRightBy51(r3)
|
|
||||||
c4 := shiftRightBy51(r4)
|
|
||||||
|
|
||||||
rr0 := r0.lo&maskLow51Bits + c4*19
|
|
||||||
rr1 := r1.lo&maskLow51Bits + c0
|
|
||||||
rr2 := r2.lo&maskLow51Bits + c1
|
|
||||||
rr3 := r3.lo&maskLow51Bits + c2
|
|
||||||
rr4 := r4.lo&maskLow51Bits + c3
|
|
||||||
|
|
||||||
*v = Element{rr0, rr1, rr2, rr3, rr4}
|
|
||||||
v.carryPropagate()
|
|
||||||
}
|
|
||||||
|
|
||||||
// carryPropagateGeneric brings the limbs below 52 bits by applying the reduction
|
|
||||||
// identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry. TODO inline
|
|
||||||
func (v *Element) carryPropagateGeneric() *Element {
|
|
||||||
c0 := v.l0 >> 51
|
|
||||||
c1 := v.l1 >> 51
|
|
||||||
c2 := v.l2 >> 51
|
|
||||||
c3 := v.l3 >> 51
|
|
||||||
c4 := v.l4 >> 51
|
|
||||||
|
|
||||||
v.l0 = v.l0&maskLow51Bits + c4*19
|
|
||||||
v.l1 = v.l1&maskLow51Bits + c0
|
|
||||||
v.l2 = v.l2&maskLow51Bits + c1
|
|
||||||
v.l3 = v.l3&maskLow51Bits + c2
|
|
||||||
v.l4 = v.l4&maskLow51Bits + c3
|
|
||||||
|
|
||||||
return v
|
|
||||||
}
|
|
1
vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint
generated
vendored
1
vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint
generated
vendored
@ -1 +0,0 @@
|
|||||||
b0c49ae9f59d233526f8934262c5bbbe14d4358d
|
|
19
vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh
generated
vendored
19
vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh
generated
vendored
@ -1,19 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
cd "$(git rev-parse --show-toplevel)"
|
|
||||||
|
|
||||||
STD_PATH=src/crypto/ed25519/internal/edwards25519/field
|
|
||||||
LOCAL_PATH=curve25519/internal/field
|
|
||||||
LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint)
|
|
||||||
|
|
||||||
git fetch https://go.googlesource.com/go master
|
|
||||||
|
|
||||||
if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then
|
|
||||||
echo "No changes."
|
|
||||||
else
|
|
||||||
NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint)
|
|
||||||
echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..."
|
|
||||||
git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \
|
|
||||||
git apply -3 --directory=$LOCAL_PATH
|
|
||||||
fi
|
|
2
vendor/golang.org/x/crypto/hkdf/hkdf.go
generated
vendored
2
vendor/golang.org/x/crypto/hkdf/hkdf.go
generated
vendored
@ -8,7 +8,7 @@
|
|||||||
// HKDF is a cryptographic key derivation function (KDF) with the goal of
|
// HKDF is a cryptographic key derivation function (KDF) with the goal of
|
||||||
// expanding limited input keying material into one or more cryptographically
|
// expanding limited input keying material into one or more cryptographically
|
||||||
// strong secret keys.
|
// strong secret keys.
|
||||||
package hkdf // import "golang.org/x/crypto/hkdf"
|
package hkdf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/hmac"
|
"crypto/hmac"
|
||||||
|
2
vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go
generated
vendored
2
vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build (!amd64 && !ppc64le && !s390x) || !gc || purego
|
//go:build (!amd64 && !ppc64le && !ppc64 && !s390x) || !gc || purego
|
||||||
|
|
||||||
package poly1305
|
package poly1305
|
||||||
|
|
||||||
|
131
vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s
generated
vendored
131
vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s
generated
vendored
@ -1,108 +1,93 @@
|
|||||||
// Copyright 2012 The Go Authors. All rights reserved.
|
// Code generated by command: go run sum_amd64_asm.go -out ../sum_amd64.s -pkg poly1305. DO NOT EDIT.
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build gc && !purego
|
//go:build gc && !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
// func update(state *macState, msg []byte)
|
||||||
|
|
||||||
#define POLY1305_ADD(msg, h0, h1, h2) \
|
|
||||||
ADDQ 0(msg), h0; \
|
|
||||||
ADCQ 8(msg), h1; \
|
|
||||||
ADCQ $1, h2; \
|
|
||||||
LEAQ 16(msg), msg
|
|
||||||
|
|
||||||
#define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3) \
|
|
||||||
MOVQ r0, AX; \
|
|
||||||
MULQ h0; \
|
|
||||||
MOVQ AX, t0; \
|
|
||||||
MOVQ DX, t1; \
|
|
||||||
MOVQ r0, AX; \
|
|
||||||
MULQ h1; \
|
|
||||||
ADDQ AX, t1; \
|
|
||||||
ADCQ $0, DX; \
|
|
||||||
MOVQ r0, t2; \
|
|
||||||
IMULQ h2, t2; \
|
|
||||||
ADDQ DX, t2; \
|
|
||||||
\
|
|
||||||
MOVQ r1, AX; \
|
|
||||||
MULQ h0; \
|
|
||||||
ADDQ AX, t1; \
|
|
||||||
ADCQ $0, DX; \
|
|
||||||
MOVQ DX, h0; \
|
|
||||||
MOVQ r1, t3; \
|
|
||||||
IMULQ h2, t3; \
|
|
||||||
MOVQ r1, AX; \
|
|
||||||
MULQ h1; \
|
|
||||||
ADDQ AX, t2; \
|
|
||||||
ADCQ DX, t3; \
|
|
||||||
ADDQ h0, t2; \
|
|
||||||
ADCQ $0, t3; \
|
|
||||||
\
|
|
||||||
MOVQ t0, h0; \
|
|
||||||
MOVQ t1, h1; \
|
|
||||||
MOVQ t2, h2; \
|
|
||||||
ANDQ $3, h2; \
|
|
||||||
MOVQ t2, t0; \
|
|
||||||
ANDQ $0xFFFFFFFFFFFFFFFC, t0; \
|
|
||||||
ADDQ t0, h0; \
|
|
||||||
ADCQ t3, h1; \
|
|
||||||
ADCQ $0, h2; \
|
|
||||||
SHRQ $2, t3, t2; \
|
|
||||||
SHRQ $2, t3; \
|
|
||||||
ADDQ t2, h0; \
|
|
||||||
ADCQ t3, h1; \
|
|
||||||
ADCQ $0, h2
|
|
||||||
|
|
||||||
// func update(state *[7]uint64, msg []byte)
|
|
||||||
TEXT ·update(SB), $0-32
|
TEXT ·update(SB), $0-32
|
||||||
MOVQ state+0(FP), DI
|
MOVQ state+0(FP), DI
|
||||||
MOVQ msg_base+8(FP), SI
|
MOVQ msg_base+8(FP), SI
|
||||||
MOVQ msg_len+16(FP), R15
|
MOVQ msg_len+16(FP), R15
|
||||||
|
MOVQ (DI), R8
|
||||||
MOVQ 0(DI), R8 // h0
|
MOVQ 8(DI), R9
|
||||||
MOVQ 8(DI), R9 // h1
|
MOVQ 16(DI), R10
|
||||||
MOVQ 16(DI), R10 // h2
|
MOVQ 24(DI), R11
|
||||||
MOVQ 24(DI), R11 // r0
|
MOVQ 32(DI), R12
|
||||||
MOVQ 32(DI), R12 // r1
|
CMPQ R15, $0x10
|
||||||
|
|
||||||
CMPQ R15, $16
|
|
||||||
JB bytes_between_0_and_15
|
JB bytes_between_0_and_15
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
POLY1305_ADD(SI, R8, R9, R10)
|
ADDQ (SI), R8
|
||||||
|
ADCQ 8(SI), R9
|
||||||
|
ADCQ $0x01, R10
|
||||||
|
LEAQ 16(SI), SI
|
||||||
|
|
||||||
multiply:
|
multiply:
|
||||||
POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14)
|
MOVQ R11, AX
|
||||||
SUBQ $16, R15
|
MULQ R8
|
||||||
CMPQ R15, $16
|
MOVQ AX, BX
|
||||||
|
MOVQ DX, CX
|
||||||
|
MOVQ R11, AX
|
||||||
|
MULQ R9
|
||||||
|
ADDQ AX, CX
|
||||||
|
ADCQ $0x00, DX
|
||||||
|
MOVQ R11, R13
|
||||||
|
IMULQ R10, R13
|
||||||
|
ADDQ DX, R13
|
||||||
|
MOVQ R12, AX
|
||||||
|
MULQ R8
|
||||||
|
ADDQ AX, CX
|
||||||
|
ADCQ $0x00, DX
|
||||||
|
MOVQ DX, R8
|
||||||
|
MOVQ R12, R14
|
||||||
|
IMULQ R10, R14
|
||||||
|
MOVQ R12, AX
|
||||||
|
MULQ R9
|
||||||
|
ADDQ AX, R13
|
||||||
|
ADCQ DX, R14
|
||||||
|
ADDQ R8, R13
|
||||||
|
ADCQ $0x00, R14
|
||||||
|
MOVQ BX, R8
|
||||||
|
MOVQ CX, R9
|
||||||
|
MOVQ R13, R10
|
||||||
|
ANDQ $0x03, R10
|
||||||
|
MOVQ R13, BX
|
||||||
|
ANDQ $-4, BX
|
||||||
|
ADDQ BX, R8
|
||||||
|
ADCQ R14, R9
|
||||||
|
ADCQ $0x00, R10
|
||||||
|
SHRQ $0x02, R14, R13
|
||||||
|
SHRQ $0x02, R14
|
||||||
|
ADDQ R13, R8
|
||||||
|
ADCQ R14, R9
|
||||||
|
ADCQ $0x00, R10
|
||||||
|
SUBQ $0x10, R15
|
||||||
|
CMPQ R15, $0x10
|
||||||
JAE loop
|
JAE loop
|
||||||
|
|
||||||
bytes_between_0_and_15:
|
bytes_between_0_and_15:
|
||||||
TESTQ R15, R15
|
TESTQ R15, R15
|
||||||
JZ done
|
JZ done
|
||||||
MOVQ $1, BX
|
MOVQ $0x00000001, BX
|
||||||
XORQ CX, CX
|
XORQ CX, CX
|
||||||
XORQ R13, R13
|
XORQ R13, R13
|
||||||
ADDQ R15, SI
|
ADDQ R15, SI
|
||||||
|
|
||||||
flush_buffer:
|
flush_buffer:
|
||||||
SHLQ $8, BX, CX
|
SHLQ $0x08, BX, CX
|
||||||
SHLQ $8, BX
|
SHLQ $0x08, BX
|
||||||
MOVB -1(SI), R13
|
MOVB -1(SI), R13
|
||||||
XORQ R13, BX
|
XORQ R13, BX
|
||||||
DECQ SI
|
DECQ SI
|
||||||
DECQ R15
|
DECQ R15
|
||||||
JNZ flush_buffer
|
JNZ flush_buffer
|
||||||
|
|
||||||
ADDQ BX, R8
|
ADDQ BX, R8
|
||||||
ADCQ CX, R9
|
ADCQ CX, R9
|
||||||
ADCQ $0, R10
|
ADCQ $0x00, R10
|
||||||
MOVQ $16, R15
|
MOVQ $0x00000010, R15
|
||||||
JMP multiply
|
JMP multiply
|
||||||
|
|
||||||
done:
|
done:
|
||||||
MOVQ R8, 0(DI)
|
MOVQ R8, (DI)
|
||||||
MOVQ R9, 8(DI)
|
MOVQ R9, 8(DI)
|
||||||
MOVQ R10, 16(DI)
|
MOVQ R10, 16(DI)
|
||||||
RET
|
RET
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build gc && !purego
|
//go:build gc && !purego && (ppc64 || ppc64le)
|
||||||
|
|
||||||
package poly1305
|
package poly1305
|
||||||
|
|
@ -2,15 +2,25 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build gc && !purego
|
//go:build gc && !purego && (ppc64 || ppc64le)
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
// This was ported from the amd64 implementation.
|
// This was ported from the amd64 implementation.
|
||||||
|
|
||||||
|
#ifdef GOARCH_ppc64le
|
||||||
|
#define LE_MOVD MOVD
|
||||||
|
#define LE_MOVWZ MOVWZ
|
||||||
|
#define LE_MOVHZ MOVHZ
|
||||||
|
#else
|
||||||
|
#define LE_MOVD MOVDBR
|
||||||
|
#define LE_MOVWZ MOVWBR
|
||||||
|
#define LE_MOVHZ MOVHBR
|
||||||
|
#endif
|
||||||
|
|
||||||
#define POLY1305_ADD(msg, h0, h1, h2, t0, t1, t2) \
|
#define POLY1305_ADD(msg, h0, h1, h2, t0, t1, t2) \
|
||||||
MOVD (msg), t0; \
|
LE_MOVD (msg)( R0), t0; \
|
||||||
MOVD 8(msg), t1; \
|
LE_MOVD (msg)(R24), t1; \
|
||||||
MOVD $1, t2; \
|
MOVD $1, t2; \
|
||||||
ADDC t0, h0, h0; \
|
ADDC t0, h0, h0; \
|
||||||
ADDE t1, h1, h1; \
|
ADDE t1, h1, h1; \
|
||||||
@ -50,10 +60,6 @@
|
|||||||
ADDE t3, h1, h1; \
|
ADDE t3, h1, h1; \
|
||||||
ADDZE h2
|
ADDZE h2
|
||||||
|
|
||||||
DATA ·poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF
|
|
||||||
DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC
|
|
||||||
GLOBL ·poly1305Mask<>(SB), RODATA, $16
|
|
||||||
|
|
||||||
// func update(state *[7]uint64, msg []byte)
|
// func update(state *[7]uint64, msg []byte)
|
||||||
TEXT ·update(SB), $0-32
|
TEXT ·update(SB), $0-32
|
||||||
MOVD state+0(FP), R3
|
MOVD state+0(FP), R3
|
||||||
@ -66,6 +72,8 @@ TEXT ·update(SB), $0-32
|
|||||||
MOVD 24(R3), R11 // r0
|
MOVD 24(R3), R11 // r0
|
||||||
MOVD 32(R3), R12 // r1
|
MOVD 32(R3), R12 // r1
|
||||||
|
|
||||||
|
MOVD $8, R24
|
||||||
|
|
||||||
CMP R5, $16
|
CMP R5, $16
|
||||||
BLT bytes_between_0_and_15
|
BLT bytes_between_0_and_15
|
||||||
|
|
||||||
@ -94,7 +102,7 @@ flush_buffer:
|
|||||||
|
|
||||||
// Greater than 8 -- load the rightmost remaining bytes in msg
|
// Greater than 8 -- load the rightmost remaining bytes in msg
|
||||||
// and put into R17 (h1)
|
// and put into R17 (h1)
|
||||||
MOVD (R4)(R21), R17
|
LE_MOVD (R4)(R21), R17
|
||||||
MOVD $16, R22
|
MOVD $16, R22
|
||||||
|
|
||||||
// Find the offset to those bytes
|
// Find the offset to those bytes
|
||||||
@ -118,7 +126,7 @@ just1:
|
|||||||
BLT less8
|
BLT less8
|
||||||
|
|
||||||
// Exactly 8
|
// Exactly 8
|
||||||
MOVD (R4), R16
|
LE_MOVD (R4), R16
|
||||||
|
|
||||||
CMP R17, $0
|
CMP R17, $0
|
||||||
|
|
||||||
@ -133,7 +141,7 @@ less8:
|
|||||||
MOVD $0, R22 // shift count
|
MOVD $0, R22 // shift count
|
||||||
CMP R5, $4
|
CMP R5, $4
|
||||||
BLT less4
|
BLT less4
|
||||||
MOVWZ (R4), R16
|
LE_MOVWZ (R4), R16
|
||||||
ADD $4, R4
|
ADD $4, R4
|
||||||
ADD $-4, R5
|
ADD $-4, R5
|
||||||
MOVD $32, R22
|
MOVD $32, R22
|
||||||
@ -141,7 +149,7 @@ less8:
|
|||||||
less4:
|
less4:
|
||||||
CMP R5, $2
|
CMP R5, $2
|
||||||
BLT less2
|
BLT less2
|
||||||
MOVHZ (R4), R21
|
LE_MOVHZ (R4), R21
|
||||||
SLD R22, R21, R21
|
SLD R22, R21, R21
|
||||||
OR R16, R21, R16
|
OR R16, R21, R16
|
||||||
ADD $16, R22
|
ADD $16, R22
|
2
vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
generated
vendored
2
vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
generated
vendored
@ -32,7 +32,7 @@ chunk size.
|
|||||||
|
|
||||||
This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html.
|
This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html.
|
||||||
*/
|
*/
|
||||||
package secretbox // import "golang.org/x/crypto/nacl/secretbox"
|
package secretbox
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"golang.org/x/crypto/internal/alias"
|
"golang.org/x/crypto/internal/alias"
|
||||||
|
2
vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
generated
vendored
2
vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
generated
vendored
@ -16,7 +16,7 @@ Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To
|
|||||||
choose, you can pass the `New` functions from the different SHA packages to
|
choose, you can pass the `New` functions from the different SHA packages to
|
||||||
pbkdf2.Key.
|
pbkdf2.Key.
|
||||||
*/
|
*/
|
||||||
package pbkdf2 // import "golang.org/x/crypto/pbkdf2"
|
package pbkdf2
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/hmac"
|
"crypto/hmac"
|
||||||
|
2
vendor/golang.org/x/crypto/pkcs12/crypto.go
generated
vendored
2
vendor/golang.org/x/crypto/pkcs12/crypto.go
generated
vendored
@ -26,7 +26,7 @@ type pbeCipher interface {
|
|||||||
create(key []byte) (cipher.Block, error)
|
create(key []byte) (cipher.Block, error)
|
||||||
// deriveKey returns a key derived from the given password and salt.
|
// deriveKey returns a key derived from the given password and salt.
|
||||||
deriveKey(salt, password []byte, iterations int) []byte
|
deriveKey(salt, password []byte, iterations int) []byte
|
||||||
// deriveKey returns an IV derived from the given password and salt.
|
// deriveIV returns an IV derived from the given password and salt.
|
||||||
deriveIV(salt, password []byte, iterations int) []byte
|
deriveIV(salt, password []byte, iterations int) []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go
generated
vendored
2
vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go
generated
vendored
@ -3,7 +3,7 @@
|
|||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// Package salsa provides low-level access to functions in the Salsa family.
|
// Package salsa provides low-level access to functions in the Salsa family.
|
||||||
package salsa // import "golang.org/x/crypto/salsa20/salsa"
|
package salsa
|
||||||
|
|
||||||
import "math/bits"
|
import "math/bits"
|
||||||
|
|
||||||
|
474
vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s
generated
vendored
474
vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s
generated
vendored
@ -1,36 +1,29 @@
|
|||||||
// Copyright 2012 The Go Authors. All rights reserved.
|
// Code generated by command: go run salsa20_amd64_asm.go -out ../salsa20_amd64.s -pkg salsa. DO NOT EDIT.
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
//go:build amd64 && !purego && gc
|
//go:build amd64 && !purego && gc
|
||||||
|
|
||||||
// This code was translated into a form compatible with 6a from the public
|
// func salsa2020XORKeyStream(out *byte, in *byte, n uint64, nonce *byte, key *byte)
|
||||||
// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
|
// Requires: SSE2
|
||||||
|
TEXT ·salsa2020XORKeyStream(SB), $456-40
|
||||||
// func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
|
|
||||||
// This needs up to 64 bytes at 360(R12); hence the non-obvious frame size.
|
// This needs up to 64 bytes at 360(R12); hence the non-obvious frame size.
|
||||||
TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|
||||||
MOVQ out+0(FP), DI
|
MOVQ out+0(FP), DI
|
||||||
MOVQ in+8(FP), SI
|
MOVQ in+8(FP), SI
|
||||||
MOVQ n+16(FP), DX
|
MOVQ n+16(FP), DX
|
||||||
MOVQ nonce+24(FP), CX
|
MOVQ nonce+24(FP), CX
|
||||||
MOVQ key+32(FP), R8
|
MOVQ key+32(FP), R8
|
||||||
|
|
||||||
MOVQ SP, R12
|
MOVQ SP, R12
|
||||||
ADDQ $31, R12
|
ADDQ $0x1f, R12
|
||||||
ANDQ $~31, R12
|
ANDQ $-32, R12
|
||||||
|
|
||||||
MOVQ DX, R9
|
MOVQ DX, R9
|
||||||
MOVQ CX, DX
|
MOVQ CX, DX
|
||||||
MOVQ R8, R10
|
MOVQ R8, R10
|
||||||
CMPQ R9,$0
|
CMPQ R9, $0x00
|
||||||
JBE DONE
|
JBE DONE
|
||||||
START:
|
|
||||||
MOVL 20(R10), CX
|
MOVL 20(R10), CX
|
||||||
MOVL 0(R10),R8
|
MOVL (R10), R8
|
||||||
MOVL 0(DX),AX
|
MOVL (DX), AX
|
||||||
MOVL 16(R10), R11
|
MOVL 16(R10), R11
|
||||||
MOVL CX,0(R12)
|
MOVL CX, (R12)
|
||||||
MOVL R8, 4(R12)
|
MOVL R8, 4(R12)
|
||||||
MOVL AX, 8(R12)
|
MOVL AX, 8(R12)
|
||||||
MOVL R11, 12(R12)
|
MOVL R11, 12(R12)
|
||||||
@ -50,77 +43,78 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVL CX, 36(R12)
|
MOVL CX, 36(R12)
|
||||||
MOVL R8, 40(R12)
|
MOVL R8, 40(R12)
|
||||||
MOVL AX, 44(R12)
|
MOVL AX, 44(R12)
|
||||||
MOVQ $1634760805,DX
|
MOVQ $0x61707865, DX
|
||||||
MOVQ $857760878,CX
|
MOVQ $0x3320646e, CX
|
||||||
MOVQ $2036477234,R8
|
MOVQ $0x79622d32, R8
|
||||||
MOVQ $1797285236,AX
|
MOVQ $0x6b206574, AX
|
||||||
MOVL DX, 48(R12)
|
MOVL DX, 48(R12)
|
||||||
MOVL CX, 52(R12)
|
MOVL CX, 52(R12)
|
||||||
MOVL R8, 56(R12)
|
MOVL R8, 56(R12)
|
||||||
MOVL AX, 60(R12)
|
MOVL AX, 60(R12)
|
||||||
CMPQ R9,$256
|
CMPQ R9, $0x00000100
|
||||||
JB BYTESBETWEEN1AND255
|
JB BYTESBETWEEN1AND255
|
||||||
MOVOA 48(R12), X0
|
MOVOA 48(R12), X0
|
||||||
PSHUFL $0X55,X0,X1
|
PSHUFL $0x55, X0, X1
|
||||||
PSHUFL $0XAA,X0,X2
|
PSHUFL $0xaa, X0, X2
|
||||||
PSHUFL $0XFF,X0,X3
|
PSHUFL $0xff, X0, X3
|
||||||
PSHUFL $0X00,X0,X0
|
PSHUFL $0x00, X0, X0
|
||||||
MOVOA X1, 64(R12)
|
MOVOA X1, 64(R12)
|
||||||
MOVOA X2, 80(R12)
|
MOVOA X2, 80(R12)
|
||||||
MOVOA X3, 96(R12)
|
MOVOA X3, 96(R12)
|
||||||
MOVOA X0, 112(R12)
|
MOVOA X0, 112(R12)
|
||||||
MOVOA 0(R12),X0
|
MOVOA (R12), X0
|
||||||
PSHUFL $0XAA,X0,X1
|
PSHUFL $0xaa, X0, X1
|
||||||
PSHUFL $0XFF,X0,X2
|
PSHUFL $0xff, X0, X2
|
||||||
PSHUFL $0X00,X0,X3
|
PSHUFL $0x00, X0, X3
|
||||||
PSHUFL $0X55,X0,X0
|
PSHUFL $0x55, X0, X0
|
||||||
MOVOA X1, 128(R12)
|
MOVOA X1, 128(R12)
|
||||||
MOVOA X2, 144(R12)
|
MOVOA X2, 144(R12)
|
||||||
MOVOA X3, 160(R12)
|
MOVOA X3, 160(R12)
|
||||||
MOVOA X0, 176(R12)
|
MOVOA X0, 176(R12)
|
||||||
MOVOA 16(R12), X0
|
MOVOA 16(R12), X0
|
||||||
PSHUFL $0XFF,X0,X1
|
PSHUFL $0xff, X0, X1
|
||||||
PSHUFL $0X55,X0,X2
|
PSHUFL $0x55, X0, X2
|
||||||
PSHUFL $0XAA,X0,X0
|
PSHUFL $0xaa, X0, X0
|
||||||
MOVOA X1, 192(R12)
|
MOVOA X1, 192(R12)
|
||||||
MOVOA X2, 208(R12)
|
MOVOA X2, 208(R12)
|
||||||
MOVOA X0, 224(R12)
|
MOVOA X0, 224(R12)
|
||||||
MOVOA 32(R12), X0
|
MOVOA 32(R12), X0
|
||||||
PSHUFL $0X00,X0,X1
|
PSHUFL $0x00, X0, X1
|
||||||
PSHUFL $0XAA,X0,X2
|
PSHUFL $0xaa, X0, X2
|
||||||
PSHUFL $0XFF,X0,X0
|
PSHUFL $0xff, X0, X0
|
||||||
MOVOA X1, 240(R12)
|
MOVOA X1, 240(R12)
|
||||||
MOVOA X2, 256(R12)
|
MOVOA X2, 256(R12)
|
||||||
MOVOA X0, 272(R12)
|
MOVOA X0, 272(R12)
|
||||||
|
|
||||||
BYTESATLEAST256:
|
BYTESATLEAST256:
|
||||||
MOVL 16(R12), DX
|
MOVL 16(R12), DX
|
||||||
MOVL 36(R12), CX
|
MOVL 36(R12), CX
|
||||||
MOVL DX, 288(R12)
|
MOVL DX, 288(R12)
|
||||||
MOVL CX, 304(R12)
|
MOVL CX, 304(R12)
|
||||||
SHLQ $32,CX
|
SHLQ $0x20, CX
|
||||||
ADDQ CX, DX
|
ADDQ CX, DX
|
||||||
ADDQ $1,DX
|
ADDQ $0x01, DX
|
||||||
MOVQ DX, CX
|
MOVQ DX, CX
|
||||||
SHRQ $32,CX
|
SHRQ $0x20, CX
|
||||||
MOVL DX, 292(R12)
|
MOVL DX, 292(R12)
|
||||||
MOVL CX, 308(R12)
|
MOVL CX, 308(R12)
|
||||||
ADDQ $1,DX
|
ADDQ $0x01, DX
|
||||||
MOVQ DX, CX
|
MOVQ DX, CX
|
||||||
SHRQ $32,CX
|
SHRQ $0x20, CX
|
||||||
MOVL DX, 296(R12)
|
MOVL DX, 296(R12)
|
||||||
MOVL CX, 312(R12)
|
MOVL CX, 312(R12)
|
||||||
ADDQ $1,DX
|
ADDQ $0x01, DX
|
||||||
MOVQ DX, CX
|
MOVQ DX, CX
|
||||||
SHRQ $32,CX
|
SHRQ $0x20, CX
|
||||||
MOVL DX, 300(R12)
|
MOVL DX, 300(R12)
|
||||||
MOVL CX, 316(R12)
|
MOVL CX, 316(R12)
|
||||||
ADDQ $1,DX
|
ADDQ $0x01, DX
|
||||||
MOVQ DX, CX
|
MOVQ DX, CX
|
||||||
SHRQ $32,CX
|
SHRQ $0x20, CX
|
||||||
MOVL DX, 16(R12)
|
MOVL DX, 16(R12)
|
||||||
MOVL CX, 36(R12)
|
MOVL CX, 36(R12)
|
||||||
MOVQ R9, 352(R12)
|
MOVQ R9, 352(R12)
|
||||||
MOVQ $20,DX
|
MOVQ $0x00000014, DX
|
||||||
MOVOA 64(R12), X0
|
MOVOA 64(R12), X0
|
||||||
MOVOA 80(R12), X1
|
MOVOA 80(R12), X1
|
||||||
MOVOA 96(R12), X2
|
MOVOA 96(R12), X2
|
||||||
@ -137,248 +131,249 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVOA 160(R12), X13
|
MOVOA 160(R12), X13
|
||||||
MOVOA 240(R12), X14
|
MOVOA 240(R12), X14
|
||||||
MOVOA 288(R12), X15
|
MOVOA 288(R12), X15
|
||||||
|
|
||||||
MAINLOOP1:
|
MAINLOOP1:
|
||||||
MOVOA X1, 320(R12)
|
MOVOA X1, 320(R12)
|
||||||
MOVOA X2, 336(R12)
|
MOVOA X2, 336(R12)
|
||||||
MOVOA X13, X1
|
MOVOA X13, X1
|
||||||
PADDL X12, X1
|
PADDL X12, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $7,X1
|
PSLLL $0x07, X1
|
||||||
PXOR X1, X14
|
PXOR X1, X14
|
||||||
PSRLL $25,X2
|
PSRLL $0x19, X2
|
||||||
PXOR X2, X14
|
PXOR X2, X14
|
||||||
MOVOA X7, X1
|
MOVOA X7, X1
|
||||||
PADDL X0, X1
|
PADDL X0, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $7,X1
|
PSLLL $0x07, X1
|
||||||
PXOR X1, X11
|
PXOR X1, X11
|
||||||
PSRLL $25,X2
|
PSRLL $0x19, X2
|
||||||
PXOR X2, X11
|
PXOR X2, X11
|
||||||
MOVOA X12, X1
|
MOVOA X12, X1
|
||||||
PADDL X14, X1
|
PADDL X14, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $9,X1
|
PSLLL $0x09, X1
|
||||||
PXOR X1, X15
|
PXOR X1, X15
|
||||||
PSRLL $23,X2
|
PSRLL $0x17, X2
|
||||||
PXOR X2, X15
|
PXOR X2, X15
|
||||||
MOVOA X0, X1
|
MOVOA X0, X1
|
||||||
PADDL X11, X1
|
PADDL X11, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $9,X1
|
PSLLL $0x09, X1
|
||||||
PXOR X1, X9
|
PXOR X1, X9
|
||||||
PSRLL $23,X2
|
PSRLL $0x17, X2
|
||||||
PXOR X2, X9
|
PXOR X2, X9
|
||||||
MOVOA X14, X1
|
MOVOA X14, X1
|
||||||
PADDL X15, X1
|
PADDL X15, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $13,X1
|
PSLLL $0x0d, X1
|
||||||
PXOR X1, X13
|
PXOR X1, X13
|
||||||
PSRLL $19,X2
|
PSRLL $0x13, X2
|
||||||
PXOR X2, X13
|
PXOR X2, X13
|
||||||
MOVOA X11, X1
|
MOVOA X11, X1
|
||||||
PADDL X9, X1
|
PADDL X9, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $13,X1
|
PSLLL $0x0d, X1
|
||||||
PXOR X1, X7
|
PXOR X1, X7
|
||||||
PSRLL $19,X2
|
PSRLL $0x13, X2
|
||||||
PXOR X2, X7
|
PXOR X2, X7
|
||||||
MOVOA X15, X1
|
MOVOA X15, X1
|
||||||
PADDL X13, X1
|
PADDL X13, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $18,X1
|
PSLLL $0x12, X1
|
||||||
PXOR X1, X12
|
PXOR X1, X12
|
||||||
PSRLL $14,X2
|
PSRLL $0x0e, X2
|
||||||
PXOR X2, X12
|
PXOR X2, X12
|
||||||
MOVOA 320(R12), X1
|
MOVOA 320(R12), X1
|
||||||
MOVOA X12, 320(R12)
|
MOVOA X12, 320(R12)
|
||||||
MOVOA X9, X2
|
MOVOA X9, X2
|
||||||
PADDL X7, X2
|
PADDL X7, X2
|
||||||
MOVOA X2, X12
|
MOVOA X2, X12
|
||||||
PSLLL $18,X2
|
PSLLL $0x12, X2
|
||||||
PXOR X2, X0
|
PXOR X2, X0
|
||||||
PSRLL $14,X12
|
PSRLL $0x0e, X12
|
||||||
PXOR X12, X0
|
PXOR X12, X0
|
||||||
MOVOA X5, X2
|
MOVOA X5, X2
|
||||||
PADDL X1, X2
|
PADDL X1, X2
|
||||||
MOVOA X2, X12
|
MOVOA X2, X12
|
||||||
PSLLL $7,X2
|
PSLLL $0x07, X2
|
||||||
PXOR X2, X3
|
PXOR X2, X3
|
||||||
PSRLL $25,X12
|
PSRLL $0x19, X12
|
||||||
PXOR X12, X3
|
PXOR X12, X3
|
||||||
MOVOA 336(R12), X2
|
MOVOA 336(R12), X2
|
||||||
MOVOA X0, 336(R12)
|
MOVOA X0, 336(R12)
|
||||||
MOVOA X6, X0
|
MOVOA X6, X0
|
||||||
PADDL X2, X0
|
PADDL X2, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $7,X0
|
PSLLL $0x07, X0
|
||||||
PXOR X0, X4
|
PXOR X0, X4
|
||||||
PSRLL $25,X12
|
PSRLL $0x19, X12
|
||||||
PXOR X12, X4
|
PXOR X12, X4
|
||||||
MOVOA X1, X0
|
MOVOA X1, X0
|
||||||
PADDL X3, X0
|
PADDL X3, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $9,X0
|
PSLLL $0x09, X0
|
||||||
PXOR X0, X10
|
PXOR X0, X10
|
||||||
PSRLL $23,X12
|
PSRLL $0x17, X12
|
||||||
PXOR X12, X10
|
PXOR X12, X10
|
||||||
MOVOA X2, X0
|
MOVOA X2, X0
|
||||||
PADDL X4, X0
|
PADDL X4, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $9,X0
|
PSLLL $0x09, X0
|
||||||
PXOR X0, X8
|
PXOR X0, X8
|
||||||
PSRLL $23,X12
|
PSRLL $0x17, X12
|
||||||
PXOR X12, X8
|
PXOR X12, X8
|
||||||
MOVOA X3, X0
|
MOVOA X3, X0
|
||||||
PADDL X10, X0
|
PADDL X10, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $13,X0
|
PSLLL $0x0d, X0
|
||||||
PXOR X0, X5
|
PXOR X0, X5
|
||||||
PSRLL $19,X12
|
PSRLL $0x13, X12
|
||||||
PXOR X12, X5
|
PXOR X12, X5
|
||||||
MOVOA X4, X0
|
MOVOA X4, X0
|
||||||
PADDL X8, X0
|
PADDL X8, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $13,X0
|
PSLLL $0x0d, X0
|
||||||
PXOR X0, X6
|
PXOR X0, X6
|
||||||
PSRLL $19,X12
|
PSRLL $0x13, X12
|
||||||
PXOR X12, X6
|
PXOR X12, X6
|
||||||
MOVOA X10, X0
|
MOVOA X10, X0
|
||||||
PADDL X5, X0
|
PADDL X5, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $18,X0
|
PSLLL $0x12, X0
|
||||||
PXOR X0, X1
|
PXOR X0, X1
|
||||||
PSRLL $14,X12
|
PSRLL $0x0e, X12
|
||||||
PXOR X12, X1
|
PXOR X12, X1
|
||||||
MOVOA 320(R12), X0
|
MOVOA 320(R12), X0
|
||||||
MOVOA X1, 320(R12)
|
MOVOA X1, 320(R12)
|
||||||
MOVOA X4, X1
|
MOVOA X4, X1
|
||||||
PADDL X0, X1
|
PADDL X0, X1
|
||||||
MOVOA X1, X12
|
MOVOA X1, X12
|
||||||
PSLLL $7,X1
|
PSLLL $0x07, X1
|
||||||
PXOR X1, X7
|
PXOR X1, X7
|
||||||
PSRLL $25,X12
|
PSRLL $0x19, X12
|
||||||
PXOR X12, X7
|
PXOR X12, X7
|
||||||
MOVOA X8, X1
|
MOVOA X8, X1
|
||||||
PADDL X6, X1
|
PADDL X6, X1
|
||||||
MOVOA X1, X12
|
MOVOA X1, X12
|
||||||
PSLLL $18,X1
|
PSLLL $0x12, X1
|
||||||
PXOR X1, X2
|
PXOR X1, X2
|
||||||
PSRLL $14,X12
|
PSRLL $0x0e, X12
|
||||||
PXOR X12, X2
|
PXOR X12, X2
|
||||||
MOVOA 336(R12), X12
|
MOVOA 336(R12), X12
|
||||||
MOVOA X2, 336(R12)
|
MOVOA X2, 336(R12)
|
||||||
MOVOA X14, X1
|
MOVOA X14, X1
|
||||||
PADDL X12, X1
|
PADDL X12, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $7,X1
|
PSLLL $0x07, X1
|
||||||
PXOR X1, X5
|
PXOR X1, X5
|
||||||
PSRLL $25,X2
|
PSRLL $0x19, X2
|
||||||
PXOR X2, X5
|
PXOR X2, X5
|
||||||
MOVOA X0, X1
|
MOVOA X0, X1
|
||||||
PADDL X7, X1
|
PADDL X7, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $9,X1
|
PSLLL $0x09, X1
|
||||||
PXOR X1, X10
|
PXOR X1, X10
|
||||||
PSRLL $23,X2
|
PSRLL $0x17, X2
|
||||||
PXOR X2, X10
|
PXOR X2, X10
|
||||||
MOVOA X12, X1
|
MOVOA X12, X1
|
||||||
PADDL X5, X1
|
PADDL X5, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $9,X1
|
PSLLL $0x09, X1
|
||||||
PXOR X1, X8
|
PXOR X1, X8
|
||||||
PSRLL $23,X2
|
PSRLL $0x17, X2
|
||||||
PXOR X2, X8
|
PXOR X2, X8
|
||||||
MOVOA X7, X1
|
MOVOA X7, X1
|
||||||
PADDL X10, X1
|
PADDL X10, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $13,X1
|
PSLLL $0x0d, X1
|
||||||
PXOR X1, X4
|
PXOR X1, X4
|
||||||
PSRLL $19,X2
|
PSRLL $0x13, X2
|
||||||
PXOR X2, X4
|
PXOR X2, X4
|
||||||
MOVOA X5, X1
|
MOVOA X5, X1
|
||||||
PADDL X8, X1
|
PADDL X8, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $13,X1
|
PSLLL $0x0d, X1
|
||||||
PXOR X1, X14
|
PXOR X1, X14
|
||||||
PSRLL $19,X2
|
PSRLL $0x13, X2
|
||||||
PXOR X2, X14
|
PXOR X2, X14
|
||||||
MOVOA X10, X1
|
MOVOA X10, X1
|
||||||
PADDL X4, X1
|
PADDL X4, X1
|
||||||
MOVOA X1, X2
|
MOVOA X1, X2
|
||||||
PSLLL $18,X1
|
PSLLL $0x12, X1
|
||||||
PXOR X1, X0
|
PXOR X1, X0
|
||||||
PSRLL $14,X2
|
PSRLL $0x0e, X2
|
||||||
PXOR X2, X0
|
PXOR X2, X0
|
||||||
MOVOA 320(R12), X1
|
MOVOA 320(R12), X1
|
||||||
MOVOA X0, 320(R12)
|
MOVOA X0, 320(R12)
|
||||||
MOVOA X8, X0
|
MOVOA X8, X0
|
||||||
PADDL X14, X0
|
PADDL X14, X0
|
||||||
MOVOA X0, X2
|
MOVOA X0, X2
|
||||||
PSLLL $18,X0
|
PSLLL $0x12, X0
|
||||||
PXOR X0, X12
|
PXOR X0, X12
|
||||||
PSRLL $14,X2
|
PSRLL $0x0e, X2
|
||||||
PXOR X2, X12
|
PXOR X2, X12
|
||||||
MOVOA X11, X0
|
MOVOA X11, X0
|
||||||
PADDL X1, X0
|
PADDL X1, X0
|
||||||
MOVOA X0, X2
|
MOVOA X0, X2
|
||||||
PSLLL $7,X0
|
PSLLL $0x07, X0
|
||||||
PXOR X0, X6
|
PXOR X0, X6
|
||||||
PSRLL $25,X2
|
PSRLL $0x19, X2
|
||||||
PXOR X2, X6
|
PXOR X2, X6
|
||||||
MOVOA 336(R12), X2
|
MOVOA 336(R12), X2
|
||||||
MOVOA X12, 336(R12)
|
MOVOA X12, 336(R12)
|
||||||
MOVOA X3, X0
|
MOVOA X3, X0
|
||||||
PADDL X2, X0
|
PADDL X2, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $7,X0
|
PSLLL $0x07, X0
|
||||||
PXOR X0, X13
|
PXOR X0, X13
|
||||||
PSRLL $25,X12
|
PSRLL $0x19, X12
|
||||||
PXOR X12, X13
|
PXOR X12, X13
|
||||||
MOVOA X1, X0
|
MOVOA X1, X0
|
||||||
PADDL X6, X0
|
PADDL X6, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $9,X0
|
PSLLL $0x09, X0
|
||||||
PXOR X0, X15
|
PXOR X0, X15
|
||||||
PSRLL $23,X12
|
PSRLL $0x17, X12
|
||||||
PXOR X12, X15
|
PXOR X12, X15
|
||||||
MOVOA X2, X0
|
MOVOA X2, X0
|
||||||
PADDL X13, X0
|
PADDL X13, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $9,X0
|
PSLLL $0x09, X0
|
||||||
PXOR X0, X9
|
PXOR X0, X9
|
||||||
PSRLL $23,X12
|
PSRLL $0x17, X12
|
||||||
PXOR X12, X9
|
PXOR X12, X9
|
||||||
MOVOA X6, X0
|
MOVOA X6, X0
|
||||||
PADDL X15, X0
|
PADDL X15, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $13,X0
|
PSLLL $0x0d, X0
|
||||||
PXOR X0, X11
|
PXOR X0, X11
|
||||||
PSRLL $19,X12
|
PSRLL $0x13, X12
|
||||||
PXOR X12, X11
|
PXOR X12, X11
|
||||||
MOVOA X13, X0
|
MOVOA X13, X0
|
||||||
PADDL X9, X0
|
PADDL X9, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $13,X0
|
PSLLL $0x0d, X0
|
||||||
PXOR X0, X3
|
PXOR X0, X3
|
||||||
PSRLL $19,X12
|
PSRLL $0x13, X12
|
||||||
PXOR X12, X3
|
PXOR X12, X3
|
||||||
MOVOA X15, X0
|
MOVOA X15, X0
|
||||||
PADDL X11, X0
|
PADDL X11, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $18,X0
|
PSLLL $0x12, X0
|
||||||
PXOR X0, X1
|
PXOR X0, X1
|
||||||
PSRLL $14,X12
|
PSRLL $0x0e, X12
|
||||||
PXOR X12, X1
|
PXOR X12, X1
|
||||||
MOVOA X9, X0
|
MOVOA X9, X0
|
||||||
PADDL X3, X0
|
PADDL X3, X0
|
||||||
MOVOA X0, X12
|
MOVOA X0, X12
|
||||||
PSLLL $18,X0
|
PSLLL $0x12, X0
|
||||||
PXOR X0, X2
|
PXOR X0, X2
|
||||||
PSRLL $14,X12
|
PSRLL $0x0e, X12
|
||||||
PXOR X12, X2
|
PXOR X12, X2
|
||||||
MOVOA 320(R12), X12
|
MOVOA 320(R12), X12
|
||||||
MOVOA 336(R12), X0
|
MOVOA 336(R12), X0
|
||||||
SUBQ $2,DX
|
SUBQ $0x02, DX
|
||||||
JA MAINLOOP1
|
JA MAINLOOP1
|
||||||
PADDL 112(R12), X12
|
PADDL 112(R12), X12
|
||||||
PADDL 176(R12), X7
|
PADDL 176(R12), X7
|
||||||
@ -388,15 +383,15 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X7, CX
|
MOVD X7, CX
|
||||||
MOVD X10, R8
|
MOVD X10, R8
|
||||||
MOVD X4, R9
|
MOVD X4, R9
|
||||||
PSHUFL $0X39,X12,X12
|
PSHUFL $0x39, X12, X12
|
||||||
PSHUFL $0X39,X7,X7
|
PSHUFL $0x39, X7, X7
|
||||||
PSHUFL $0X39,X10,X10
|
PSHUFL $0x39, X10, X10
|
||||||
PSHUFL $0X39,X4,X4
|
PSHUFL $0x39, X4, X4
|
||||||
XORL 0(SI),DX
|
XORL (SI), DX
|
||||||
XORL 4(SI), CX
|
XORL 4(SI), CX
|
||||||
XORL 8(SI), R8
|
XORL 8(SI), R8
|
||||||
XORL 12(SI), R9
|
XORL 12(SI), R9
|
||||||
MOVL DX,0(DI)
|
MOVL DX, (DI)
|
||||||
MOVL CX, 4(DI)
|
MOVL CX, 4(DI)
|
||||||
MOVL R8, 8(DI)
|
MOVL R8, 8(DI)
|
||||||
MOVL R9, 12(DI)
|
MOVL R9, 12(DI)
|
||||||
@ -404,10 +399,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X7, CX
|
MOVD X7, CX
|
||||||
MOVD X10, R8
|
MOVD X10, R8
|
||||||
MOVD X4, R9
|
MOVD X4, R9
|
||||||
PSHUFL $0X39,X12,X12
|
PSHUFL $0x39, X12, X12
|
||||||
PSHUFL $0X39,X7,X7
|
PSHUFL $0x39, X7, X7
|
||||||
PSHUFL $0X39,X10,X10
|
PSHUFL $0x39, X10, X10
|
||||||
PSHUFL $0X39,X4,X4
|
PSHUFL $0x39, X4, X4
|
||||||
XORL 64(SI), DX
|
XORL 64(SI), DX
|
||||||
XORL 68(SI), CX
|
XORL 68(SI), CX
|
||||||
XORL 72(SI), R8
|
XORL 72(SI), R8
|
||||||
@ -420,10 +415,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X7, CX
|
MOVD X7, CX
|
||||||
MOVD X10, R8
|
MOVD X10, R8
|
||||||
MOVD X4, R9
|
MOVD X4, R9
|
||||||
PSHUFL $0X39,X12,X12
|
PSHUFL $0x39, X12, X12
|
||||||
PSHUFL $0X39,X7,X7
|
PSHUFL $0x39, X7, X7
|
||||||
PSHUFL $0X39,X10,X10
|
PSHUFL $0x39, X10, X10
|
||||||
PSHUFL $0X39,X4,X4
|
PSHUFL $0x39, X4, X4
|
||||||
XORL 128(SI), DX
|
XORL 128(SI), DX
|
||||||
XORL 132(SI), CX
|
XORL 132(SI), CX
|
||||||
XORL 136(SI), R8
|
XORL 136(SI), R8
|
||||||
@ -452,10 +447,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X0, CX
|
MOVD X0, CX
|
||||||
MOVD X5, R8
|
MOVD X5, R8
|
||||||
MOVD X8, R9
|
MOVD X8, R9
|
||||||
PSHUFL $0X39,X14,X14
|
PSHUFL $0x39, X14, X14
|
||||||
PSHUFL $0X39,X0,X0
|
PSHUFL $0x39, X0, X0
|
||||||
PSHUFL $0X39,X5,X5
|
PSHUFL $0x39, X5, X5
|
||||||
PSHUFL $0X39,X8,X8
|
PSHUFL $0x39, X8, X8
|
||||||
XORL 16(SI), DX
|
XORL 16(SI), DX
|
||||||
XORL 20(SI), CX
|
XORL 20(SI), CX
|
||||||
XORL 24(SI), R8
|
XORL 24(SI), R8
|
||||||
@ -468,10 +463,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X0, CX
|
MOVD X0, CX
|
||||||
MOVD X5, R8
|
MOVD X5, R8
|
||||||
MOVD X8, R9
|
MOVD X8, R9
|
||||||
PSHUFL $0X39,X14,X14
|
PSHUFL $0x39, X14, X14
|
||||||
PSHUFL $0X39,X0,X0
|
PSHUFL $0x39, X0, X0
|
||||||
PSHUFL $0X39,X5,X5
|
PSHUFL $0x39, X5, X5
|
||||||
PSHUFL $0X39,X8,X8
|
PSHUFL $0x39, X8, X8
|
||||||
XORL 80(SI), DX
|
XORL 80(SI), DX
|
||||||
XORL 84(SI), CX
|
XORL 84(SI), CX
|
||||||
XORL 88(SI), R8
|
XORL 88(SI), R8
|
||||||
@ -484,10 +479,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X0, CX
|
MOVD X0, CX
|
||||||
MOVD X5, R8
|
MOVD X5, R8
|
||||||
MOVD X8, R9
|
MOVD X8, R9
|
||||||
PSHUFL $0X39,X14,X14
|
PSHUFL $0x39, X14, X14
|
||||||
PSHUFL $0X39,X0,X0
|
PSHUFL $0x39, X0, X0
|
||||||
PSHUFL $0X39,X5,X5
|
PSHUFL $0x39, X5, X5
|
||||||
PSHUFL $0X39,X8,X8
|
PSHUFL $0x39, X8, X8
|
||||||
XORL 144(SI), DX
|
XORL 144(SI), DX
|
||||||
XORL 148(SI), CX
|
XORL 148(SI), CX
|
||||||
XORL 152(SI), R8
|
XORL 152(SI), R8
|
||||||
@ -516,10 +511,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X11, CX
|
MOVD X11, CX
|
||||||
MOVD X1, R8
|
MOVD X1, R8
|
||||||
MOVD X6, R9
|
MOVD X6, R9
|
||||||
PSHUFL $0X39,X15,X15
|
PSHUFL $0x39, X15, X15
|
||||||
PSHUFL $0X39,X11,X11
|
PSHUFL $0x39, X11, X11
|
||||||
PSHUFL $0X39,X1,X1
|
PSHUFL $0x39, X1, X1
|
||||||
PSHUFL $0X39,X6,X6
|
PSHUFL $0x39, X6, X6
|
||||||
XORL 32(SI), DX
|
XORL 32(SI), DX
|
||||||
XORL 36(SI), CX
|
XORL 36(SI), CX
|
||||||
XORL 40(SI), R8
|
XORL 40(SI), R8
|
||||||
@ -532,10 +527,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X11, CX
|
MOVD X11, CX
|
||||||
MOVD X1, R8
|
MOVD X1, R8
|
||||||
MOVD X6, R9
|
MOVD X6, R9
|
||||||
PSHUFL $0X39,X15,X15
|
PSHUFL $0x39, X15, X15
|
||||||
PSHUFL $0X39,X11,X11
|
PSHUFL $0x39, X11, X11
|
||||||
PSHUFL $0X39,X1,X1
|
PSHUFL $0x39, X1, X1
|
||||||
PSHUFL $0X39,X6,X6
|
PSHUFL $0x39, X6, X6
|
||||||
XORL 96(SI), DX
|
XORL 96(SI), DX
|
||||||
XORL 100(SI), CX
|
XORL 100(SI), CX
|
||||||
XORL 104(SI), R8
|
XORL 104(SI), R8
|
||||||
@ -548,10 +543,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X11, CX
|
MOVD X11, CX
|
||||||
MOVD X1, R8
|
MOVD X1, R8
|
||||||
MOVD X6, R9
|
MOVD X6, R9
|
||||||
PSHUFL $0X39,X15,X15
|
PSHUFL $0x39, X15, X15
|
||||||
PSHUFL $0X39,X11,X11
|
PSHUFL $0x39, X11, X11
|
||||||
PSHUFL $0X39,X1,X1
|
PSHUFL $0x39, X1, X1
|
||||||
PSHUFL $0X39,X6,X6
|
PSHUFL $0x39, X6, X6
|
||||||
XORL 160(SI), DX
|
XORL 160(SI), DX
|
||||||
XORL 164(SI), CX
|
XORL 164(SI), CX
|
||||||
XORL 168(SI), R8
|
XORL 168(SI), R8
|
||||||
@ -580,10 +575,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X9, CX
|
MOVD X9, CX
|
||||||
MOVD X3, R8
|
MOVD X3, R8
|
||||||
MOVD X2, R9
|
MOVD X2, R9
|
||||||
PSHUFL $0X39,X13,X13
|
PSHUFL $0x39, X13, X13
|
||||||
PSHUFL $0X39,X9,X9
|
PSHUFL $0x39, X9, X9
|
||||||
PSHUFL $0X39,X3,X3
|
PSHUFL $0x39, X3, X3
|
||||||
PSHUFL $0X39,X2,X2
|
PSHUFL $0x39, X2, X2
|
||||||
XORL 48(SI), DX
|
XORL 48(SI), DX
|
||||||
XORL 52(SI), CX
|
XORL 52(SI), CX
|
||||||
XORL 56(SI), R8
|
XORL 56(SI), R8
|
||||||
@ -596,10 +591,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X9, CX
|
MOVD X9, CX
|
||||||
MOVD X3, R8
|
MOVD X3, R8
|
||||||
MOVD X2, R9
|
MOVD X2, R9
|
||||||
PSHUFL $0X39,X13,X13
|
PSHUFL $0x39, X13, X13
|
||||||
PSHUFL $0X39,X9,X9
|
PSHUFL $0x39, X9, X9
|
||||||
PSHUFL $0X39,X3,X3
|
PSHUFL $0x39, X3, X3
|
||||||
PSHUFL $0X39,X2,X2
|
PSHUFL $0x39, X2, X2
|
||||||
XORL 112(SI), DX
|
XORL 112(SI), DX
|
||||||
XORL 116(SI), CX
|
XORL 116(SI), CX
|
||||||
XORL 120(SI), R8
|
XORL 120(SI), R8
|
||||||
@ -612,10 +607,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X9, CX
|
MOVD X9, CX
|
||||||
MOVD X3, R8
|
MOVD X3, R8
|
||||||
MOVD X2, R9
|
MOVD X2, R9
|
||||||
PSHUFL $0X39,X13,X13
|
PSHUFL $0x39, X13, X13
|
||||||
PSHUFL $0X39,X9,X9
|
PSHUFL $0x39, X9, X9
|
||||||
PSHUFL $0X39,X3,X3
|
PSHUFL $0x39, X3, X3
|
||||||
PSHUFL $0X39,X2,X2
|
PSHUFL $0x39, X2, X2
|
||||||
XORL 176(SI), DX
|
XORL 176(SI), DX
|
||||||
XORL 180(SI), CX
|
XORL 180(SI), CX
|
||||||
XORL 184(SI), R8
|
XORL 184(SI), R8
|
||||||
@ -637,15 +632,16 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVL R8, 248(DI)
|
MOVL R8, 248(DI)
|
||||||
MOVL R9, 252(DI)
|
MOVL R9, 252(DI)
|
||||||
MOVQ 352(R12), R9
|
MOVQ 352(R12), R9
|
||||||
SUBQ $256,R9
|
SUBQ $0x00000100, R9
|
||||||
ADDQ $256,SI
|
ADDQ $0x00000100, SI
|
||||||
ADDQ $256,DI
|
ADDQ $0x00000100, DI
|
||||||
CMPQ R9,$256
|
CMPQ R9, $0x00000100
|
||||||
JAE BYTESATLEAST256
|
JAE BYTESATLEAST256
|
||||||
CMPQ R9,$0
|
CMPQ R9, $0x00
|
||||||
JBE DONE
|
JBE DONE
|
||||||
|
|
||||||
BYTESBETWEEN1AND255:
|
BYTESBETWEEN1AND255:
|
||||||
CMPQ R9,$64
|
CMPQ R9, $0x40
|
||||||
JAE NOCOPY
|
JAE NOCOPY
|
||||||
MOVQ DI, DX
|
MOVQ DI, DX
|
||||||
LEAQ 360(R12), DI
|
LEAQ 360(R12), DI
|
||||||
@ -653,159 +649,161 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
REP; MOVSB
|
REP; MOVSB
|
||||||
LEAQ 360(R12), DI
|
LEAQ 360(R12), DI
|
||||||
LEAQ 360(R12), SI
|
LEAQ 360(R12), SI
|
||||||
|
|
||||||
NOCOPY:
|
NOCOPY:
|
||||||
MOVQ R9, 352(R12)
|
MOVQ R9, 352(R12)
|
||||||
MOVOA 48(R12), X0
|
MOVOA 48(R12), X0
|
||||||
MOVOA 0(R12),X1
|
MOVOA (R12), X1
|
||||||
MOVOA 16(R12), X2
|
MOVOA 16(R12), X2
|
||||||
MOVOA 32(R12), X3
|
MOVOA 32(R12), X3
|
||||||
MOVOA X1, X4
|
MOVOA X1, X4
|
||||||
MOVQ $20,CX
|
MOVQ $0x00000014, CX
|
||||||
|
|
||||||
MAINLOOP2:
|
MAINLOOP2:
|
||||||
PADDL X0, X4
|
PADDL X0, X4
|
||||||
MOVOA X0, X5
|
MOVOA X0, X5
|
||||||
MOVOA X4, X6
|
MOVOA X4, X6
|
||||||
PSLLL $7,X4
|
PSLLL $0x07, X4
|
||||||
PSRLL $25,X6
|
PSRLL $0x19, X6
|
||||||
PXOR X4, X3
|
PXOR X4, X3
|
||||||
PXOR X6, X3
|
PXOR X6, X3
|
||||||
PADDL X3, X5
|
PADDL X3, X5
|
||||||
MOVOA X3, X4
|
MOVOA X3, X4
|
||||||
MOVOA X5, X6
|
MOVOA X5, X6
|
||||||
PSLLL $9,X5
|
PSLLL $0x09, X5
|
||||||
PSRLL $23,X6
|
PSRLL $0x17, X6
|
||||||
PXOR X5, X2
|
PXOR X5, X2
|
||||||
PSHUFL $0X93,X3,X3
|
PSHUFL $0x93, X3, X3
|
||||||
PXOR X6, X2
|
PXOR X6, X2
|
||||||
PADDL X2, X4
|
PADDL X2, X4
|
||||||
MOVOA X2, X5
|
MOVOA X2, X5
|
||||||
MOVOA X4, X6
|
MOVOA X4, X6
|
||||||
PSLLL $13,X4
|
PSLLL $0x0d, X4
|
||||||
PSRLL $19,X6
|
PSRLL $0x13, X6
|
||||||
PXOR X4, X1
|
PXOR X4, X1
|
||||||
PSHUFL $0X4E,X2,X2
|
PSHUFL $0x4e, X2, X2
|
||||||
PXOR X6, X1
|
PXOR X6, X1
|
||||||
PADDL X1, X5
|
PADDL X1, X5
|
||||||
MOVOA X3, X4
|
MOVOA X3, X4
|
||||||
MOVOA X5, X6
|
MOVOA X5, X6
|
||||||
PSLLL $18,X5
|
PSLLL $0x12, X5
|
||||||
PSRLL $14,X6
|
PSRLL $0x0e, X6
|
||||||
PXOR X5, X0
|
PXOR X5, X0
|
||||||
PSHUFL $0X39,X1,X1
|
PSHUFL $0x39, X1, X1
|
||||||
PXOR X6, X0
|
PXOR X6, X0
|
||||||
PADDL X0, X4
|
PADDL X0, X4
|
||||||
MOVOA X0, X5
|
MOVOA X0, X5
|
||||||
MOVOA X4, X6
|
MOVOA X4, X6
|
||||||
PSLLL $7,X4
|
PSLLL $0x07, X4
|
||||||
PSRLL $25,X6
|
PSRLL $0x19, X6
|
||||||
PXOR X4, X1
|
PXOR X4, X1
|
||||||
PXOR X6, X1
|
PXOR X6, X1
|
||||||
PADDL X1, X5
|
PADDL X1, X5
|
||||||
MOVOA X1, X4
|
MOVOA X1, X4
|
||||||
MOVOA X5, X6
|
MOVOA X5, X6
|
||||||
PSLLL $9,X5
|
PSLLL $0x09, X5
|
||||||
PSRLL $23,X6
|
PSRLL $0x17, X6
|
||||||
PXOR X5, X2
|
PXOR X5, X2
|
||||||
PSHUFL $0X93,X1,X1
|
PSHUFL $0x93, X1, X1
|
||||||
PXOR X6, X2
|
PXOR X6, X2
|
||||||
PADDL X2, X4
|
PADDL X2, X4
|
||||||
MOVOA X2, X5
|
MOVOA X2, X5
|
||||||
MOVOA X4, X6
|
MOVOA X4, X6
|
||||||
PSLLL $13,X4
|
PSLLL $0x0d, X4
|
||||||
PSRLL $19,X6
|
PSRLL $0x13, X6
|
||||||
PXOR X4, X3
|
PXOR X4, X3
|
||||||
PSHUFL $0X4E,X2,X2
|
PSHUFL $0x4e, X2, X2
|
||||||
PXOR X6, X3
|
PXOR X6, X3
|
||||||
PADDL X3, X5
|
PADDL X3, X5
|
||||||
MOVOA X1, X4
|
MOVOA X1, X4
|
||||||
MOVOA X5, X6
|
MOVOA X5, X6
|
||||||
PSLLL $18,X5
|
PSLLL $0x12, X5
|
||||||
PSRLL $14,X6
|
PSRLL $0x0e, X6
|
||||||
PXOR X5, X0
|
PXOR X5, X0
|
||||||
PSHUFL $0X39,X3,X3
|
PSHUFL $0x39, X3, X3
|
||||||
PXOR X6, X0
|
PXOR X6, X0
|
||||||
PADDL X0, X4
|
PADDL X0, X4
|
||||||
MOVOA X0, X5
|
MOVOA X0, X5
|
||||||
MOVOA X4, X6
|
MOVOA X4, X6
|
||||||
PSLLL $7,X4
|
PSLLL $0x07, X4
|
||||||
PSRLL $25,X6
|
PSRLL $0x19, X6
|
||||||
PXOR X4, X3
|
PXOR X4, X3
|
||||||
PXOR X6, X3
|
PXOR X6, X3
|
||||||
PADDL X3, X5
|
PADDL X3, X5
|
||||||
MOVOA X3, X4
|
MOVOA X3, X4
|
||||||
MOVOA X5, X6
|
MOVOA X5, X6
|
||||||
PSLLL $9,X5
|
PSLLL $0x09, X5
|
||||||
PSRLL $23,X6
|
PSRLL $0x17, X6
|
||||||
PXOR X5, X2
|
PXOR X5, X2
|
||||||
PSHUFL $0X93,X3,X3
|
PSHUFL $0x93, X3, X3
|
||||||
PXOR X6, X2
|
PXOR X6, X2
|
||||||
PADDL X2, X4
|
PADDL X2, X4
|
||||||
MOVOA X2, X5
|
MOVOA X2, X5
|
||||||
MOVOA X4, X6
|
MOVOA X4, X6
|
||||||
PSLLL $13,X4
|
PSLLL $0x0d, X4
|
||||||
PSRLL $19,X6
|
PSRLL $0x13, X6
|
||||||
PXOR X4, X1
|
PXOR X4, X1
|
||||||
PSHUFL $0X4E,X2,X2
|
PSHUFL $0x4e, X2, X2
|
||||||
PXOR X6, X1
|
PXOR X6, X1
|
||||||
PADDL X1, X5
|
PADDL X1, X5
|
||||||
MOVOA X3, X4
|
MOVOA X3, X4
|
||||||
MOVOA X5, X6
|
MOVOA X5, X6
|
||||||
PSLLL $18,X5
|
PSLLL $0x12, X5
|
||||||
PSRLL $14,X6
|
PSRLL $0x0e, X6
|
||||||
PXOR X5, X0
|
PXOR X5, X0
|
||||||
PSHUFL $0X39,X1,X1
|
PSHUFL $0x39, X1, X1
|
||||||
PXOR X6, X0
|
PXOR X6, X0
|
||||||
PADDL X0, X4
|
PADDL X0, X4
|
||||||
MOVOA X0, X5
|
MOVOA X0, X5
|
||||||
MOVOA X4, X6
|
MOVOA X4, X6
|
||||||
PSLLL $7,X4
|
PSLLL $0x07, X4
|
||||||
PSRLL $25,X6
|
PSRLL $0x19, X6
|
||||||
PXOR X4, X1
|
PXOR X4, X1
|
||||||
PXOR X6, X1
|
PXOR X6, X1
|
||||||
PADDL X1, X5
|
PADDL X1, X5
|
||||||
MOVOA X1, X4
|
MOVOA X1, X4
|
||||||
MOVOA X5, X6
|
MOVOA X5, X6
|
||||||
PSLLL $9,X5
|
PSLLL $0x09, X5
|
||||||
PSRLL $23,X6
|
PSRLL $0x17, X6
|
||||||
PXOR X5, X2
|
PXOR X5, X2
|
||||||
PSHUFL $0X93,X1,X1
|
PSHUFL $0x93, X1, X1
|
||||||
PXOR X6, X2
|
PXOR X6, X2
|
||||||
PADDL X2, X4
|
PADDL X2, X4
|
||||||
MOVOA X2, X5
|
MOVOA X2, X5
|
||||||
MOVOA X4, X6
|
MOVOA X4, X6
|
||||||
PSLLL $13,X4
|
PSLLL $0x0d, X4
|
||||||
PSRLL $19,X6
|
PSRLL $0x13, X6
|
||||||
PXOR X4, X3
|
PXOR X4, X3
|
||||||
PSHUFL $0X4E,X2,X2
|
PSHUFL $0x4e, X2, X2
|
||||||
PXOR X6, X3
|
PXOR X6, X3
|
||||||
SUBQ $4,CX
|
SUBQ $0x04, CX
|
||||||
PADDL X3, X5
|
PADDL X3, X5
|
||||||
MOVOA X1, X4
|
MOVOA X1, X4
|
||||||
MOVOA X5, X6
|
MOVOA X5, X6
|
||||||
PSLLL $18,X5
|
PSLLL $0x12, X5
|
||||||
PXOR X7, X7
|
PXOR X7, X7
|
||||||
PSRLL $14,X6
|
PSRLL $0x0e, X6
|
||||||
PXOR X5, X0
|
PXOR X5, X0
|
||||||
PSHUFL $0X39,X3,X3
|
PSHUFL $0x39, X3, X3
|
||||||
PXOR X6, X0
|
PXOR X6, X0
|
||||||
JA MAINLOOP2
|
JA MAINLOOP2
|
||||||
PADDL 48(R12), X0
|
PADDL 48(R12), X0
|
||||||
PADDL 0(R12),X1
|
PADDL (R12), X1
|
||||||
PADDL 16(R12), X2
|
PADDL 16(R12), X2
|
||||||
PADDL 32(R12), X3
|
PADDL 32(R12), X3
|
||||||
MOVD X0, CX
|
MOVD X0, CX
|
||||||
MOVD X1, R8
|
MOVD X1, R8
|
||||||
MOVD X2, R9
|
MOVD X2, R9
|
||||||
MOVD X3, AX
|
MOVD X3, AX
|
||||||
PSHUFL $0X39,X0,X0
|
PSHUFL $0x39, X0, X0
|
||||||
PSHUFL $0X39,X1,X1
|
PSHUFL $0x39, X1, X1
|
||||||
PSHUFL $0X39,X2,X2
|
PSHUFL $0x39, X2, X2
|
||||||
PSHUFL $0X39,X3,X3
|
PSHUFL $0x39, X3, X3
|
||||||
XORL 0(SI),CX
|
XORL (SI), CX
|
||||||
XORL 48(SI), R8
|
XORL 48(SI), R8
|
||||||
XORL 32(SI), R9
|
XORL 32(SI), R9
|
||||||
XORL 16(SI), AX
|
XORL 16(SI), AX
|
||||||
MOVL CX,0(DI)
|
MOVL CX, (DI)
|
||||||
MOVL R8, 48(DI)
|
MOVL R8, 48(DI)
|
||||||
MOVL R9, 32(DI)
|
MOVL R9, 32(DI)
|
||||||
MOVL AX, 16(DI)
|
MOVL AX, 16(DI)
|
||||||
@ -813,10 +811,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X1, R8
|
MOVD X1, R8
|
||||||
MOVD X2, R9
|
MOVD X2, R9
|
||||||
MOVD X3, AX
|
MOVD X3, AX
|
||||||
PSHUFL $0X39,X0,X0
|
PSHUFL $0x39, X0, X0
|
||||||
PSHUFL $0X39,X1,X1
|
PSHUFL $0x39, X1, X1
|
||||||
PSHUFL $0X39,X2,X2
|
PSHUFL $0x39, X2, X2
|
||||||
PSHUFL $0X39,X3,X3
|
PSHUFL $0x39, X3, X3
|
||||||
XORL 20(SI), CX
|
XORL 20(SI), CX
|
||||||
XORL 4(SI), R8
|
XORL 4(SI), R8
|
||||||
XORL 52(SI), R9
|
XORL 52(SI), R9
|
||||||
@ -829,10 +827,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVD X1, R8
|
MOVD X1, R8
|
||||||
MOVD X2, R9
|
MOVD X2, R9
|
||||||
MOVD X3, AX
|
MOVD X3, AX
|
||||||
PSHUFL $0X39,X0,X0
|
PSHUFL $0x39, X0, X0
|
||||||
PSHUFL $0X39,X1,X1
|
PSHUFL $0x39, X1, X1
|
||||||
PSHUFL $0X39,X2,X2
|
PSHUFL $0x39, X2, X2
|
||||||
PSHUFL $0X39,X3,X3
|
PSHUFL $0x39, X3, X3
|
||||||
XORL 40(SI), CX
|
XORL 40(SI), CX
|
||||||
XORL 24(SI), R8
|
XORL 24(SI), R8
|
||||||
XORL 8(SI), R9
|
XORL 8(SI), R9
|
||||||
@ -856,25 +854,27 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
|
|||||||
MOVQ 352(R12), R9
|
MOVQ 352(R12), R9
|
||||||
MOVL 16(R12), CX
|
MOVL 16(R12), CX
|
||||||
MOVL 36(R12), R8
|
MOVL 36(R12), R8
|
||||||
ADDQ $1,CX
|
ADDQ $0x01, CX
|
||||||
SHLQ $32,R8
|
SHLQ $0x20, R8
|
||||||
ADDQ R8, CX
|
ADDQ R8, CX
|
||||||
MOVQ CX, R8
|
MOVQ CX, R8
|
||||||
SHRQ $32,R8
|
SHRQ $0x20, R8
|
||||||
MOVL CX, 16(R12)
|
MOVL CX, 16(R12)
|
||||||
MOVL R8, 36(R12)
|
MOVL R8, 36(R12)
|
||||||
CMPQ R9,$64
|
CMPQ R9, $0x40
|
||||||
JA BYTESATLEAST65
|
JA BYTESATLEAST65
|
||||||
JAE BYTESATLEAST64
|
JAE BYTESATLEAST64
|
||||||
MOVQ DI, SI
|
MOVQ DI, SI
|
||||||
MOVQ DX, DI
|
MOVQ DX, DI
|
||||||
MOVQ R9, CX
|
MOVQ R9, CX
|
||||||
REP; MOVSB
|
REP; MOVSB
|
||||||
|
|
||||||
BYTESATLEAST64:
|
BYTESATLEAST64:
|
||||||
DONE:
|
DONE:
|
||||||
RET
|
RET
|
||||||
|
|
||||||
BYTESATLEAST65:
|
BYTESATLEAST65:
|
||||||
SUBQ $64,R9
|
SUBQ $0x40, R9
|
||||||
ADDQ $64,DI
|
ADDQ $0x40, DI
|
||||||
ADDQ $64,SI
|
ADDQ $0x40, SI
|
||||||
JMP BYTESBETWEEN1AND255
|
JMP BYTESBETWEEN1AND255
|
||||||
|
2
vendor/golang.org/x/crypto/scrypt/scrypt.go
generated
vendored
2
vendor/golang.org/x/crypto/scrypt/scrypt.go
generated
vendored
@ -5,7 +5,7 @@
|
|||||||
// Package scrypt implements the scrypt key derivation function as defined in
|
// Package scrypt implements the scrypt key derivation function as defined in
|
||||||
// Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard
|
// Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard
|
||||||
// Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf).
|
// Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf).
|
||||||
package scrypt // import "golang.org/x/crypto/scrypt"
|
package scrypt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
23
vendor/golang.org/x/crypto/ssh/client_auth.go
generated
vendored
23
vendor/golang.org/x/crypto/ssh/client_auth.go
generated
vendored
@ -71,6 +71,10 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error {
|
|||||||
for auth := AuthMethod(new(noneAuth)); auth != nil; {
|
for auth := AuthMethod(new(noneAuth)); auth != nil; {
|
||||||
ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand, extensions)
|
ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand, extensions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// On disconnect, return error immediately
|
||||||
|
if _, ok := err.(*disconnectMsg); ok {
|
||||||
|
return err
|
||||||
|
}
|
||||||
// We return the error later if there is no other method left to
|
// We return the error later if there is no other method left to
|
||||||
// try.
|
// try.
|
||||||
ok = authFailure
|
ok = authFailure
|
||||||
@ -404,10 +408,10 @@ func validateKey(key PublicKey, algo string, user string, c packetConn) (bool, e
|
|||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return confirmKeyAck(key, algo, c)
|
return confirmKeyAck(key, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func confirmKeyAck(key PublicKey, algo string, c packetConn) (bool, error) {
|
func confirmKeyAck(key PublicKey, c packetConn) (bool, error) {
|
||||||
pubKey := key.Marshal()
|
pubKey := key.Marshal()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
@ -425,7 +429,15 @@ func confirmKeyAck(key PublicKey, algo string, c packetConn) (bool, error) {
|
|||||||
if err := Unmarshal(packet, &msg); err != nil {
|
if err := Unmarshal(packet, &msg); err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
if msg.Algo != algo || !bytes.Equal(msg.PubKey, pubKey) {
|
// According to RFC 4252 Section 7 the algorithm in
|
||||||
|
// SSH_MSG_USERAUTH_PK_OK should match that of the request but some
|
||||||
|
// servers send the key type instead. OpenSSH allows any algorithm
|
||||||
|
// that matches the public key, so we do the same.
|
||||||
|
// https://github.com/openssh/openssh-portable/blob/86bdd385/sshconnect2.c#L709
|
||||||
|
if !contains(algorithmsForKeyFormat(key.Type()), msg.Algo) {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
if !bytes.Equal(msg.PubKey, pubKey) {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
return true, nil
|
return true, nil
|
||||||
@ -543,6 +555,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe
|
|||||||
}
|
}
|
||||||
|
|
||||||
gotMsgExtInfo := false
|
gotMsgExtInfo := false
|
||||||
|
gotUserAuthInfoRequest := false
|
||||||
for {
|
for {
|
||||||
packet, err := c.readPacket()
|
packet, err := c.readPacket()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -573,6 +586,9 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe
|
|||||||
if msg.PartialSuccess {
|
if msg.PartialSuccess {
|
||||||
return authPartialSuccess, msg.Methods, nil
|
return authPartialSuccess, msg.Methods, nil
|
||||||
}
|
}
|
||||||
|
if !gotUserAuthInfoRequest {
|
||||||
|
return authFailure, msg.Methods, unexpectedMessageError(msgUserAuthInfoRequest, packet[0])
|
||||||
|
}
|
||||||
return authFailure, msg.Methods, nil
|
return authFailure, msg.Methods, nil
|
||||||
case msgUserAuthSuccess:
|
case msgUserAuthSuccess:
|
||||||
return authSuccess, nil, nil
|
return authSuccess, nil, nil
|
||||||
@ -584,6 +600,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe
|
|||||||
if err := Unmarshal(packet, &msg); err != nil {
|
if err := Unmarshal(packet, &msg); err != nil {
|
||||||
return authFailure, nil, err
|
return authFailure, nil, err
|
||||||
}
|
}
|
||||||
|
gotUserAuthInfoRequest = true
|
||||||
|
|
||||||
// Manually unpack the prompt/echo pairs.
|
// Manually unpack the prompt/echo pairs.
|
||||||
rest := msg.Prompts
|
rest := msg.Prompts
|
||||||
|
2
vendor/golang.org/x/crypto/ssh/doc.go
generated
vendored
2
vendor/golang.org/x/crypto/ssh/doc.go
generated
vendored
@ -20,4 +20,4 @@ References:
|
|||||||
This package does not fall under the stability promise of the Go language itself,
|
This package does not fall under the stability promise of the Go language itself,
|
||||||
so its API may be changed when pressing needs arise.
|
so its API may be changed when pressing needs arise.
|
||||||
*/
|
*/
|
||||||
package ssh // import "golang.org/x/crypto/ssh"
|
package ssh
|
||||||
|
52
vendor/golang.org/x/crypto/ssh/keys.go
generated
vendored
52
vendor/golang.org/x/crypto/ssh/keys.go
generated
vendored
@ -488,7 +488,49 @@ func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error {
|
|||||||
h := hash.New()
|
h := hash.New()
|
||||||
h.Write(data)
|
h.Write(data)
|
||||||
digest := h.Sum(nil)
|
digest := h.Sum(nil)
|
||||||
return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), hash, digest, sig.Blob)
|
|
||||||
|
// Signatures in PKCS1v15 must match the key's modulus in
|
||||||
|
// length. However with SSH, some signers provide RSA
|
||||||
|
// signatures which are missing the MSB 0's of the bignum
|
||||||
|
// represented. With ssh-rsa signatures, this is encouraged by
|
||||||
|
// the spec (even though e.g. OpenSSH will give the full
|
||||||
|
// length unconditionally). With rsa-sha2-* signatures, the
|
||||||
|
// verifier is allowed to support these, even though they are
|
||||||
|
// out of spec. See RFC 4253 Section 6.6 for ssh-rsa and RFC
|
||||||
|
// 8332 Section 3 for rsa-sha2-* details.
|
||||||
|
//
|
||||||
|
// In practice:
|
||||||
|
// * OpenSSH always allows "short" signatures:
|
||||||
|
// https://github.com/openssh/openssh-portable/blob/V_9_8_P1/ssh-rsa.c#L526
|
||||||
|
// but always generates padded signatures:
|
||||||
|
// https://github.com/openssh/openssh-portable/blob/V_9_8_P1/ssh-rsa.c#L439
|
||||||
|
//
|
||||||
|
// * PuTTY versions 0.81 and earlier will generate short
|
||||||
|
// signatures for all RSA signature variants. Note that
|
||||||
|
// PuTTY is embedded in other software, such as WinSCP and
|
||||||
|
// FileZilla. At the time of writing, a patch has been
|
||||||
|
// applied to PuTTY to generate padded signatures for
|
||||||
|
// rsa-sha2-*, but not yet released:
|
||||||
|
// https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a5bcf3d384e1bf15a51a6923c3724cbbee022d8e
|
||||||
|
//
|
||||||
|
// * SSH.NET versions 2024.0.0 and earlier will generate short
|
||||||
|
// signatures for all RSA signature variants, fixed in 2024.1.0:
|
||||||
|
// https://github.com/sshnet/SSH.NET/releases/tag/2024.1.0
|
||||||
|
//
|
||||||
|
// As a result, we pad these up to the key size by inserting
|
||||||
|
// leading 0's.
|
||||||
|
//
|
||||||
|
// Note that support for short signatures with rsa-sha2-* may
|
||||||
|
// be removed in the future due to such signatures not being
|
||||||
|
// allowed by the spec.
|
||||||
|
blob := sig.Blob
|
||||||
|
keySize := (*rsa.PublicKey)(r).Size()
|
||||||
|
if len(blob) < keySize {
|
||||||
|
padded := make([]byte, keySize)
|
||||||
|
copy(padded[keySize-len(blob):], blob)
|
||||||
|
blob = padded
|
||||||
|
}
|
||||||
|
return rsa.VerifyPKCS1v15((*rsa.PublicKey)(r), hash, digest, blob)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *rsaPublicKey) CryptoPublicKey() crypto.PublicKey {
|
func (r *rsaPublicKey) CryptoPublicKey() crypto.PublicKey {
|
||||||
@ -904,6 +946,10 @@ func (k *skECDSAPublicKey) Verify(data []byte, sig *Signature) error {
|
|||||||
return errors.New("ssh: signature did not verify")
|
return errors.New("ssh: signature did not verify")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (k *skECDSAPublicKey) CryptoPublicKey() crypto.PublicKey {
|
||||||
|
return &k.PublicKey
|
||||||
|
}
|
||||||
|
|
||||||
type skEd25519PublicKey struct {
|
type skEd25519PublicKey struct {
|
||||||
// application is a URL-like string, typically "ssh:" for SSH.
|
// application is a URL-like string, typically "ssh:" for SSH.
|
||||||
// see openssh/PROTOCOL.u2f for details.
|
// see openssh/PROTOCOL.u2f for details.
|
||||||
@ -1000,6 +1046,10 @@ func (k *skEd25519PublicKey) Verify(data []byte, sig *Signature) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (k *skEd25519PublicKey) CryptoPublicKey() crypto.PublicKey {
|
||||||
|
return k.PublicKey
|
||||||
|
}
|
||||||
|
|
||||||
// NewSignerFromKey takes an *rsa.PrivateKey, *dsa.PrivateKey,
|
// NewSignerFromKey takes an *rsa.PrivateKey, *dsa.PrivateKey,
|
||||||
// *ecdsa.PrivateKey or any other crypto.Signer and returns a
|
// *ecdsa.PrivateKey or any other crypto.Signer and returns a
|
||||||
// corresponding Signer instance. ECDSA keys must use P-256, P-384 or
|
// corresponding Signer instance. ECDSA keys must use P-256, P-384 or
|
||||||
|
173
vendor/golang.org/x/crypto/ssh/server.go
generated
vendored
173
vendor/golang.org/x/crypto/ssh/server.go
generated
vendored
@ -149,7 +149,7 @@ func (s *ServerConfig) AddHostKey(key Signer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// cachedPubKey contains the results of querying whether a public key is
|
// cachedPubKey contains the results of querying whether a public key is
|
||||||
// acceptable for a user.
|
// acceptable for a user. This is a FIFO cache.
|
||||||
type cachedPubKey struct {
|
type cachedPubKey struct {
|
||||||
user string
|
user string
|
||||||
pubKeyData []byte
|
pubKeyData []byte
|
||||||
@ -157,7 +157,13 @@ type cachedPubKey struct {
|
|||||||
perms *Permissions
|
perms *Permissions
|
||||||
}
|
}
|
||||||
|
|
||||||
const maxCachedPubKeys = 16
|
// maxCachedPubKeys is the number of cache entries we store.
|
||||||
|
//
|
||||||
|
// Due to consistent misuse of the PublicKeyCallback API, we have reduced this
|
||||||
|
// to 1, such that the only key in the cache is the most recently seen one. This
|
||||||
|
// forces the behavior that the last call to PublicKeyCallback will always be
|
||||||
|
// with the key that is used for authentication.
|
||||||
|
const maxCachedPubKeys = 1
|
||||||
|
|
||||||
// pubKeyCache caches tests for public keys. Since SSH clients
|
// pubKeyCache caches tests for public keys. Since SSH clients
|
||||||
// will query whether a public key is acceptable before attempting to
|
// will query whether a public key is acceptable before attempting to
|
||||||
@ -179,9 +185,10 @@ func (c *pubKeyCache) get(user string, pubKeyData []byte) (cachedPubKey, bool) {
|
|||||||
|
|
||||||
// add adds the given tuple to the cache.
|
// add adds the given tuple to the cache.
|
||||||
func (c *pubKeyCache) add(candidate cachedPubKey) {
|
func (c *pubKeyCache) add(candidate cachedPubKey) {
|
||||||
if len(c.keys) < maxCachedPubKeys {
|
if len(c.keys) >= maxCachedPubKeys {
|
||||||
c.keys = append(c.keys, candidate)
|
c.keys = c.keys[1:]
|
||||||
}
|
}
|
||||||
|
c.keys = append(c.keys, candidate)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServerConn is an authenticated SSH connection, as seen from the
|
// ServerConn is an authenticated SSH connection, as seen from the
|
||||||
@ -426,6 +433,35 @@ func (l ServerAuthError) Error() string {
|
|||||||
return "[" + strings.Join(errs, ", ") + "]"
|
return "[" + strings.Join(errs, ", ") + "]"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ServerAuthCallbacks defines server-side authentication callbacks.
|
||||||
|
type ServerAuthCallbacks struct {
|
||||||
|
// PasswordCallback behaves like [ServerConfig.PasswordCallback].
|
||||||
|
PasswordCallback func(conn ConnMetadata, password []byte) (*Permissions, error)
|
||||||
|
|
||||||
|
// PublicKeyCallback behaves like [ServerConfig.PublicKeyCallback].
|
||||||
|
PublicKeyCallback func(conn ConnMetadata, key PublicKey) (*Permissions, error)
|
||||||
|
|
||||||
|
// KeyboardInteractiveCallback behaves like [ServerConfig.KeyboardInteractiveCallback].
|
||||||
|
KeyboardInteractiveCallback func(conn ConnMetadata, client KeyboardInteractiveChallenge) (*Permissions, error)
|
||||||
|
|
||||||
|
// GSSAPIWithMICConfig behaves like [ServerConfig.GSSAPIWithMICConfig].
|
||||||
|
GSSAPIWithMICConfig *GSSAPIWithMICConfig
|
||||||
|
}
|
||||||
|
|
||||||
|
// PartialSuccessError can be returned by any of the [ServerConfig]
|
||||||
|
// authentication callbacks to indicate to the client that authentication has
|
||||||
|
// partially succeeded, but further steps are required.
|
||||||
|
type PartialSuccessError struct {
|
||||||
|
// Next defines the authentication callbacks to apply to further steps. The
|
||||||
|
// available methods communicated to the client are based on the non-nil
|
||||||
|
// ServerAuthCallbacks fields.
|
||||||
|
Next ServerAuthCallbacks
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PartialSuccessError) Error() string {
|
||||||
|
return "ssh: authenticated with partial success"
|
||||||
|
}
|
||||||
|
|
||||||
// ErrNoAuth is the error value returned if no
|
// ErrNoAuth is the error value returned if no
|
||||||
// authentication method has been passed yet. This happens as a normal
|
// authentication method has been passed yet. This happens as a normal
|
||||||
// part of the authentication loop, since the client first tries
|
// part of the authentication loop, since the client first tries
|
||||||
@ -433,14 +469,42 @@ func (l ServerAuthError) Error() string {
|
|||||||
// It is returned in ServerAuthError.Errors from NewServerConn.
|
// It is returned in ServerAuthError.Errors from NewServerConn.
|
||||||
var ErrNoAuth = errors.New("ssh: no auth passed yet")
|
var ErrNoAuth = errors.New("ssh: no auth passed yet")
|
||||||
|
|
||||||
|
// BannerError is an error that can be returned by authentication handlers in
|
||||||
|
// ServerConfig to send a banner message to the client.
|
||||||
|
type BannerError struct {
|
||||||
|
Err error
|
||||||
|
Message string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (b *BannerError) Unwrap() error {
|
||||||
|
return b.Err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (b *BannerError) Error() string {
|
||||||
|
if b.Err == nil {
|
||||||
|
return b.Message
|
||||||
|
}
|
||||||
|
return b.Err.Error()
|
||||||
|
}
|
||||||
|
|
||||||
func (s *connection) serverAuthenticate(config *ServerConfig) (*Permissions, error) {
|
func (s *connection) serverAuthenticate(config *ServerConfig) (*Permissions, error) {
|
||||||
sessionID := s.transport.getSessionID()
|
sessionID := s.transport.getSessionID()
|
||||||
var cache pubKeyCache
|
var cache pubKeyCache
|
||||||
var perms *Permissions
|
var perms *Permissions
|
||||||
|
|
||||||
authFailures := 0
|
authFailures := 0
|
||||||
|
noneAuthCount := 0
|
||||||
var authErrs []error
|
var authErrs []error
|
||||||
var displayedBanner bool
|
var displayedBanner bool
|
||||||
|
partialSuccessReturned := false
|
||||||
|
// Set the initial authentication callbacks from the config. They can be
|
||||||
|
// changed if a PartialSuccessError is returned.
|
||||||
|
authConfig := ServerAuthCallbacks{
|
||||||
|
PasswordCallback: config.PasswordCallback,
|
||||||
|
PublicKeyCallback: config.PublicKeyCallback,
|
||||||
|
KeyboardInteractiveCallback: config.KeyboardInteractiveCallback,
|
||||||
|
GSSAPIWithMICConfig: config.GSSAPIWithMICConfig,
|
||||||
|
}
|
||||||
|
|
||||||
userAuthLoop:
|
userAuthLoop:
|
||||||
for {
|
for {
|
||||||
@ -453,8 +517,8 @@ userAuthLoop:
|
|||||||
if err := s.transport.writePacket(Marshal(discMsg)); err != nil {
|
if err := s.transport.writePacket(Marshal(discMsg)); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
authErrs = append(authErrs, discMsg)
|
||||||
return nil, discMsg
|
return nil, &ServerAuthError{Errors: authErrs}
|
||||||
}
|
}
|
||||||
|
|
||||||
var userAuthReq userAuthRequestMsg
|
var userAuthReq userAuthRequestMsg
|
||||||
@ -471,6 +535,11 @@ userAuthLoop:
|
|||||||
return nil, errors.New("ssh: client attempted to negotiate for unknown service: " + userAuthReq.Service)
|
return nil, errors.New("ssh: client attempted to negotiate for unknown service: " + userAuthReq.Service)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.user != userAuthReq.User && partialSuccessReturned {
|
||||||
|
return nil, fmt.Errorf("ssh: client changed the user after a partial success authentication, previous user %q, current user %q",
|
||||||
|
s.user, userAuthReq.User)
|
||||||
|
}
|
||||||
|
|
||||||
s.user = userAuthReq.User
|
s.user = userAuthReq.User
|
||||||
|
|
||||||
if !displayedBanner && config.BannerCallback != nil {
|
if !displayedBanner && config.BannerCallback != nil {
|
||||||
@ -491,20 +560,18 @@ userAuthLoop:
|
|||||||
|
|
||||||
switch userAuthReq.Method {
|
switch userAuthReq.Method {
|
||||||
case "none":
|
case "none":
|
||||||
if config.NoClientAuth {
|
noneAuthCount++
|
||||||
|
// We don't allow none authentication after a partial success
|
||||||
|
// response.
|
||||||
|
if config.NoClientAuth && !partialSuccessReturned {
|
||||||
if config.NoClientAuthCallback != nil {
|
if config.NoClientAuthCallback != nil {
|
||||||
perms, authErr = config.NoClientAuthCallback(s)
|
perms, authErr = config.NoClientAuthCallback(s)
|
||||||
} else {
|
} else {
|
||||||
authErr = nil
|
authErr = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow initial attempt of 'none' without penalty
|
|
||||||
if authFailures == 0 {
|
|
||||||
authFailures--
|
|
||||||
}
|
|
||||||
case "password":
|
case "password":
|
||||||
if config.PasswordCallback == nil {
|
if authConfig.PasswordCallback == nil {
|
||||||
authErr = errors.New("ssh: password auth not configured")
|
authErr = errors.New("ssh: password auth not configured")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -518,17 +585,17 @@ userAuthLoop:
|
|||||||
return nil, parseError(msgUserAuthRequest)
|
return nil, parseError(msgUserAuthRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
perms, authErr = config.PasswordCallback(s, password)
|
perms, authErr = authConfig.PasswordCallback(s, password)
|
||||||
case "keyboard-interactive":
|
case "keyboard-interactive":
|
||||||
if config.KeyboardInteractiveCallback == nil {
|
if authConfig.KeyboardInteractiveCallback == nil {
|
||||||
authErr = errors.New("ssh: keyboard-interactive auth not configured")
|
authErr = errors.New("ssh: keyboard-interactive auth not configured")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
prompter := &sshClientKeyboardInteractive{s}
|
prompter := &sshClientKeyboardInteractive{s}
|
||||||
perms, authErr = config.KeyboardInteractiveCallback(s, prompter.Challenge)
|
perms, authErr = authConfig.KeyboardInteractiveCallback(s, prompter.Challenge)
|
||||||
case "publickey":
|
case "publickey":
|
||||||
if config.PublicKeyCallback == nil {
|
if authConfig.PublicKeyCallback == nil {
|
||||||
authErr = errors.New("ssh: publickey auth not configured")
|
authErr = errors.New("ssh: publickey auth not configured")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -562,11 +629,18 @@ userAuthLoop:
|
|||||||
if !ok {
|
if !ok {
|
||||||
candidate.user = s.user
|
candidate.user = s.user
|
||||||
candidate.pubKeyData = pubKeyData
|
candidate.pubKeyData = pubKeyData
|
||||||
candidate.perms, candidate.result = config.PublicKeyCallback(s, pubKey)
|
candidate.perms, candidate.result = authConfig.PublicKeyCallback(s, pubKey)
|
||||||
if candidate.result == nil && candidate.perms != nil && candidate.perms.CriticalOptions != nil && candidate.perms.CriticalOptions[sourceAddressCriticalOption] != "" {
|
_, isPartialSuccessError := candidate.result.(*PartialSuccessError)
|
||||||
candidate.result = checkSourceAddress(
|
|
||||||
|
if (candidate.result == nil || isPartialSuccessError) &&
|
||||||
|
candidate.perms != nil &&
|
||||||
|
candidate.perms.CriticalOptions != nil &&
|
||||||
|
candidate.perms.CriticalOptions[sourceAddressCriticalOption] != "" {
|
||||||
|
if err := checkSourceAddress(
|
||||||
s.RemoteAddr(),
|
s.RemoteAddr(),
|
||||||
candidate.perms.CriticalOptions[sourceAddressCriticalOption])
|
candidate.perms.CriticalOptions[sourceAddressCriticalOption]); err != nil {
|
||||||
|
candidate.result = err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cache.add(candidate)
|
cache.add(candidate)
|
||||||
}
|
}
|
||||||
@ -578,8 +652,8 @@ userAuthLoop:
|
|||||||
if len(payload) > 0 {
|
if len(payload) > 0 {
|
||||||
return nil, parseError(msgUserAuthRequest)
|
return nil, parseError(msgUserAuthRequest)
|
||||||
}
|
}
|
||||||
|
_, isPartialSuccessError := candidate.result.(*PartialSuccessError)
|
||||||
if candidate.result == nil {
|
if candidate.result == nil || isPartialSuccessError {
|
||||||
okMsg := userAuthPubKeyOkMsg{
|
okMsg := userAuthPubKeyOkMsg{
|
||||||
Algo: algo,
|
Algo: algo,
|
||||||
PubKey: pubKeyData,
|
PubKey: pubKeyData,
|
||||||
@ -629,11 +703,11 @@ userAuthLoop:
|
|||||||
perms = candidate.perms
|
perms = candidate.perms
|
||||||
}
|
}
|
||||||
case "gssapi-with-mic":
|
case "gssapi-with-mic":
|
||||||
if config.GSSAPIWithMICConfig == nil {
|
if authConfig.GSSAPIWithMICConfig == nil {
|
||||||
authErr = errors.New("ssh: gssapi-with-mic auth not configured")
|
authErr = errors.New("ssh: gssapi-with-mic auth not configured")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
gssapiConfig := config.GSSAPIWithMICConfig
|
gssapiConfig := authConfig.GSSAPIWithMICConfig
|
||||||
userAuthRequestGSSAPI, err := parseGSSAPIPayload(userAuthReq.Payload)
|
userAuthRequestGSSAPI, err := parseGSSAPIPayload(userAuthReq.Payload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, parseError(msgUserAuthRequest)
|
return nil, parseError(msgUserAuthRequest)
|
||||||
@ -685,11 +759,44 @@ userAuthLoop:
|
|||||||
config.AuthLogCallback(s, userAuthReq.Method, authErr)
|
config.AuthLogCallback(s, userAuthReq.Method, authErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var bannerErr *BannerError
|
||||||
|
if errors.As(authErr, &bannerErr) {
|
||||||
|
if bannerErr.Message != "" {
|
||||||
|
bannerMsg := &userAuthBannerMsg{
|
||||||
|
Message: bannerErr.Message,
|
||||||
|
}
|
||||||
|
if err := s.transport.writePacket(Marshal(bannerMsg)); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if authErr == nil {
|
if authErr == nil {
|
||||||
break userAuthLoop
|
break userAuthLoop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var failureMsg userAuthFailureMsg
|
||||||
|
|
||||||
|
if partialSuccess, ok := authErr.(*PartialSuccessError); ok {
|
||||||
|
// After a partial success error we don't allow changing the user
|
||||||
|
// name and execute the NoClientAuthCallback.
|
||||||
|
partialSuccessReturned = true
|
||||||
|
|
||||||
|
// In case a partial success is returned, the server may send
|
||||||
|
// a new set of authentication methods.
|
||||||
|
authConfig = partialSuccess.Next
|
||||||
|
|
||||||
|
// Reset pubkey cache, as the new PublicKeyCallback might
|
||||||
|
// accept a different set of public keys.
|
||||||
|
cache = pubKeyCache{}
|
||||||
|
|
||||||
|
// Send back a partial success message to the user.
|
||||||
|
failureMsg.PartialSuccess = true
|
||||||
|
} else {
|
||||||
|
// Allow initial attempt of 'none' without penalty.
|
||||||
|
if authFailures > 0 || userAuthReq.Method != "none" || noneAuthCount != 1 {
|
||||||
authFailures++
|
authFailures++
|
||||||
|
}
|
||||||
if config.MaxAuthTries > 0 && authFailures >= config.MaxAuthTries {
|
if config.MaxAuthTries > 0 && authFailures >= config.MaxAuthTries {
|
||||||
// If we have hit the max attempts, don't bother sending the
|
// If we have hit the max attempts, don't bother sending the
|
||||||
// final SSH_MSG_USERAUTH_FAILURE message, since there are
|
// final SSH_MSG_USERAUTH_FAILURE message, since there are
|
||||||
@ -709,29 +816,29 @@ userAuthLoop:
|
|||||||
// disconnect, should we only send that message.)
|
// disconnect, should we only send that message.)
|
||||||
//
|
//
|
||||||
// Either way, OpenSSH disconnects immediately after the last
|
// Either way, OpenSSH disconnects immediately after the last
|
||||||
// failed authnetication attempt, and given they are typically
|
// failed authentication attempt, and given they are typically
|
||||||
// considered the golden implementation it seems reasonable
|
// considered the golden implementation it seems reasonable
|
||||||
// to match that behavior.
|
// to match that behavior.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var failureMsg userAuthFailureMsg
|
if authConfig.PasswordCallback != nil {
|
||||||
if config.PasswordCallback != nil {
|
|
||||||
failureMsg.Methods = append(failureMsg.Methods, "password")
|
failureMsg.Methods = append(failureMsg.Methods, "password")
|
||||||
}
|
}
|
||||||
if config.PublicKeyCallback != nil {
|
if authConfig.PublicKeyCallback != nil {
|
||||||
failureMsg.Methods = append(failureMsg.Methods, "publickey")
|
failureMsg.Methods = append(failureMsg.Methods, "publickey")
|
||||||
}
|
}
|
||||||
if config.KeyboardInteractiveCallback != nil {
|
if authConfig.KeyboardInteractiveCallback != nil {
|
||||||
failureMsg.Methods = append(failureMsg.Methods, "keyboard-interactive")
|
failureMsg.Methods = append(failureMsg.Methods, "keyboard-interactive")
|
||||||
}
|
}
|
||||||
if config.GSSAPIWithMICConfig != nil && config.GSSAPIWithMICConfig.Server != nil &&
|
if authConfig.GSSAPIWithMICConfig != nil && authConfig.GSSAPIWithMICConfig.Server != nil &&
|
||||||
config.GSSAPIWithMICConfig.AllowLogin != nil {
|
authConfig.GSSAPIWithMICConfig.AllowLogin != nil {
|
||||||
failureMsg.Methods = append(failureMsg.Methods, "gssapi-with-mic")
|
failureMsg.Methods = append(failureMsg.Methods, "gssapi-with-mic")
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(failureMsg.Methods) == 0 {
|
if len(failureMsg.Methods) == 0 {
|
||||||
return nil, errors.New("ssh: no authentication methods configured but NoClientAuth is also false")
|
return nil, errors.New("ssh: no authentication methods available")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := s.transport.writePacket(Marshal(&failureMsg)); err != nil {
|
if err := s.transport.writePacket(Marshal(&failureMsg)); err != nil {
|
||||||
|
2
vendor/golang.org/x/net/html/doc.go
generated
vendored
2
vendor/golang.org/x/net/html/doc.go
generated
vendored
@ -104,7 +104,7 @@ tokenization, and tokenization and tree construction stages of the WHATWG HTML
|
|||||||
parsing specification respectively. While the tokenizer parses and normalizes
|
parsing specification respectively. While the tokenizer parses and normalizes
|
||||||
individual HTML tokens, only the parser constructs the DOM tree from the
|
individual HTML tokens, only the parser constructs the DOM tree from the
|
||||||
tokenized HTML, as described in the tree construction stage of the
|
tokenized HTML, as described in the tree construction stage of the
|
||||||
specification, dynamically modifying or extending the docuemnt's DOM tree.
|
specification, dynamically modifying or extending the document's DOM tree.
|
||||||
|
|
||||||
If your use case requires semantically well-formed HTML documents, as defined by
|
If your use case requires semantically well-formed HTML documents, as defined by
|
||||||
the WHATWG specification, the parser should be used rather than the tokenizer.
|
the WHATWG specification, the parser should be used rather than the tokenizer.
|
||||||
|
13
vendor/golang.org/x/net/http/httpguts/httplex.go
generated
vendored
13
vendor/golang.org/x/net/http/httpguts/httplex.go
generated
vendored
@ -12,7 +12,7 @@ import (
|
|||||||
"golang.org/x/net/idna"
|
"golang.org/x/net/idna"
|
||||||
)
|
)
|
||||||
|
|
||||||
var isTokenTable = [127]bool{
|
var isTokenTable = [256]bool{
|
||||||
'!': true,
|
'!': true,
|
||||||
'#': true,
|
'#': true,
|
||||||
'$': true,
|
'$': true,
|
||||||
@ -93,12 +93,7 @@ var isTokenTable = [127]bool{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func IsTokenRune(r rune) bool {
|
func IsTokenRune(r rune) bool {
|
||||||
i := int(r)
|
return r < utf8.RuneSelf && isTokenTable[byte(r)]
|
||||||
return i < len(isTokenTable) && isTokenTable[i]
|
|
||||||
}
|
|
||||||
|
|
||||||
func isNotToken(r rune) bool {
|
|
||||||
return !IsTokenRune(r)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// HeaderValuesContainsToken reports whether any string in values
|
// HeaderValuesContainsToken reports whether any string in values
|
||||||
@ -202,8 +197,8 @@ func ValidHeaderFieldName(v string) bool {
|
|||||||
if len(v) == 0 {
|
if len(v) == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for _, r := range v {
|
for i := 0; i < len(v); i++ {
|
||||||
if !IsTokenRune(r) {
|
if !isTokenTable[v[i]] {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
40
vendor/golang.org/x/net/http2/frame.go
generated
vendored
40
vendor/golang.org/x/net/http2/frame.go
generated
vendored
@ -490,6 +490,9 @@ func terminalReadFrameError(err error) bool {
|
|||||||
// returned error is ErrFrameTooLarge. Other errors may be of type
|
// returned error is ErrFrameTooLarge. Other errors may be of type
|
||||||
// ConnectionError, StreamError, or anything else from the underlying
|
// ConnectionError, StreamError, or anything else from the underlying
|
||||||
// reader.
|
// reader.
|
||||||
|
//
|
||||||
|
// If ReadFrame returns an error and a non-nil Frame, the Frame's StreamID
|
||||||
|
// indicates the stream responsible for the error.
|
||||||
func (fr *Framer) ReadFrame() (Frame, error) {
|
func (fr *Framer) ReadFrame() (Frame, error) {
|
||||||
fr.errDetail = nil
|
fr.errDetail = nil
|
||||||
if fr.lastFrame != nil {
|
if fr.lastFrame != nil {
|
||||||
@ -1521,7 +1524,7 @@ func (fr *Framer) maxHeaderStringLen() int {
|
|||||||
// readMetaFrame returns 0 or more CONTINUATION frames from fr and
|
// readMetaFrame returns 0 or more CONTINUATION frames from fr and
|
||||||
// merge them into the provided hf and returns a MetaHeadersFrame
|
// merge them into the provided hf and returns a MetaHeadersFrame
|
||||||
// with the decoded hpack values.
|
// with the decoded hpack values.
|
||||||
func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
|
func (fr *Framer) readMetaFrame(hf *HeadersFrame) (Frame, error) {
|
||||||
if fr.AllowIllegalReads {
|
if fr.AllowIllegalReads {
|
||||||
return nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders")
|
return nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders")
|
||||||
}
|
}
|
||||||
@ -1564,6 +1567,7 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
|
|||||||
if size > remainSize {
|
if size > remainSize {
|
||||||
hdec.SetEmitEnabled(false)
|
hdec.SetEmitEnabled(false)
|
||||||
mh.Truncated = true
|
mh.Truncated = true
|
||||||
|
remainSize = 0
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
remainSize -= size
|
remainSize -= size
|
||||||
@ -1576,8 +1580,38 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
|
|||||||
var hc headersOrContinuation = hf
|
var hc headersOrContinuation = hf
|
||||||
for {
|
for {
|
||||||
frag := hc.HeaderBlockFragment()
|
frag := hc.HeaderBlockFragment()
|
||||||
|
|
||||||
|
// Avoid parsing large amounts of headers that we will then discard.
|
||||||
|
// If the sender exceeds the max header list size by too much,
|
||||||
|
// skip parsing the fragment and close the connection.
|
||||||
|
//
|
||||||
|
// "Too much" is either any CONTINUATION frame after we've already
|
||||||
|
// exceeded the max header list size (in which case remainSize is 0),
|
||||||
|
// or a frame whose encoded size is more than twice the remaining
|
||||||
|
// header list bytes we're willing to accept.
|
||||||
|
if int64(len(frag)) > int64(2*remainSize) {
|
||||||
|
if VerboseLogs {
|
||||||
|
log.Printf("http2: header list too large")
|
||||||
|
}
|
||||||
|
// It would be nice to send a RST_STREAM before sending the GOAWAY,
|
||||||
|
// but the structure of the server's frame writer makes this difficult.
|
||||||
|
return mh, ConnectionError(ErrCodeProtocol)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Also close the connection after any CONTINUATION frame following an
|
||||||
|
// invalid header, since we stop tracking the size of the headers after
|
||||||
|
// an invalid one.
|
||||||
|
if invalid != nil {
|
||||||
|
if VerboseLogs {
|
||||||
|
log.Printf("http2: invalid header: %v", invalid)
|
||||||
|
}
|
||||||
|
// It would be nice to send a RST_STREAM before sending the GOAWAY,
|
||||||
|
// but the structure of the server's frame writer makes this difficult.
|
||||||
|
return mh, ConnectionError(ErrCodeProtocol)
|
||||||
|
}
|
||||||
|
|
||||||
if _, err := hdec.Write(frag); err != nil {
|
if _, err := hdec.Write(frag); err != nil {
|
||||||
return nil, ConnectionError(ErrCodeCompression)
|
return mh, ConnectionError(ErrCodeCompression)
|
||||||
}
|
}
|
||||||
|
|
||||||
if hc.HeadersEnded() {
|
if hc.HeadersEnded() {
|
||||||
@ -1594,7 +1628,7 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
|
|||||||
mh.HeadersFrame.invalidate()
|
mh.HeadersFrame.invalidate()
|
||||||
|
|
||||||
if err := hdec.Close(); err != nil {
|
if err := hdec.Close(); err != nil {
|
||||||
return nil, ConnectionError(ErrCodeCompression)
|
return mh, ConnectionError(ErrCodeCompression)
|
||||||
}
|
}
|
||||||
if invalid != nil {
|
if invalid != nil {
|
||||||
fr.errDetail = invalid
|
fr.errDetail = invalid
|
||||||
|
11
vendor/golang.org/x/net/http2/pipe.go
generated
vendored
11
vendor/golang.org/x/net/http2/pipe.go
generated
vendored
@ -77,7 +77,10 @@ func (p *pipe) Read(d []byte) (n int, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var errClosedPipeWrite = errors.New("write on closed buffer")
|
var (
|
||||||
|
errClosedPipeWrite = errors.New("write on closed buffer")
|
||||||
|
errUninitializedPipeWrite = errors.New("write on uninitialized buffer")
|
||||||
|
)
|
||||||
|
|
||||||
// Write copies bytes from p into the buffer and wakes a reader.
|
// Write copies bytes from p into the buffer and wakes a reader.
|
||||||
// It is an error to write more data than the buffer can hold.
|
// It is an error to write more data than the buffer can hold.
|
||||||
@ -91,6 +94,12 @@ func (p *pipe) Write(d []byte) (n int, err error) {
|
|||||||
if p.err != nil || p.breakErr != nil {
|
if p.err != nil || p.breakErr != nil {
|
||||||
return 0, errClosedPipeWrite
|
return 0, errClosedPipeWrite
|
||||||
}
|
}
|
||||||
|
// pipe.setBuffer is never invoked, leaving the buffer uninitialized.
|
||||||
|
// We shouldn't try to write to an uninitialized pipe,
|
||||||
|
// but returning an error is better than panicking.
|
||||||
|
if p.b == nil {
|
||||||
|
return 0, errUninitializedPipeWrite
|
||||||
|
}
|
||||||
return p.b.Write(d)
|
return p.b.Write(d)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
24
vendor/golang.org/x/net/http2/server.go
generated
vendored
24
vendor/golang.org/x/net/http2/server.go
generated
vendored
@ -124,6 +124,7 @@ type Server struct {
|
|||||||
// IdleTimeout specifies how long until idle clients should be
|
// IdleTimeout specifies how long until idle clients should be
|
||||||
// closed with a GOAWAY frame. PING frames are not considered
|
// closed with a GOAWAY frame. PING frames are not considered
|
||||||
// activity for the purposes of IdleTimeout.
|
// activity for the purposes of IdleTimeout.
|
||||||
|
// If zero or negative, there is no timeout.
|
||||||
IdleTimeout time.Duration
|
IdleTimeout time.Duration
|
||||||
|
|
||||||
// MaxUploadBufferPerConnection is the size of the initial flow
|
// MaxUploadBufferPerConnection is the size of the initial flow
|
||||||
@ -434,7 +435,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
|
|||||||
// passes the connection off to us with the deadline already set.
|
// passes the connection off to us with the deadline already set.
|
||||||
// Write deadlines are set per stream in serverConn.newStream.
|
// Write deadlines are set per stream in serverConn.newStream.
|
||||||
// Disarm the net.Conn write deadline here.
|
// Disarm the net.Conn write deadline here.
|
||||||
if sc.hs.WriteTimeout != 0 {
|
if sc.hs.WriteTimeout > 0 {
|
||||||
sc.conn.SetWriteDeadline(time.Time{})
|
sc.conn.SetWriteDeadline(time.Time{})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -731,11 +732,7 @@ func isClosedConnError(err error) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove this string search and be more like the Windows
|
if errors.Is(err, net.ErrClosed) {
|
||||||
// case below. That might involve modifying the standard library
|
|
||||||
// to return better error types.
|
|
||||||
str := err.Error()
|
|
||||||
if strings.Contains(str, "use of closed network connection") {
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -924,7 +921,7 @@ func (sc *serverConn) serve() {
|
|||||||
sc.setConnState(http.StateActive)
|
sc.setConnState(http.StateActive)
|
||||||
sc.setConnState(http.StateIdle)
|
sc.setConnState(http.StateIdle)
|
||||||
|
|
||||||
if sc.srv.IdleTimeout != 0 {
|
if sc.srv.IdleTimeout > 0 {
|
||||||
sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)
|
sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)
|
||||||
defer sc.idleTimer.Stop()
|
defer sc.idleTimer.Stop()
|
||||||
}
|
}
|
||||||
@ -1481,6 +1478,11 @@ func (sc *serverConn) processFrameFromReader(res readFrameResult) bool {
|
|||||||
sc.goAway(ErrCodeFlowControl)
|
sc.goAway(ErrCodeFlowControl)
|
||||||
return true
|
return true
|
||||||
case ConnectionError:
|
case ConnectionError:
|
||||||
|
if res.f != nil {
|
||||||
|
if id := res.f.Header().StreamID; id > sc.maxClientStreamID {
|
||||||
|
sc.maxClientStreamID = id
|
||||||
|
}
|
||||||
|
}
|
||||||
sc.logf("http2: server connection error from %v: %v", sc.conn.RemoteAddr(), ev)
|
sc.logf("http2: server connection error from %v: %v", sc.conn.RemoteAddr(), ev)
|
||||||
sc.goAway(ErrCode(ev))
|
sc.goAway(ErrCode(ev))
|
||||||
return true // goAway will handle shutdown
|
return true // goAway will handle shutdown
|
||||||
@ -1637,7 +1639,7 @@ func (sc *serverConn) closeStream(st *stream, err error) {
|
|||||||
delete(sc.streams, st.id)
|
delete(sc.streams, st.id)
|
||||||
if len(sc.streams) == 0 {
|
if len(sc.streams) == 0 {
|
||||||
sc.setConnState(http.StateIdle)
|
sc.setConnState(http.StateIdle)
|
||||||
if sc.srv.IdleTimeout != 0 {
|
if sc.srv.IdleTimeout > 0 {
|
||||||
sc.idleTimer.Reset(sc.srv.IdleTimeout)
|
sc.idleTimer.Reset(sc.srv.IdleTimeout)
|
||||||
}
|
}
|
||||||
if h1ServerKeepAlivesDisabled(sc.hs) {
|
if h1ServerKeepAlivesDisabled(sc.hs) {
|
||||||
@ -2017,7 +2019,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
|
|||||||
// similar to how the http1 server works. Here it's
|
// similar to how the http1 server works. Here it's
|
||||||
// technically more like the http1 Server's ReadHeaderTimeout
|
// technically more like the http1 Server's ReadHeaderTimeout
|
||||||
// (in Go 1.8), though. That's a more sane option anyway.
|
// (in Go 1.8), though. That's a more sane option anyway.
|
||||||
if sc.hs.ReadTimeout != 0 {
|
if sc.hs.ReadTimeout > 0 {
|
||||||
sc.conn.SetReadDeadline(time.Time{})
|
sc.conn.SetReadDeadline(time.Time{})
|
||||||
st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
|
st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
|
||||||
}
|
}
|
||||||
@ -2038,7 +2040,7 @@ func (sc *serverConn) upgradeRequest(req *http.Request) {
|
|||||||
|
|
||||||
// Disable any read deadline set by the net/http package
|
// Disable any read deadline set by the net/http package
|
||||||
// prior to the upgrade.
|
// prior to the upgrade.
|
||||||
if sc.hs.ReadTimeout != 0 {
|
if sc.hs.ReadTimeout > 0 {
|
||||||
sc.conn.SetReadDeadline(time.Time{})
|
sc.conn.SetReadDeadline(time.Time{})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2116,7 +2118,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream
|
|||||||
st.flow.conn = &sc.flow // link to conn-level counter
|
st.flow.conn = &sc.flow // link to conn-level counter
|
||||||
st.flow.add(sc.initialStreamSendWindowSize)
|
st.flow.add(sc.initialStreamSendWindowSize)
|
||||||
st.inflow.init(sc.srv.initialStreamRecvWindowSize())
|
st.inflow.init(sc.srv.initialStreamRecvWindowSize())
|
||||||
if sc.hs.WriteTimeout != 0 {
|
if sc.hs.WriteTimeout > 0 {
|
||||||
st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout)
|
st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
331
vendor/golang.org/x/net/http2/testsync.go
generated
vendored
Normal file
331
vendor/golang.org/x/net/http2/testsync.go
generated
vendored
Normal file
@ -0,0 +1,331 @@
|
|||||||
|
// Copyright 2024 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 http2
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// testSyncHooks coordinates goroutines in tests.
|
||||||
|
//
|
||||||
|
// For example, a call to ClientConn.RoundTrip involves several goroutines, including:
|
||||||
|
// - the goroutine running RoundTrip;
|
||||||
|
// - the clientStream.doRequest goroutine, which writes the request; and
|
||||||
|
// - the clientStream.readLoop goroutine, which reads the response.
|
||||||
|
//
|
||||||
|
// Using testSyncHooks, a test can start a RoundTrip and identify when all these goroutines
|
||||||
|
// are blocked waiting for some condition such as reading the Request.Body or waiting for
|
||||||
|
// flow control to become available.
|
||||||
|
//
|
||||||
|
// The testSyncHooks also manage timers and synthetic time in tests.
|
||||||
|
// This permits us to, for example, start a request and cause it to time out waiting for
|
||||||
|
// response headers without resorting to time.Sleep calls.
|
||||||
|
type testSyncHooks struct {
|
||||||
|
// active/inactive act as a mutex and condition variable.
|
||||||
|
//
|
||||||
|
// - neither chan contains a value: testSyncHooks is locked.
|
||||||
|
// - active contains a value: unlocked, and at least one goroutine is not blocked
|
||||||
|
// - inactive contains a value: unlocked, and all goroutines are blocked
|
||||||
|
active chan struct{}
|
||||||
|
inactive chan struct{}
|
||||||
|
|
||||||
|
// goroutine counts
|
||||||
|
total int // total goroutines
|
||||||
|
condwait map[*sync.Cond]int // blocked in sync.Cond.Wait
|
||||||
|
blocked []*testBlockedGoroutine // otherwise blocked
|
||||||
|
|
||||||
|
// fake time
|
||||||
|
now time.Time
|
||||||
|
timers []*fakeTimer
|
||||||
|
|
||||||
|
// Transport testing: Report various events.
|
||||||
|
newclientconn func(*ClientConn)
|
||||||
|
newstream func(*clientStream)
|
||||||
|
}
|
||||||
|
|
||||||
|
// testBlockedGoroutine is a blocked goroutine.
|
||||||
|
type testBlockedGoroutine struct {
|
||||||
|
f func() bool // blocked until f returns true
|
||||||
|
ch chan struct{} // closed when unblocked
|
||||||
|
}
|
||||||
|
|
||||||
|
func newTestSyncHooks() *testSyncHooks {
|
||||||
|
h := &testSyncHooks{
|
||||||
|
active: make(chan struct{}, 1),
|
||||||
|
inactive: make(chan struct{}, 1),
|
||||||
|
condwait: map[*sync.Cond]int{},
|
||||||
|
}
|
||||||
|
h.inactive <- struct{}{}
|
||||||
|
h.now = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||||
|
return h
|
||||||
|
}
|
||||||
|
|
||||||
|
// lock acquires the testSyncHooks mutex.
|
||||||
|
func (h *testSyncHooks) lock() {
|
||||||
|
select {
|
||||||
|
case <-h.active:
|
||||||
|
case <-h.inactive:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// waitInactive waits for all goroutines to become inactive.
|
||||||
|
func (h *testSyncHooks) waitInactive() {
|
||||||
|
for {
|
||||||
|
<-h.inactive
|
||||||
|
if !h.unlock() {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// unlock releases the testSyncHooks mutex.
|
||||||
|
// It reports whether any goroutines are active.
|
||||||
|
func (h *testSyncHooks) unlock() (active bool) {
|
||||||
|
// Look for a blocked goroutine which can be unblocked.
|
||||||
|
blocked := h.blocked[:0]
|
||||||
|
unblocked := false
|
||||||
|
for _, b := range h.blocked {
|
||||||
|
if !unblocked && b.f() {
|
||||||
|
unblocked = true
|
||||||
|
close(b.ch)
|
||||||
|
} else {
|
||||||
|
blocked = append(blocked, b)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
h.blocked = blocked
|
||||||
|
|
||||||
|
// Count goroutines blocked on condition variables.
|
||||||
|
condwait := 0
|
||||||
|
for _, count := range h.condwait {
|
||||||
|
condwait += count
|
||||||
|
}
|
||||||
|
|
||||||
|
if h.total > condwait+len(blocked) {
|
||||||
|
h.active <- struct{}{}
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
h.inactive <- struct{}{}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// goRun starts a new goroutine.
|
||||||
|
func (h *testSyncHooks) goRun(f func()) {
|
||||||
|
h.lock()
|
||||||
|
h.total++
|
||||||
|
h.unlock()
|
||||||
|
go func() {
|
||||||
|
defer func() {
|
||||||
|
h.lock()
|
||||||
|
h.total--
|
||||||
|
h.unlock()
|
||||||
|
}()
|
||||||
|
f()
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
|
// blockUntil indicates that a goroutine is blocked waiting for some condition to become true.
|
||||||
|
// It waits until f returns true before proceeding.
|
||||||
|
//
|
||||||
|
// Example usage:
|
||||||
|
//
|
||||||
|
// h.blockUntil(func() bool {
|
||||||
|
// // Is the context done yet?
|
||||||
|
// select {
|
||||||
|
// case <-ctx.Done():
|
||||||
|
// default:
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
|
// return true
|
||||||
|
// })
|
||||||
|
// // Wait for the context to become done.
|
||||||
|
// <-ctx.Done()
|
||||||
|
//
|
||||||
|
// The function f passed to blockUntil must be non-blocking and idempotent.
|
||||||
|
func (h *testSyncHooks) blockUntil(f func() bool) {
|
||||||
|
if f() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ch := make(chan struct{})
|
||||||
|
h.lock()
|
||||||
|
h.blocked = append(h.blocked, &testBlockedGoroutine{
|
||||||
|
f: f,
|
||||||
|
ch: ch,
|
||||||
|
})
|
||||||
|
h.unlock()
|
||||||
|
<-ch
|
||||||
|
}
|
||||||
|
|
||||||
|
// broadcast is sync.Cond.Broadcast.
|
||||||
|
func (h *testSyncHooks) condBroadcast(cond *sync.Cond) {
|
||||||
|
h.lock()
|
||||||
|
delete(h.condwait, cond)
|
||||||
|
h.unlock()
|
||||||
|
cond.Broadcast()
|
||||||
|
}
|
||||||
|
|
||||||
|
// broadcast is sync.Cond.Wait.
|
||||||
|
func (h *testSyncHooks) condWait(cond *sync.Cond) {
|
||||||
|
h.lock()
|
||||||
|
h.condwait[cond]++
|
||||||
|
h.unlock()
|
||||||
|
}
|
||||||
|
|
||||||
|
// newTimer creates a new fake timer.
|
||||||
|
func (h *testSyncHooks) newTimer(d time.Duration) timer {
|
||||||
|
h.lock()
|
||||||
|
defer h.unlock()
|
||||||
|
t := &fakeTimer{
|
||||||
|
hooks: h,
|
||||||
|
when: h.now.Add(d),
|
||||||
|
c: make(chan time.Time),
|
||||||
|
}
|
||||||
|
h.timers = append(h.timers, t)
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
|
||||||
|
// afterFunc creates a new fake AfterFunc timer.
|
||||||
|
func (h *testSyncHooks) afterFunc(d time.Duration, f func()) timer {
|
||||||
|
h.lock()
|
||||||
|
defer h.unlock()
|
||||||
|
t := &fakeTimer{
|
||||||
|
hooks: h,
|
||||||
|
when: h.now.Add(d),
|
||||||
|
f: f,
|
||||||
|
}
|
||||||
|
h.timers = append(h.timers, t)
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *testSyncHooks) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) {
|
||||||
|
ctx, cancel := context.WithCancel(ctx)
|
||||||
|
t := h.afterFunc(d, cancel)
|
||||||
|
return ctx, func() {
|
||||||
|
t.Stop()
|
||||||
|
cancel()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *testSyncHooks) timeUntilEvent() time.Duration {
|
||||||
|
h.lock()
|
||||||
|
defer h.unlock()
|
||||||
|
var next time.Time
|
||||||
|
for _, t := range h.timers {
|
||||||
|
if next.IsZero() || t.when.Before(next) {
|
||||||
|
next = t.when
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if d := next.Sub(h.now); d > 0 {
|
||||||
|
return d
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// advance advances time and causes synthetic timers to fire.
|
||||||
|
func (h *testSyncHooks) advance(d time.Duration) {
|
||||||
|
h.lock()
|
||||||
|
defer h.unlock()
|
||||||
|
h.now = h.now.Add(d)
|
||||||
|
timers := h.timers[:0]
|
||||||
|
for _, t := range h.timers {
|
||||||
|
t := t // remove after go.mod depends on go1.22
|
||||||
|
t.mu.Lock()
|
||||||
|
switch {
|
||||||
|
case t.when.After(h.now):
|
||||||
|
timers = append(timers, t)
|
||||||
|
case t.when.IsZero():
|
||||||
|
// stopped timer
|
||||||
|
default:
|
||||||
|
t.when = time.Time{}
|
||||||
|
if t.c != nil {
|
||||||
|
close(t.c)
|
||||||
|
}
|
||||||
|
if t.f != nil {
|
||||||
|
h.total++
|
||||||
|
go func() {
|
||||||
|
defer func() {
|
||||||
|
h.lock()
|
||||||
|
h.total--
|
||||||
|
h.unlock()
|
||||||
|
}()
|
||||||
|
t.f()
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t.mu.Unlock()
|
||||||
|
}
|
||||||
|
h.timers = timers
|
||||||
|
}
|
||||||
|
|
||||||
|
// A timer wraps a time.Timer, or a synthetic equivalent in tests.
|
||||||
|
// Unlike time.Timer, timer is single-use: The timer channel is closed when the timer expires.
|
||||||
|
type timer interface {
|
||||||
|
C() <-chan time.Time
|
||||||
|
Stop() bool
|
||||||
|
Reset(d time.Duration) bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// timeTimer implements timer using real time.
|
||||||
|
type timeTimer struct {
|
||||||
|
t *time.Timer
|
||||||
|
c chan time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
// newTimeTimer creates a new timer using real time.
|
||||||
|
func newTimeTimer(d time.Duration) timer {
|
||||||
|
ch := make(chan time.Time)
|
||||||
|
t := time.AfterFunc(d, func() {
|
||||||
|
close(ch)
|
||||||
|
})
|
||||||
|
return &timeTimer{t, ch}
|
||||||
|
}
|
||||||
|
|
||||||
|
// newTimeAfterFunc creates an AfterFunc timer using real time.
|
||||||
|
func newTimeAfterFunc(d time.Duration, f func()) timer {
|
||||||
|
return &timeTimer{
|
||||||
|
t: time.AfterFunc(d, f),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t timeTimer) C() <-chan time.Time { return t.c }
|
||||||
|
func (t timeTimer) Stop() bool { return t.t.Stop() }
|
||||||
|
func (t timeTimer) Reset(d time.Duration) bool { return t.t.Reset(d) }
|
||||||
|
|
||||||
|
// fakeTimer implements timer using fake time.
|
||||||
|
type fakeTimer struct {
|
||||||
|
hooks *testSyncHooks
|
||||||
|
|
||||||
|
mu sync.Mutex
|
||||||
|
when time.Time // when the timer will fire
|
||||||
|
c chan time.Time // closed when the timer fires; mutually exclusive with f
|
||||||
|
f func() // called when the timer fires; mutually exclusive with c
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *fakeTimer) C() <-chan time.Time { return t.c }
|
||||||
|
|
||||||
|
func (t *fakeTimer) Stop() bool {
|
||||||
|
t.mu.Lock()
|
||||||
|
defer t.mu.Unlock()
|
||||||
|
stopped := t.when.IsZero()
|
||||||
|
t.when = time.Time{}
|
||||||
|
return stopped
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *fakeTimer) Reset(d time.Duration) bool {
|
||||||
|
if t.c != nil || t.f == nil {
|
||||||
|
panic("fakeTimer only supports Reset on AfterFunc timers")
|
||||||
|
}
|
||||||
|
t.mu.Lock()
|
||||||
|
defer t.mu.Unlock()
|
||||||
|
t.hooks.lock()
|
||||||
|
defer t.hooks.unlock()
|
||||||
|
active := !t.when.IsZero()
|
||||||
|
t.when = t.hooks.now.Add(d)
|
||||||
|
if !active {
|
||||||
|
t.hooks.timers = append(t.hooks.timers, t)
|
||||||
|
}
|
||||||
|
return active
|
||||||
|
}
|
311
vendor/golang.org/x/net/http2/transport.go
generated
vendored
311
vendor/golang.org/x/net/http2/transport.go
generated
vendored
@ -147,6 +147,12 @@ type Transport struct {
|
|||||||
// waiting for their turn.
|
// waiting for their turn.
|
||||||
StrictMaxConcurrentStreams bool
|
StrictMaxConcurrentStreams bool
|
||||||
|
|
||||||
|
// IdleConnTimeout is the maximum amount of time an idle
|
||||||
|
// (keep-alive) connection will remain idle before closing
|
||||||
|
// itself.
|
||||||
|
// Zero means no limit.
|
||||||
|
IdleConnTimeout time.Duration
|
||||||
|
|
||||||
// ReadIdleTimeout is the timeout after which a health check using ping
|
// ReadIdleTimeout is the timeout after which a health check using ping
|
||||||
// frame will be carried out if no frame is received on the connection.
|
// frame will be carried out if no frame is received on the connection.
|
||||||
// Note that a ping response will is considered a received frame, so if
|
// Note that a ping response will is considered a received frame, so if
|
||||||
@ -178,6 +184,8 @@ type Transport struct {
|
|||||||
|
|
||||||
connPoolOnce sync.Once
|
connPoolOnce sync.Once
|
||||||
connPoolOrDef ClientConnPool // non-nil version of ConnPool
|
connPoolOrDef ClientConnPool // non-nil version of ConnPool
|
||||||
|
|
||||||
|
syncHooks *testSyncHooks
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Transport) maxHeaderListSize() uint32 {
|
func (t *Transport) maxHeaderListSize() uint32 {
|
||||||
@ -302,7 +310,7 @@ type ClientConn struct {
|
|||||||
readerErr error // set before readerDone is closed
|
readerErr error // set before readerDone is closed
|
||||||
|
|
||||||
idleTimeout time.Duration // or 0 for never
|
idleTimeout time.Duration // or 0 for never
|
||||||
idleTimer *time.Timer
|
idleTimer timer
|
||||||
|
|
||||||
mu sync.Mutex // guards following
|
mu sync.Mutex // guards following
|
||||||
cond *sync.Cond // hold mu; broadcast on flow/closed changes
|
cond *sync.Cond // hold mu; broadcast on flow/closed changes
|
||||||
@ -344,6 +352,60 @@ type ClientConn struct {
|
|||||||
werr error // first write error that has occurred
|
werr error // first write error that has occurred
|
||||||
hbuf bytes.Buffer // HPACK encoder writes into this
|
hbuf bytes.Buffer // HPACK encoder writes into this
|
||||||
henc *hpack.Encoder
|
henc *hpack.Encoder
|
||||||
|
|
||||||
|
syncHooks *testSyncHooks // can be nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hook points used for testing.
|
||||||
|
// Outside of tests, cc.syncHooks is nil and these all have minimal implementations.
|
||||||
|
// Inside tests, see the testSyncHooks function docs.
|
||||||
|
|
||||||
|
// goRun starts a new goroutine.
|
||||||
|
func (cc *ClientConn) goRun(f func()) {
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
cc.syncHooks.goRun(f)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
go f()
|
||||||
|
}
|
||||||
|
|
||||||
|
// condBroadcast is cc.cond.Broadcast.
|
||||||
|
func (cc *ClientConn) condBroadcast() {
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
cc.syncHooks.condBroadcast(cc.cond)
|
||||||
|
}
|
||||||
|
cc.cond.Broadcast()
|
||||||
|
}
|
||||||
|
|
||||||
|
// condWait is cc.cond.Wait.
|
||||||
|
func (cc *ClientConn) condWait() {
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
cc.syncHooks.condWait(cc.cond)
|
||||||
|
}
|
||||||
|
cc.cond.Wait()
|
||||||
|
}
|
||||||
|
|
||||||
|
// newTimer creates a new time.Timer, or a synthetic timer in tests.
|
||||||
|
func (cc *ClientConn) newTimer(d time.Duration) timer {
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
return cc.syncHooks.newTimer(d)
|
||||||
|
}
|
||||||
|
return newTimeTimer(d)
|
||||||
|
}
|
||||||
|
|
||||||
|
// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests.
|
||||||
|
func (cc *ClientConn) afterFunc(d time.Duration, f func()) timer {
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
return cc.syncHooks.afterFunc(d, f)
|
||||||
|
}
|
||||||
|
return newTimeAfterFunc(d, f)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cc *ClientConn) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) {
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
return cc.syncHooks.contextWithTimeout(ctx, d)
|
||||||
|
}
|
||||||
|
return context.WithTimeout(ctx, d)
|
||||||
}
|
}
|
||||||
|
|
||||||
// clientStream is the state for a single HTTP/2 stream. One of these
|
// clientStream is the state for a single HTTP/2 stream. One of these
|
||||||
@ -425,7 +487,7 @@ func (cs *clientStream) abortStreamLocked(err error) {
|
|||||||
// TODO(dneil): Clean up tests where cs.cc.cond is nil.
|
// TODO(dneil): Clean up tests where cs.cc.cond is nil.
|
||||||
if cs.cc.cond != nil {
|
if cs.cc.cond != nil {
|
||||||
// Wake up writeRequestBody if it is waiting on flow control.
|
// Wake up writeRequestBody if it is waiting on flow control.
|
||||||
cs.cc.cond.Broadcast()
|
cs.cc.condBroadcast()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,7 +497,7 @@ func (cs *clientStream) abortRequestBodyWrite() {
|
|||||||
defer cc.mu.Unlock()
|
defer cc.mu.Unlock()
|
||||||
if cs.reqBody != nil && cs.reqBodyClosed == nil {
|
if cs.reqBody != nil && cs.reqBodyClosed == nil {
|
||||||
cs.closeReqBodyLocked()
|
cs.closeReqBodyLocked()
|
||||||
cc.cond.Broadcast()
|
cc.condBroadcast()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,10 +507,10 @@ func (cs *clientStream) closeReqBodyLocked() {
|
|||||||
}
|
}
|
||||||
cs.reqBodyClosed = make(chan struct{})
|
cs.reqBodyClosed = make(chan struct{})
|
||||||
reqBodyClosed := cs.reqBodyClosed
|
reqBodyClosed := cs.reqBodyClosed
|
||||||
go func() {
|
cs.cc.goRun(func() {
|
||||||
cs.reqBody.Close()
|
cs.reqBody.Close()
|
||||||
close(reqBodyClosed)
|
close(reqBodyClosed)
|
||||||
}()
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
type stickyErrWriter struct {
|
type stickyErrWriter struct {
|
||||||
@ -537,15 +599,6 @@ func authorityAddr(scheme string, authority string) (addr string) {
|
|||||||
return net.JoinHostPort(host, port)
|
return net.JoinHostPort(host, port)
|
||||||
}
|
}
|
||||||
|
|
||||||
var retryBackoffHook func(time.Duration) *time.Timer
|
|
||||||
|
|
||||||
func backoffNewTimer(d time.Duration) *time.Timer {
|
|
||||||
if retryBackoffHook != nil {
|
|
||||||
return retryBackoffHook(d)
|
|
||||||
}
|
|
||||||
return time.NewTimer(d)
|
|
||||||
}
|
|
||||||
|
|
||||||
// RoundTripOpt is like RoundTrip, but takes options.
|
// RoundTripOpt is like RoundTrip, but takes options.
|
||||||
func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) {
|
func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) {
|
||||||
if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) {
|
if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) {
|
||||||
@ -573,13 +626,27 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
|
|||||||
backoff := float64(uint(1) << (uint(retry) - 1))
|
backoff := float64(uint(1) << (uint(retry) - 1))
|
||||||
backoff += backoff * (0.1 * mathrand.Float64())
|
backoff += backoff * (0.1 * mathrand.Float64())
|
||||||
d := time.Second * time.Duration(backoff)
|
d := time.Second * time.Duration(backoff)
|
||||||
timer := backoffNewTimer(d)
|
var tm timer
|
||||||
|
if t.syncHooks != nil {
|
||||||
|
tm = t.syncHooks.newTimer(d)
|
||||||
|
t.syncHooks.blockUntil(func() bool {
|
||||||
select {
|
select {
|
||||||
case <-timer.C:
|
case <-tm.C():
|
||||||
|
case <-req.Context().Done():
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
tm = newTimeTimer(d)
|
||||||
|
}
|
||||||
|
select {
|
||||||
|
case <-tm.C():
|
||||||
t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
|
t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
|
||||||
continue
|
continue
|
||||||
case <-req.Context().Done():
|
case <-req.Context().Done():
|
||||||
timer.Stop()
|
tm.Stop()
|
||||||
err = req.Context().Err()
|
err = req.Context().Err()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -658,6 +725,9 @@ func canRetryError(err error) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse bool) (*ClientConn, error) {
|
func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse bool) (*ClientConn, error) {
|
||||||
|
if t.syncHooks != nil {
|
||||||
|
return t.newClientConn(nil, singleUse, t.syncHooks)
|
||||||
|
}
|
||||||
host, _, err := net.SplitHostPort(addr)
|
host, _, err := net.SplitHostPort(addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -666,7 +736,7 @@ func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse b
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return t.newClientConn(tconn, singleUse)
|
return t.newClientConn(tconn, singleUse, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Transport) newTLSConfig(host string) *tls.Config {
|
func (t *Transport) newTLSConfig(host string) *tls.Config {
|
||||||
@ -732,10 +802,10 @@ func (t *Transport) maxEncoderHeaderTableSize() uint32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {
|
func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {
|
||||||
return t.newClientConn(c, t.disableKeepAlives())
|
return t.newClientConn(c, t.disableKeepAlives(), nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) {
|
func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHooks) (*ClientConn, error) {
|
||||||
cc := &ClientConn{
|
cc := &ClientConn{
|
||||||
t: t,
|
t: t,
|
||||||
tconn: c,
|
tconn: c,
|
||||||
@ -750,10 +820,15 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
|
|||||||
wantSettingsAck: true,
|
wantSettingsAck: true,
|
||||||
pings: make(map[[8]byte]chan struct{}),
|
pings: make(map[[8]byte]chan struct{}),
|
||||||
reqHeaderMu: make(chan struct{}, 1),
|
reqHeaderMu: make(chan struct{}, 1),
|
||||||
|
syncHooks: hooks,
|
||||||
|
}
|
||||||
|
if hooks != nil {
|
||||||
|
hooks.newclientconn(cc)
|
||||||
|
c = cc.tconn
|
||||||
}
|
}
|
||||||
if d := t.idleConnTimeout(); d != 0 {
|
if d := t.idleConnTimeout(); d != 0 {
|
||||||
cc.idleTimeout = d
|
cc.idleTimeout = d
|
||||||
cc.idleTimer = time.AfterFunc(d, cc.onIdleTimeout)
|
cc.idleTimer = cc.afterFunc(d, cc.onIdleTimeout)
|
||||||
}
|
}
|
||||||
if VerboseLogs {
|
if VerboseLogs {
|
||||||
t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr())
|
t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr())
|
||||||
@ -818,7 +893,7 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
|
|||||||
return nil, cc.werr
|
return nil, cc.werr
|
||||||
}
|
}
|
||||||
|
|
||||||
go cc.readLoop()
|
cc.goRun(cc.readLoop)
|
||||||
return cc, nil
|
return cc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -826,7 +901,7 @@ func (cc *ClientConn) healthCheck() {
|
|||||||
pingTimeout := cc.t.pingTimeout()
|
pingTimeout := cc.t.pingTimeout()
|
||||||
// We don't need to periodically ping in the health check, because the readLoop of ClientConn will
|
// We don't need to periodically ping in the health check, because the readLoop of ClientConn will
|
||||||
// trigger the healthCheck again if there is no frame received.
|
// trigger the healthCheck again if there is no frame received.
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), pingTimeout)
|
ctx, cancel := cc.contextWithTimeout(context.Background(), pingTimeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
cc.vlogf("http2: Transport sending health check")
|
cc.vlogf("http2: Transport sending health check")
|
||||||
err := cc.Ping(ctx)
|
err := cc.Ping(ctx)
|
||||||
@ -861,7 +936,20 @@ func (cc *ClientConn) setGoAway(f *GoAwayFrame) {
|
|||||||
}
|
}
|
||||||
last := f.LastStreamID
|
last := f.LastStreamID
|
||||||
for streamID, cs := range cc.streams {
|
for streamID, cs := range cc.streams {
|
||||||
if streamID > last {
|
if streamID <= last {
|
||||||
|
// The server's GOAWAY indicates that it received this stream.
|
||||||
|
// It will either finish processing it, or close the connection
|
||||||
|
// without doing so. Either way, leave the stream alone for now.
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if streamID == 1 && cc.goAway.ErrCode != ErrCodeNo {
|
||||||
|
// Don't retry the first stream on a connection if we get a non-NO error.
|
||||||
|
// If the server is sending an error on a new connection,
|
||||||
|
// retrying the request on a new one probably isn't going to work.
|
||||||
|
cs.abortStreamLocked(fmt.Errorf("http2: Transport received GOAWAY from server ErrCode:%v", cc.goAway.ErrCode))
|
||||||
|
} else {
|
||||||
|
// Aborting the stream with errClentConnGotGoAway indicates that
|
||||||
|
// the request should be retried on a new connection.
|
||||||
cs.abortStreamLocked(errClientConnGotGoAway)
|
cs.abortStreamLocked(errClientConnGotGoAway)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1056,7 +1144,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
|
|||||||
// Wait for all in-flight streams to complete or connection to close
|
// Wait for all in-flight streams to complete or connection to close
|
||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
cancelled := false // guarded by cc.mu
|
cancelled := false // guarded by cc.mu
|
||||||
go func() {
|
cc.goRun(func() {
|
||||||
cc.mu.Lock()
|
cc.mu.Lock()
|
||||||
defer cc.mu.Unlock()
|
defer cc.mu.Unlock()
|
||||||
for {
|
for {
|
||||||
@ -1068,9 +1156,9 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
|
|||||||
if cancelled {
|
if cancelled {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
cc.cond.Wait()
|
cc.condWait()
|
||||||
}
|
}
|
||||||
}()
|
})
|
||||||
shutdownEnterWaitStateHook()
|
shutdownEnterWaitStateHook()
|
||||||
select {
|
select {
|
||||||
case <-done:
|
case <-done:
|
||||||
@ -1080,7 +1168,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
|
|||||||
cc.mu.Lock()
|
cc.mu.Lock()
|
||||||
// Free the goroutine above
|
// Free the goroutine above
|
||||||
cancelled = true
|
cancelled = true
|
||||||
cc.cond.Broadcast()
|
cc.condBroadcast()
|
||||||
cc.mu.Unlock()
|
cc.mu.Unlock()
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
}
|
}
|
||||||
@ -1118,7 +1206,7 @@ func (cc *ClientConn) closeForError(err error) {
|
|||||||
for _, cs := range cc.streams {
|
for _, cs := range cc.streams {
|
||||||
cs.abortStreamLocked(err)
|
cs.abortStreamLocked(err)
|
||||||
}
|
}
|
||||||
cc.cond.Broadcast()
|
cc.condBroadcast()
|
||||||
cc.mu.Unlock()
|
cc.mu.Unlock()
|
||||||
cc.closeConn()
|
cc.closeConn()
|
||||||
}
|
}
|
||||||
@ -1215,6 +1303,10 @@ func (cc *ClientConn) decrStreamReservationsLocked() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||||
|
return cc.roundTrip(req, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) (*http.Response, error) {
|
||||||
ctx := req.Context()
|
ctx := req.Context()
|
||||||
cs := &clientStream{
|
cs := &clientStream{
|
||||||
cc: cc,
|
cc: cc,
|
||||||
@ -1229,9 +1321,23 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||||||
respHeaderRecv: make(chan struct{}),
|
respHeaderRecv: make(chan struct{}),
|
||||||
donec: make(chan struct{}),
|
donec: make(chan struct{}),
|
||||||
}
|
}
|
||||||
go cs.doRequest(req)
|
cc.goRun(func() {
|
||||||
|
cs.doRequest(req)
|
||||||
|
})
|
||||||
|
|
||||||
waitDone := func() error {
|
waitDone := func() error {
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
cc.syncHooks.blockUntil(func() bool {
|
||||||
|
select {
|
||||||
|
case <-cs.donec:
|
||||||
|
case <-ctx.Done():
|
||||||
|
case <-cs.reqCancel:
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
}
|
||||||
select {
|
select {
|
||||||
case <-cs.donec:
|
case <-cs.donec:
|
||||||
return nil
|
return nil
|
||||||
@ -1292,7 +1398,24 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if streamf != nil {
|
||||||
|
streamf(cs)
|
||||||
|
}
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
cc.syncHooks.blockUntil(func() bool {
|
||||||
|
select {
|
||||||
|
case <-cs.respHeaderRecv:
|
||||||
|
case <-cs.abort:
|
||||||
|
case <-ctx.Done():
|
||||||
|
case <-cs.reqCancel:
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
}
|
||||||
select {
|
select {
|
||||||
case <-cs.respHeaderRecv:
|
case <-cs.respHeaderRecv:
|
||||||
return handleResponseHeaders()
|
return handleResponseHeaders()
|
||||||
@ -1348,6 +1471,21 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) {
|
|||||||
if cc.reqHeaderMu == nil {
|
if cc.reqHeaderMu == nil {
|
||||||
panic("RoundTrip on uninitialized ClientConn") // for tests
|
panic("RoundTrip on uninitialized ClientConn") // for tests
|
||||||
}
|
}
|
||||||
|
var newStreamHook func(*clientStream)
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
newStreamHook = cc.syncHooks.newstream
|
||||||
|
cc.syncHooks.blockUntil(func() bool {
|
||||||
|
select {
|
||||||
|
case cc.reqHeaderMu <- struct{}{}:
|
||||||
|
<-cc.reqHeaderMu
|
||||||
|
case <-cs.reqCancel:
|
||||||
|
case <-ctx.Done():
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
}
|
||||||
select {
|
select {
|
||||||
case cc.reqHeaderMu <- struct{}{}:
|
case cc.reqHeaderMu <- struct{}{}:
|
||||||
case <-cs.reqCancel:
|
case <-cs.reqCancel:
|
||||||
@ -1372,6 +1510,10 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) {
|
|||||||
}
|
}
|
||||||
cc.mu.Unlock()
|
cc.mu.Unlock()
|
||||||
|
|
||||||
|
if newStreamHook != nil {
|
||||||
|
newStreamHook(cs)
|
||||||
|
}
|
||||||
|
|
||||||
// TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
|
// TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
|
||||||
if !cc.t.disableCompression() &&
|
if !cc.t.disableCompression() &&
|
||||||
req.Header.Get("Accept-Encoding") == "" &&
|
req.Header.Get("Accept-Encoding") == "" &&
|
||||||
@ -1452,15 +1594,30 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) {
|
|||||||
var respHeaderTimer <-chan time.Time
|
var respHeaderTimer <-chan time.Time
|
||||||
var respHeaderRecv chan struct{}
|
var respHeaderRecv chan struct{}
|
||||||
if d := cc.responseHeaderTimeout(); d != 0 {
|
if d := cc.responseHeaderTimeout(); d != 0 {
|
||||||
timer := time.NewTimer(d)
|
timer := cc.newTimer(d)
|
||||||
defer timer.Stop()
|
defer timer.Stop()
|
||||||
respHeaderTimer = timer.C
|
respHeaderTimer = timer.C()
|
||||||
respHeaderRecv = cs.respHeaderRecv
|
respHeaderRecv = cs.respHeaderRecv
|
||||||
}
|
}
|
||||||
// Wait until the peer half-closes its end of the stream,
|
// Wait until the peer half-closes its end of the stream,
|
||||||
// or until the request is aborted (via context, error, or otherwise),
|
// or until the request is aborted (via context, error, or otherwise),
|
||||||
// whichever comes first.
|
// whichever comes first.
|
||||||
for {
|
for {
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
cc.syncHooks.blockUntil(func() bool {
|
||||||
|
select {
|
||||||
|
case <-cs.peerClosed:
|
||||||
|
case <-respHeaderTimer:
|
||||||
|
case <-respHeaderRecv:
|
||||||
|
case <-cs.abort:
|
||||||
|
case <-ctx.Done():
|
||||||
|
case <-cs.reqCancel:
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
}
|
||||||
select {
|
select {
|
||||||
case <-cs.peerClosed:
|
case <-cs.peerClosed:
|
||||||
return nil
|
return nil
|
||||||
@ -1609,7 +1766,7 @@ func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
cc.pendingRequests++
|
cc.pendingRequests++
|
||||||
cc.cond.Wait()
|
cc.condWait()
|
||||||
cc.pendingRequests--
|
cc.pendingRequests--
|
||||||
select {
|
select {
|
||||||
case <-cs.abort:
|
case <-cs.abort:
|
||||||
@ -1871,10 +2028,26 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
|
|||||||
cs.flow.take(take)
|
cs.flow.take(take)
|
||||||
return take, nil
|
return take, nil
|
||||||
}
|
}
|
||||||
cc.cond.Wait()
|
cc.condWait()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func validateHeaders(hdrs http.Header) string {
|
||||||
|
for k, vv := range hdrs {
|
||||||
|
if !httpguts.ValidHeaderFieldName(k) {
|
||||||
|
return fmt.Sprintf("name %q", k)
|
||||||
|
}
|
||||||
|
for _, v := range vv {
|
||||||
|
if !httpguts.ValidHeaderFieldValue(v) {
|
||||||
|
// Don't include the value in the error,
|
||||||
|
// because it may be sensitive.
|
||||||
|
return fmt.Sprintf("value for header %q", k)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var errNilRequestURL = errors.New("http2: Request.URI is nil")
|
var errNilRequestURL = errors.New("http2: Request.URI is nil")
|
||||||
|
|
||||||
// requires cc.wmu be held.
|
// requires cc.wmu be held.
|
||||||
@ -1912,19 +2085,14 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for any invalid headers and return an error before we
|
// Check for any invalid headers+trailers and return an error before we
|
||||||
// potentially pollute our hpack state. (We want to be able to
|
// potentially pollute our hpack state. (We want to be able to
|
||||||
// continue to reuse the hpack encoder for future requests)
|
// continue to reuse the hpack encoder for future requests)
|
||||||
for k, vv := range req.Header {
|
if err := validateHeaders(req.Header); err != "" {
|
||||||
if !httpguts.ValidHeaderFieldName(k) {
|
return nil, fmt.Errorf("invalid HTTP header %s", err)
|
||||||
return nil, fmt.Errorf("invalid HTTP header name %q", k)
|
|
||||||
}
|
|
||||||
for _, v := range vv {
|
|
||||||
if !httpguts.ValidHeaderFieldValue(v) {
|
|
||||||
// Don't include the value in the error, because it may be sensitive.
|
|
||||||
return nil, fmt.Errorf("invalid HTTP header value for header %q", k)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if err := validateHeaders(req.Trailer); err != "" {
|
||||||
|
return nil, fmt.Errorf("invalid HTTP trailer %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
enumerateHeaders := func(f func(name, value string)) {
|
enumerateHeaders := func(f func(name, value string)) {
|
||||||
@ -2143,7 +2311,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) {
|
|||||||
}
|
}
|
||||||
// Wake up writeRequestBody via clientStream.awaitFlowControl and
|
// Wake up writeRequestBody via clientStream.awaitFlowControl and
|
||||||
// wake up RoundTrip if there is a pending request.
|
// wake up RoundTrip if there is a pending request.
|
||||||
cc.cond.Broadcast()
|
cc.condBroadcast()
|
||||||
|
|
||||||
closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil
|
closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil
|
||||||
if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {
|
if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {
|
||||||
@ -2231,7 +2399,7 @@ func (rl *clientConnReadLoop) cleanup() {
|
|||||||
cs.abortStreamLocked(err)
|
cs.abortStreamLocked(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cc.cond.Broadcast()
|
cc.condBroadcast()
|
||||||
cc.mu.Unlock()
|
cc.mu.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2266,10 +2434,9 @@ func (rl *clientConnReadLoop) run() error {
|
|||||||
cc := rl.cc
|
cc := rl.cc
|
||||||
gotSettings := false
|
gotSettings := false
|
||||||
readIdleTimeout := cc.t.ReadIdleTimeout
|
readIdleTimeout := cc.t.ReadIdleTimeout
|
||||||
var t *time.Timer
|
var t timer
|
||||||
if readIdleTimeout != 0 {
|
if readIdleTimeout != 0 {
|
||||||
t = time.AfterFunc(readIdleTimeout, cc.healthCheck)
|
t = cc.afterFunc(readIdleTimeout, cc.healthCheck)
|
||||||
defer t.Stop()
|
|
||||||
}
|
}
|
||||||
for {
|
for {
|
||||||
f, err := cc.fr.ReadFrame()
|
f, err := cc.fr.ReadFrame()
|
||||||
@ -2684,7 +2851,7 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
|
|||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if !cs.firstByte {
|
if !cs.pastHeaders {
|
||||||
cc.logf("protocol error: received DATA before a HEADERS frame")
|
cc.logf("protocol error: received DATA before a HEADERS frame")
|
||||||
rl.endStreamError(cs, StreamError{
|
rl.endStreamError(cs, StreamError{
|
||||||
StreamID: f.StreamID,
|
StreamID: f.StreamID,
|
||||||
@ -2867,7 +3034,7 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error {
|
|||||||
for _, cs := range cc.streams {
|
for _, cs := range cc.streams {
|
||||||
cs.flow.add(delta)
|
cs.flow.add(delta)
|
||||||
}
|
}
|
||||||
cc.cond.Broadcast()
|
cc.condBroadcast()
|
||||||
|
|
||||||
cc.initialWindowSize = s.Val
|
cc.initialWindowSize = s.Val
|
||||||
case SettingHeaderTableSize:
|
case SettingHeaderTableSize:
|
||||||
@ -2922,7 +3089,7 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error {
|
|||||||
|
|
||||||
return ConnectionError(ErrCodeFlowControl)
|
return ConnectionError(ErrCodeFlowControl)
|
||||||
}
|
}
|
||||||
cc.cond.Broadcast()
|
cc.condBroadcast()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2964,24 +3131,38 @@ func (cc *ClientConn) Ping(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
cc.mu.Unlock()
|
cc.mu.Unlock()
|
||||||
}
|
}
|
||||||
errc := make(chan error, 1)
|
var pingError error
|
||||||
go func() {
|
errc := make(chan struct{})
|
||||||
|
cc.goRun(func() {
|
||||||
cc.wmu.Lock()
|
cc.wmu.Lock()
|
||||||
defer cc.wmu.Unlock()
|
defer cc.wmu.Unlock()
|
||||||
if err := cc.fr.WritePing(false, p); err != nil {
|
if pingError = cc.fr.WritePing(false, p); pingError != nil {
|
||||||
errc <- err
|
close(errc)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := cc.bw.Flush(); err != nil {
|
if pingError = cc.bw.Flush(); pingError != nil {
|
||||||
errc <- err
|
close(errc)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}()
|
})
|
||||||
|
if cc.syncHooks != nil {
|
||||||
|
cc.syncHooks.blockUntil(func() bool {
|
||||||
|
select {
|
||||||
|
case <-c:
|
||||||
|
case <-errc:
|
||||||
|
case <-ctx.Done():
|
||||||
|
case <-cc.readerDone:
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
}
|
||||||
select {
|
select {
|
||||||
case <-c:
|
case <-c:
|
||||||
return nil
|
return nil
|
||||||
case err := <-errc:
|
case <-errc:
|
||||||
return err
|
return pingError
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
case <-cc.readerDone:
|
case <-cc.readerDone:
|
||||||
@ -3150,9 +3331,17 @@ func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, err
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *Transport) idleConnTimeout() time.Duration {
|
func (t *Transport) idleConnTimeout() time.Duration {
|
||||||
|
// to keep things backwards compatible, we use non-zero values of
|
||||||
|
// IdleConnTimeout, followed by using the IdleConnTimeout on the underlying
|
||||||
|
// http1 transport, followed by 0
|
||||||
|
if t.IdleConnTimeout != 0 {
|
||||||
|
return t.IdleConnTimeout
|
||||||
|
}
|
||||||
|
|
||||||
if t.t1 != nil {
|
if t.t1 != nil {
|
||||||
return t.t1.IdleConnTimeout
|
return t.t1.IdleConnTimeout
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sync/LICENSE
generated
vendored
4
vendor/golang.org/x/sync/LICENSE
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
|||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/LICENSE
generated
vendored
4
vendor/golang.org/x/sys/LICENSE
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
|
|||||||
copyright notice, this list of conditions and the following disclaimer
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
in the documentation and/or other materials provided with the
|
in the documentation and/or other materials provided with the
|
||||||
distribution.
|
distribution.
|
||||||
* Neither the name of Google Inc. nor the names of its
|
* Neither the name of Google LLC nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
17
vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s
generated
vendored
Normal file
17
vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright 2024 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 && amd64 && gc
|
||||||
|
|
||||||
|
#include "textflag.h"
|
||||||
|
|
||||||
|
TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sysctl(SB)
|
||||||
|
GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
|
||||||
|
|
||||||
|
TEXT libc_sysctlbyname_trampoline<>(SB),NOSPLIT,$0-0
|
||||||
|
JMP libc_sysctlbyname(SB)
|
||||||
|
GLOBL ·libc_sysctlbyname_trampoline_addr(SB), RODATA, $8
|
||||||
|
DATA ·libc_sysctlbyname_trampoline_addr(SB)/8, $libc_sysctlbyname_trampoline<>(SB)
|
21
vendor/golang.org/x/sys/cpu/cpu.go
generated
vendored
21
vendor/golang.org/x/sys/cpu/cpu.go
generated
vendored
@ -105,6 +105,8 @@ var ARM64 struct {
|
|||||||
HasSVE bool // Scalable Vector Extensions
|
HasSVE bool // Scalable Vector Extensions
|
||||||
HasSVE2 bool // Scalable Vector Extensions 2
|
HasSVE2 bool // Scalable Vector Extensions 2
|
||||||
HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32
|
HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32
|
||||||
|
HasDIT bool // Data Independent Timing support
|
||||||
|
HasI8MM bool // Advanced SIMD Int8 matrix multiplication instructions
|
||||||
_ CacheLinePad
|
_ CacheLinePad
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +201,25 @@ var S390X struct {
|
|||||||
_ CacheLinePad
|
_ CacheLinePad
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RISCV64 contains the supported CPU features and performance characteristics for riscv64
|
||||||
|
// platforms. The booleans in RISCV64, with the exception of HasFastMisaligned, indicate
|
||||||
|
// the presence of RISC-V extensions.
|
||||||
|
//
|
||||||
|
// It is safe to assume that all the RV64G extensions are supported and so they are omitted from
|
||||||
|
// this structure. As riscv64 Go programs require at least RV64G, the code that populates
|
||||||
|
// this structure cannot run successfully if some of the RV64G extensions are missing.
|
||||||
|
// The struct is padded to avoid false sharing.
|
||||||
|
var RISCV64 struct {
|
||||||
|
_ CacheLinePad
|
||||||
|
HasFastMisaligned bool // Fast misaligned accesses
|
||||||
|
HasC bool // Compressed instruction-set extension
|
||||||
|
HasV bool // Vector extension compatible with RVV 1.0
|
||||||
|
HasZba bool // Address generation instructions extension
|
||||||
|
HasZbb bool // Basic bit-manipulation extension
|
||||||
|
HasZbs bool // Single-bit instructions extension
|
||||||
|
_ CacheLinePad
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
archInit()
|
archInit()
|
||||||
initOptions()
|
initOptions()
|
||||||
|
12
vendor/golang.org/x/sys/cpu/cpu_arm64.go
generated
vendored
12
vendor/golang.org/x/sys/cpu/cpu_arm64.go
generated
vendored
@ -38,6 +38,8 @@ func initOptions() {
|
|||||||
{Name: "dcpop", Feature: &ARM64.HasDCPOP},
|
{Name: "dcpop", Feature: &ARM64.HasDCPOP},
|
||||||
{Name: "asimddp", Feature: &ARM64.HasASIMDDP},
|
{Name: "asimddp", Feature: &ARM64.HasASIMDDP},
|
||||||
{Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM},
|
{Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM},
|
||||||
|
{Name: "dit", Feature: &ARM64.HasDIT},
|
||||||
|
{Name: "i8mm", Feature: &ARM64.HasI8MM},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,6 +147,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
|
|||||||
ARM64.HasLRCPC = true
|
ARM64.HasLRCPC = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch extractBits(isar1, 52, 55) {
|
||||||
|
case 1:
|
||||||
|
ARM64.HasI8MM = true
|
||||||
|
}
|
||||||
|
|
||||||
// ID_AA64PFR0_EL1
|
// ID_AA64PFR0_EL1
|
||||||
switch extractBits(pfr0, 16, 19) {
|
switch extractBits(pfr0, 16, 19) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -168,6 +175,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
|
|||||||
|
|
||||||
parseARM64SVERegister(getzfr0())
|
parseARM64SVERegister(getzfr0())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch extractBits(pfr0, 48, 51) {
|
||||||
|
case 1:
|
||||||
|
ARM64.HasDIT = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseARM64SVERegister(zfr0 uint64) {
|
func parseARM64SVERegister(zfr0 uint64) {
|
||||||
|
61
vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go
generated
vendored
Normal file
61
vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
// Copyright 2024 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 && amd64 && gc
|
||||||
|
|
||||||
|
package cpu
|
||||||
|
|
||||||
|
// darwinSupportsAVX512 checks Darwin kernel for AVX512 support via sysctl
|
||||||
|
// call (see issue 43089). It also restricts AVX512 support for Darwin to
|
||||||
|
// kernel version 21.3.0 (MacOS 12.2.0) or later (see issue 49233).
|
||||||
|
//
|
||||||
|
// Background:
|
||||||
|
// Darwin implements a special mechanism to economize on thread state when
|
||||||
|
// AVX512 specific registers are not in use. This scheme minimizes state when
|
||||||
|
// preempting threads that haven't yet used any AVX512 instructions, but adds
|
||||||
|
// special requirements to check for AVX512 hardware support at runtime (e.g.
|
||||||
|
// via sysctl call or commpage inspection). See issue 43089 and link below for
|
||||||
|
// full background:
|
||||||
|
// https://github.com/apple-oss-distributions/xnu/blob/xnu-11215.1.10/osfmk/i386/fpu.c#L214-L240
|
||||||
|
//
|
||||||
|
// Additionally, all versions of the Darwin kernel from 19.6.0 through 21.2.0
|
||||||
|
// (corresponding to MacOS 10.15.6 - 12.1) have a bug that can cause corruption
|
||||||
|
// of the AVX512 mask registers (K0-K7) upon signal return. For this reason
|
||||||
|
// AVX512 is considered unsafe to use on Darwin for kernel versions prior to
|
||||||
|
// 21.3.0, where a fix has been confirmed. See issue 49233 for full background.
|
||||||
|
func darwinSupportsAVX512() bool {
|
||||||
|
return darwinSysctlEnabled([]byte("hw.optional.avx512f\x00")) && darwinKernelVersionCheck(21, 3, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure Darwin kernel version is at least major.minor.patch, avoiding dependencies
|
||||||
|
func darwinKernelVersionCheck(major, minor, patch int) bool {
|
||||||
|
var release [256]byte
|
||||||
|
err := darwinOSRelease(&release)
|
||||||
|
if err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
var mmp [3]int
|
||||||
|
c := 0
|
||||||
|
Loop:
|
||||||
|
for _, b := range release[:] {
|
||||||
|
switch {
|
||||||
|
case b >= '0' && b <= '9':
|
||||||
|
mmp[c] = 10*mmp[c] + int(b-'0')
|
||||||
|
case b == '.':
|
||||||
|
c++
|
||||||
|
if c > 2 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
case b == 0:
|
||||||
|
break Loop
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if c != 2 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return mmp[0] > major || mmp[0] == major && (mmp[1] > minor || mmp[1] == minor && mmp[2] >= patch)
|
||||||
|
}
|
4
vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
generated
vendored
4
vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
generated
vendored
@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
package cpu
|
package cpu
|
||||||
|
|
||||||
// cpuid is implemented in cpu_x86.s for gc compiler
|
// cpuid is implemented in cpu_gc_x86.s for gc compiler
|
||||||
// and in cpu_gccgo.c for gccgo.
|
// and in cpu_gccgo.c for gccgo.
|
||||||
func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
|
func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
|
||||||
|
|
||||||
// xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler
|
// xgetbv with ecx = 0 is implemented in cpu_gc_x86.s for gc compiler
|
||||||
// and in cpu_gccgo.c for gccgo.
|
// and in cpu_gccgo.c for gccgo.
|
||||||
func xgetbv() (eax, edx uint32)
|
func xgetbv() (eax, edx uint32)
|
||||||
|
0
vendor/golang.org/x/sys/cpu/cpu_x86.s → vendor/golang.org/x/sys/cpu/cpu_gc_x86.s
generated
vendored
0
vendor/golang.org/x/sys/cpu/cpu_x86.s → vendor/golang.org/x/sys/cpu/cpu_gc_x86.s
generated
vendored
6
vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
generated
vendored
6
vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
generated
vendored
@ -23,9 +23,3 @@ func xgetbv() (eax, edx uint32) {
|
|||||||
gccgoXgetbv(&a, &d)
|
gccgoXgetbv(&a, &d)
|
||||||
return a, d
|
return a, d
|
||||||
}
|
}
|
||||||
|
|
||||||
// gccgo doesn't build on Darwin, per:
|
|
||||||
// https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb#L76
|
|
||||||
func darwinSupportsAVX512() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
4
vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go
generated
vendored
4
vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go
generated
vendored
@ -35,8 +35,10 @@ const (
|
|||||||
hwcap_SHA512 = 1 << 21
|
hwcap_SHA512 = 1 << 21
|
||||||
hwcap_SVE = 1 << 22
|
hwcap_SVE = 1 << 22
|
||||||
hwcap_ASIMDFHM = 1 << 23
|
hwcap_ASIMDFHM = 1 << 23
|
||||||
|
hwcap_DIT = 1 << 24
|
||||||
|
|
||||||
hwcap2_SVE2 = 1 << 1
|
hwcap2_SVE2 = 1 << 1
|
||||||
|
hwcap2_I8MM = 1 << 13
|
||||||
)
|
)
|
||||||
|
|
||||||
// linuxKernelCanEmulateCPUID reports whether we're running
|
// linuxKernelCanEmulateCPUID reports whether we're running
|
||||||
@ -106,9 +108,11 @@ func doinit() {
|
|||||||
ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512)
|
ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512)
|
||||||
ARM64.HasSVE = isSet(hwCap, hwcap_SVE)
|
ARM64.HasSVE = isSet(hwCap, hwcap_SVE)
|
||||||
ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM)
|
ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM)
|
||||||
|
ARM64.HasDIT = isSet(hwCap, hwcap_DIT)
|
||||||
|
|
||||||
// HWCAP2 feature bits
|
// HWCAP2 feature bits
|
||||||
ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2)
|
ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2)
|
||||||
|
ARM64.HasI8MM = isSet(hwCap2, hwcap2_I8MM)
|
||||||
}
|
}
|
||||||
|
|
||||||
func isSet(hwc uint, value uint) bool {
|
func isSet(hwc uint, value uint) bool {
|
||||||
|
2
vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
generated
vendored
2
vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x
|
//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64
|
||||||
|
|
||||||
package cpu
|
package cpu
|
||||||
|
|
||||||
|
137
vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
generated
vendored
Normal file
137
vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
generated
vendored
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
// Copyright 2024 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 cpu
|
||||||
|
|
||||||
|
import (
|
||||||
|
"syscall"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RISC-V extension discovery code for Linux. The approach here is to first try the riscv_hwprobe
|
||||||
|
// syscall falling back to HWCAP to check for the C extension if riscv_hwprobe is not available.
|
||||||
|
//
|
||||||
|
// A note on detection of the Vector extension using HWCAP.
|
||||||
|
//
|
||||||
|
// Support for the Vector extension version 1.0 was added to the Linux kernel in release 6.5.
|
||||||
|
// Support for the riscv_hwprobe syscall was added in 6.4. It follows that if the riscv_hwprobe
|
||||||
|
// syscall is not available then neither is the Vector extension (which needs kernel support).
|
||||||
|
// The riscv_hwprobe syscall should then be all we need to detect the Vector extension.
|
||||||
|
// However, some RISC-V board manufacturers ship boards with an older kernel on top of which
|
||||||
|
// they have back-ported various versions of the Vector extension patches but not the riscv_hwprobe
|
||||||
|
// patches. These kernels advertise support for the Vector extension using HWCAP. Falling
|
||||||
|
// back to HWCAP to detect the Vector extension, if riscv_hwprobe is not available, or simply not
|
||||||
|
// bothering with riscv_hwprobe at all and just using HWCAP may then seem like an attractive option.
|
||||||
|
//
|
||||||
|
// Unfortunately, simply checking the 'V' bit in AT_HWCAP will not work as this bit is used by
|
||||||
|
// RISC-V board and cloud instance providers to mean different things. The Lichee Pi 4A board
|
||||||
|
// and the Scaleway RV1 cloud instances use the 'V' bit to advertise their support for the unratified
|
||||||
|
// 0.7.1 version of the Vector Specification. The Banana Pi BPI-F3 and the CanMV-K230 board use
|
||||||
|
// it to advertise support for 1.0 of the Vector extension. Versions 0.7.1 and 1.0 of the Vector
|
||||||
|
// extension are binary incompatible. HWCAP can then not be used in isolation to populate the
|
||||||
|
// HasV field as this field indicates that the underlying CPU is compatible with RVV 1.0.
|
||||||
|
//
|
||||||
|
// There is a way at runtime to distinguish between versions 0.7.1 and 1.0 of the Vector
|
||||||
|
// specification by issuing a RVV 1.0 vsetvli instruction and checking the vill bit of the vtype
|
||||||
|
// register. This check would allow us to safely detect version 1.0 of the Vector extension
|
||||||
|
// with HWCAP, if riscv_hwprobe were not available. However, the check cannot
|
||||||
|
// be added until the assembler supports the Vector instructions.
|
||||||
|
//
|
||||||
|
// Note the riscv_hwprobe syscall does not suffer from these ambiguities by design as all of the
|
||||||
|
// extensions it advertises support for are explicitly versioned. It's also worth noting that
|
||||||
|
// the riscv_hwprobe syscall is the only way to detect multi-letter RISC-V extensions, e.g., Zba.
|
||||||
|
// These cannot be detected using HWCAP and so riscv_hwprobe must be used to detect the majority
|
||||||
|
// of RISC-V extensions.
|
||||||
|
//
|
||||||
|
// Please see https://docs.kernel.org/arch/riscv/hwprobe.html for more information.
|
||||||
|
|
||||||
|
// golang.org/x/sys/cpu is not allowed to depend on golang.org/x/sys/unix so we must
|
||||||
|
// reproduce the constants, types and functions needed to make the riscv_hwprobe syscall
|
||||||
|
// here.
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go.
|
||||||
|
riscv_HWPROBE_KEY_IMA_EXT_0 = 0x4
|
||||||
|
riscv_HWPROBE_IMA_C = 0x2
|
||||||
|
riscv_HWPROBE_IMA_V = 0x4
|
||||||
|
riscv_HWPROBE_EXT_ZBA = 0x8
|
||||||
|
riscv_HWPROBE_EXT_ZBB = 0x10
|
||||||
|
riscv_HWPROBE_EXT_ZBS = 0x20
|
||||||
|
riscv_HWPROBE_KEY_CPUPERF_0 = 0x5
|
||||||
|
riscv_HWPROBE_MISALIGNED_FAST = 0x3
|
||||||
|
riscv_HWPROBE_MISALIGNED_MASK = 0x7
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// sys_RISCV_HWPROBE is copied from golang.org/x/sys/unix/zsysnum_linux_riscv64.go.
|
||||||
|
sys_RISCV_HWPROBE = 258
|
||||||
|
)
|
||||||
|
|
||||||
|
// riscvHWProbePairs is copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go.
|
||||||
|
type riscvHWProbePairs struct {
|
||||||
|
key int64
|
||||||
|
value uint64
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
// CPU features
|
||||||
|
hwcap_RISCV_ISA_C = 1 << ('C' - 'A')
|
||||||
|
)
|
||||||
|
|
||||||
|
func doinit() {
|
||||||
|
// A slice of key/value pair structures is passed to the RISCVHWProbe syscall. The key
|
||||||
|
// field should be initialised with one of the key constants defined above, e.g.,
|
||||||
|
// RISCV_HWPROBE_KEY_IMA_EXT_0. The syscall will set the value field to the appropriate value.
|
||||||
|
// If the kernel does not recognise a key it will set the key field to -1 and the value field to 0.
|
||||||
|
|
||||||
|
pairs := []riscvHWProbePairs{
|
||||||
|
{riscv_HWPROBE_KEY_IMA_EXT_0, 0},
|
||||||
|
{riscv_HWPROBE_KEY_CPUPERF_0, 0},
|
||||||
|
}
|
||||||
|
|
||||||
|
// This call only indicates that extensions are supported if they are implemented on all cores.
|
||||||
|
if riscvHWProbe(pairs, 0) {
|
||||||
|
if pairs[0].key != -1 {
|
||||||
|
v := uint(pairs[0].value)
|
||||||
|
RISCV64.HasC = isSet(v, riscv_HWPROBE_IMA_C)
|
||||||
|
RISCV64.HasV = isSet(v, riscv_HWPROBE_IMA_V)
|
||||||
|
RISCV64.HasZba = isSet(v, riscv_HWPROBE_EXT_ZBA)
|
||||||
|
RISCV64.HasZbb = isSet(v, riscv_HWPROBE_EXT_ZBB)
|
||||||
|
RISCV64.HasZbs = isSet(v, riscv_HWPROBE_EXT_ZBS)
|
||||||
|
}
|
||||||
|
if pairs[1].key != -1 {
|
||||||
|
v := pairs[1].value & riscv_HWPROBE_MISALIGNED_MASK
|
||||||
|
RISCV64.HasFastMisaligned = v == riscv_HWPROBE_MISALIGNED_FAST
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Let's double check with HWCAP if the C extension does not appear to be supported.
|
||||||
|
// This may happen if we're running on a kernel older than 6.4.
|
||||||
|
|
||||||
|
if !RISCV64.HasC {
|
||||||
|
RISCV64.HasC = isSet(hwCap, hwcap_RISCV_ISA_C)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func isSet(hwc uint, value uint) bool {
|
||||||
|
return hwc&value != 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// riscvHWProbe is a simplified version of the generated wrapper function found in
|
||||||
|
// golang.org/x/sys/unix/zsyscall_linux_riscv64.go. We simplify it by removing the
|
||||||
|
// cpuCount and cpus parameters which we do not need. We always want to pass 0 for
|
||||||
|
// these parameters here so the kernel only reports the extensions that are present
|
||||||
|
// on all cores.
|
||||||
|
func riscvHWProbe(pairs []riscvHWProbePairs, flags uint) bool {
|
||||||
|
var _zero uintptr
|
||||||
|
var p0 unsafe.Pointer
|
||||||
|
if len(pairs) > 0 {
|
||||||
|
p0 = unsafe.Pointer(&pairs[0])
|
||||||
|
} else {
|
||||||
|
p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
|
||||||
|
_, _, e1 := syscall.Syscall6(sys_RISCV_HWPROBE, uintptr(p0), uintptr(len(pairs)), uintptr(0), uintptr(0), uintptr(flags), 0)
|
||||||
|
return e1 == 0
|
||||||
|
}
|
11
vendor/golang.org/x/sys/cpu/cpu_other_x86.go
generated
vendored
Normal file
11
vendor/golang.org/x/sys/cpu/cpu_other_x86.go
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright 2024 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 386 || amd64p32 || (amd64 && (!darwin || !gc))
|
||||||
|
|
||||||
|
package cpu
|
||||||
|
|
||||||
|
func darwinSupportsAVX512() bool {
|
||||||
|
panic("only implemented for gc && amd64 && darwin")
|
||||||
|
}
|
11
vendor/golang.org/x/sys/cpu/cpu_riscv64.go
generated
vendored
11
vendor/golang.org/x/sys/cpu/cpu_riscv64.go
generated
vendored
@ -8,4 +8,13 @@ package cpu
|
|||||||
|
|
||||||
const cacheLineSize = 64
|
const cacheLineSize = 64
|
||||||
|
|
||||||
func initOptions() {}
|
func initOptions() {
|
||||||
|
options = []option{
|
||||||
|
{Name: "fastmisaligned", Feature: &RISCV64.HasFastMisaligned},
|
||||||
|
{Name: "c", Feature: &RISCV64.HasC},
|
||||||
|
{Name: "v", Feature: &RISCV64.HasV},
|
||||||
|
{Name: "zba", Feature: &RISCV64.HasZba},
|
||||||
|
{Name: "zbb", Feature: &RISCV64.HasZbb},
|
||||||
|
{Name: "zbs", Feature: &RISCV64.HasZbs},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
6
vendor/golang.org/x/sys/cpu/cpu_x86.go
generated
vendored
6
vendor/golang.org/x/sys/cpu/cpu_x86.go
generated
vendored
@ -92,10 +92,8 @@ func archInit() {
|
|||||||
osSupportsAVX = isSet(1, eax) && isSet(2, eax)
|
osSupportsAVX = isSet(1, eax) && isSet(2, eax)
|
||||||
|
|
||||||
if runtime.GOOS == "darwin" {
|
if runtime.GOOS == "darwin" {
|
||||||
// Darwin doesn't save/restore AVX-512 mask registers correctly across signal handlers.
|
// Darwin requires special AVX512 checks, see cpu_darwin_x86.go
|
||||||
// Since users can't rely on mask register contents, let's not advertise AVX-512 support.
|
osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512()
|
||||||
// See issue 49233.
|
|
||||||
osSupportsAVX512 = false
|
|
||||||
} else {
|
} else {
|
||||||
// Check if OPMASK and ZMM registers have OS support.
|
// Check if OPMASK and ZMM registers have OS support.
|
||||||
osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax)
|
osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax)
|
||||||
|
98
vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go
generated
vendored
Normal file
98
vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go
generated
vendored
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
// Copyright 2024 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.
|
||||||
|
|
||||||
|
// Minimal copy of x/sys/unix so the cpu package can make a
|
||||||
|
// system call on Darwin without depending on x/sys/unix.
|
||||||
|
|
||||||
|
//go:build darwin && amd64 && gc
|
||||||
|
|
||||||
|
package cpu
|
||||||
|
|
||||||
|
import (
|
||||||
|
"syscall"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
type _C_int int32
|
||||||
|
|
||||||
|
// adapted from unix.Uname() at x/sys/unix/syscall_darwin.go L419
|
||||||
|
func darwinOSRelease(release *[256]byte) error {
|
||||||
|
// from x/sys/unix/zerrors_openbsd_amd64.go
|
||||||
|
const (
|
||||||
|
CTL_KERN = 0x1
|
||||||
|
KERN_OSRELEASE = 0x2
|
||||||
|
)
|
||||||
|
|
||||||
|
mib := []_C_int{CTL_KERN, KERN_OSRELEASE}
|
||||||
|
n := unsafe.Sizeof(*release)
|
||||||
|
|
||||||
|
return sysctl(mib, &release[0], &n, nil, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
type Errno = syscall.Errno
|
||||||
|
|
||||||
|
var _zero uintptr // Single-word zero for use when we need a valid pointer to 0 bytes.
|
||||||
|
|
||||||
|
// from x/sys/unix/zsyscall_darwin_amd64.go L791-807
|
||||||
|
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(mib) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&mib[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
if _, _, err := syscall_syscall6(
|
||||||
|
libc_sysctl_trampoline_addr,
|
||||||
|
uintptr(_p0),
|
||||||
|
uintptr(len(mib)),
|
||||||
|
uintptr(unsafe.Pointer(old)),
|
||||||
|
uintptr(unsafe.Pointer(oldlen)),
|
||||||
|
uintptr(unsafe.Pointer(new)),
|
||||||
|
uintptr(newlen),
|
||||||
|
); err != 0 {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var libc_sysctl_trampoline_addr uintptr
|
||||||
|
|
||||||
|
// adapted from internal/cpu/cpu_arm64_darwin.go
|
||||||
|
func darwinSysctlEnabled(name []byte) bool {
|
||||||
|
out := int32(0)
|
||||||
|
nout := unsafe.Sizeof(out)
|
||||||
|
if ret := sysctlbyname(&name[0], (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); ret != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return out > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
var libc_sysctlbyname_trampoline_addr uintptr
|
||||||
|
|
||||||
|
// adapted from runtime/sys_darwin.go in the pattern of sysctl() above, as defined in x/sys/unix
|
||||||
|
func sysctlbyname(name *byte, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error {
|
||||||
|
if _, _, err := syscall_syscall6(
|
||||||
|
libc_sysctlbyname_trampoline_addr,
|
||||||
|
uintptr(unsafe.Pointer(name)),
|
||||||
|
uintptr(unsafe.Pointer(old)),
|
||||||
|
uintptr(unsafe.Pointer(oldlen)),
|
||||||
|
uintptr(unsafe.Pointer(new)),
|
||||||
|
uintptr(newlen),
|
||||||
|
0,
|
||||||
|
); err != 0 {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
//go:cgo_import_dynamic libc_sysctlbyname sysctlbyname "/usr/lib/libSystem.B.dylib"
|
||||||
|
|
||||||
|
// Implemented in the runtime package (runtime/sys_darwin.go)
|
||||||
|
func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
|
||||||
|
|
||||||
|
//go:linkname syscall_syscall6 syscall.syscall6
|
2
vendor/golang.org/x/sys/unix/README.md
generated
vendored
2
vendor/golang.org/x/sys/unix/README.md
generated
vendored
@ -156,7 +156,7 @@ from the generated architecture-specific files listed below, and merge these
|
|||||||
into a common file for each OS.
|
into a common file for each OS.
|
||||||
|
|
||||||
The merge is performed in the following steps:
|
The merge is performed in the following steps:
|
||||||
1. Construct the set of common code that is idential in all architecture-specific files.
|
1. Construct the set of common code that is identical in all architecture-specific files.
|
||||||
2. Write this common code to the merged file.
|
2. Write this common code to the merged file.
|
||||||
3. Remove the common code from all architecture-specific files.
|
3. Remove the common code from all architecture-specific files.
|
||||||
|
|
||||||
|
96
vendor/golang.org/x/sys/unix/ioctl_linux.go
generated
vendored
96
vendor/golang.org/x/sys/unix/ioctl_linux.go
generated
vendored
@ -58,6 +58,102 @@ func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
|
|||||||
return &value, err
|
return &value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IoctlGetEthtoolTsInfo fetches ethtool timestamping and PHC
|
||||||
|
// association for the network device specified by ifname.
|
||||||
|
func IoctlGetEthtoolTsInfo(fd int, ifname string) (*EthtoolTsInfo, error) {
|
||||||
|
ifr, err := NewIfreq(ifname)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
value := EthtoolTsInfo{Cmd: ETHTOOL_GET_TS_INFO}
|
||||||
|
ifrd := ifr.withData(unsafe.Pointer(&value))
|
||||||
|
|
||||||
|
err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd)
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlGetHwTstamp retrieves the hardware timestamping configuration
|
||||||
|
// for the network device specified by ifname.
|
||||||
|
func IoctlGetHwTstamp(fd int, ifname string) (*HwTstampConfig, error) {
|
||||||
|
ifr, err := NewIfreq(ifname)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
value := HwTstampConfig{}
|
||||||
|
ifrd := ifr.withData(unsafe.Pointer(&value))
|
||||||
|
|
||||||
|
err = ioctlIfreqData(fd, SIOCGHWTSTAMP, &ifrd)
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlSetHwTstamp updates the hardware timestamping configuration for
|
||||||
|
// the network device specified by ifname.
|
||||||
|
func IoctlSetHwTstamp(fd int, ifname string, cfg *HwTstampConfig) error {
|
||||||
|
ifr, err := NewIfreq(ifname)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
ifrd := ifr.withData(unsafe.Pointer(cfg))
|
||||||
|
return ioctlIfreqData(fd, SIOCSHWTSTAMP, &ifrd)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FdToClockID derives the clock ID from the file descriptor number
|
||||||
|
// - see clock_gettime(3), FD_TO_CLOCKID macros. The resulting ID is
|
||||||
|
// suitable for system calls like ClockGettime.
|
||||||
|
func FdToClockID(fd int) int32 { return int32((int(^fd) << 3) | 3) }
|
||||||
|
|
||||||
|
// IoctlPtpClockGetcaps returns the description of a given PTP device.
|
||||||
|
func IoctlPtpClockGetcaps(fd int) (*PtpClockCaps, error) {
|
||||||
|
var value PtpClockCaps
|
||||||
|
err := ioctlPtr(fd, PTP_CLOCK_GETCAPS2, unsafe.Pointer(&value))
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlPtpSysOffsetPrecise returns a description of the clock
|
||||||
|
// offset compared to the system clock.
|
||||||
|
func IoctlPtpSysOffsetPrecise(fd int) (*PtpSysOffsetPrecise, error) {
|
||||||
|
var value PtpSysOffsetPrecise
|
||||||
|
err := ioctlPtr(fd, PTP_SYS_OFFSET_PRECISE2, unsafe.Pointer(&value))
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlPtpSysOffsetExtended returns an extended description of the
|
||||||
|
// clock offset compared to the system clock. The samples parameter
|
||||||
|
// specifies the desired number of measurements.
|
||||||
|
func IoctlPtpSysOffsetExtended(fd int, samples uint) (*PtpSysOffsetExtended, error) {
|
||||||
|
value := PtpSysOffsetExtended{Samples: uint32(samples)}
|
||||||
|
err := ioctlPtr(fd, PTP_SYS_OFFSET_EXTENDED2, unsafe.Pointer(&value))
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlPtpPinGetfunc returns the configuration of the specified
|
||||||
|
// I/O pin on given PTP device.
|
||||||
|
func IoctlPtpPinGetfunc(fd int, index uint) (*PtpPinDesc, error) {
|
||||||
|
value := PtpPinDesc{Index: uint32(index)}
|
||||||
|
err := ioctlPtr(fd, PTP_PIN_GETFUNC2, unsafe.Pointer(&value))
|
||||||
|
return &value, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlPtpPinSetfunc updates configuration of the specified PTP
|
||||||
|
// I/O pin.
|
||||||
|
func IoctlPtpPinSetfunc(fd int, pd *PtpPinDesc) error {
|
||||||
|
return ioctlPtr(fd, PTP_PIN_SETFUNC2, unsafe.Pointer(pd))
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlPtpPeroutRequest configures the periodic output mode of the
|
||||||
|
// PTP I/O pins.
|
||||||
|
func IoctlPtpPeroutRequest(fd int, r *PtpPeroutRequest) error {
|
||||||
|
return ioctlPtr(fd, PTP_PEROUT_REQUEST2, unsafe.Pointer(r))
|
||||||
|
}
|
||||||
|
|
||||||
|
// IoctlPtpExttsRequest configures the external timestamping mode
|
||||||
|
// of the PTP I/O pins.
|
||||||
|
func IoctlPtpExttsRequest(fd int, r *PtpExttsRequest) error {
|
||||||
|
return ioctlPtr(fd, PTP_EXTTS_REQUEST2, unsafe.Pointer(r))
|
||||||
|
}
|
||||||
|
|
||||||
// IoctlGetWatchdogInfo fetches information about a watchdog device from the
|
// IoctlGetWatchdogInfo fetches information about a watchdog device from the
|
||||||
// Linux watchdog API. For more information, see:
|
// Linux watchdog API. For more information, see:
|
||||||
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
// https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html.
|
||||||
|
20
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
20
vendor/golang.org/x/sys/unix/mkerrors.sh
generated
vendored
@ -58,6 +58,7 @@ includes_Darwin='
|
|||||||
#define _DARWIN_USE_64_BIT_INODE
|
#define _DARWIN_USE_64_BIT_INODE
|
||||||
#define __APPLE_USE_RFC_3542
|
#define __APPLE_USE_RFC_3542
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/stdio.h>
|
||||||
#include <sys/attr.h>
|
#include <sys/attr.h>
|
||||||
#include <sys/clonefile.h>
|
#include <sys/clonefile.h>
|
||||||
#include <sys/kern_control.h>
|
#include <sys/kern_control.h>
|
||||||
@ -157,6 +158,16 @@ includes_Linux='
|
|||||||
#endif
|
#endif
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
|
||||||
|
// See the description in unix/linux/types.go
|
||||||
|
#if defined(__ARM_EABI__) || \
|
||||||
|
(defined(__mips__) && (_MIPS_SIM == _ABIO32)) || \
|
||||||
|
(defined(__powerpc__) && (!defined(__powerpc64__)))
|
||||||
|
# ifdef _TIME_BITS
|
||||||
|
# undef _TIME_BITS
|
||||||
|
# endif
|
||||||
|
# define _TIME_BITS 32
|
||||||
|
#endif
|
||||||
|
|
||||||
// <sys/ioctl.h> is broken on powerpc64, as it fails to include definitions of
|
// <sys/ioctl.h> is broken on powerpc64, as it fails to include definitions of
|
||||||
// these structures. We just include them copied from <bits/termios.h>.
|
// these structures. We just include them copied from <bits/termios.h>.
|
||||||
#if defined(__powerpc__)
|
#if defined(__powerpc__)
|
||||||
@ -255,6 +266,7 @@ struct ltchars {
|
|||||||
#include <linux/nsfs.h>
|
#include <linux/nsfs.h>
|
||||||
#include <linux/perf_event.h>
|
#include <linux/perf_event.h>
|
||||||
#include <linux/pps.h>
|
#include <linux/pps.h>
|
||||||
|
#include <linux/ptp_clock.h>
|
||||||
#include <linux/ptrace.h>
|
#include <linux/ptrace.h>
|
||||||
#include <linux/random.h>
|
#include <linux/random.h>
|
||||||
#include <linux/reboot.h>
|
#include <linux/reboot.h>
|
||||||
@ -263,6 +275,7 @@ struct ltchars {
|
|||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/seccomp.h>
|
#include <linux/seccomp.h>
|
||||||
#include <linux/serial.h>
|
#include <linux/serial.h>
|
||||||
|
#include <linux/sock_diag.h>
|
||||||
#include <linux/sockios.h>
|
#include <linux/sockios.h>
|
||||||
#include <linux/taskstats.h>
|
#include <linux/taskstats.h>
|
||||||
#include <linux/tipc.h>
|
#include <linux/tipc.h>
|
||||||
@ -525,6 +538,7 @@ ccflags="$@"
|
|||||||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||
|
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||
|
||||||
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
|
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
|
||||||
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
|
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
|
||||||
|
$2 ~ /^PTP_/ ||
|
||||||
$2 ~ /^RAW_PAYLOAD_/ ||
|
$2 ~ /^RAW_PAYLOAD_/ ||
|
||||||
$2 ~ /^[US]F_/ ||
|
$2 ~ /^[US]F_/ ||
|
||||||
$2 ~ /^TP_STATUS_/ ||
|
$2 ~ /^TP_STATUS_/ ||
|
||||||
@ -549,6 +563,8 @@ ccflags="$@"
|
|||||||
$2 !~ "NLA_TYPE_MASK" &&
|
$2 !~ "NLA_TYPE_MASK" &&
|
||||||
$2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&
|
$2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&
|
||||||
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||
|
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||
|
||||||
|
$2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ ||
|
||||||
|
$2 ~ /^(CONNECT|SAE)_/ ||
|
||||||
$2 ~ /^FIORDCHK$/ ||
|
$2 ~ /^FIORDCHK$/ ||
|
||||||
$2 ~ /^SIOC/ ||
|
$2 ~ /^SIOC/ ||
|
||||||
$2 ~ /^TIOC/ ||
|
$2 ~ /^TIOC/ ||
|
||||||
@ -652,7 +668,7 @@ errors=$(
|
|||||||
signals=$(
|
signals=$(
|
||||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
|
||||||
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
|
grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
|
||||||
sort
|
sort
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -662,7 +678,7 @@ echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
|
|||||||
sort >_error.grep
|
sort >_error.grep
|
||||||
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
|
||||||
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
|
||||||
grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
|
grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
|
||||||
sort >_signal.grep
|
sort >_signal.grep
|
||||||
|
|
||||||
echo '// mkerrors.sh' "$@"
|
echo '// mkerrors.sh' "$@"
|
||||||
|
5
vendor/golang.org/x/sys/unix/mremap.go
generated
vendored
5
vendor/golang.org/x/sys/unix/mremap.go
generated
vendored
@ -50,3 +50,8 @@ func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data [
|
|||||||
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
|
||||||
return mapper.Mremap(oldData, newLength, flags)
|
return mapper.Mremap(oldData, newLength, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) {
|
||||||
|
xaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr))
|
||||||
|
return unsafe.Pointer(xaddr), err
|
||||||
|
}
|
||||||
|
2
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_aix.go
generated
vendored
@ -360,7 +360,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
|
|||||||
var status _C_int
|
var status _C_int
|
||||||
var r Pid_t
|
var r Pid_t
|
||||||
err = ERESTART
|
err = ERESTART
|
||||||
// AIX wait4 may return with ERESTART errno, while the processus is still
|
// AIX wait4 may return with ERESTART errno, while the process is still
|
||||||
// active.
|
// active.
|
||||||
for err == ERESTART {
|
for err == ERESTART {
|
||||||
r, err = wait4(Pid_t(pid), &status, options, rusage)
|
r, err = wait4(Pid_t(pid), &status, options, rusage)
|
||||||
|
61
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
61
vendor/golang.org/x/sys/unix/syscall_darwin.go
generated
vendored
@ -402,6 +402,18 @@ func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {
|
|||||||
return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
|
return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys renamexNp(from string, to string, flag uint32) (err error)
|
||||||
|
|
||||||
|
func RenamexNp(from string, to string, flag uint32) (err error) {
|
||||||
|
return renamexNp(from, to, flag)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error)
|
||||||
|
|
||||||
|
func RenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) {
|
||||||
|
return renameatxNp(fromfd, from, tofd, to, flag)
|
||||||
|
}
|
||||||
|
|
||||||
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
|
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
|
||||||
|
|
||||||
func Uname(uname *Utsname) error {
|
func Uname(uname *Utsname) error {
|
||||||
@ -542,6 +554,55 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//sys pthread_chdir_np(path string) (err error)
|
||||||
|
|
||||||
|
func PthreadChdir(path string) (err error) {
|
||||||
|
return pthread_chdir_np(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
//sys pthread_fchdir_np(fd int) (err error)
|
||||||
|
|
||||||
|
func PthreadFchdir(fd int) (err error) {
|
||||||
|
return pthread_fchdir_np(fd)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Connectx calls connectx(2) to initiate a connection on a socket.
|
||||||
|
//
|
||||||
|
// srcIf, srcAddr, and dstAddr are filled into a [SaEndpoints] struct and passed as the endpoints argument.
|
||||||
|
//
|
||||||
|
// - srcIf is the optional source interface index. 0 means unspecified.
|
||||||
|
// - srcAddr is the optional source address. nil means unspecified.
|
||||||
|
// - dstAddr is the destination address.
|
||||||
|
//
|
||||||
|
// On success, Connectx returns the number of bytes enqueued for transmission.
|
||||||
|
func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocID, flags uint32, iov []Iovec, connid *SaeConnID) (n uintptr, err error) {
|
||||||
|
endpoints := SaEndpoints{
|
||||||
|
Srcif: srcIf,
|
||||||
|
}
|
||||||
|
|
||||||
|
if srcAddr != nil {
|
||||||
|
addrp, addrlen, err := srcAddr.sockaddr()
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
endpoints.Srcaddr = (*RawSockaddr)(addrp)
|
||||||
|
endpoints.Srcaddrlen = uint32(addrlen)
|
||||||
|
}
|
||||||
|
|
||||||
|
if dstAddr != nil {
|
||||||
|
addrp, addrlen, err := dstAddr.sockaddr()
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
endpoints.Dstaddr = (*RawSockaddr)(addrp)
|
||||||
|
endpoints.Dstaddrlen = uint32(addrlen)
|
||||||
|
}
|
||||||
|
|
||||||
|
err = connectx(fd, &endpoints, associd, flags, iov, &n, connid)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
//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)
|
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
|
||||||
|
|
||||||
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
|
||||||
|
12
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
12
vendor/golang.org/x/sys/unix/syscall_dragonfly.go
generated
vendored
@ -246,6 +246,18 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||||||
return sendfile(outfd, infd, offset, count)
|
return sendfile(outfd, infd, offset, count)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Dup3(oldfd, newfd, flags int) error {
|
||||||
|
if oldfd == newfd || flags&^O_CLOEXEC != 0 {
|
||||||
|
return EINVAL
|
||||||
|
}
|
||||||
|
how := F_DUP2FD
|
||||||
|
if flags&O_CLOEXEC != 0 {
|
||||||
|
how = F_DUP2FD_CLOEXEC
|
||||||
|
}
|
||||||
|
_, err := fcntl(oldfd, how, newfd)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exposed directly
|
* Exposed directly
|
||||||
*/
|
*/
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_hurd.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_hurd.go
generated
vendored
@ -11,6 +11,7 @@ package unix
|
|||||||
int ioctl(int, unsigned long int, uintptr_t);
|
int ioctl(int, unsigned long int, uintptr_t);
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
import "unsafe"
|
||||||
|
|
||||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||||
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
|
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
|
||||||
|
65
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
65
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -1295,6 +1295,48 @@ func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {
|
|||||||
return &value, err
|
return &value, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetsockoptTCPCCVegasInfo returns algorithm specific congestion control information for a socket using the "vegas"
|
||||||
|
// algorithm.
|
||||||
|
//
|
||||||
|
// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option:
|
||||||
|
//
|
||||||
|
// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION)
|
||||||
|
func GetsockoptTCPCCVegasInfo(fd, level, opt int) (*TCPVegasInfo, error) {
|
||||||
|
var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment
|
||||||
|
vallen := _Socklen(SizeofTCPCCInfo)
|
||||||
|
err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
|
||||||
|
out := (*TCPVegasInfo)(unsafe.Pointer(&value[0]))
|
||||||
|
return out, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetsockoptTCPCCDCTCPInfo returns algorithm specific congestion control information for a socket using the "dctp"
|
||||||
|
// algorithm.
|
||||||
|
//
|
||||||
|
// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option:
|
||||||
|
//
|
||||||
|
// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION)
|
||||||
|
func GetsockoptTCPCCDCTCPInfo(fd, level, opt int) (*TCPDCTCPInfo, error) {
|
||||||
|
var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment
|
||||||
|
vallen := _Socklen(SizeofTCPCCInfo)
|
||||||
|
err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
|
||||||
|
out := (*TCPDCTCPInfo)(unsafe.Pointer(&value[0]))
|
||||||
|
return out, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetsockoptTCPCCBBRInfo returns algorithm specific congestion control information for a socket using the "bbr"
|
||||||
|
// algorithm.
|
||||||
|
//
|
||||||
|
// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option:
|
||||||
|
//
|
||||||
|
// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION)
|
||||||
|
func GetsockoptTCPCCBBRInfo(fd, level, opt int) (*TCPBBRInfo, error) {
|
||||||
|
var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment
|
||||||
|
vallen := _Socklen(SizeofTCPCCInfo)
|
||||||
|
err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
|
||||||
|
out := (*TCPBBRInfo)(unsafe.Pointer(&value[0]))
|
||||||
|
return out, err
|
||||||
|
}
|
||||||
|
|
||||||
// GetsockoptString returns the string value of the socket option opt for the
|
// GetsockoptString returns the string value of the socket option opt for the
|
||||||
// socket associated with fd at the given socket level.
|
// socket associated with fd at the given socket level.
|
||||||
func GetsockoptString(fd, level, opt int) (string, error) {
|
func GetsockoptString(fd, level, opt int) (string, error) {
|
||||||
@ -1818,6 +1860,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
|||||||
//sys ClockAdjtime(clockid int32, buf *Timex) (state int, err error)
|
//sys ClockAdjtime(clockid int32, buf *Timex) (state int, err error)
|
||||||
//sys ClockGetres(clockid int32, res *Timespec) (err error)
|
//sys ClockGetres(clockid int32, res *Timespec) (err error)
|
||||||
//sys ClockGettime(clockid int32, time *Timespec) (err error)
|
//sys ClockGettime(clockid int32, time *Timespec) (err error)
|
||||||
|
//sys ClockSettime(clockid int32, time *Timespec) (err error)
|
||||||
//sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
|
//sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
|
||||||
//sys Close(fd int) (err error)
|
//sys Close(fd int) (err error)
|
||||||
//sys CloseRange(first uint, last uint, flags uint) (err error)
|
//sys CloseRange(first uint, last uint, flags uint) (err error)
|
||||||
@ -1959,7 +2002,26 @@ func Getpgrp() (pid int) {
|
|||||||
//sysnb Getpid() (pid int)
|
//sysnb Getpid() (pid int)
|
||||||
//sysnb Getppid() (ppid int)
|
//sysnb Getppid() (ppid int)
|
||||||
//sys Getpriority(which int, who int) (prio int, err error)
|
//sys Getpriority(which int, who int) (prio int, err error)
|
||||||
//sys Getrandom(buf []byte, flags int) (n int, err error)
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
vdsoRet, supported := vgetrandom(buf, uint32(flags))
|
||||||
|
if supported {
|
||||||
|
if vdsoRet < 0 {
|
||||||
|
return 0, errnoErr(syscall.Errno(-vdsoRet))
|
||||||
|
}
|
||||||
|
return vdsoRet, nil
|
||||||
|
}
|
||||||
|
var p *byte
|
||||||
|
if len(buf) > 0 {
|
||||||
|
p = &buf[0]
|
||||||
|
}
|
||||||
|
r, _, e := Syscall(SYS_GETRANDOM, uintptr(unsafe.Pointer(p)), uintptr(len(buf)), uintptr(flags))
|
||||||
|
if e != 0 {
|
||||||
|
return 0, errnoErr(e)
|
||||||
|
}
|
||||||
|
return int(r), nil
|
||||||
|
}
|
||||||
|
|
||||||
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
||||||
//sysnb Getsid(pid int) (sid int, err error)
|
//sysnb Getsid(pid int) (sid int, err error)
|
||||||
//sysnb Gettid() (tid int)
|
//sysnb Gettid() (tid int)
|
||||||
@ -2592,3 +2654,4 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
|
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
|
||||||
|
//sys Mseal(b []byte, flags uint) (err error)
|
||||||
|
2
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
generated
vendored
@ -182,3 +182,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
|
|||||||
}
|
}
|
||||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SYS_FSTATAT = SYS_NEWFSTATAT
|
||||||
|
2
vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
generated
vendored
@ -214,3 +214,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
|
|||||||
}
|
}
|
||||||
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SYS_FSTATAT = SYS_NEWFSTATAT
|
||||||
|
2
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
generated
vendored
@ -187,3 +187,5 @@ func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error
|
|||||||
}
|
}
|
||||||
return riscvHWProbe(pairs, setSize, set, flags)
|
return riscvHWProbe(pairs, setSize, set, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SYS_FSTATAT = SYS_NEWFSTATAT
|
||||||
|
1
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
1
vendor/golang.org/x/sys/unix/syscall_openbsd.go
generated
vendored
@ -293,6 +293,7 @@ func Uname(uname *Utsname) error {
|
|||||||
//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
|
//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
|
||||||
//sys Mknod(path string, mode uint32, dev int) (err error)
|
//sys Mknod(path string, mode uint32, dev int) (err error)
|
||||||
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
|
||||||
|
//sys Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error)
|
||||||
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
|
||||||
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
//sys Open(path string, mode int, perm uint32) (fd int, err error)
|
||||||
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
|
||||||
|
9
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
9
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
@ -154,6 +154,15 @@ func Munmap(b []byte) (err error) {
|
|||||||
return mapper.Munmap(b)
|
return mapper.Munmap(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) {
|
||||||
|
xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset)
|
||||||
|
return unsafe.Pointer(xaddr), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) {
|
||||||
|
return mapper.munmap(uintptr(addr), length)
|
||||||
|
}
|
||||||
|
|
||||||
func Read(fd int, p []byte) (n int, err error) {
|
func Read(fd int, p []byte) (n int, err error) {
|
||||||
n, err = read(fd, p)
|
n, err = read(fd, p)
|
||||||
if raceenabled {
|
if raceenabled {
|
||||||
|
104
vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
generated
vendored
104
vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
generated
vendored
@ -768,6 +768,15 @@ func Munmap(b []byte) (err error) {
|
|||||||
return mapper.Munmap(b)
|
return mapper.Munmap(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) {
|
||||||
|
xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset)
|
||||||
|
return unsafe.Pointer(xaddr), err
|
||||||
|
}
|
||||||
|
|
||||||
|
func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) {
|
||||||
|
return mapper.munmap(uintptr(addr), length)
|
||||||
|
}
|
||||||
|
|
||||||
//sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A
|
//sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A
|
||||||
//sysnb Getgid() (gid int)
|
//sysnb Getgid() (gid int)
|
||||||
//sysnb Getpid() (pid int)
|
//sysnb Getpid() (pid int)
|
||||||
@ -816,10 +825,10 @@ func Lstat(path string, stat *Stat_t) (err error) {
|
|||||||
// for checking symlinks begins with $VERSION/ $SYSNAME/ $SYSSYMR/ $SYSSYMA/
|
// for checking symlinks begins with $VERSION/ $SYSNAME/ $SYSSYMR/ $SYSSYMA/
|
||||||
func isSpecialPath(path []byte) (v bool) {
|
func isSpecialPath(path []byte) (v bool) {
|
||||||
var special = [4][8]byte{
|
var special = [4][8]byte{
|
||||||
[8]byte{'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'},
|
{'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'},
|
||||||
[8]byte{'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'},
|
{'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'},
|
||||||
[8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'},
|
{'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'},
|
||||||
[8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}}
|
{'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}}
|
||||||
|
|
||||||
var i, j int
|
var i, j int
|
||||||
for i = 0; i < len(special); i++ {
|
for i = 0; i < len(special); i++ {
|
||||||
@ -3115,3 +3124,90 @@ func legacy_Mkfifoat(dirfd int, path string, mode uint32) (err error) {
|
|||||||
//sys Posix_openpt(oflag int) (fd int, err error) = SYS_POSIX_OPENPT
|
//sys Posix_openpt(oflag int) (fd int, err error) = SYS_POSIX_OPENPT
|
||||||
//sys Grantpt(fildes int) (rc int, err error) = SYS_GRANTPT
|
//sys Grantpt(fildes int) (rc int, err error) = SYS_GRANTPT
|
||||||
//sys Unlockpt(fildes int) (rc int, err error) = SYS_UNLOCKPT
|
//sys Unlockpt(fildes int) (rc int, err error) = SYS_UNLOCKPT
|
||||||
|
|
||||||
|
func fcntlAsIs(fd uintptr, cmd int, arg uintptr) (val int, err error) {
|
||||||
|
runtime.EnterSyscall()
|
||||||
|
r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), arg)
|
||||||
|
runtime.ExitSyscall()
|
||||||
|
val = int(r0)
|
||||||
|
if int64(r0) == -1 {
|
||||||
|
err = errnoErr2(e1, e2)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func Fcntl(fd uintptr, cmd int, op interface{}) (ret int, err error) {
|
||||||
|
switch op.(type) {
|
||||||
|
case *Flock_t:
|
||||||
|
err = FcntlFlock(fd, cmd, op.(*Flock_t))
|
||||||
|
if err != nil {
|
||||||
|
ret = -1
|
||||||
|
}
|
||||||
|
return
|
||||||
|
case int:
|
||||||
|
return FcntlInt(fd, cmd, op.(int))
|
||||||
|
case *F_cnvrt:
|
||||||
|
return fcntlAsIs(fd, cmd, uintptr(unsafe.Pointer(op.(*F_cnvrt))))
|
||||||
|
case unsafe.Pointer:
|
||||||
|
return fcntlAsIs(fd, cmd, uintptr(op.(unsafe.Pointer)))
|
||||||
|
default:
|
||||||
|
return -1, EINVAL
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||||
|
if raceenabled {
|
||||||
|
raceReleaseMerge(unsafe.Pointer(&ioSync))
|
||||||
|
}
|
||||||
|
return sendfile(outfd, infd, offset, count)
|
||||||
|
}
|
||||||
|
|
||||||
|
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
||||||
|
// TODO: use LE call instead if the call is implemented
|
||||||
|
originalOffset, err := Seek(infd, 0, SEEK_CUR)
|
||||||
|
if err != nil {
|
||||||
|
return -1, err
|
||||||
|
}
|
||||||
|
//start reading data from in_fd
|
||||||
|
if offset != nil {
|
||||||
|
_, err := Seek(infd, *offset, SEEK_SET)
|
||||||
|
if err != nil {
|
||||||
|
return -1, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buf := make([]byte, count)
|
||||||
|
readBuf := make([]byte, 0)
|
||||||
|
var n int = 0
|
||||||
|
for i := 0; i < count; i += n {
|
||||||
|
n, err := Read(infd, buf)
|
||||||
|
if n == 0 {
|
||||||
|
if err != nil {
|
||||||
|
return -1, err
|
||||||
|
} else { // EOF
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
readBuf = append(readBuf, buf...)
|
||||||
|
buf = buf[0:0]
|
||||||
|
}
|
||||||
|
|
||||||
|
n2, err := Write(outfd, readBuf)
|
||||||
|
if err != nil {
|
||||||
|
return -1, err
|
||||||
|
}
|
||||||
|
|
||||||
|
//When sendfile() returns, this variable will be set to the
|
||||||
|
// offset of the byte following the last byte that was read.
|
||||||
|
if offset != nil {
|
||||||
|
*offset = *offset + int64(n)
|
||||||
|
// If offset is not NULL, then sendfile() does not modify the file
|
||||||
|
// offset of in_fd
|
||||||
|
_, err := Seek(infd, originalOffset, SEEK_SET)
|
||||||
|
if err != nil {
|
||||||
|
return -1, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n2, nil
|
||||||
|
}
|
||||||
|
13
vendor/golang.org/x/sys/unix/vgetrandom_linux.go
generated
vendored
Normal file
13
vendor/golang.org/x/sys/unix/vgetrandom_linux.go
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2024 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 linux && go1.24
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
import _ "unsafe"
|
||||||
|
|
||||||
|
//go:linkname vgetrandom runtime.vgetrandom
|
||||||
|
//go:noescape
|
||||||
|
func vgetrandom(p []byte, flags uint32) (ret int, supported bool)
|
11
vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go
generated
vendored
Normal file
11
vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright 2024 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 !linux || !go1.24
|
||||||
|
|
||||||
|
package unix
|
||||||
|
|
||||||
|
func vgetrandom(p []byte, flags uint32) (ret int, supported bool) {
|
||||||
|
return -1, false
|
||||||
|
}
|
12
vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
generated
vendored
@ -237,6 +237,9 @@ const (
|
|||||||
CLOCK_UPTIME_RAW_APPROX = 0x9
|
CLOCK_UPTIME_RAW_APPROX = 0x9
|
||||||
CLONE_NOFOLLOW = 0x1
|
CLONE_NOFOLLOW = 0x1
|
||||||
CLONE_NOOWNERCOPY = 0x2
|
CLONE_NOOWNERCOPY = 0x2
|
||||||
|
CONNECT_DATA_AUTHENTICATED = 0x4
|
||||||
|
CONNECT_DATA_IDEMPOTENT = 0x2
|
||||||
|
CONNECT_RESUME_ON_READ_WRITE = 0x1
|
||||||
CR0 = 0x0
|
CR0 = 0x0
|
||||||
CR1 = 0x1000
|
CR1 = 0x1000
|
||||||
CR2 = 0x2000
|
CR2 = 0x2000
|
||||||
@ -1169,6 +1172,11 @@ const (
|
|||||||
PT_WRITE_D = 0x5
|
PT_WRITE_D = 0x5
|
||||||
PT_WRITE_I = 0x4
|
PT_WRITE_I = 0x4
|
||||||
PT_WRITE_U = 0x6
|
PT_WRITE_U = 0x6
|
||||||
|
RENAME_EXCL = 0x4
|
||||||
|
RENAME_NOFOLLOW_ANY = 0x10
|
||||||
|
RENAME_RESERVED1 = 0x8
|
||||||
|
RENAME_SECLUDE = 0x1
|
||||||
|
RENAME_SWAP = 0x2
|
||||||
RLIMIT_AS = 0x5
|
RLIMIT_AS = 0x5
|
||||||
RLIMIT_CORE = 0x4
|
RLIMIT_CORE = 0x4
|
||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
@ -1260,6 +1268,10 @@ const (
|
|||||||
RTV_SSTHRESH = 0x20
|
RTV_SSTHRESH = 0x20
|
||||||
RUSAGE_CHILDREN = -0x1
|
RUSAGE_CHILDREN = -0x1
|
||||||
RUSAGE_SELF = 0x0
|
RUSAGE_SELF = 0x0
|
||||||
|
SAE_ASSOCID_ALL = 0xffffffff
|
||||||
|
SAE_ASSOCID_ANY = 0x0
|
||||||
|
SAE_CONNID_ALL = 0xffffffff
|
||||||
|
SAE_CONNID_ANY = 0x0
|
||||||
SCM_CREDS = 0x3
|
SCM_CREDS = 0x3
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
|
12
vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
generated
vendored
12
vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
generated
vendored
@ -237,6 +237,9 @@ const (
|
|||||||
CLOCK_UPTIME_RAW_APPROX = 0x9
|
CLOCK_UPTIME_RAW_APPROX = 0x9
|
||||||
CLONE_NOFOLLOW = 0x1
|
CLONE_NOFOLLOW = 0x1
|
||||||
CLONE_NOOWNERCOPY = 0x2
|
CLONE_NOOWNERCOPY = 0x2
|
||||||
|
CONNECT_DATA_AUTHENTICATED = 0x4
|
||||||
|
CONNECT_DATA_IDEMPOTENT = 0x2
|
||||||
|
CONNECT_RESUME_ON_READ_WRITE = 0x1
|
||||||
CR0 = 0x0
|
CR0 = 0x0
|
||||||
CR1 = 0x1000
|
CR1 = 0x1000
|
||||||
CR2 = 0x2000
|
CR2 = 0x2000
|
||||||
@ -1169,6 +1172,11 @@ const (
|
|||||||
PT_WRITE_D = 0x5
|
PT_WRITE_D = 0x5
|
||||||
PT_WRITE_I = 0x4
|
PT_WRITE_I = 0x4
|
||||||
PT_WRITE_U = 0x6
|
PT_WRITE_U = 0x6
|
||||||
|
RENAME_EXCL = 0x4
|
||||||
|
RENAME_NOFOLLOW_ANY = 0x10
|
||||||
|
RENAME_RESERVED1 = 0x8
|
||||||
|
RENAME_SECLUDE = 0x1
|
||||||
|
RENAME_SWAP = 0x2
|
||||||
RLIMIT_AS = 0x5
|
RLIMIT_AS = 0x5
|
||||||
RLIMIT_CORE = 0x4
|
RLIMIT_CORE = 0x4
|
||||||
RLIMIT_CPU = 0x0
|
RLIMIT_CPU = 0x0
|
||||||
@ -1260,6 +1268,10 @@ const (
|
|||||||
RTV_SSTHRESH = 0x20
|
RTV_SSTHRESH = 0x20
|
||||||
RUSAGE_CHILDREN = -0x1
|
RUSAGE_CHILDREN = -0x1
|
||||||
RUSAGE_SELF = 0x0
|
RUSAGE_SELF = 0x0
|
||||||
|
SAE_ASSOCID_ALL = 0xffffffff
|
||||||
|
SAE_ASSOCID_ANY = 0x0
|
||||||
|
SAE_CONNID_ALL = 0xffffffff
|
||||||
|
SAE_CONNID_ANY = 0x0
|
||||||
SCM_CREDS = 0x3
|
SCM_CREDS = 0x3
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
SCM_TIMESTAMP = 0x2
|
SCM_TIMESTAMP = 0x2
|
||||||
|
100
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
100
vendor/golang.org/x/sys/unix/zerrors_linux.go
generated
vendored
@ -321,6 +321,9 @@ const (
|
|||||||
AUDIT_INTEGRITY_STATUS = 0x70a
|
AUDIT_INTEGRITY_STATUS = 0x70a
|
||||||
AUDIT_IPC = 0x517
|
AUDIT_IPC = 0x517
|
||||||
AUDIT_IPC_SET_PERM = 0x51f
|
AUDIT_IPC_SET_PERM = 0x51f
|
||||||
|
AUDIT_IPE_ACCESS = 0x58c
|
||||||
|
AUDIT_IPE_CONFIG_CHANGE = 0x58d
|
||||||
|
AUDIT_IPE_POLICY_LOAD = 0x58e
|
||||||
AUDIT_KERNEL = 0x7d0
|
AUDIT_KERNEL = 0x7d0
|
||||||
AUDIT_KERNEL_OTHER = 0x524
|
AUDIT_KERNEL_OTHER = 0x524
|
||||||
AUDIT_KERN_MODULE = 0x532
|
AUDIT_KERN_MODULE = 0x532
|
||||||
@ -457,6 +460,7 @@ const (
|
|||||||
B600 = 0x8
|
B600 = 0x8
|
||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BCACHEFS_SUPER_MAGIC = 0xca451a4e
|
||||||
BDEVFS_MAGIC = 0x62646576
|
BDEVFS_MAGIC = 0x62646576
|
||||||
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
BINDERFS_SUPER_MAGIC = 0x6c6f6f70
|
||||||
BINFMTFS_MAGIC = 0x42494e4d
|
BINFMTFS_MAGIC = 0x42494e4d
|
||||||
@ -488,12 +492,14 @@ const (
|
|||||||
BPF_F_ID = 0x20
|
BPF_F_ID = 0x20
|
||||||
BPF_F_NETFILTER_IP_DEFRAG = 0x1
|
BPF_F_NETFILTER_IP_DEFRAG = 0x1
|
||||||
BPF_F_QUERY_EFFECTIVE = 0x1
|
BPF_F_QUERY_EFFECTIVE = 0x1
|
||||||
|
BPF_F_REDIRECT_FLAGS = 0x19
|
||||||
BPF_F_REPLACE = 0x4
|
BPF_F_REPLACE = 0x4
|
||||||
BPF_F_SLEEPABLE = 0x10
|
BPF_F_SLEEPABLE = 0x10
|
||||||
BPF_F_STRICT_ALIGNMENT = 0x1
|
BPF_F_STRICT_ALIGNMENT = 0x1
|
||||||
BPF_F_TEST_REG_INVARIANTS = 0x80
|
BPF_F_TEST_REG_INVARIANTS = 0x80
|
||||||
BPF_F_TEST_RND_HI32 = 0x4
|
BPF_F_TEST_RND_HI32 = 0x4
|
||||||
BPF_F_TEST_RUN_ON_CPU = 0x1
|
BPF_F_TEST_RUN_ON_CPU = 0x1
|
||||||
|
BPF_F_TEST_SKB_CHECKSUM_COMPLETE = 0x4
|
||||||
BPF_F_TEST_STATE_FREQ = 0x8
|
BPF_F_TEST_STATE_FREQ = 0x8
|
||||||
BPF_F_TEST_XDP_LIVE_FRAMES = 0x2
|
BPF_F_TEST_XDP_LIVE_FRAMES = 0x2
|
||||||
BPF_F_XDP_DEV_BOUND_ONLY = 0x40
|
BPF_F_XDP_DEV_BOUND_ONLY = 0x40
|
||||||
@ -502,6 +508,7 @@ const (
|
|||||||
BPF_IMM = 0x0
|
BPF_IMM = 0x0
|
||||||
BPF_IND = 0x40
|
BPF_IND = 0x40
|
||||||
BPF_JA = 0x0
|
BPF_JA = 0x0
|
||||||
|
BPF_JCOND = 0xe0
|
||||||
BPF_JEQ = 0x10
|
BPF_JEQ = 0x10
|
||||||
BPF_JGE = 0x30
|
BPF_JGE = 0x30
|
||||||
BPF_JGT = 0x20
|
BPF_JGT = 0x20
|
||||||
@ -657,6 +664,9 @@ const (
|
|||||||
CAN_NPROTO = 0x8
|
CAN_NPROTO = 0x8
|
||||||
CAN_RAW = 0x1
|
CAN_RAW = 0x1
|
||||||
CAN_RAW_FILTER_MAX = 0x200
|
CAN_RAW_FILTER_MAX = 0x200
|
||||||
|
CAN_RAW_XL_VCID_RX_FILTER = 0x4
|
||||||
|
CAN_RAW_XL_VCID_TX_PASS = 0x2
|
||||||
|
CAN_RAW_XL_VCID_TX_SET = 0x1
|
||||||
CAN_RTR_FLAG = 0x40000000
|
CAN_RTR_FLAG = 0x40000000
|
||||||
CAN_SFF_ID_BITS = 0xb
|
CAN_SFF_ID_BITS = 0xb
|
||||||
CAN_SFF_MASK = 0x7ff
|
CAN_SFF_MASK = 0x7ff
|
||||||
@ -924,6 +934,7 @@ const (
|
|||||||
EPOLL_CTL_ADD = 0x1
|
EPOLL_CTL_ADD = 0x1
|
||||||
EPOLL_CTL_DEL = 0x2
|
EPOLL_CTL_DEL = 0x2
|
||||||
EPOLL_CTL_MOD = 0x3
|
EPOLL_CTL_MOD = 0x3
|
||||||
|
EPOLL_IOC_TYPE = 0x8a
|
||||||
EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
|
EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
|
||||||
ESP_V4_FLOW = 0xa
|
ESP_V4_FLOW = 0xa
|
||||||
ESP_V6_FLOW = 0xc
|
ESP_V6_FLOW = 0xc
|
||||||
@ -937,9 +948,6 @@ const (
|
|||||||
ETHTOOL_FEC_OFF = 0x4
|
ETHTOOL_FEC_OFF = 0x4
|
||||||
ETHTOOL_FEC_RS = 0x8
|
ETHTOOL_FEC_RS = 0x8
|
||||||
ETHTOOL_FLAG_ALL = 0x7
|
ETHTOOL_FLAG_ALL = 0x7
|
||||||
ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
|
|
||||||
ETHTOOL_FLAG_OMIT_REPLY = 0x2
|
|
||||||
ETHTOOL_FLAG_STATS = 0x4
|
|
||||||
ETHTOOL_FLASHDEV = 0x33
|
ETHTOOL_FLASHDEV = 0x33
|
||||||
ETHTOOL_FLASH_MAX_FILENAME = 0x80
|
ETHTOOL_FLASH_MAX_FILENAME = 0x80
|
||||||
ETHTOOL_FWVERS_LEN = 0x20
|
ETHTOOL_FWVERS_LEN = 0x20
|
||||||
@ -1162,6 +1170,7 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
F2FS_SUPER_MAGIC = 0xf2f52010
|
F2FS_SUPER_MAGIC = 0xf2f52010
|
||||||
|
FALLOC_FL_ALLOCATE_RANGE = 0x0
|
||||||
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
FALLOC_FL_INSERT_RANGE = 0x20
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
FALLOC_FL_KEEP_SIZE = 0x1
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
@ -1339,6 +1348,7 @@ const (
|
|||||||
F_OFD_SETLK = 0x25
|
F_OFD_SETLK = 0x25
|
||||||
F_OFD_SETLKW = 0x26
|
F_OFD_SETLKW = 0x26
|
||||||
F_OK = 0x0
|
F_OK = 0x0
|
||||||
|
F_SEAL_EXEC = 0x20
|
||||||
F_SEAL_FUTURE_WRITE = 0x10
|
F_SEAL_FUTURE_WRITE = 0x10
|
||||||
F_SEAL_GROW = 0x4
|
F_SEAL_GROW = 0x4
|
||||||
F_SEAL_SEAL = 0x1
|
F_SEAL_SEAL = 0x1
|
||||||
@ -1627,6 +1637,7 @@ const (
|
|||||||
IP_FREEBIND = 0xf
|
IP_FREEBIND = 0xf
|
||||||
IP_HDRINCL = 0x3
|
IP_HDRINCL = 0x3
|
||||||
IP_IPSEC_POLICY = 0x10
|
IP_IPSEC_POLICY = 0x10
|
||||||
|
IP_LOCAL_PORT_RANGE = 0x33
|
||||||
IP_MAXPACKET = 0xffff
|
IP_MAXPACKET = 0xffff
|
||||||
IP_MAX_MEMBERSHIPS = 0x14
|
IP_MAX_MEMBERSHIPS = 0x14
|
||||||
IP_MF = 0x2000
|
IP_MF = 0x2000
|
||||||
@ -1653,6 +1664,7 @@ const (
|
|||||||
IP_PMTUDISC_OMIT = 0x5
|
IP_PMTUDISC_OMIT = 0x5
|
||||||
IP_PMTUDISC_PROBE = 0x3
|
IP_PMTUDISC_PROBE = 0x3
|
||||||
IP_PMTUDISC_WANT = 0x1
|
IP_PMTUDISC_WANT = 0x1
|
||||||
|
IP_PROTOCOL = 0x34
|
||||||
IP_RECVERR = 0xb
|
IP_RECVERR = 0xb
|
||||||
IP_RECVERR_RFC4884 = 0x1a
|
IP_RECVERR_RFC4884 = 0x1a
|
||||||
IP_RECVFRAGSIZE = 0x19
|
IP_RECVFRAGSIZE = 0x19
|
||||||
@ -1698,6 +1710,7 @@ const (
|
|||||||
KEXEC_ARCH_S390 = 0x160000
|
KEXEC_ARCH_S390 = 0x160000
|
||||||
KEXEC_ARCH_SH = 0x2a0000
|
KEXEC_ARCH_SH = 0x2a0000
|
||||||
KEXEC_ARCH_X86_64 = 0x3e0000
|
KEXEC_ARCH_X86_64 = 0x3e0000
|
||||||
|
KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8
|
||||||
KEXEC_FILE_DEBUG = 0x8
|
KEXEC_FILE_DEBUG = 0x8
|
||||||
KEXEC_FILE_NO_INITRAMFS = 0x4
|
KEXEC_FILE_NO_INITRAMFS = 0x4
|
||||||
KEXEC_FILE_ON_CRASH = 0x2
|
KEXEC_FILE_ON_CRASH = 0x2
|
||||||
@ -1773,6 +1786,7 @@ const (
|
|||||||
KEY_SPEC_USER_KEYRING = -0x4
|
KEY_SPEC_USER_KEYRING = -0x4
|
||||||
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
KEY_SPEC_USER_SESSION_KEYRING = -0x5
|
||||||
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
|
LANDLOCK_ACCESS_FS_EXECUTE = 0x1
|
||||||
|
LANDLOCK_ACCESS_FS_IOCTL_DEV = 0x8000
|
||||||
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
|
LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
|
||||||
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
|
LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
|
||||||
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
|
LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
|
||||||
@ -1790,6 +1804,8 @@ const (
|
|||||||
LANDLOCK_ACCESS_NET_BIND_TCP = 0x1
|
LANDLOCK_ACCESS_NET_BIND_TCP = 0x1
|
||||||
LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2
|
LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2
|
||||||
LANDLOCK_CREATE_RULESET_VERSION = 0x1
|
LANDLOCK_CREATE_RULESET_VERSION = 0x1
|
||||||
|
LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET = 0x1
|
||||||
|
LANDLOCK_SCOPE_SIGNAL = 0x2
|
||||||
LINUX_REBOOT_CMD_CAD_OFF = 0x0
|
LINUX_REBOOT_CMD_CAD_OFF = 0x0
|
||||||
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
|
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
|
||||||
LINUX_REBOOT_CMD_HALT = 0xcdef0123
|
LINUX_REBOOT_CMD_HALT = 0xcdef0123
|
||||||
@ -1854,6 +1870,19 @@ const (
|
|||||||
MAP_FILE = 0x0
|
MAP_FILE = 0x0
|
||||||
MAP_FIXED = 0x10
|
MAP_FIXED = 0x10
|
||||||
MAP_FIXED_NOREPLACE = 0x100000
|
MAP_FIXED_NOREPLACE = 0x100000
|
||||||
|
MAP_HUGE_16GB = 0x88000000
|
||||||
|
MAP_HUGE_16KB = 0x38000000
|
||||||
|
MAP_HUGE_16MB = 0x60000000
|
||||||
|
MAP_HUGE_1GB = 0x78000000
|
||||||
|
MAP_HUGE_1MB = 0x50000000
|
||||||
|
MAP_HUGE_256MB = 0x70000000
|
||||||
|
MAP_HUGE_2GB = 0x7c000000
|
||||||
|
MAP_HUGE_2MB = 0x54000000
|
||||||
|
MAP_HUGE_32MB = 0x64000000
|
||||||
|
MAP_HUGE_512KB = 0x4c000000
|
||||||
|
MAP_HUGE_512MB = 0x74000000
|
||||||
|
MAP_HUGE_64KB = 0x40000000
|
||||||
|
MAP_HUGE_8MB = 0x5c000000
|
||||||
MAP_HUGE_MASK = 0x3f
|
MAP_HUGE_MASK = 0x3f
|
||||||
MAP_HUGE_SHIFT = 0x1a
|
MAP_HUGE_SHIFT = 0x1a
|
||||||
MAP_PRIVATE = 0x2
|
MAP_PRIVATE = 0x2
|
||||||
@ -1901,6 +1930,8 @@ const (
|
|||||||
MNT_EXPIRE = 0x4
|
MNT_EXPIRE = 0x4
|
||||||
MNT_FORCE = 0x1
|
MNT_FORCE = 0x1
|
||||||
MNT_ID_REQ_SIZE_VER0 = 0x18
|
MNT_ID_REQ_SIZE_VER0 = 0x18
|
||||||
|
MNT_ID_REQ_SIZE_VER1 = 0x20
|
||||||
|
MNT_NS_INFO_SIZE_VER0 = 0x10
|
||||||
MODULE_INIT_COMPRESSED_FILE = 0x4
|
MODULE_INIT_COMPRESSED_FILE = 0x4
|
||||||
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
|
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
|
||||||
MODULE_INIT_IGNORE_VERMAGIC = 0x2
|
MODULE_INIT_IGNORE_VERMAGIC = 0x2
|
||||||
@ -2166,10 +2197,10 @@ const (
|
|||||||
NFT_REG_SIZE = 0x10
|
NFT_REG_SIZE = 0x10
|
||||||
NFT_REJECT_ICMPX_MAX = 0x3
|
NFT_REJECT_ICMPX_MAX = 0x3
|
||||||
NFT_RT_MAX = 0x4
|
NFT_RT_MAX = 0x4
|
||||||
NFT_SECMARK_CTX_MAXLEN = 0x100
|
NFT_SECMARK_CTX_MAXLEN = 0x1000
|
||||||
NFT_SET_MAXNAMELEN = 0x100
|
NFT_SET_MAXNAMELEN = 0x100
|
||||||
NFT_SOCKET_MAX = 0x3
|
NFT_SOCKET_MAX = 0x3
|
||||||
NFT_TABLE_F_MASK = 0x3
|
NFT_TABLE_F_MASK = 0x7
|
||||||
NFT_TABLE_MAXNAMELEN = 0x100
|
NFT_TABLE_MAXNAMELEN = 0x100
|
||||||
NFT_TRACETYPE_MAX = 0x3
|
NFT_TRACETYPE_MAX = 0x3
|
||||||
NFT_TUNNEL_F_MASK = 0x7
|
NFT_TUNNEL_F_MASK = 0x7
|
||||||
@ -2335,9 +2366,11 @@ const (
|
|||||||
PERF_MEM_LVLNUM_IO = 0xa
|
PERF_MEM_LVLNUM_IO = 0xa
|
||||||
PERF_MEM_LVLNUM_L1 = 0x1
|
PERF_MEM_LVLNUM_L1 = 0x1
|
||||||
PERF_MEM_LVLNUM_L2 = 0x2
|
PERF_MEM_LVLNUM_L2 = 0x2
|
||||||
|
PERF_MEM_LVLNUM_L2_MHB = 0x5
|
||||||
PERF_MEM_LVLNUM_L3 = 0x3
|
PERF_MEM_LVLNUM_L3 = 0x3
|
||||||
PERF_MEM_LVLNUM_L4 = 0x4
|
PERF_MEM_LVLNUM_L4 = 0x4
|
||||||
PERF_MEM_LVLNUM_LFB = 0xc
|
PERF_MEM_LVLNUM_LFB = 0xc
|
||||||
|
PERF_MEM_LVLNUM_MSC = 0x6
|
||||||
PERF_MEM_LVLNUM_NA = 0xf
|
PERF_MEM_LVLNUM_NA = 0xf
|
||||||
PERF_MEM_LVLNUM_PMEM = 0xe
|
PERF_MEM_LVLNUM_PMEM = 0xe
|
||||||
PERF_MEM_LVLNUM_RAM = 0xd
|
PERF_MEM_LVLNUM_RAM = 0xd
|
||||||
@ -2403,12 +2436,14 @@ const (
|
|||||||
PERF_RECORD_MISC_USER = 0x2
|
PERF_RECORD_MISC_USER = 0x2
|
||||||
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
|
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
|
||||||
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
|
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
|
||||||
|
PID_FS_MAGIC = 0x50494446
|
||||||
PIPEFS_MAGIC = 0x50495045
|
PIPEFS_MAGIC = 0x50495045
|
||||||
PPPIOCGNPMODE = 0xc008744c
|
PPPIOCGNPMODE = 0xc008744c
|
||||||
PPPIOCNEWUNIT = 0xc004743e
|
PPPIOCNEWUNIT = 0xc004743e
|
||||||
PRIO_PGRP = 0x1
|
PRIO_PGRP = 0x1
|
||||||
PRIO_PROCESS = 0x0
|
PRIO_PROCESS = 0x0
|
||||||
PRIO_USER = 0x2
|
PRIO_USER = 0x2
|
||||||
|
PROCFS_IOCTL_MAGIC = 'f'
|
||||||
PROC_SUPER_MAGIC = 0x9fa0
|
PROC_SUPER_MAGIC = 0x9fa0
|
||||||
PROT_EXEC = 0x4
|
PROT_EXEC = 0x4
|
||||||
PROT_GROWSDOWN = 0x1000000
|
PROT_GROWSDOWN = 0x1000000
|
||||||
@ -2490,6 +2525,23 @@ const (
|
|||||||
PR_PAC_GET_ENABLED_KEYS = 0x3d
|
PR_PAC_GET_ENABLED_KEYS = 0x3d
|
||||||
PR_PAC_RESET_KEYS = 0x36
|
PR_PAC_RESET_KEYS = 0x36
|
||||||
PR_PAC_SET_ENABLED_KEYS = 0x3c
|
PR_PAC_SET_ENABLED_KEYS = 0x3c
|
||||||
|
PR_PPC_DEXCR_CTRL_CLEAR = 0x4
|
||||||
|
PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC = 0x10
|
||||||
|
PR_PPC_DEXCR_CTRL_EDITABLE = 0x1
|
||||||
|
PR_PPC_DEXCR_CTRL_MASK = 0x1f
|
||||||
|
PR_PPC_DEXCR_CTRL_SET = 0x2
|
||||||
|
PR_PPC_DEXCR_CTRL_SET_ONEXEC = 0x8
|
||||||
|
PR_PPC_DEXCR_IBRTPD = 0x1
|
||||||
|
PR_PPC_DEXCR_NPHIE = 0x3
|
||||||
|
PR_PPC_DEXCR_SBHE = 0x0
|
||||||
|
PR_PPC_DEXCR_SRAPD = 0x2
|
||||||
|
PR_PPC_GET_DEXCR = 0x48
|
||||||
|
PR_PPC_SET_DEXCR = 0x49
|
||||||
|
PR_RISCV_CTX_SW_FENCEI_OFF = 0x1
|
||||||
|
PR_RISCV_CTX_SW_FENCEI_ON = 0x0
|
||||||
|
PR_RISCV_SCOPE_PER_PROCESS = 0x0
|
||||||
|
PR_RISCV_SCOPE_PER_THREAD = 0x1
|
||||||
|
PR_RISCV_SET_ICACHE_FLUSH_CTX = 0x47
|
||||||
PR_RISCV_V_GET_CONTROL = 0x46
|
PR_RISCV_V_GET_CONTROL = 0x46
|
||||||
PR_RISCV_V_SET_CONTROL = 0x45
|
PR_RISCV_V_SET_CONTROL = 0x45
|
||||||
PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3
|
PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3
|
||||||
@ -2581,6 +2633,28 @@ const (
|
|||||||
PR_UNALIGN_NOPRINT = 0x1
|
PR_UNALIGN_NOPRINT = 0x1
|
||||||
PR_UNALIGN_SIGBUS = 0x2
|
PR_UNALIGN_SIGBUS = 0x2
|
||||||
PSTOREFS_MAGIC = 0x6165676c
|
PSTOREFS_MAGIC = 0x6165676c
|
||||||
|
PTP_CLK_MAGIC = '='
|
||||||
|
PTP_ENABLE_FEATURE = 0x1
|
||||||
|
PTP_EXTTS_EDGES = 0x6
|
||||||
|
PTP_EXTTS_EVENT_VALID = 0x1
|
||||||
|
PTP_EXTTS_V1_VALID_FLAGS = 0x7
|
||||||
|
PTP_EXTTS_VALID_FLAGS = 0x1f
|
||||||
|
PTP_EXT_OFFSET = 0x10
|
||||||
|
PTP_FALLING_EDGE = 0x4
|
||||||
|
PTP_MAX_SAMPLES = 0x19
|
||||||
|
PTP_PEROUT_DUTY_CYCLE = 0x2
|
||||||
|
PTP_PEROUT_ONE_SHOT = 0x1
|
||||||
|
PTP_PEROUT_PHASE = 0x4
|
||||||
|
PTP_PEROUT_V1_VALID_FLAGS = 0x0
|
||||||
|
PTP_PEROUT_VALID_FLAGS = 0x7
|
||||||
|
PTP_PIN_GETFUNC = 0xc0603d06
|
||||||
|
PTP_PIN_GETFUNC2 = 0xc0603d0f
|
||||||
|
PTP_RISING_EDGE = 0x2
|
||||||
|
PTP_STRICT_FLAGS = 0x8
|
||||||
|
PTP_SYS_OFFSET_EXTENDED = 0xc4c03d09
|
||||||
|
PTP_SYS_OFFSET_EXTENDED2 = 0xc4c03d12
|
||||||
|
PTP_SYS_OFFSET_PRECISE = 0xc0403d08
|
||||||
|
PTP_SYS_OFFSET_PRECISE2 = 0xc0403d11
|
||||||
PTRACE_ATTACH = 0x10
|
PTRACE_ATTACH = 0x10
|
||||||
PTRACE_CONT = 0x7
|
PTRACE_CONT = 0x7
|
||||||
PTRACE_DETACH = 0x11
|
PTRACE_DETACH = 0x11
|
||||||
@ -2894,14 +2968,17 @@ const (
|
|||||||
RUSAGE_SELF = 0x0
|
RUSAGE_SELF = 0x0
|
||||||
RUSAGE_THREAD = 0x1
|
RUSAGE_THREAD = 0x1
|
||||||
RWF_APPEND = 0x10
|
RWF_APPEND = 0x10
|
||||||
|
RWF_ATOMIC = 0x40
|
||||||
RWF_DSYNC = 0x2
|
RWF_DSYNC = 0x2
|
||||||
RWF_HIPRI = 0x1
|
RWF_HIPRI = 0x1
|
||||||
|
RWF_NOAPPEND = 0x20
|
||||||
RWF_NOWAIT = 0x8
|
RWF_NOWAIT = 0x8
|
||||||
RWF_SUPPORTED = 0x1f
|
RWF_SUPPORTED = 0x7f
|
||||||
RWF_SYNC = 0x4
|
RWF_SYNC = 0x4
|
||||||
RWF_WRITE_LIFE_NOT_SET = 0x0
|
RWF_WRITE_LIFE_NOT_SET = 0x0
|
||||||
SCHED_BATCH = 0x3
|
SCHED_BATCH = 0x3
|
||||||
SCHED_DEADLINE = 0x6
|
SCHED_DEADLINE = 0x6
|
||||||
|
SCHED_EXT = 0x7
|
||||||
SCHED_FIFO = 0x1
|
SCHED_FIFO = 0x1
|
||||||
SCHED_FLAG_ALL = 0x7f
|
SCHED_FLAG_ALL = 0x7f
|
||||||
SCHED_FLAG_DL_OVERRUN = 0x4
|
SCHED_FLAG_DL_OVERRUN = 0x4
|
||||||
@ -2918,7 +2995,9 @@ const (
|
|||||||
SCHED_RESET_ON_FORK = 0x40000000
|
SCHED_RESET_ON_FORK = 0x40000000
|
||||||
SCHED_RR = 0x2
|
SCHED_RR = 0x2
|
||||||
SCM_CREDENTIALS = 0x2
|
SCM_CREDENTIALS = 0x2
|
||||||
|
SCM_PIDFD = 0x4
|
||||||
SCM_RIGHTS = 0x1
|
SCM_RIGHTS = 0x1
|
||||||
|
SCM_SECURITY = 0x3
|
||||||
SCM_TIMESTAMP = 0x1d
|
SCM_TIMESTAMP = 0x1d
|
||||||
SC_LOG_FLUSH = 0x100000
|
SC_LOG_FLUSH = 0x100000
|
||||||
SECCOMP_ADDFD_FLAG_SEND = 0x2
|
SECCOMP_ADDFD_FLAG_SEND = 0x2
|
||||||
@ -3051,6 +3130,8 @@ const (
|
|||||||
SIOCSMIIREG = 0x8949
|
SIOCSMIIREG = 0x8949
|
||||||
SIOCSRARP = 0x8962
|
SIOCSRARP = 0x8962
|
||||||
SIOCWANDEV = 0x894a
|
SIOCWANDEV = 0x894a
|
||||||
|
SK_DIAG_BPF_STORAGE_MAX = 0x3
|
||||||
|
SK_DIAG_BPF_STORAGE_REQ_MAX = 0x1
|
||||||
SMACK_MAGIC = 0x43415d53
|
SMACK_MAGIC = 0x43415d53
|
||||||
SMART_AUTOSAVE = 0xd2
|
SMART_AUTOSAVE = 0xd2
|
||||||
SMART_AUTO_OFFLINE = 0xdb
|
SMART_AUTO_OFFLINE = 0xdb
|
||||||
@ -3071,6 +3152,8 @@ const (
|
|||||||
SOCKFS_MAGIC = 0x534f434b
|
SOCKFS_MAGIC = 0x534f434b
|
||||||
SOCK_BUF_LOCK_MASK = 0x3
|
SOCK_BUF_LOCK_MASK = 0x3
|
||||||
SOCK_DCCP = 0x6
|
SOCK_DCCP = 0x6
|
||||||
|
SOCK_DESTROY = 0x15
|
||||||
|
SOCK_DIAG_BY_FAMILY = 0x14
|
||||||
SOCK_IOC_TYPE = 0x89
|
SOCK_IOC_TYPE = 0x89
|
||||||
SOCK_PACKET = 0xa
|
SOCK_PACKET = 0xa
|
||||||
SOCK_RAW = 0x3
|
SOCK_RAW = 0x3
|
||||||
@ -3164,6 +3247,7 @@ const (
|
|||||||
STATX_ATTR_MOUNT_ROOT = 0x2000
|
STATX_ATTR_MOUNT_ROOT = 0x2000
|
||||||
STATX_ATTR_NODUMP = 0x40
|
STATX_ATTR_NODUMP = 0x40
|
||||||
STATX_ATTR_VERITY = 0x100000
|
STATX_ATTR_VERITY = 0x100000
|
||||||
|
STATX_ATTR_WRITE_ATOMIC = 0x400000
|
||||||
STATX_BASIC_STATS = 0x7ff
|
STATX_BASIC_STATS = 0x7ff
|
||||||
STATX_BLOCKS = 0x400
|
STATX_BLOCKS = 0x400
|
||||||
STATX_BTIME = 0x800
|
STATX_BTIME = 0x800
|
||||||
@ -3177,8 +3261,10 @@ const (
|
|||||||
STATX_MTIME = 0x40
|
STATX_MTIME = 0x40
|
||||||
STATX_NLINK = 0x4
|
STATX_NLINK = 0x4
|
||||||
STATX_SIZE = 0x200
|
STATX_SIZE = 0x200
|
||||||
|
STATX_SUBVOL = 0x8000
|
||||||
STATX_TYPE = 0x1
|
STATX_TYPE = 0x1
|
||||||
STATX_UID = 0x8
|
STATX_UID = 0x8
|
||||||
|
STATX_WRITE_ATOMIC = 0x10000
|
||||||
STATX__RESERVED = 0x80000000
|
STATX__RESERVED = 0x80000000
|
||||||
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
SYNC_FILE_RANGE_WAIT_AFTER = 0x4
|
||||||
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
|
||||||
@ -3260,6 +3346,7 @@ const (
|
|||||||
TCP_MAX_WINSHIFT = 0xe
|
TCP_MAX_WINSHIFT = 0xe
|
||||||
TCP_MD5SIG = 0xe
|
TCP_MD5SIG = 0xe
|
||||||
TCP_MD5SIG_EXT = 0x20
|
TCP_MD5SIG_EXT = 0x20
|
||||||
|
TCP_MD5SIG_FLAG_IFINDEX = 0x2
|
||||||
TCP_MD5SIG_FLAG_PREFIX = 0x1
|
TCP_MD5SIG_FLAG_PREFIX = 0x1
|
||||||
TCP_MD5SIG_MAXKEYLEN = 0x50
|
TCP_MD5SIG_MAXKEYLEN = 0x50
|
||||||
TCP_MSS = 0x200
|
TCP_MSS = 0x200
|
||||||
@ -3576,6 +3663,7 @@ const (
|
|||||||
XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
|
XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
|
||||||
XDP_UMEM_PGOFF_FILL_RING = 0x100000000
|
XDP_UMEM_PGOFF_FILL_RING = 0x100000000
|
||||||
XDP_UMEM_REG = 0x4
|
XDP_UMEM_REG = 0x4
|
||||||
|
XDP_UMEM_TX_METADATA_LEN = 0x4
|
||||||
XDP_UMEM_TX_SW_CSUM = 0x2
|
XDP_UMEM_TX_SW_CSUM = 0x2
|
||||||
XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
|
XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
|
||||||
XDP_USE_NEED_WAKEUP = 0x8
|
XDP_USE_NEED_WAKEUP = 0x8
|
||||||
|
28
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
28
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -107,6 +109,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x80084803
|
HIDIOCGRAWINFO = 0x80084803
|
||||||
HIDIOCGRDESC = 0x90044802
|
HIDIOCGRDESC = 0x90044802
|
||||||
HIDIOCGRDESCSIZE = 0x80044801
|
HIDIOCGRDESCSIZE = 0x80044801
|
||||||
|
HIDIOCREVOKE = 0x4004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x8000
|
IEXTEN = 0x8000
|
||||||
@ -118,6 +121,7 @@ const (
|
|||||||
IXOFF = 0x1000
|
IXOFF = 0x1000
|
||||||
IXON = 0x400
|
IXON = 0x400
|
||||||
MAP_32BIT = 0x40
|
MAP_32BIT = 0x40
|
||||||
|
MAP_ABOVE4G = 0x80
|
||||||
MAP_ANON = 0x20
|
MAP_ANON = 0x20
|
||||||
MAP_ANONYMOUS = 0x20
|
MAP_ANONYMOUS = 0x20
|
||||||
MAP_DENYWRITE = 0x800
|
MAP_DENYWRITE = 0x800
|
||||||
@ -150,9 +154,14 @@ const (
|
|||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x8008b705
|
||||||
NS_GET_NSTYPE = 0xb703
|
NS_GET_NSTYPE = 0xb703
|
||||||
NS_GET_OWNER_UID = 0xb704
|
NS_GET_OWNER_UID = 0xb704
|
||||||
NS_GET_PARENT = 0xb702
|
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
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -229,6 +238,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x7434
|
PPPIOCUNBRIDGECHAN = 0x7434
|
||||||
PPPIOCXFERUNIT = 0x744e
|
PPPIOCXFERUNIT = 0x744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffff
|
PR_SET_PTRACER_ANY = 0xffffffff
|
||||||
|
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_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GETFPXREGS = 0x12
|
PTRACE_GETFPXREGS = 0x12
|
||||||
PTRACE_GET_THREAD_AREA = 0x19
|
PTRACE_GET_THREAD_AREA = 0x19
|
||||||
@ -275,6 +298,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x700f
|
RTC_WIE_ON = 0x700f
|
||||||
RTC_WKALM_RD = 0x80287010
|
RTC_WKALM_RD = 0x80287010
|
||||||
RTC_WKALM_SET = 0x4028700f
|
RTC_WKALM_SET = 0x4028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -313,6 +338,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
28
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
28
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -107,6 +109,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x80084803
|
HIDIOCGRAWINFO = 0x80084803
|
||||||
HIDIOCGRDESC = 0x90044802
|
HIDIOCGRDESC = 0x90044802
|
||||||
HIDIOCGRDESCSIZE = 0x80044801
|
HIDIOCGRDESCSIZE = 0x80044801
|
||||||
|
HIDIOCREVOKE = 0x4004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x8000
|
IEXTEN = 0x8000
|
||||||
@ -118,6 +121,7 @@ const (
|
|||||||
IXOFF = 0x1000
|
IXOFF = 0x1000
|
||||||
IXON = 0x400
|
IXON = 0x400
|
||||||
MAP_32BIT = 0x40
|
MAP_32BIT = 0x40
|
||||||
|
MAP_ABOVE4G = 0x80
|
||||||
MAP_ANON = 0x20
|
MAP_ANON = 0x20
|
||||||
MAP_ANONYMOUS = 0x20
|
MAP_ANONYMOUS = 0x20
|
||||||
MAP_DENYWRITE = 0x800
|
MAP_DENYWRITE = 0x800
|
||||||
@ -150,9 +154,14 @@ const (
|
|||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x8008b705
|
||||||
NS_GET_NSTYPE = 0xb703
|
NS_GET_NSTYPE = 0xb703
|
||||||
NS_GET_OWNER_UID = 0xb704
|
NS_GET_OWNER_UID = 0xb704
|
||||||
NS_GET_PARENT = 0xb702
|
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
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -229,6 +238,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x7434
|
PPPIOCUNBRIDGECHAN = 0x7434
|
||||||
PPPIOCXFERUNIT = 0x744e
|
PPPIOCXFERUNIT = 0x744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
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_ARCH_PRCTL = 0x1e
|
PTRACE_ARCH_PRCTL = 0x1e
|
||||||
PTRACE_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GETFPXREGS = 0x12
|
PTRACE_GETFPXREGS = 0x12
|
||||||
@ -276,6 +299,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x700f
|
RTC_WIE_ON = 0x700f
|
||||||
RTC_WKALM_RD = 0x80287010
|
RTC_WKALM_RD = 0x80287010
|
||||||
RTC_WKALM_SET = 0x4028700f
|
RTC_WKALM_SET = 0x4028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -314,6 +339,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x80084803
|
HIDIOCGRAWINFO = 0x80084803
|
||||||
HIDIOCGRDESC = 0x90044802
|
HIDIOCGRDESC = 0x90044802
|
||||||
HIDIOCGRDESCSIZE = 0x80044801
|
HIDIOCGRDESCSIZE = 0x80044801
|
||||||
|
HIDIOCREVOKE = 0x4004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x8000
|
IEXTEN = 0x8000
|
||||||
@ -148,9 +151,14 @@ const (
|
|||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x8008b705
|
||||||
NS_GET_NSTYPE = 0xb703
|
NS_GET_NSTYPE = 0xb703
|
||||||
NS_GET_OWNER_UID = 0xb704
|
NS_GET_OWNER_UID = 0xb704
|
||||||
NS_GET_PARENT = 0xb702
|
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
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -227,6 +235,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x7434
|
PPPIOCUNBRIDGECHAN = 0x7434
|
||||||
PPPIOCXFERUNIT = 0x744e
|
PPPIOCXFERUNIT = 0x744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffff
|
PR_SET_PTRACER_ANY = 0xffffffff
|
||||||
|
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_GETCRUNCHREGS = 0x19
|
PTRACE_GETCRUNCHREGS = 0x19
|
||||||
PTRACE_GETFDPIC = 0x1f
|
PTRACE_GETFDPIC = 0x1f
|
||||||
PTRACE_GETFDPIC_EXEC = 0x0
|
PTRACE_GETFDPIC_EXEC = 0x0
|
||||||
@ -282,6 +304,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x700f
|
RTC_WIE_ON = 0x700f
|
||||||
RTC_WKALM_RD = 0x80287010
|
RTC_WKALM_RD = 0x80287010
|
||||||
RTC_WKALM_SET = 0x4028700f
|
RTC_WKALM_SET = 0x4028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -320,6 +344,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
29
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
29
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
ESR_MAGIC = 0x45535201
|
ESR_MAGIC = 0x45535201
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
@ -87,6 +89,7 @@ const (
|
|||||||
FICLONE = 0x40049409
|
FICLONE = 0x40049409
|
||||||
FICLONERANGE = 0x4020940d
|
FICLONERANGE = 0x4020940d
|
||||||
FLUSHO = 0x1000
|
FLUSHO = 0x1000
|
||||||
|
FPMR_MAGIC = 0x46504d52
|
||||||
FPSIMD_MAGIC = 0x46508001
|
FPSIMD_MAGIC = 0x46508001
|
||||||
FS_IOC_ENABLE_VERITY = 0x40806685
|
FS_IOC_ENABLE_VERITY = 0x40806685
|
||||||
FS_IOC_GETFLAGS = 0x80086601
|
FS_IOC_GETFLAGS = 0x80086601
|
||||||
@ -109,6 +112,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x80084803
|
HIDIOCGRAWINFO = 0x80084803
|
||||||
HIDIOCGRDESC = 0x90044802
|
HIDIOCGRDESC = 0x90044802
|
||||||
HIDIOCGRDESCSIZE = 0x80044801
|
HIDIOCGRDESCSIZE = 0x80044801
|
||||||
|
HIDIOCREVOKE = 0x4004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x8000
|
IEXTEN = 0x8000
|
||||||
@ -151,9 +155,14 @@ const (
|
|||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x8008b705
|
||||||
NS_GET_NSTYPE = 0xb703
|
NS_GET_NSTYPE = 0xb703
|
||||||
NS_GET_OWNER_UID = 0xb704
|
NS_GET_OWNER_UID = 0xb704
|
||||||
NS_GET_PARENT = 0xb702
|
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
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -197,6 +206,7 @@ const (
|
|||||||
PERF_EVENT_IOC_SET_BPF = 0x40042408
|
PERF_EVENT_IOC_SET_BPF = 0x40042408
|
||||||
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
PERF_EVENT_IOC_SET_FILTER = 0x40082406
|
||||||
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
PERF_EVENT_IOC_SET_OUTPUT = 0x2405
|
||||||
|
POE_MAGIC = 0x504f4530
|
||||||
PPPIOCATTACH = 0x4004743d
|
PPPIOCATTACH = 0x4004743d
|
||||||
PPPIOCATTCHAN = 0x40047438
|
PPPIOCATTCHAN = 0x40047438
|
||||||
PPPIOCBRIDGECHAN = 0x40047435
|
PPPIOCBRIDGECHAN = 0x40047435
|
||||||
@ -232,6 +242,20 @@ const (
|
|||||||
PROT_BTI = 0x10
|
PROT_BTI = 0x10
|
||||||
PROT_MTE = 0x20
|
PROT_MTE = 0x20
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
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_PEEKMTETAGS = 0x21
|
PTRACE_PEEKMTETAGS = 0x21
|
||||||
PTRACE_POKEMTETAGS = 0x22
|
PTRACE_POKEMTETAGS = 0x22
|
||||||
PTRACE_SYSEMU = 0x1f
|
PTRACE_SYSEMU = 0x1f
|
||||||
@ -272,6 +296,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x700f
|
RTC_WIE_ON = 0x700f
|
||||||
RTC_WKALM_RD = 0x80287010
|
RTC_WKALM_RD = 0x80287010
|
||||||
RTC_WKALM_SET = 0x4028700f
|
RTC_WKALM_SET = 0x4028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -310,6 +336,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -107,6 +109,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x80084803
|
HIDIOCGRAWINFO = 0x80084803
|
||||||
HIDIOCGRDESC = 0x90044802
|
HIDIOCGRDESC = 0x90044802
|
||||||
HIDIOCGRDESCSIZE = 0x80044801
|
HIDIOCGRDESCSIZE = 0x80044801
|
||||||
|
HIDIOCREVOKE = 0x4004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x8000
|
IEXTEN = 0x8000
|
||||||
@ -152,9 +155,14 @@ const (
|
|||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x8008b705
|
||||||
NS_GET_NSTYPE = 0xb703
|
NS_GET_NSTYPE = 0xb703
|
||||||
NS_GET_OWNER_UID = 0xb704
|
NS_GET_OWNER_UID = 0xb704
|
||||||
NS_GET_PARENT = 0xb702
|
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
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -231,6 +239,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x7434
|
PPPIOCUNBRIDGECHAN = 0x7434
|
||||||
PPPIOCXFERUNIT = 0x744e
|
PPPIOCXFERUNIT = 0x744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
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_SYSEMU = 0x1f
|
PTRACE_SYSEMU = 0x1f
|
||||||
PTRACE_SYSEMU_SINGLESTEP = 0x20
|
PTRACE_SYSEMU_SINGLESTEP = 0x20
|
||||||
RLIMIT_AS = 0x9
|
RLIMIT_AS = 0x9
|
||||||
@ -269,6 +291,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x700f
|
RTC_WIE_ON = 0x700f
|
||||||
RTC_WKALM_RD = 0x80287010
|
RTC_WKALM_RD = 0x80287010
|
||||||
RTC_WKALM_SET = 0x4028700f
|
RTC_WKALM_SET = 0x4028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -307,6 +331,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x40084803
|
HIDIOCGRAWINFO = 0x40084803
|
||||||
HIDIOCGRDESC = 0x50044802
|
HIDIOCGRDESC = 0x50044802
|
||||||
HIDIOCGRDESCSIZE = 0x40044801
|
HIDIOCGRDESCSIZE = 0x40044801
|
||||||
|
HIDIOCREVOKE = 0x8004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x100
|
IEXTEN = 0x100
|
||||||
@ -148,9 +151,14 @@ const (
|
|||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x4008b705
|
||||||
NS_GET_NSTYPE = 0x2000b703
|
NS_GET_NSTYPE = 0x2000b703
|
||||||
NS_GET_OWNER_UID = 0x2000b704
|
NS_GET_OWNER_UID = 0x2000b704
|
||||||
NS_GET_PARENT = 0x2000b702
|
NS_GET_PARENT = 0x2000b702
|
||||||
|
NS_GET_PID_FROM_PIDNS = 0x4004b706
|
||||||
|
NS_GET_PID_IN_PIDNS = 0x4004b708
|
||||||
|
NS_GET_TGID_FROM_PIDNS = 0x4004b707
|
||||||
|
NS_GET_TGID_IN_PIDNS = 0x4004b709
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -227,6 +235,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x20007434
|
PPPIOCUNBRIDGECHAN = 0x20007434
|
||||||
PPPIOCXFERUNIT = 0x2000744e
|
PPPIOCXFERUNIT = 0x2000744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffff
|
PR_SET_PTRACER_ANY = 0xffffffff
|
||||||
|
PTP_CLOCK_GETCAPS = 0x40503d01
|
||||||
|
PTP_CLOCK_GETCAPS2 = 0x40503d0a
|
||||||
|
PTP_ENABLE_PPS = 0x80043d04
|
||||||
|
PTP_ENABLE_PPS2 = 0x80043d0d
|
||||||
|
PTP_EXTTS_REQUEST = 0x80103d02
|
||||||
|
PTP_EXTTS_REQUEST2 = 0x80103d0b
|
||||||
|
PTP_MASK_CLEAR_ALL = 0x20003d13
|
||||||
|
PTP_MASK_EN_SINGLE = 0x80043d14
|
||||||
|
PTP_PEROUT_REQUEST = 0x80383d03
|
||||||
|
PTP_PEROUT_REQUEST2 = 0x80383d0c
|
||||||
|
PTP_PIN_SETFUNC = 0x80603d07
|
||||||
|
PTP_PIN_SETFUNC2 = 0x80603d10
|
||||||
|
PTP_SYS_OFFSET = 0x83403d05
|
||||||
|
PTP_SYS_OFFSET2 = 0x83403d0e
|
||||||
PTRACE_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GET_THREAD_AREA = 0x19
|
PTRACE_GET_THREAD_AREA = 0x19
|
||||||
PTRACE_GET_THREAD_AREA_3264 = 0xc4
|
PTRACE_GET_THREAD_AREA_3264 = 0xc4
|
||||||
@ -275,6 +297,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x2000700f
|
RTC_WIE_ON = 0x2000700f
|
||||||
RTC_WKALM_RD = 0x40287010
|
RTC_WKALM_RD = 0x40287010
|
||||||
RTC_WKALM_SET = 0x8028700f
|
RTC_WKALM_SET = 0x8028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -313,6 +337,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x1029
|
SO_DOMAIN = 0x1029
|
||||||
SO_DONTROUTE = 0x10
|
SO_DONTROUTE = 0x10
|
||||||
SO_ERROR = 0x1007
|
SO_ERROR = 0x1007
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x40084803
|
HIDIOCGRAWINFO = 0x40084803
|
||||||
HIDIOCGRDESC = 0x50044802
|
HIDIOCGRDESC = 0x50044802
|
||||||
HIDIOCGRDESCSIZE = 0x40044801
|
HIDIOCGRDESCSIZE = 0x40044801
|
||||||
|
HIDIOCREVOKE = 0x8004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x100
|
IEXTEN = 0x100
|
||||||
@ -148,9 +151,14 @@ const (
|
|||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x4008b705
|
||||||
NS_GET_NSTYPE = 0x2000b703
|
NS_GET_NSTYPE = 0x2000b703
|
||||||
NS_GET_OWNER_UID = 0x2000b704
|
NS_GET_OWNER_UID = 0x2000b704
|
||||||
NS_GET_PARENT = 0x2000b702
|
NS_GET_PARENT = 0x2000b702
|
||||||
|
NS_GET_PID_FROM_PIDNS = 0x4004b706
|
||||||
|
NS_GET_PID_IN_PIDNS = 0x4004b708
|
||||||
|
NS_GET_TGID_FROM_PIDNS = 0x4004b707
|
||||||
|
NS_GET_TGID_IN_PIDNS = 0x4004b709
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -227,6 +235,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x20007434
|
PPPIOCUNBRIDGECHAN = 0x20007434
|
||||||
PPPIOCXFERUNIT = 0x2000744e
|
PPPIOCXFERUNIT = 0x2000744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||||
|
PTP_CLOCK_GETCAPS = 0x40503d01
|
||||||
|
PTP_CLOCK_GETCAPS2 = 0x40503d0a
|
||||||
|
PTP_ENABLE_PPS = 0x80043d04
|
||||||
|
PTP_ENABLE_PPS2 = 0x80043d0d
|
||||||
|
PTP_EXTTS_REQUEST = 0x80103d02
|
||||||
|
PTP_EXTTS_REQUEST2 = 0x80103d0b
|
||||||
|
PTP_MASK_CLEAR_ALL = 0x20003d13
|
||||||
|
PTP_MASK_EN_SINGLE = 0x80043d14
|
||||||
|
PTP_PEROUT_REQUEST = 0x80383d03
|
||||||
|
PTP_PEROUT_REQUEST2 = 0x80383d0c
|
||||||
|
PTP_PIN_SETFUNC = 0x80603d07
|
||||||
|
PTP_PIN_SETFUNC2 = 0x80603d10
|
||||||
|
PTP_SYS_OFFSET = 0x83403d05
|
||||||
|
PTP_SYS_OFFSET2 = 0x83403d0e
|
||||||
PTRACE_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GET_THREAD_AREA = 0x19
|
PTRACE_GET_THREAD_AREA = 0x19
|
||||||
PTRACE_GET_THREAD_AREA_3264 = 0xc4
|
PTRACE_GET_THREAD_AREA_3264 = 0xc4
|
||||||
@ -275,6 +297,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x2000700f
|
RTC_WIE_ON = 0x2000700f
|
||||||
RTC_WKALM_RD = 0x40287010
|
RTC_WKALM_RD = 0x40287010
|
||||||
RTC_WKALM_SET = 0x8028700f
|
RTC_WKALM_SET = 0x8028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -313,6 +337,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x1029
|
SO_DOMAIN = 0x1029
|
||||||
SO_DONTROUTE = 0x10
|
SO_DONTROUTE = 0x10
|
||||||
SO_ERROR = 0x1007
|
SO_ERROR = 0x1007
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x40084803
|
HIDIOCGRAWINFO = 0x40084803
|
||||||
HIDIOCGRDESC = 0x50044802
|
HIDIOCGRDESC = 0x50044802
|
||||||
HIDIOCGRDESCSIZE = 0x40044801
|
HIDIOCGRDESCSIZE = 0x40044801
|
||||||
|
HIDIOCREVOKE = 0x8004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x100
|
IEXTEN = 0x100
|
||||||
@ -148,9 +151,14 @@ const (
|
|||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x4008b705
|
||||||
NS_GET_NSTYPE = 0x2000b703
|
NS_GET_NSTYPE = 0x2000b703
|
||||||
NS_GET_OWNER_UID = 0x2000b704
|
NS_GET_OWNER_UID = 0x2000b704
|
||||||
NS_GET_PARENT = 0x2000b702
|
NS_GET_PARENT = 0x2000b702
|
||||||
|
NS_GET_PID_FROM_PIDNS = 0x4004b706
|
||||||
|
NS_GET_PID_IN_PIDNS = 0x4004b708
|
||||||
|
NS_GET_TGID_FROM_PIDNS = 0x4004b707
|
||||||
|
NS_GET_TGID_IN_PIDNS = 0x4004b709
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -227,6 +235,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x20007434
|
PPPIOCUNBRIDGECHAN = 0x20007434
|
||||||
PPPIOCXFERUNIT = 0x2000744e
|
PPPIOCXFERUNIT = 0x2000744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||||
|
PTP_CLOCK_GETCAPS = 0x40503d01
|
||||||
|
PTP_CLOCK_GETCAPS2 = 0x40503d0a
|
||||||
|
PTP_ENABLE_PPS = 0x80043d04
|
||||||
|
PTP_ENABLE_PPS2 = 0x80043d0d
|
||||||
|
PTP_EXTTS_REQUEST = 0x80103d02
|
||||||
|
PTP_EXTTS_REQUEST2 = 0x80103d0b
|
||||||
|
PTP_MASK_CLEAR_ALL = 0x20003d13
|
||||||
|
PTP_MASK_EN_SINGLE = 0x80043d14
|
||||||
|
PTP_PEROUT_REQUEST = 0x80383d03
|
||||||
|
PTP_PEROUT_REQUEST2 = 0x80383d0c
|
||||||
|
PTP_PIN_SETFUNC = 0x80603d07
|
||||||
|
PTP_PIN_SETFUNC2 = 0x80603d10
|
||||||
|
PTP_SYS_OFFSET = 0x83403d05
|
||||||
|
PTP_SYS_OFFSET2 = 0x83403d0e
|
||||||
PTRACE_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GET_THREAD_AREA = 0x19
|
PTRACE_GET_THREAD_AREA = 0x19
|
||||||
PTRACE_GET_THREAD_AREA_3264 = 0xc4
|
PTRACE_GET_THREAD_AREA_3264 = 0xc4
|
||||||
@ -275,6 +297,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x2000700f
|
RTC_WIE_ON = 0x2000700f
|
||||||
RTC_WKALM_RD = 0x40287010
|
RTC_WKALM_RD = 0x40287010
|
||||||
RTC_WKALM_SET = 0x8028700f
|
RTC_WKALM_SET = 0x8028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -313,6 +337,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x1029
|
SO_DOMAIN = 0x1029
|
||||||
SO_DONTROUTE = 0x10
|
SO_DONTROUTE = 0x10
|
||||||
SO_ERROR = 0x1007
|
SO_ERROR = 0x1007
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x80
|
EFD_NONBLOCK = 0x80
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x40084803
|
HIDIOCGRAWINFO = 0x40084803
|
||||||
HIDIOCGRDESC = 0x50044802
|
HIDIOCGRDESC = 0x50044802
|
||||||
HIDIOCGRDESCSIZE = 0x40044801
|
HIDIOCGRDESCSIZE = 0x40044801
|
||||||
|
HIDIOCREVOKE = 0x8004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x100
|
IEXTEN = 0x100
|
||||||
@ -148,9 +151,14 @@ const (
|
|||||||
NFDBITS = 0x20
|
NFDBITS = 0x20
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x4008b705
|
||||||
NS_GET_NSTYPE = 0x2000b703
|
NS_GET_NSTYPE = 0x2000b703
|
||||||
NS_GET_OWNER_UID = 0x2000b704
|
NS_GET_OWNER_UID = 0x2000b704
|
||||||
NS_GET_PARENT = 0x2000b702
|
NS_GET_PARENT = 0x2000b702
|
||||||
|
NS_GET_PID_FROM_PIDNS = 0x4004b706
|
||||||
|
NS_GET_PID_IN_PIDNS = 0x4004b708
|
||||||
|
NS_GET_TGID_FROM_PIDNS = 0x4004b707
|
||||||
|
NS_GET_TGID_IN_PIDNS = 0x4004b709
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -227,6 +235,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x20007434
|
PPPIOCUNBRIDGECHAN = 0x20007434
|
||||||
PPPIOCXFERUNIT = 0x2000744e
|
PPPIOCXFERUNIT = 0x2000744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffff
|
PR_SET_PTRACER_ANY = 0xffffffff
|
||||||
|
PTP_CLOCK_GETCAPS = 0x40503d01
|
||||||
|
PTP_CLOCK_GETCAPS2 = 0x40503d0a
|
||||||
|
PTP_ENABLE_PPS = 0x80043d04
|
||||||
|
PTP_ENABLE_PPS2 = 0x80043d0d
|
||||||
|
PTP_EXTTS_REQUEST = 0x80103d02
|
||||||
|
PTP_EXTTS_REQUEST2 = 0x80103d0b
|
||||||
|
PTP_MASK_CLEAR_ALL = 0x20003d13
|
||||||
|
PTP_MASK_EN_SINGLE = 0x80043d14
|
||||||
|
PTP_PEROUT_REQUEST = 0x80383d03
|
||||||
|
PTP_PEROUT_REQUEST2 = 0x80383d0c
|
||||||
|
PTP_PIN_SETFUNC = 0x80603d07
|
||||||
|
PTP_PIN_SETFUNC2 = 0x80603d10
|
||||||
|
PTP_SYS_OFFSET = 0x83403d05
|
||||||
|
PTP_SYS_OFFSET2 = 0x83403d0e
|
||||||
PTRACE_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GET_THREAD_AREA = 0x19
|
PTRACE_GET_THREAD_AREA = 0x19
|
||||||
PTRACE_GET_THREAD_AREA_3264 = 0xc4
|
PTRACE_GET_THREAD_AREA_3264 = 0xc4
|
||||||
@ -275,6 +297,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x2000700f
|
RTC_WIE_ON = 0x2000700f
|
||||||
RTC_WKALM_RD = 0x40287010
|
RTC_WKALM_RD = 0x40287010
|
||||||
RTC_WKALM_SET = 0x8028700f
|
RTC_WKALM_SET = 0x8028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -313,6 +337,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x1029
|
SO_DOMAIN = 0x1029
|
||||||
SO_DONTROUTE = 0x10
|
SO_DONTROUTE = 0x10
|
||||||
SO_ERROR = 0x1007
|
SO_ERROR = 0x1007
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x20
|
ECHOPRT = 0x20
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x40084803
|
HIDIOCGRAWINFO = 0x40084803
|
||||||
HIDIOCGRDESC = 0x50044802
|
HIDIOCGRDESC = 0x50044802
|
||||||
HIDIOCGRDESCSIZE = 0x40044801
|
HIDIOCGRDESCSIZE = 0x40044801
|
||||||
|
HIDIOCREVOKE = 0x8004480d
|
||||||
HUPCL = 0x4000
|
HUPCL = 0x4000
|
||||||
ICANON = 0x100
|
ICANON = 0x100
|
||||||
IEXTEN = 0x400
|
IEXTEN = 0x400
|
||||||
@ -150,9 +153,14 @@ const (
|
|||||||
NL3 = 0x300
|
NL3 = 0x300
|
||||||
NLDLY = 0x300
|
NLDLY = 0x300
|
||||||
NOFLSH = 0x80000000
|
NOFLSH = 0x80000000
|
||||||
|
NS_GET_MNTNS_ID = 0x4008b705
|
||||||
NS_GET_NSTYPE = 0x2000b703
|
NS_GET_NSTYPE = 0x2000b703
|
||||||
NS_GET_OWNER_UID = 0x2000b704
|
NS_GET_OWNER_UID = 0x2000b704
|
||||||
NS_GET_PARENT = 0x2000b702
|
NS_GET_PARENT = 0x2000b702
|
||||||
|
NS_GET_PID_FROM_PIDNS = 0x4004b706
|
||||||
|
NS_GET_PID_IN_PIDNS = 0x4004b708
|
||||||
|
NS_GET_TGID_FROM_PIDNS = 0x4004b707
|
||||||
|
NS_GET_TGID_IN_PIDNS = 0x4004b709
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x4
|
OLCUC = 0x4
|
||||||
ONLCR = 0x2
|
ONLCR = 0x2
|
||||||
@ -230,6 +238,20 @@ const (
|
|||||||
PPPIOCXFERUNIT = 0x2000744e
|
PPPIOCXFERUNIT = 0x2000744e
|
||||||
PROT_SAO = 0x10
|
PROT_SAO = 0x10
|
||||||
PR_SET_PTRACER_ANY = 0xffffffff
|
PR_SET_PTRACER_ANY = 0xffffffff
|
||||||
|
PTP_CLOCK_GETCAPS = 0x40503d01
|
||||||
|
PTP_CLOCK_GETCAPS2 = 0x40503d0a
|
||||||
|
PTP_ENABLE_PPS = 0x80043d04
|
||||||
|
PTP_ENABLE_PPS2 = 0x80043d0d
|
||||||
|
PTP_EXTTS_REQUEST = 0x80103d02
|
||||||
|
PTP_EXTTS_REQUEST2 = 0x80103d0b
|
||||||
|
PTP_MASK_CLEAR_ALL = 0x20003d13
|
||||||
|
PTP_MASK_EN_SINGLE = 0x80043d14
|
||||||
|
PTP_PEROUT_REQUEST = 0x80383d03
|
||||||
|
PTP_PEROUT_REQUEST2 = 0x80383d0c
|
||||||
|
PTP_PIN_SETFUNC = 0x80603d07
|
||||||
|
PTP_PIN_SETFUNC2 = 0x80603d10
|
||||||
|
PTP_SYS_OFFSET = 0x83403d05
|
||||||
|
PTP_SYS_OFFSET2 = 0x83403d0e
|
||||||
PTRACE_GETEVRREGS = 0x14
|
PTRACE_GETEVRREGS = 0x14
|
||||||
PTRACE_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GETREGS64 = 0x16
|
PTRACE_GETREGS64 = 0x16
|
||||||
@ -330,6 +352,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x2000700f
|
RTC_WIE_ON = 0x2000700f
|
||||||
RTC_WKALM_RD = 0x40287010
|
RTC_WKALM_RD = 0x40287010
|
||||||
RTC_WKALM_SET = 0x8028700f
|
RTC_WKALM_SET = 0x8028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -368,6 +392,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x20
|
ECHOPRT = 0x20
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x40084803
|
HIDIOCGRAWINFO = 0x40084803
|
||||||
HIDIOCGRDESC = 0x50044802
|
HIDIOCGRDESC = 0x50044802
|
||||||
HIDIOCGRDESCSIZE = 0x40044801
|
HIDIOCGRDESCSIZE = 0x40044801
|
||||||
|
HIDIOCREVOKE = 0x8004480d
|
||||||
HUPCL = 0x4000
|
HUPCL = 0x4000
|
||||||
ICANON = 0x100
|
ICANON = 0x100
|
||||||
IEXTEN = 0x400
|
IEXTEN = 0x400
|
||||||
@ -150,9 +153,14 @@ const (
|
|||||||
NL3 = 0x300
|
NL3 = 0x300
|
||||||
NLDLY = 0x300
|
NLDLY = 0x300
|
||||||
NOFLSH = 0x80000000
|
NOFLSH = 0x80000000
|
||||||
|
NS_GET_MNTNS_ID = 0x4008b705
|
||||||
NS_GET_NSTYPE = 0x2000b703
|
NS_GET_NSTYPE = 0x2000b703
|
||||||
NS_GET_OWNER_UID = 0x2000b704
|
NS_GET_OWNER_UID = 0x2000b704
|
||||||
NS_GET_PARENT = 0x2000b702
|
NS_GET_PARENT = 0x2000b702
|
||||||
|
NS_GET_PID_FROM_PIDNS = 0x4004b706
|
||||||
|
NS_GET_PID_IN_PIDNS = 0x4004b708
|
||||||
|
NS_GET_TGID_FROM_PIDNS = 0x4004b707
|
||||||
|
NS_GET_TGID_IN_PIDNS = 0x4004b709
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x4
|
OLCUC = 0x4
|
||||||
ONLCR = 0x2
|
ONLCR = 0x2
|
||||||
@ -230,6 +238,20 @@ const (
|
|||||||
PPPIOCXFERUNIT = 0x2000744e
|
PPPIOCXFERUNIT = 0x2000744e
|
||||||
PROT_SAO = 0x10
|
PROT_SAO = 0x10
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||||
|
PTP_CLOCK_GETCAPS = 0x40503d01
|
||||||
|
PTP_CLOCK_GETCAPS2 = 0x40503d0a
|
||||||
|
PTP_ENABLE_PPS = 0x80043d04
|
||||||
|
PTP_ENABLE_PPS2 = 0x80043d0d
|
||||||
|
PTP_EXTTS_REQUEST = 0x80103d02
|
||||||
|
PTP_EXTTS_REQUEST2 = 0x80103d0b
|
||||||
|
PTP_MASK_CLEAR_ALL = 0x20003d13
|
||||||
|
PTP_MASK_EN_SINGLE = 0x80043d14
|
||||||
|
PTP_PEROUT_REQUEST = 0x80383d03
|
||||||
|
PTP_PEROUT_REQUEST2 = 0x80383d0c
|
||||||
|
PTP_PIN_SETFUNC = 0x80603d07
|
||||||
|
PTP_PIN_SETFUNC2 = 0x80603d10
|
||||||
|
PTP_SYS_OFFSET = 0x83403d05
|
||||||
|
PTP_SYS_OFFSET2 = 0x83403d0e
|
||||||
PTRACE_GETEVRREGS = 0x14
|
PTRACE_GETEVRREGS = 0x14
|
||||||
PTRACE_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GETREGS64 = 0x16
|
PTRACE_GETREGS64 = 0x16
|
||||||
@ -334,6 +356,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x2000700f
|
RTC_WIE_ON = 0x2000700f
|
||||||
RTC_WKALM_RD = 0x40287010
|
RTC_WKALM_RD = 0x40287010
|
||||||
RTC_WKALM_SET = 0x8028700f
|
RTC_WKALM_SET = 0x8028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -372,6 +396,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x20
|
ECHOPRT = 0x20
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
FF1 = 0x4000
|
FF1 = 0x4000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x40084803
|
HIDIOCGRAWINFO = 0x40084803
|
||||||
HIDIOCGRDESC = 0x50044802
|
HIDIOCGRDESC = 0x50044802
|
||||||
HIDIOCGRDESCSIZE = 0x40044801
|
HIDIOCGRDESCSIZE = 0x40044801
|
||||||
|
HIDIOCREVOKE = 0x8004480d
|
||||||
HUPCL = 0x4000
|
HUPCL = 0x4000
|
||||||
ICANON = 0x100
|
ICANON = 0x100
|
||||||
IEXTEN = 0x400
|
IEXTEN = 0x400
|
||||||
@ -150,9 +153,14 @@ const (
|
|||||||
NL3 = 0x300
|
NL3 = 0x300
|
||||||
NLDLY = 0x300
|
NLDLY = 0x300
|
||||||
NOFLSH = 0x80000000
|
NOFLSH = 0x80000000
|
||||||
|
NS_GET_MNTNS_ID = 0x4008b705
|
||||||
NS_GET_NSTYPE = 0x2000b703
|
NS_GET_NSTYPE = 0x2000b703
|
||||||
NS_GET_OWNER_UID = 0x2000b704
|
NS_GET_OWNER_UID = 0x2000b704
|
||||||
NS_GET_PARENT = 0x2000b702
|
NS_GET_PARENT = 0x2000b702
|
||||||
|
NS_GET_PID_FROM_PIDNS = 0x4004b706
|
||||||
|
NS_GET_PID_IN_PIDNS = 0x4004b708
|
||||||
|
NS_GET_TGID_FROM_PIDNS = 0x4004b707
|
||||||
|
NS_GET_TGID_IN_PIDNS = 0x4004b709
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x4
|
OLCUC = 0x4
|
||||||
ONLCR = 0x2
|
ONLCR = 0x2
|
||||||
@ -230,6 +238,20 @@ const (
|
|||||||
PPPIOCXFERUNIT = 0x2000744e
|
PPPIOCXFERUNIT = 0x2000744e
|
||||||
PROT_SAO = 0x10
|
PROT_SAO = 0x10
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||||
|
PTP_CLOCK_GETCAPS = 0x40503d01
|
||||||
|
PTP_CLOCK_GETCAPS2 = 0x40503d0a
|
||||||
|
PTP_ENABLE_PPS = 0x80043d04
|
||||||
|
PTP_ENABLE_PPS2 = 0x80043d0d
|
||||||
|
PTP_EXTTS_REQUEST = 0x80103d02
|
||||||
|
PTP_EXTTS_REQUEST2 = 0x80103d0b
|
||||||
|
PTP_MASK_CLEAR_ALL = 0x20003d13
|
||||||
|
PTP_MASK_EN_SINGLE = 0x80043d14
|
||||||
|
PTP_PEROUT_REQUEST = 0x80383d03
|
||||||
|
PTP_PEROUT_REQUEST2 = 0x80383d0c
|
||||||
|
PTP_PIN_SETFUNC = 0x80603d07
|
||||||
|
PTP_PIN_SETFUNC2 = 0x80603d10
|
||||||
|
PTP_SYS_OFFSET = 0x83403d05
|
||||||
|
PTP_SYS_OFFSET2 = 0x83403d0e
|
||||||
PTRACE_GETEVRREGS = 0x14
|
PTRACE_GETEVRREGS = 0x14
|
||||||
PTRACE_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GETREGS64 = 0x16
|
PTRACE_GETREGS64 = 0x16
|
||||||
@ -334,6 +356,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x2000700f
|
RTC_WIE_ON = 0x2000700f
|
||||||
RTC_WKALM_RD = 0x40287010
|
RTC_WKALM_RD = 0x40287010
|
||||||
RTC_WKALM_SET = 0x8028700f
|
RTC_WKALM_SET = 0x8028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -372,6 +396,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x80084803
|
HIDIOCGRAWINFO = 0x80084803
|
||||||
HIDIOCGRDESC = 0x90044802
|
HIDIOCGRDESC = 0x90044802
|
||||||
HIDIOCGRDESCSIZE = 0x80044801
|
HIDIOCGRDESCSIZE = 0x80044801
|
||||||
|
HIDIOCREVOKE = 0x4004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x8000
|
IEXTEN = 0x8000
|
||||||
@ -148,9 +151,14 @@ const (
|
|||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x8008b705
|
||||||
NS_GET_NSTYPE = 0xb703
|
NS_GET_NSTYPE = 0xb703
|
||||||
NS_GET_OWNER_UID = 0xb704
|
NS_GET_OWNER_UID = 0xb704
|
||||||
NS_GET_PARENT = 0xb702
|
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
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -227,6 +235,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x7434
|
PPPIOCUNBRIDGECHAN = 0x7434
|
||||||
PPPIOCXFERUNIT = 0x744e
|
PPPIOCXFERUNIT = 0x744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
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 = 0x21
|
||||||
PTRACE_GETFDPIC_EXEC = 0x0
|
PTRACE_GETFDPIC_EXEC = 0x0
|
||||||
PTRACE_GETFDPIC_INTERP = 0x1
|
PTRACE_GETFDPIC_INTERP = 0x1
|
||||||
@ -266,6 +288,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x700f
|
RTC_WIE_ON = 0x700f
|
||||||
RTC_WKALM_RD = 0x80287010
|
RTC_WKALM_RD = 0x80287010
|
||||||
RTC_WKALM_SET = 0x4028700f
|
RTC_WKALM_SET = 0x4028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -304,6 +328,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
@ -78,6 +78,8 @@ const (
|
|||||||
ECHOPRT = 0x400
|
ECHOPRT = 0x400
|
||||||
EFD_CLOEXEC = 0x80000
|
EFD_CLOEXEC = 0x80000
|
||||||
EFD_NONBLOCK = 0x800
|
EFD_NONBLOCK = 0x800
|
||||||
|
EPIOCGPARAMS = 0x80088a02
|
||||||
|
EPIOCSPARAMS = 0x40088a01
|
||||||
EPOLL_CLOEXEC = 0x80000
|
EPOLL_CLOEXEC = 0x80000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -106,6 +108,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x80084803
|
HIDIOCGRAWINFO = 0x80084803
|
||||||
HIDIOCGRDESC = 0x90044802
|
HIDIOCGRDESC = 0x90044802
|
||||||
HIDIOCGRDESCSIZE = 0x80044801
|
HIDIOCGRDESCSIZE = 0x80044801
|
||||||
|
HIDIOCREVOKE = 0x4004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x8000
|
IEXTEN = 0x8000
|
||||||
@ -148,9 +151,14 @@ const (
|
|||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x8008b705
|
||||||
NS_GET_NSTYPE = 0xb703
|
NS_GET_NSTYPE = 0xb703
|
||||||
NS_GET_OWNER_UID = 0xb704
|
NS_GET_OWNER_UID = 0xb704
|
||||||
NS_GET_PARENT = 0xb702
|
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
|
NS_GET_USERNS = 0xb701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -227,6 +235,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x7434
|
PPPIOCUNBRIDGECHAN = 0x7434
|
||||||
PPPIOCXFERUNIT = 0x744e
|
PPPIOCXFERUNIT = 0x744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
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_DISABLE_TE = 0x5010
|
PTRACE_DISABLE_TE = 0x5010
|
||||||
PTRACE_ENABLE_TE = 0x5009
|
PTRACE_ENABLE_TE = 0x5009
|
||||||
PTRACE_GET_LAST_BREAK = 0x5006
|
PTRACE_GET_LAST_BREAK = 0x5006
|
||||||
@ -338,6 +360,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x700f
|
RTC_WIE_ON = 0x700f
|
||||||
RTC_WKALM_RD = 0x80287010
|
RTC_WKALM_RD = 0x80287010
|
||||||
RTC_WKALM_SET = 0x4028700f
|
RTC_WKALM_SET = 0x4028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x4f
|
||||||
|
SCM_DEVMEM_LINEAR = 0x4e
|
||||||
SCM_TIMESTAMPING = 0x25
|
SCM_TIMESTAMPING = 0x25
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
SCM_TIMESTAMPING_OPT_STATS = 0x36
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
SCM_TIMESTAMPING_PKTINFO = 0x3a
|
||||||
@ -376,6 +400,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x35
|
SO_CNX_ADVICE = 0x35
|
||||||
SO_COOKIE = 0x39
|
SO_COOKIE = 0x39
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x44
|
SO_DETACH_REUSEPORT_BPF = 0x44
|
||||||
|
SO_DEVMEM_DMABUF = 0x4f
|
||||||
|
SO_DEVMEM_DONTNEED = 0x50
|
||||||
|
SO_DEVMEM_LINEAR = 0x4e
|
||||||
SO_DOMAIN = 0x27
|
SO_DOMAIN = 0x27
|
||||||
SO_DONTROUTE = 0x5
|
SO_DONTROUTE = 0x5
|
||||||
SO_ERROR = 0x4
|
SO_ERROR = 0x4
|
||||||
|
27
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
27
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
@ -82,6 +82,8 @@ const (
|
|||||||
EFD_CLOEXEC = 0x400000
|
EFD_CLOEXEC = 0x400000
|
||||||
EFD_NONBLOCK = 0x4000
|
EFD_NONBLOCK = 0x4000
|
||||||
EMT_TAGOVF = 0x1
|
EMT_TAGOVF = 0x1
|
||||||
|
EPIOCGPARAMS = 0x40088a02
|
||||||
|
EPIOCSPARAMS = 0x80088a01
|
||||||
EPOLL_CLOEXEC = 0x400000
|
EPOLL_CLOEXEC = 0x400000
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
FF1 = 0x8000
|
FF1 = 0x8000
|
||||||
@ -110,6 +112,7 @@ const (
|
|||||||
HIDIOCGRAWINFO = 0x40084803
|
HIDIOCGRAWINFO = 0x40084803
|
||||||
HIDIOCGRDESC = 0x50044802
|
HIDIOCGRDESC = 0x50044802
|
||||||
HIDIOCGRDESCSIZE = 0x40044801
|
HIDIOCGRDESCSIZE = 0x40044801
|
||||||
|
HIDIOCREVOKE = 0x8004480d
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
IEXTEN = 0x8000
|
IEXTEN = 0x8000
|
||||||
@ -153,9 +156,14 @@ const (
|
|||||||
NFDBITS = 0x40
|
NFDBITS = 0x40
|
||||||
NLDLY = 0x100
|
NLDLY = 0x100
|
||||||
NOFLSH = 0x80
|
NOFLSH = 0x80
|
||||||
|
NS_GET_MNTNS_ID = 0x4008b705
|
||||||
NS_GET_NSTYPE = 0x2000b703
|
NS_GET_NSTYPE = 0x2000b703
|
||||||
NS_GET_OWNER_UID = 0x2000b704
|
NS_GET_OWNER_UID = 0x2000b704
|
||||||
NS_GET_PARENT = 0x2000b702
|
NS_GET_PARENT = 0x2000b702
|
||||||
|
NS_GET_PID_FROM_PIDNS = 0x4004b706
|
||||||
|
NS_GET_PID_IN_PIDNS = 0x4004b708
|
||||||
|
NS_GET_TGID_FROM_PIDNS = 0x4004b707
|
||||||
|
NS_GET_TGID_IN_PIDNS = 0x4004b709
|
||||||
NS_GET_USERNS = 0x2000b701
|
NS_GET_USERNS = 0x2000b701
|
||||||
OLCUC = 0x2
|
OLCUC = 0x2
|
||||||
ONLCR = 0x4
|
ONLCR = 0x4
|
||||||
@ -232,6 +240,20 @@ const (
|
|||||||
PPPIOCUNBRIDGECHAN = 0x20007434
|
PPPIOCUNBRIDGECHAN = 0x20007434
|
||||||
PPPIOCXFERUNIT = 0x2000744e
|
PPPIOCXFERUNIT = 0x2000744e
|
||||||
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
PR_SET_PTRACER_ANY = 0xffffffffffffffff
|
||||||
|
PTP_CLOCK_GETCAPS = 0x40503d01
|
||||||
|
PTP_CLOCK_GETCAPS2 = 0x40503d0a
|
||||||
|
PTP_ENABLE_PPS = 0x80043d04
|
||||||
|
PTP_ENABLE_PPS2 = 0x80043d0d
|
||||||
|
PTP_EXTTS_REQUEST = 0x80103d02
|
||||||
|
PTP_EXTTS_REQUEST2 = 0x80103d0b
|
||||||
|
PTP_MASK_CLEAR_ALL = 0x20003d13
|
||||||
|
PTP_MASK_EN_SINGLE = 0x80043d14
|
||||||
|
PTP_PEROUT_REQUEST = 0x80383d03
|
||||||
|
PTP_PEROUT_REQUEST2 = 0x80383d0c
|
||||||
|
PTP_PIN_SETFUNC = 0x80603d07
|
||||||
|
PTP_PIN_SETFUNC2 = 0x80603d10
|
||||||
|
PTP_SYS_OFFSET = 0x83403d05
|
||||||
|
PTP_SYS_OFFSET2 = 0x83403d0e
|
||||||
PTRACE_GETFPAREGS = 0x14
|
PTRACE_GETFPAREGS = 0x14
|
||||||
PTRACE_GETFPREGS = 0xe
|
PTRACE_GETFPREGS = 0xe
|
||||||
PTRACE_GETFPREGS64 = 0x19
|
PTRACE_GETFPREGS64 = 0x19
|
||||||
@ -329,6 +351,8 @@ const (
|
|||||||
RTC_WIE_ON = 0x2000700f
|
RTC_WIE_ON = 0x2000700f
|
||||||
RTC_WKALM_RD = 0x40287010
|
RTC_WKALM_RD = 0x40287010
|
||||||
RTC_WKALM_SET = 0x8028700f
|
RTC_WKALM_SET = 0x8028700f
|
||||||
|
SCM_DEVMEM_DMABUF = 0x58
|
||||||
|
SCM_DEVMEM_LINEAR = 0x57
|
||||||
SCM_TIMESTAMPING = 0x23
|
SCM_TIMESTAMPING = 0x23
|
||||||
SCM_TIMESTAMPING_OPT_STATS = 0x38
|
SCM_TIMESTAMPING_OPT_STATS = 0x38
|
||||||
SCM_TIMESTAMPING_PKTINFO = 0x3c
|
SCM_TIMESTAMPING_PKTINFO = 0x3c
|
||||||
@ -415,6 +439,9 @@ const (
|
|||||||
SO_CNX_ADVICE = 0x37
|
SO_CNX_ADVICE = 0x37
|
||||||
SO_COOKIE = 0x3b
|
SO_COOKIE = 0x3b
|
||||||
SO_DETACH_REUSEPORT_BPF = 0x47
|
SO_DETACH_REUSEPORT_BPF = 0x47
|
||||||
|
SO_DEVMEM_DMABUF = 0x58
|
||||||
|
SO_DEVMEM_DONTNEED = 0x59
|
||||||
|
SO_DEVMEM_LINEAR = 0x57
|
||||||
SO_DOMAIN = 0x1029
|
SO_DOMAIN = 0x1029
|
||||||
SO_DONTROUTE = 0x10
|
SO_DONTROUTE = 0x10
|
||||||
SO_ERROR = 0x1007
|
SO_ERROR = 0x1007
|
||||||
|
2
vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
generated
vendored
@ -581,6 +581,8 @@ const (
|
|||||||
AT_EMPTY_PATH = 0x1000
|
AT_EMPTY_PATH = 0x1000
|
||||||
AT_REMOVEDIR = 0x200
|
AT_REMOVEDIR = 0x200
|
||||||
RENAME_NOREPLACE = 1 << 0
|
RENAME_NOREPLACE = 1 << 0
|
||||||
|
ST_RDONLY = 1
|
||||||
|
ST_NOSUID = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user