From 39469fbda01b28a1121fbe28306151a6b5148023 Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Sat, 1 Feb 2025 03:09:56 +0300 Subject: [PATCH 01/37] first commit Signed-off-by: Aleksandr Zimin --- api/v1alpha1/nfs_storage_class.go | 1 + crds/nfsstorageclass.yaml | 15 ++ .../controller/nfs_storage_class_watcher.go | 2 + .../nfs_storage_class_watcher_func.go | 1 + .../patches/0004-Add-secure-erase.patch | 193 ++++++++++++++++++ 5 files changed, 212 insertions(+) create mode 100644 images/csi-nfs/patches/0004-Add-secure-erase.patch diff --git a/api/v1alpha1/nfs_storage_class.go b/api/v1alpha1/nfs_storage_class.go index e8c90f4e..f0dde1fd 100644 --- a/api/v1alpha1/nfs_storage_class.go +++ b/api/v1alpha1/nfs_storage_class.go @@ -45,6 +45,7 @@ type NFSStorageClassSpec struct { ReclaimPolicy string `json:"reclaimPolicy"` VolumeBindingMode string `json:"volumeBindingMode"` WorkloadNodes *NFSStorageClassWorkloadNodes `json:"workloadNodes,omitempty"` + SecureErase string `json:"secureErase,omitempty"` } // +k8s:deepcopy-gen=true diff --git a/crds/nfsstorageclass.yaml b/crds/nfsstorageclass.yaml index ca47e5f2..0c2ceae8 100644 --- a/crds/nfsstorageclass.yaml +++ b/crds/nfsstorageclass.yaml @@ -39,6 +39,11 @@ spec: - connection - reclaimPolicy - volumeBindingMode + x-kubernetes-validations: + - rule: "self.reclaimPolicy != 'Retain' || self.secureErase == 'Disable'" + message: "If reclaimPolicy is 'Retain', secureErase must be set to 'Disable'." + - rule: "self.connection.nfsVersion == '4.2' || self.secureErase != 'Discard'" + message: "Discard mode is only available when connection.nfsVersion is '4.2'." properties: connection: type: object @@ -191,6 +196,16 @@ spec: type: array items: type: string + secureErase: + type: string + description: | + Secure erase mode for PVs subdirectory + enum: + - Disable + - Discard + - SinglePass + - ThreePass + default: "Disable" status: type: object description: | diff --git a/images/controller/src/pkg/controller/nfs_storage_class_watcher.go b/images/controller/src/pkg/controller/nfs_storage_class_watcher.go index 160236aa..dc8fed66 100644 --- a/images/controller/src/pkg/controller/nfs_storage_class_watcher.go +++ b/images/controller/src/pkg/controller/nfs_storage_class_watcher.go @@ -75,6 +75,8 @@ const ( SecretForMountOptionsPrefix = "nfs-mount-options-for-" StorageClassSecretNameKey = "csi.storage.k8s.io/provisioner-secret-name" StorageClassSecretNSKey = "csi.storage.k8s.io/provisioner-secret-namespace" + + secureEraseMethodKey = "secureErase" ) var ( diff --git a/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go b/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go index 8e1208b8..dd8deeef 100644 --- a/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go +++ b/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go @@ -724,6 +724,7 @@ func configureSecret(nsc *v1alpha1.NFSStorageClass, controllerNamespace string) }, StringData: map[string]string{ MountOptionsSecretKey: strings.Join(mountOptions, ","), + secureEraseMethodKey: nsc.Spec.SecureErase, }, } diff --git a/images/csi-nfs/patches/0004-Add-secure-erase.patch b/images/csi-nfs/patches/0004-Add-secure-erase.patch new file mode 100644 index 00000000..87d63819 --- /dev/null +++ b/images/csi-nfs/patches/0004-Add-secure-erase.patch @@ -0,0 +1,193 @@ +From 3a15955ef678a8ba36d0a8978441f3b9ed56d0eb Mon Sep 17 00:00:00 2001 +From: Aleksandr Zimin +Date: Sat, 1 Feb 2025 02:41:44 +0300 +Subject: [PATCH] Add secure erase + +Signed-off-by: Aleksandr Zimin +--- + pkg/nfs/controllerserver.go | 19 ++++- + pkg/nfs/secure_erase.go | 142 ++++++++++++++++++++++++++++++++++++ + 2 files changed, 158 insertions(+), 3 deletions(-) + create mode 100644 pkg/nfs/secure_erase.go + +diff --git a/pkg/nfs/controllerserver.go b/pkg/nfs/controllerserver.go +index d8af15da..51b3f8ff 100644 +--- a/pkg/nfs/controllerserver.go ++++ b/pkg/nfs/controllerserver.go +@@ -259,9 +259,22 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol + } + } else { + // delete subdirectory under base-dir +- klog.V(2).Infof("removing subdirectory at %v", internalVolumePath) +- if err = os.RemoveAll(internalVolumePath); err != nil { +- return nil, status.Errorf(codes.Internal, "delete subdirectory(%s) failed with %v", internalVolumePath, err.Error()) ++ secureEraseMethod, secureEraseEnabled, err := getSecureEraseMethod(req.GetSecrets()) ++ if err != nil { ++ return nil, status.Errorf(codes.Internal, "failed to get secure erase method: %v", err.Error()) ++ } ++ ++ if secureEraseEnabled { ++ klog.V(2).Infof("secure erase enabled, using method %v. Securely erasing subdirectory at %v", secureEraseMethod, internalVolumePath) ++ err = secureEraseVolume(internalVolumePath, secureEraseMethod) ++ if err != nil { ++ return nil, status.Errorf(codes.Internal, "secure erase failed with %v", err.Error()) ++ } ++ } else { ++ klog.V(2).Infof("secure erase disabled. Removing subdirectory at %v", internalVolumePath) ++ if err = os.RemoveAll(internalVolumePath); err != nil { ++ return nil, status.Errorf(codes.Internal, "delete subdirectory(%s) failed with %v", internalVolumePath, err.Error()) ++ } + } + } + } else { +diff --git a/pkg/nfs/secure_erase.go b/pkg/nfs/secure_erase.go +new file mode 100644 +index 00000000..26378f1b +--- /dev/null ++++ b/pkg/nfs/secure_erase.go +@@ -0,0 +1,142 @@ ++/* ++Copyright 2025 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package nfs ++ ++import ( ++ "fmt" ++ "io/fs" ++ "os" ++ "os/exec" ++ "path/filepath" ++ "syscall" ++ ++ "k8s.io/klog/v2" ++) ++ ++const ( ++ secureEraseMethodKey = "secureErase" ++ secureEraseMethodDisable = "Disable" ++ secureEraseMethodDiscard = "Discard" ++ secureEraseMethodSinglePass = "SinglePass" ++ secureEraseMethodThreePass = "ThreePass" ++) ++ ++func getSecureEraseMethod(context map[string]string) (string, bool, error) { ++ val, ok := context[secureEraseMethodKey] ++ if !ok { ++ return "", false, nil ++ } ++ if val == secureEraseMethodDisable { ++ return "", false, nil ++ } ++ ++ switch val { ++ case secureEraseMethodDiscard, secureEraseMethodSinglePass, secureEraseMethodThreePass: ++ return val, true, nil ++ default: ++ return "", false, fmt.Errorf("invalid secure erase method %s", val) ++ } ++} ++ ++func secureEraseVolume(volumePath, secureEraseMethod string) error { ++ absPath, err := filepath.Abs(volumePath) ++ if err != nil { ++ return fmt.Errorf("getting absolute path for %s: %w", volumePath, err) ++ } ++ klog.V(4).Infof("Secure erasing volume %s with method %s", absPath, secureEraseMethod) ++ ++ err = filepath.Walk(absPath, func(path string, info fs.FileInfo, walkErr error) error { ++ if walkErr != nil { ++ return fmt.Errorf("walking error for %s: %w", path, walkErr) ++ } ++ ++ if !info.IsDir() { ++ klog.V(4).Infof("Secure erasing file %s", path) ++ return secureEraseFile(path, secureEraseMethod) ++ } else { ++ klog.V(4).Infof("Skipping directory %s", path) ++ } ++ return nil ++ }) ++ if err != nil { ++ return fmt.Errorf("error while walking through volume directory %s: %w", absPath, err) ++ } ++ ++ return nil ++} ++ ++func secureEraseFile(filePath, secureEraseMethod string) error { ++ info, err := os.Stat(filePath) ++ if err != nil { ++ return fmt.Errorf("failed to stat file %s: %w", filePath, err) ++ } ++ ++ if !info.Mode().IsRegular() { ++ klog.V(4).Infof("Skipping non-regular file %s", filePath) ++ return nil ++ } ++ ++ switch secureEraseMethod { ++ case secureEraseMethodDiscard: ++ return discardFile(filePath, info) ++ case secureEraseMethodSinglePass: ++ return shredFile(filePath, info, 1) ++ case secureEraseMethodThreePass: ++ return shredFile(filePath, info, 3) ++ default: ++ return fmt.Errorf("invalid secure erase method %s", secureEraseMethod) ++ } ++} ++ ++func discardFile(filePath string, info os.FileInfo) error { ++ klog.V(4).Infof("Discarding file %s", filePath) ++ file, err := os.OpenFile(filePath, os.O_WRONLY, 0) ++ if err != nil { ++ return fmt.Errorf("failed to open file %s for discard: %w", filePath, err) ++ } ++ defer file.Close() ++ ++ fileSize := info.Size() ++ fd := int(file.Fd()) ++ klog.V(4).Infof("Sending FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE for file %s with size %d", filePath, fileSize) ++ if err := syscall.Fallocate(fd, syscall.FALLOC_FL_PUNCH_HOLE|syscall.FALLOC_FL_KEEP_SIZE, 0, fileSize); err != nil { ++ return fmt.Errorf("discard (punch hole) failed for file %s: %w", filePath, err) ++ } ++ ++ klog.V(4).Infof("Discarding file %s completed. Removing file", filePath) ++ if err := os.Remove(filePath); err != nil { ++ return fmt.Errorf("failed to remove file %s after discard: %w", filePath, err) ++ } ++ ++ return nil ++} ++ ++func shredFile(filePath string, info os.FileInfo, passes int) error { ++ klog.V(4).Infof("Shredding file %s with %d passes. Run command: shred -v -n %d %s", filePath, passes, passes, filePath) ++ cmd := exec.Command("shred", "-v", "-n", fmt.Sprintf("%d", passes), filePath) ++ ++ if out, err := cmd.CombinedOutput(); err != nil { ++ return fmt.Errorf("shred shred failed for file %s: %w, output: %s", filePath, err, string(out)) ++ } ++ ++ klog.V(4).Infof("Shredding file %s completed. Removing file", filePath) ++ if err := os.Remove(filePath); err != nil { ++ return fmt.Errorf("failed to remove file %s after shred: %w", filePath, err) ++ } ++ ++ return nil ++} +-- +2.39.5 (Apple Git-154) + From 24007be569a468ce34fe2055d49154bb9e8d31e8 Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Sat, 1 Feb 2025 03:25:15 +0300 Subject: [PATCH 02/37] some fixes Signed-off-by: Aleksandr Zimin --- .../csi-nfs/patches/0004-Add-secure-erase.patch | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/images/csi-nfs/patches/0004-Add-secure-erase.patch b/images/csi-nfs/patches/0004-Add-secure-erase.patch index 87d63819..f519a859 100644 --- a/images/csi-nfs/patches/0004-Add-secure-erase.patch +++ b/images/csi-nfs/patches/0004-Add-secure-erase.patch @@ -1,13 +1,13 @@ -From 3a15955ef678a8ba36d0a8978441f3b9ed56d0eb Mon Sep 17 00:00:00 2001 +From b9d2b3922660f904eb7c2e0bfb6091da38dec77d Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin -Date: Sat, 1 Feb 2025 02:41:44 +0300 +Date: Sat, 1 Feb 2025 03:16:57 +0300 Subject: [PATCH] Add secure erase Signed-off-by: Aleksandr Zimin --- pkg/nfs/controllerserver.go | 19 ++++- - pkg/nfs/secure_erase.go | 142 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 158 insertions(+), 3 deletions(-) + pkg/nfs/secure_erase.go | 143 ++++++++++++++++++++++++++++++++++++ + 2 files changed, 159 insertions(+), 3 deletions(-) create mode 100644 pkg/nfs/secure_erase.go diff --git a/pkg/nfs/controllerserver.go b/pkg/nfs/controllerserver.go @@ -42,10 +42,10 @@ index d8af15da..51b3f8ff 100644 } else { diff --git a/pkg/nfs/secure_erase.go b/pkg/nfs/secure_erase.go new file mode 100644 -index 00000000..26378f1b +index 00000000..09acb0d2 --- /dev/null +++ b/pkg/nfs/secure_erase.go -@@ -0,0 +1,142 @@ +@@ -0,0 +1,143 @@ +/* +Copyright 2025 The Kubernetes Authors. + @@ -70,7 +70,8 @@ index 00000000..26378f1b + "os" + "os/exec" + "path/filepath" -+ "syscall" ++ ++ "golang.org/x/sys/unix" + + "k8s.io/klog/v2" +) @@ -161,7 +162,7 @@ index 00000000..26378f1b + fileSize := info.Size() + fd := int(file.Fd()) + klog.V(4).Infof("Sending FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE for file %s with size %d", filePath, fileSize) -+ if err := syscall.Fallocate(fd, syscall.FALLOC_FL_PUNCH_HOLE|syscall.FALLOC_FL_KEEP_SIZE, 0, fileSize); err != nil { ++ if err := unix.Fallocate(fd, unix.FALLOC_FL_PUNCH_HOLE|unix.FALLOC_FL_KEEP_SIZE, 0, fileSize); err != nil { + return fmt.Errorf("discard (punch hole) failed for file %s: %w", filePath, err) + } + From 62a7554aac54e5c7199fd5e445d645fcf0ea86d5 Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Sat, 1 Feb 2025 03:50:48 +0300 Subject: [PATCH 03/37] test Signed-off-by: Aleksandr Zimin --- .../patches/0004-Add-secure-erase.patch | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/images/csi-nfs/patches/0004-Add-secure-erase.patch b/images/csi-nfs/patches/0004-Add-secure-erase.patch index f519a859..cad3f12f 100644 --- a/images/csi-nfs/patches/0004-Add-secure-erase.patch +++ b/images/csi-nfs/patches/0004-Add-secure-erase.patch @@ -1,13 +1,13 @@ -From b9d2b3922660f904eb7c2e0bfb6091da38dec77d Mon Sep 17 00:00:00 2001 +From f2993db6160b941726ac0915382b03d6304b1048 Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin -Date: Sat, 1 Feb 2025 03:16:57 +0300 +Date: Sat, 1 Feb 2025 03:50:04 +0300 Subject: [PATCH] Add secure erase Signed-off-by: Aleksandr Zimin --- pkg/nfs/controllerserver.go | 19 ++++- - pkg/nfs/secure_erase.go | 143 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 159 insertions(+), 3 deletions(-) + pkg/nfs/secure_erase.go | 145 ++++++++++++++++++++++++++++++++++++ + 2 files changed, 161 insertions(+), 3 deletions(-) create mode 100644 pkg/nfs/secure_erase.go diff --git a/pkg/nfs/controllerserver.go b/pkg/nfs/controllerserver.go @@ -42,10 +42,10 @@ index d8af15da..51b3f8ff 100644 } else { diff --git a/pkg/nfs/secure_erase.go b/pkg/nfs/secure_erase.go new file mode 100644 -index 00000000..09acb0d2 +index 00000000..8dd3c2a9 --- /dev/null +++ b/pkg/nfs/secure_erase.go -@@ -0,0 +1,143 @@ +@@ -0,0 +1,145 @@ +/* +Copyright 2025 The Kubernetes Authors. + @@ -166,10 +166,11 @@ index 00000000..09acb0d2 + return fmt.Errorf("discard (punch hole) failed for file %s: %w", filePath, err) + } + -+ klog.V(4).Infof("Discarding file %s completed. Removing file", filePath) -+ if err := os.Remove(filePath); err != nil { -+ return fmt.Errorf("failed to remove file %s after discard: %w", filePath, err) -+ } ++ klog.V(4).Infof("Discarding file %s completed.", filePath) ++ // klog.V(4).Infof("Discarding file %s completed. Removing file", filePath) ++ // if err := os.Remove(filePath); err != nil { ++ // return fmt.Errorf("failed to remove file %s after discard: %w", filePath, err) ++ // } + + return nil +} @@ -182,10 +183,11 @@ index 00000000..09acb0d2 + return fmt.Errorf("shred shred failed for file %s: %w, output: %s", filePath, err, string(out)) + } + -+ klog.V(4).Infof("Shredding file %s completed. Removing file", filePath) -+ if err := os.Remove(filePath); err != nil { -+ return fmt.Errorf("failed to remove file %s after shred: %w", filePath, err) -+ } ++ klog.V(4).Infof("Shredding file %s completed.", filePath) ++ // klog.V(4).Infof("Shredding file %s completed. Removing file", filePath) ++ // if err := os.Remove(filePath); err != nil { ++ // return fmt.Errorf("failed to remove file %s after shred: %w", filePath, err) ++ // } + + return nil +} From e273359e13e14499648978de78f37df09aba9eae Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Sun, 2 Feb 2025 13:57:20 +0300 Subject: [PATCH 04/37] prepare for tests Signed-off-by: Aleksandr Zimin --- .../patches/0004-Add-secure-erase.patch | 27 ++++++++++--------- images/csi-nfs/patches/README.md | 12 +++++++++ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/images/csi-nfs/patches/0004-Add-secure-erase.patch b/images/csi-nfs/patches/0004-Add-secure-erase.patch index cad3f12f..1ce02877 100644 --- a/images/csi-nfs/patches/0004-Add-secure-erase.patch +++ b/images/csi-nfs/patches/0004-Add-secure-erase.patch @@ -1,23 +1,24 @@ -From f2993db6160b941726ac0915382b03d6304b1048 Mon Sep 17 00:00:00 2001 +From df112b3065ca867a1c8584e95cbd78d9373ebdba Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin -Date: Sat, 1 Feb 2025 03:50:04 +0300 +Date: Sun, 2 Feb 2025 13:49:52 +0300 Subject: [PATCH] Add secure erase Signed-off-by: Aleksandr Zimin --- - pkg/nfs/controllerserver.go | 19 ++++- + pkg/nfs/controllerserver.go | 21 +++++- pkg/nfs/secure_erase.go | 145 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 161 insertions(+), 3 deletions(-) + 2 files changed, 162 insertions(+), 4 deletions(-) create mode 100644 pkg/nfs/secure_erase.go diff --git a/pkg/nfs/controllerserver.go b/pkg/nfs/controllerserver.go -index d8af15da..51b3f8ff 100644 +index d8af15da..a84673e6 100644 --- a/pkg/nfs/controllerserver.go +++ b/pkg/nfs/controllerserver.go -@@ -259,9 +259,22 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol +@@ -258,11 +258,24 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol + return nil, status.Errorf(codes.Internal, "archive subdirectory(%s, %s) failed with %v", internalVolumePath, archivedInternalVolumePath, err.Error()) } } else { - // delete subdirectory under base-dir +- // delete subdirectory under base-dir - klog.V(2).Infof("removing subdirectory at %v", internalVolumePath) - if err = os.RemoveAll(internalVolumePath); err != nil { - return nil, status.Errorf(codes.Internal, "delete subdirectory(%s) failed with %v", internalVolumePath, err.Error()) @@ -31,15 +32,17 @@ index d8af15da..51b3f8ff 100644 + err = secureEraseVolume(internalVolumePath, secureEraseMethod) + if err != nil { + return nil, status.Errorf(codes.Internal, "secure erase failed with %v", err.Error()) -+ } -+ } else { -+ klog.V(2).Infof("secure erase disabled. Removing subdirectory at %v", internalVolumePath) -+ if err = os.RemoveAll(internalVolumePath); err != nil { -+ return nil, status.Errorf(codes.Internal, "delete subdirectory(%s) failed with %v", internalVolumePath, err.Error()) + } } ++ ++ // delete subdirectory under base-dir ++ // klog.V(2).Infof("removing subdirectory at %v", internalVolumePath) ++ // if err = os.RemoveAll(internalVolumePath); err != nil { ++ // return nil, status.Errorf(codes.Internal, "delete subdirectory(%s) failed with %v", internalVolumePath, err.Error()) ++ // } } } else { + klog.V(2).Infof("DeleteVolume: volume(%s) is set to retain, not deleting/archiving subdirectory", volumeID) diff --git a/pkg/nfs/secure_erase.go b/pkg/nfs/secure_erase.go new file mode 100644 index 00000000..8dd3c2a9 diff --git a/images/csi-nfs/patches/README.md b/images/csi-nfs/patches/README.md index eb4016d1..20d4fb48 100644 --- a/images/csi-nfs/patches/README.md +++ b/images/csi-nfs/patches/README.md @@ -4,3 +4,15 @@ It fixes https://avd.aquasec.com/nvd/2024/cve-2024-5321/ MUST BE removed after switching to v4.9.0 + +## How to apply + +```bash +export CSI_DRIVER_NFS_VERSION="4.7.0" +export REPO_PATH=$(pwd) + +git clone https://github.com/kubernetes-csi/csi-driver-nfs.git +cd csi-driver-nfs +git checkout ${CSI_DRIVER_NFS_VERSION} +for patchfile in ${REPO_PATH}/images/csi-nfs/patches/*.patch ; do echo -n "Apply ${patchfile} ... "; git apply ${patchfile}; done +``` From d66bd0b0d314a268e11db030465f4fe6cb5dcd9b Mon Sep 17 00:00:00 2001 From: Anton Sergunov Date: Fri, 7 Feb 2025 14:07:10 +0600 Subject: [PATCH 05/37] =?UTF-8?q?=D0=92=D0=B0=D1=80=D0=B8=D0=B0=D0=BD?= =?UTF-8?q?=D1=82=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anton Sergunov Signed-off-by: Aleksandr Zimin --- docs/README_RU.md | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/docs/README_RU.md b/docs/README_RU.md index 9184b626..25fdf4fb 100644 --- a/docs/README_RU.md +++ b/docs/README_RU.md @@ -80,4 +80,46 @@ EOF ### Проверка работоспособности модуля -Как проверить работоспособность модуля описано [в FAQ](./faq.html#как-проверить-работоспособность-модуля). +Проверить работоспособность модуля можно [так](./faq.html#как-проверить-работоспособность-модуля) + +### Затирание остаточных данных + +Перед удалением на томе могут остаться файлы с пользовательскими данными. Эти файлы будут удалены и не будут доступны другим пользователям через NFS. + +Однако данные удаленных файлов могут оказаться доступными другим клиентам, если сервер предоставит доступ к своему хранилищу на уровне блочных устройств. + +Настроить процедуру очистки файлов перед удалением поможет опция `???`. + +> **Внимание!** Эта опция не влияет на файлы уже удаленные клиентским приложением. + +> **Внимание!** Эта опция влияет только на команды отправляемые по протоколу NFS. Проведение этих команд на стороне сервера определено +> +> - сервисом NFS сервера +> - файловой системой +> - уровнем блочных устройств и их виртуализации (например LVM) +> - самими физическими устройствами +> +> Убедитесь в доверенности сервера. Не отправляйте деликатные данные на сервера, в которых нет уверенности. + +#### Опция `SinglePass` + +Перезаписывает содержимое файлов случайной последовательностью перед удалением. Случайная последовательность передается по сети. + +#### Опция `ThreePass` + +Трижды перезаписывает содержимое файлов случайной последовательностью перед удалением. Три случайных последовательности передаются по сети. Имеет смысл только если сервер хранит данные на жестком диске, и есть риск, что у злоумышленника появится физический доступ к устройству. + +#### Опция `Discard` + +Многие файловые системы реализуют поддержку твердотельных накопителей, позволяя освободить место, занятое файлом, на блочном уровне без записи новых данных для увеличения срока службы твердотельного накопителя. Многие накопители гарантируют недоступность данных освобожденных блоков. + +Опция `Discard` помечает содержимое файлов, как свободное через `FALLOC_FL_PUNCH_HOLE`. Файловая система освободит полностью используемые файлом блоки, через вызов `blkdiscard`, а остальное место будет перезаписано нулями. Если сервер сообщит, что `FALLOC_FL_PUNCH_HOLE` не поддерживается, то будет вызвана `FALLOC_FL_ZERO_RANGE`, которая занулит содержимое файла. + +Преимущества этого метода: + +- объем трафика не зависит от размера файлов, а только от их количества +- метод может обеспечить недоступность старых данных при многих конфигурациях сервера без применения спец средств +- работает как для жестких дисков, так и твердотельных накопителей +- позволяет увеличить время жизни твердотельного накопителя + +TODO: Может разделим на две или три (PunchHole, ZeroOut, PunchHoleOrZeroOut)? From 9b028094035e4269af097722db01f4cf3caf8295 Mon Sep 17 00:00:00 2001 From: Anton Sergunov Date: Tue, 11 Feb 2025 17:57:33 +0600 Subject: [PATCH 06/37] Punch or zero out Signed-off-by: Aleksandr Zimin --- images/csi-nfs/csi-driver-nfs | 1 + images/csi-nfs/patches/0004-Add-secure-erase.patch | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 160000 images/csi-nfs/csi-driver-nfs diff --git a/images/csi-nfs/csi-driver-nfs b/images/csi-nfs/csi-driver-nfs new file mode 160000 index 00000000..d774c858 --- /dev/null +++ b/images/csi-nfs/csi-driver-nfs @@ -0,0 +1 @@ +Subproject commit d774c858aa291b744ab83d9cf315dfea1056f1ce diff --git a/images/csi-nfs/patches/0004-Add-secure-erase.patch b/images/csi-nfs/patches/0004-Add-secure-erase.patch index 1ce02877..4627688b 100644 --- a/images/csi-nfs/patches/0004-Add-secure-erase.patch +++ b/images/csi-nfs/patches/0004-Add-secure-erase.patch @@ -166,7 +166,10 @@ index 00000000..8dd3c2a9 + fd := int(file.Fd()) + klog.V(4).Infof("Sending FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE for file %s with size %d", filePath, fileSize) + if err := unix.Fallocate(fd, unix.FALLOC_FL_PUNCH_HOLE|unix.FALLOC_FL_KEEP_SIZE, 0, fileSize); err != nil { -+ return fmt.Errorf("discard (punch hole) failed for file %s: %w", filePath, err) ++ klog.V(4).Infof("Punch hole has failed. Sending FALLOC_FL_ZERO_RANGE|FALLOC_FL_KEEP_SIZE for file %s with size %d", filePath, fileSize) ++ if err := unix.Fallocate(fd, unix.FALLOC_FL_ZERO_RANGE|unix.FALLOC_FL_KEEP_SIZE, 0, fileSize); err != nil { ++ return fmt.Errorf("zero range failed for file %s: %w", filePath, err) ++ } + } + + klog.V(4).Infof("Discarding file %s completed.", filePath) From 08333d1cbc274ea8bd2da67d42f68e46869f3ef6 Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Fri, 7 Feb 2025 15:13:58 +0300 Subject: [PATCH 07/37] fix Signed-off-by: Aleksandr Zimin --- crds/nfsstorageclass.yaml | 11 ++++++++--- .../pkg/controller/nfs_storage_class_watcher_func.go | 5 ++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/crds/nfsstorageclass.yaml b/crds/nfsstorageclass.yaml index 0c2ceae8..465fc6ed 100644 --- a/crds/nfsstorageclass.yaml +++ b/crds/nfsstorageclass.yaml @@ -41,7 +41,7 @@ spec: - volumeBindingMode x-kubernetes-validations: - rule: "self.reclaimPolicy != 'Retain' || self.secureErase == 'Disable'" - message: "If reclaimPolicy is 'Retain', secureErase must be set to 'Disable'." + message: "If reclaimPolicy is 'Retain', secureErase must be set to 'Disable' or omitted." - rule: "self.connection.nfsVersion == '4.2' || self.secureErase != 'Discard'" message: "Discard mode is only available when connection.nfsVersion is '4.2'." properties: @@ -199,13 +199,18 @@ spec: secureErase: type: string description: | - Secure erase mode for PVs subdirectory + Secure erase mode for the PV’s subdirectory content. + This option determines the method used to securely erase data from the subdirectory when a Persistent Volume Claim is deleted. + Valid options are: + - Disable: No secure erase is performed; the subdirectory is removed immediately. This is the default behavior. + - Discard: Uses the filesystem’s discard (trim) functionality to free data blocks (only available when supported, e.g. with NFSv4.2). + - SinglePass: Overwrites the file’s content once with random data before deletion. + - ThreePass: Overwrites the file’s content three times with random data before deletion. enum: - Disable - Discard - SinglePass - ThreePass - default: "Disable" status: type: object description: | diff --git a/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go b/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go index dd8deeef..59f23239 100644 --- a/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go +++ b/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go @@ -724,10 +724,13 @@ func configureSecret(nsc *v1alpha1.NFSStorageClass, controllerNamespace string) }, StringData: map[string]string{ MountOptionsSecretKey: strings.Join(mountOptions, ","), - secureEraseMethodKey: nsc.Spec.SecureErase, }, } + if nsc.Spec.SecureErase != "" { + secret.StringData[secureEraseMethodKey] = nsc.Spec.SecureErase + } + return secret } From f20f0c3f4980c8847c1bd42328c43ae6c492f7f1 Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Fri, 7 Feb 2025 15:19:55 +0300 Subject: [PATCH 08/37] fix Signed-off-by: Aleksandr Zimin --- docs/README_RU.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/README_RU.md b/docs/README_RU.md index 25fdf4fb..18690ec2 100644 --- a/docs/README_RU.md +++ b/docs/README_RU.md @@ -107,19 +107,20 @@ EOF #### Опция `ThreePass` -Трижды перезаписывает содержимое файлов случайной последовательностью перед удалением. Три случайных последовательности передаются по сети. Имеет смысл только если сервер хранит данные на жестком диске, и есть риск, что у злоумышленника появится физический доступ к устройству. +Трижды перезаписывает содержимое файлов случайной последовательностью перед удалением. Три случайных последовательности передаются по сети. + #### Опция `Discard` -Многие файловые системы реализуют поддержку твердотельных накопителей, позволяя освободить место, занятое файлом, на блочном уровне без записи новых данных для увеличения срока службы твердотельного накопителя. Многие накопители гарантируют недоступность данных освобожденных блоков. +Многие файловые системы реализуют поддержку твердотельных накопителей, позволяя освободить место, занятое файлом, на блочном уровне без записи новых данных для увеличения срока службы твердотельного накопителя. Однако не все накопители гарантируют недоступность данных освобожденных блоков. -Опция `Discard` помечает содержимое файлов, как свободное через `FALLOC_FL_PUNCH_HOLE`. Файловая система освободит полностью используемые файлом блоки, через вызов `blkdiscard`, а остальное место будет перезаписано нулями. Если сервер сообщит, что `FALLOC_FL_PUNCH_HOLE` не поддерживается, то будет вызвана `FALLOC_FL_ZERO_RANGE`, которая занулит содержимое файла. +Опция `Discard` помечает содержимое файлов, как свободное через системный вызов `falloc` с флагом `FALLOC_FL_PUNCH_HOLE`. Файловая система освободит полностью используемые файлом блоки, через вызов `blkdiscard`, а остальное место будет перезаписано нулями. Если сервер сообщит, что `FALLOC_FL_PUNCH_HOLE` не поддерживается, то будет вызвана `FALLOC_FL_ZERO_RANGE`, которая занулит содержимое файла. Преимущества этого метода: - объем трафика не зависит от размера файлов, а только от их количества -- метод может обеспечить недоступность старых данных при многих конфигурациях сервера без применения спец средств +- метод может обеспечить недоступность старых данных при некоторых конфигурациях сервера - работает как для жестких дисков, так и твердотельных накопителей - позволяет увеличить время жизни твердотельного накопителя -TODO: Может разделим на две или три (PunchHole, ZeroOut, PunchHoleOrZeroOut)? + From 54fc655e1badaf79c3145a026d002461e36c8b54 Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Thu, 13 Feb 2025 21:41:15 +0300 Subject: [PATCH 09/37] fix Signed-off-by: Aleksandr Zimin --- crds/nfsstorageclass.yaml | 26 +-- images/csi-nfs/csi-driver-nfs | 1 - .../patches/0004-Add-secure-erase.patch | 202 ------------------ images/csi-nfs/patches/README.md | 2 + .../csi-driver-nfs/pkg/nfs/volume_cleanup.go | 145 +++++++++++++ images/csi-nfs/werf.inc.yaml | 1 + 6 files changed, 161 insertions(+), 216 deletions(-) delete mode 160000 images/csi-nfs/csi-driver-nfs delete mode 100644 images/csi-nfs/patches/0004-Add-secure-erase.patch create mode 100644 images/csi-nfs/patches/csi-driver-nfs/pkg/nfs/volume_cleanup.go diff --git a/crds/nfsstorageclass.yaml b/crds/nfsstorageclass.yaml index 465fc6ed..2a8cb2d1 100644 --- a/crds/nfsstorageclass.yaml +++ b/crds/nfsstorageclass.yaml @@ -40,9 +40,9 @@ spec: - reclaimPolicy - volumeBindingMode x-kubernetes-validations: - - rule: "self.reclaimPolicy != 'Retain' || self.secureErase == 'Disable'" - message: "If reclaimPolicy is 'Retain', secureErase must be set to 'Disable' or omitted." - - rule: "self.connection.nfsVersion == '4.2' || self.secureErase != 'Discard'" + - rule: "self.reclaimPolicy != 'Retain' || self.volumeCleanup == 'Disable'" + message: "If reclaimPolicy is 'Retain', volumeCleanup must be set to 'Disable' or omitted." + - rule: "self.connection.nfsVersion == '4.2' || self.volumeCleanup != 'Discard'" message: "Discard mode is only available when connection.nfsVersion is '4.2'." properties: connection: @@ -196,21 +196,21 @@ spec: type: array items: type: string - secureErase: + volumeCleanup: type: string description: | - Secure erase mode for the PV’s subdirectory content. - This option determines the method used to securely erase data from the subdirectory when a Persistent Volume Claim is deleted. + Specifies the cleanup method to be applied to the PV’s subdirectory content before deletion. + By default, the NFS CSI driver simply deletes the directory created for the Persistent Volume (PV) on the NFS server without performing any data cleanup. + When volumeCleanup is enabled, the driver will erase each file in the PV directory. + Valid options are: - - Disable: No secure erase is performed; the subdirectory is removed immediately. This is the default behavior. - - Discard: Uses the filesystem’s discard (trim) functionality to free data blocks (only available when supported, e.g. with NFSv4.2). - - SinglePass: Overwrites the file’s content once with random data before deletion. - - ThreePass: Overwrites the file’s content three times with random data before deletion. + - **Discard**: Uses the filesystem’s discard (trim) functionality to free data blocks. (This option is available only when supported, for example with NFSv4.2.) + - **RandomFillSinglePass**: Overwrites the content of each file once with random data before deletion. This is implemented by invoking the utility `shred`. + - **RandomFillThreePass**: Overwrites the content of each file three times with random data before deletion. This is implemented by invoking the utility `shred`. enum: - - Disable - Discard - - SinglePass - - ThreePass + - RandomFillSinglePass + - RandomFillThreePass status: type: object description: | diff --git a/images/csi-nfs/csi-driver-nfs b/images/csi-nfs/csi-driver-nfs deleted file mode 160000 index d774c858..00000000 --- a/images/csi-nfs/csi-driver-nfs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d774c858aa291b744ab83d9cf315dfea1056f1ce diff --git a/images/csi-nfs/patches/0004-Add-secure-erase.patch b/images/csi-nfs/patches/0004-Add-secure-erase.patch deleted file mode 100644 index 4627688b..00000000 --- a/images/csi-nfs/patches/0004-Add-secure-erase.patch +++ /dev/null @@ -1,202 +0,0 @@ -From df112b3065ca867a1c8584e95cbd78d9373ebdba Mon Sep 17 00:00:00 2001 -From: Aleksandr Zimin -Date: Sun, 2 Feb 2025 13:49:52 +0300 -Subject: [PATCH] Add secure erase - -Signed-off-by: Aleksandr Zimin ---- - pkg/nfs/controllerserver.go | 21 +++++- - pkg/nfs/secure_erase.go | 145 ++++++++++++++++++++++++++++++++++++ - 2 files changed, 162 insertions(+), 4 deletions(-) - create mode 100644 pkg/nfs/secure_erase.go - -diff --git a/pkg/nfs/controllerserver.go b/pkg/nfs/controllerserver.go -index d8af15da..a84673e6 100644 ---- a/pkg/nfs/controllerserver.go -+++ b/pkg/nfs/controllerserver.go -@@ -258,11 +258,24 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol - return nil, status.Errorf(codes.Internal, "archive subdirectory(%s, %s) failed with %v", internalVolumePath, archivedInternalVolumePath, err.Error()) - } - } else { -- // delete subdirectory under base-dir -- klog.V(2).Infof("removing subdirectory at %v", internalVolumePath) -- if err = os.RemoveAll(internalVolumePath); err != nil { -- return nil, status.Errorf(codes.Internal, "delete subdirectory(%s) failed with %v", internalVolumePath, err.Error()) -+ secureEraseMethod, secureEraseEnabled, err := getSecureEraseMethod(req.GetSecrets()) -+ if err != nil { -+ return nil, status.Errorf(codes.Internal, "failed to get secure erase method: %v", err.Error()) -+ } -+ -+ if secureEraseEnabled { -+ klog.V(2).Infof("secure erase enabled, using method %v. Securely erasing subdirectory at %v", secureEraseMethod, internalVolumePath) -+ err = secureEraseVolume(internalVolumePath, secureEraseMethod) -+ if err != nil { -+ return nil, status.Errorf(codes.Internal, "secure erase failed with %v", err.Error()) -+ } - } -+ -+ // delete subdirectory under base-dir -+ // klog.V(2).Infof("removing subdirectory at %v", internalVolumePath) -+ // if err = os.RemoveAll(internalVolumePath); err != nil { -+ // return nil, status.Errorf(codes.Internal, "delete subdirectory(%s) failed with %v", internalVolumePath, err.Error()) -+ // } - } - } else { - klog.V(2).Infof("DeleteVolume: volume(%s) is set to retain, not deleting/archiving subdirectory", volumeID) -diff --git a/pkg/nfs/secure_erase.go b/pkg/nfs/secure_erase.go -new file mode 100644 -index 00000000..8dd3c2a9 ---- /dev/null -+++ b/pkg/nfs/secure_erase.go -@@ -0,0 +1,145 @@ -+/* -+Copyright 2025 The Kubernetes Authors. -+ -+Licensed under the Apache License, Version 2.0 (the "License"); -+you may not use this file except in compliance with the License. -+You may obtain a copy of the License at -+ -+ http://www.apache.org/licenses/LICENSE-2.0 -+ -+Unless required by applicable law or agreed to in writing, software -+distributed under the License is distributed on an "AS IS" BASIS, -+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+See the License for the specific language governing permissions and -+limitations under the License. -+*/ -+ -+package nfs -+ -+import ( -+ "fmt" -+ "io/fs" -+ "os" -+ "os/exec" -+ "path/filepath" -+ -+ "golang.org/x/sys/unix" -+ -+ "k8s.io/klog/v2" -+) -+ -+const ( -+ secureEraseMethodKey = "secureErase" -+ secureEraseMethodDisable = "Disable" -+ secureEraseMethodDiscard = "Discard" -+ secureEraseMethodSinglePass = "SinglePass" -+ secureEraseMethodThreePass = "ThreePass" -+) -+ -+func getSecureEraseMethod(context map[string]string) (string, bool, error) { -+ val, ok := context[secureEraseMethodKey] -+ if !ok { -+ return "", false, nil -+ } -+ if val == secureEraseMethodDisable { -+ return "", false, nil -+ } -+ -+ switch val { -+ case secureEraseMethodDiscard, secureEraseMethodSinglePass, secureEraseMethodThreePass: -+ return val, true, nil -+ default: -+ return "", false, fmt.Errorf("invalid secure erase method %s", val) -+ } -+} -+ -+func secureEraseVolume(volumePath, secureEraseMethod string) error { -+ absPath, err := filepath.Abs(volumePath) -+ if err != nil { -+ return fmt.Errorf("getting absolute path for %s: %w", volumePath, err) -+ } -+ klog.V(4).Infof("Secure erasing volume %s with method %s", absPath, secureEraseMethod) -+ -+ err = filepath.Walk(absPath, func(path string, info fs.FileInfo, walkErr error) error { -+ if walkErr != nil { -+ return fmt.Errorf("walking error for %s: %w", path, walkErr) -+ } -+ -+ if !info.IsDir() { -+ klog.V(4).Infof("Secure erasing file %s", path) -+ return secureEraseFile(path, secureEraseMethod) -+ } else { -+ klog.V(4).Infof("Skipping directory %s", path) -+ } -+ return nil -+ }) -+ if err != nil { -+ return fmt.Errorf("error while walking through volume directory %s: %w", absPath, err) -+ } -+ -+ return nil -+} -+ -+func secureEraseFile(filePath, secureEraseMethod string) error { -+ info, err := os.Stat(filePath) -+ if err != nil { -+ return fmt.Errorf("failed to stat file %s: %w", filePath, err) -+ } -+ -+ if !info.Mode().IsRegular() { -+ klog.V(4).Infof("Skipping non-regular file %s", filePath) -+ return nil -+ } -+ -+ switch secureEraseMethod { -+ case secureEraseMethodDiscard: -+ return discardFile(filePath, info) -+ case secureEraseMethodSinglePass: -+ return shredFile(filePath, info, 1) -+ case secureEraseMethodThreePass: -+ return shredFile(filePath, info, 3) -+ default: -+ return fmt.Errorf("invalid secure erase method %s", secureEraseMethod) -+ } -+} -+ -+func discardFile(filePath string, info os.FileInfo) error { -+ klog.V(4).Infof("Discarding file %s", filePath) -+ file, err := os.OpenFile(filePath, os.O_WRONLY, 0) -+ if err != nil { -+ return fmt.Errorf("failed to open file %s for discard: %w", filePath, err) -+ } -+ defer file.Close() -+ -+ fileSize := info.Size() -+ fd := int(file.Fd()) -+ klog.V(4).Infof("Sending FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE for file %s with size %d", filePath, fileSize) -+ if err := unix.Fallocate(fd, unix.FALLOC_FL_PUNCH_HOLE|unix.FALLOC_FL_KEEP_SIZE, 0, fileSize); err != nil { -+ klog.V(4).Infof("Punch hole has failed. Sending FALLOC_FL_ZERO_RANGE|FALLOC_FL_KEEP_SIZE for file %s with size %d", filePath, fileSize) -+ if err := unix.Fallocate(fd, unix.FALLOC_FL_ZERO_RANGE|unix.FALLOC_FL_KEEP_SIZE, 0, fileSize); err != nil { -+ return fmt.Errorf("zero range failed for file %s: %w", filePath, err) -+ } -+ } -+ -+ klog.V(4).Infof("Discarding file %s completed.", filePath) -+ // klog.V(4).Infof("Discarding file %s completed. Removing file", filePath) -+ // if err := os.Remove(filePath); err != nil { -+ // return fmt.Errorf("failed to remove file %s after discard: %w", filePath, err) -+ // } -+ -+ return nil -+} -+ -+func shredFile(filePath string, info os.FileInfo, passes int) error { -+ klog.V(4).Infof("Shredding file %s with %d passes. Run command: shred -v -n %d %s", filePath, passes, passes, filePath) -+ cmd := exec.Command("shred", "-v", "-n", fmt.Sprintf("%d", passes), filePath) -+ -+ if out, err := cmd.CombinedOutput(); err != nil { -+ return fmt.Errorf("shred shred failed for file %s: %w, output: %s", filePath, err, string(out)) -+ } -+ -+ klog.V(4).Infof("Shredding file %s completed.", filePath) -+ // klog.V(4).Infof("Shredding file %s completed. Removing file", filePath) -+ // if err := os.Remove(filePath); err != nil { -+ // return fmt.Errorf("failed to remove file %s after shred: %w", filePath, err) -+ // } -+ -+ return nil -+} --- -2.39.5 (Apple Git-154) - diff --git a/images/csi-nfs/patches/README.md b/images/csi-nfs/patches/README.md index 20d4fb48..4931d56b 100644 --- a/images/csi-nfs/patches/README.md +++ b/images/csi-nfs/patches/README.md @@ -15,4 +15,6 @@ git clone https://github.com/kubernetes-csi/csi-driver-nfs.git cd csi-driver-nfs git checkout ${CSI_DRIVER_NFS_VERSION} for patchfile in ${REPO_PATH}/images/csi-nfs/patches/*.patch ; do echo -n "Apply ${patchfile} ... "; git apply ${patchfile}; done + +cp -R ${REPO_PATH}/images/csi-nfs/patches/csi-driver-nfs/* ./ ``` diff --git a/images/csi-nfs/patches/csi-driver-nfs/pkg/nfs/volume_cleanup.go b/images/csi-nfs/patches/csi-driver-nfs/pkg/nfs/volume_cleanup.go new file mode 100644 index 00000000..8dd3c2a9 --- /dev/null +++ b/images/csi-nfs/patches/csi-driver-nfs/pkg/nfs/volume_cleanup.go @@ -0,0 +1,145 @@ +/* +Copyright 2025 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package nfs + +import ( + "fmt" + "io/fs" + "os" + "os/exec" + "path/filepath" + + "golang.org/x/sys/unix" + + "k8s.io/klog/v2" +) + +const ( + secureEraseMethodKey = "secureErase" + secureEraseMethodDisable = "Disable" + secureEraseMethodDiscard = "Discard" + secureEraseMethodSinglePass = "SinglePass" + secureEraseMethodThreePass = "ThreePass" +) + +func getSecureEraseMethod(context map[string]string) (string, bool, error) { + val, ok := context[secureEraseMethodKey] + if !ok { + return "", false, nil + } + if val == secureEraseMethodDisable { + return "", false, nil + } + + switch val { + case secureEraseMethodDiscard, secureEraseMethodSinglePass, secureEraseMethodThreePass: + return val, true, nil + default: + return "", false, fmt.Errorf("invalid secure erase method %s", val) + } +} + +func secureEraseVolume(volumePath, secureEraseMethod string) error { + absPath, err := filepath.Abs(volumePath) + if err != nil { + return fmt.Errorf("getting absolute path for %s: %w", volumePath, err) + } + klog.V(4).Infof("Secure erasing volume %s with method %s", absPath, secureEraseMethod) + + err = filepath.Walk(absPath, func(path string, info fs.FileInfo, walkErr error) error { + if walkErr != nil { + return fmt.Errorf("walking error for %s: %w", path, walkErr) + } + + if !info.IsDir() { + klog.V(4).Infof("Secure erasing file %s", path) + return secureEraseFile(path, secureEraseMethod) + } else { + klog.V(4).Infof("Skipping directory %s", path) + } + return nil + }) + if err != nil { + return fmt.Errorf("error while walking through volume directory %s: %w", absPath, err) + } + + return nil +} + +func secureEraseFile(filePath, secureEraseMethod string) error { + info, err := os.Stat(filePath) + if err != nil { + return fmt.Errorf("failed to stat file %s: %w", filePath, err) + } + + if !info.Mode().IsRegular() { + klog.V(4).Infof("Skipping non-regular file %s", filePath) + return nil + } + + switch secureEraseMethod { + case secureEraseMethodDiscard: + return discardFile(filePath, info) + case secureEraseMethodSinglePass: + return shredFile(filePath, info, 1) + case secureEraseMethodThreePass: + return shredFile(filePath, info, 3) + default: + return fmt.Errorf("invalid secure erase method %s", secureEraseMethod) + } +} + +func discardFile(filePath string, info os.FileInfo) error { + klog.V(4).Infof("Discarding file %s", filePath) + file, err := os.OpenFile(filePath, os.O_WRONLY, 0) + if err != nil { + return fmt.Errorf("failed to open file %s for discard: %w", filePath, err) + } + defer file.Close() + + fileSize := info.Size() + fd := int(file.Fd()) + klog.V(4).Infof("Sending FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE for file %s with size %d", filePath, fileSize) + if err := unix.Fallocate(fd, unix.FALLOC_FL_PUNCH_HOLE|unix.FALLOC_FL_KEEP_SIZE, 0, fileSize); err != nil { + return fmt.Errorf("discard (punch hole) failed for file %s: %w", filePath, err) + } + + klog.V(4).Infof("Discarding file %s completed.", filePath) + // klog.V(4).Infof("Discarding file %s completed. Removing file", filePath) + // if err := os.Remove(filePath); err != nil { + // return fmt.Errorf("failed to remove file %s after discard: %w", filePath, err) + // } + + return nil +} + +func shredFile(filePath string, info os.FileInfo, passes int) error { + klog.V(4).Infof("Shredding file %s with %d passes. Run command: shred -v -n %d %s", filePath, passes, passes, filePath) + cmd := exec.Command("shred", "-v", "-n", fmt.Sprintf("%d", passes), filePath) + + if out, err := cmd.CombinedOutput(); err != nil { + return fmt.Errorf("shred shred failed for file %s: %w, output: %s", filePath, err, string(out)) + } + + klog.V(4).Infof("Shredding file %s completed.", filePath) + // klog.V(4).Infof("Shredding file %s completed. Removing file", filePath) + // if err := os.Remove(filePath); err != nil { + // return fmt.Errorf("failed to remove file %s after shred: %w", filePath, err) + // } + + return nil +} diff --git a/images/csi-nfs/werf.inc.yaml b/images/csi-nfs/werf.inc.yaml index f29efb7e..98661df1 100644 --- a/images/csi-nfs/werf.inc.yaml +++ b/images/csi-nfs/werf.inc.yaml @@ -33,6 +33,7 @@ shell: install: - cd /src/csi-driver-nfs - for patchfile in /patches/images/{{ $.ImageName }}/patches/*.patch; do echo "Apply ${patchfile} ... "; git apply ${patchfile} --verbose; done + - cp -R /patches/images/{{ $.ImageName }}/patches/csi-driver-nfs/* ./ - rm -rf /src/csi-driver-nfs/.git - rm -rf /src/nfs-utils/.git From 7fcb6244b5dd9906969484635270d8ce267f6d6f Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Thu, 13 Feb 2025 21:48:53 +0300 Subject: [PATCH 10/37] add shred Signed-off-by: Aleksandr Zimin --- images/csi-nfs/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/csi-nfs/werf.inc.yaml b/images/csi-nfs/werf.inc.yaml index 98661df1..aa120921 100644 --- a/images/csi-nfs/werf.inc.yaml +++ b/images/csi-nfs/werf.inc.yaml @@ -38,7 +38,7 @@ shell: - rm -rf /src/nfs-utils/.git --- -{{- $csiBinaries := "/nfs-utils/sbin/* /nfs-utils/usr/bin/* /nfs-utils/usr/sbin/* /lib64/libnss_files.so.2 /lib64/libnss_dns.so.2 /bin/cp /bin/mount /bin/umount" }} +{{- $csiBinaries := "/nfs-utils/sbin/* /nfs-utils/usr/bin/* /nfs-utils/usr/sbin/* /lib64/libnss_files.so.2 /lib64/libnss_dns.so.2 /bin/cp /bin/mount /bin/umount /usr/bin/shred" }} image: {{ $.ImageName }}-binaries-artifact from: {{ $.Root.BASE_ALT_P11 }} final: false From 486d81dbee0352b209f5c32bf7b34a20f75ae72d Mon Sep 17 00:00:00 2001 From: Aleksandr Zimin Date: Thu, 13 Feb 2025 22:38:41 +0300 Subject: [PATCH 11/37] some changes Signed-off-by: Aleksandr Zimin --- images/controller/src/cmd/main.go | 2 +- .../nfs_storage_class_watcher_func.go | 2 +- .../patches/0004-add-volume-cleanup.patch | 65014 ++++++++++++++++ .../pkg/nfs/volume_cleanup_ce.go | 25 + .../pkg/nfs/volume_cleanup_common.go | 39 + ...volume_cleanup.go => volume_cleanup_ee.go} | 65 +- images/csi-nfs/werf.inc.yaml | 9 +- images/webhooks/src/cmd/main.go | 2 +- .../common/pkg/feature/{ce.go => const_ce.go} | 13 +- lib/go/common/pkg/feature/const_csepro.go | 14 + lib/go/common/pkg/feature/const_ee.go | 14 + lib/go/common/pkg/feature/const_se.go | 14 + lib/go/common/pkg/feature/const_seplus.go | 14 + .../common/pkg/feature/{ee.go => feature.go} | 16 +- lib/go/common/pkg/validating/validator.go | 2 +- 15 files changed, 65185 insertions(+), 60 deletions(-) create mode 100644 images/csi-nfs/patches/0004-add-volume-cleanup.patch create mode 100644 images/csi-nfs/patches/csi-driver-nfs/pkg/nfs/volume_cleanup_ce.go create mode 100644 images/csi-nfs/patches/csi-driver-nfs/pkg/nfs/volume_cleanup_common.go rename images/csi-nfs/patches/csi-driver-nfs/pkg/nfs/{volume_cleanup.go => volume_cleanup_ee.go} (60%) rename lib/go/common/pkg/feature/{ce.go => const_ce.go} (76%) create mode 100644 lib/go/common/pkg/feature/const_csepro.go create mode 100644 lib/go/common/pkg/feature/const_ee.go create mode 100644 lib/go/common/pkg/feature/const_se.go create mode 100644 lib/go/common/pkg/feature/const_seplus.go rename lib/go/common/pkg/feature/{ee.go => feature.go} (73%) diff --git a/images/controller/src/cmd/main.go b/images/controller/src/cmd/main.go index 3b70e77a..f1cdebc2 100644 --- a/images/controller/src/cmd/main.go +++ b/images/controller/src/cmd/main.go @@ -65,7 +65,7 @@ func main() { log.Info(fmt.Sprintf("[main] Go Version:%s ", goruntime.Version())) log.Info(fmt.Sprintf("[main] OS/Arch:Go OS/Arch:%s/%s ", goruntime.GOOS, goruntime.GOARCH)) - log.Info(fmt.Sprintf("[main] Feature TLSEnabled:%v", commonfeature.TLSEnabled)) + log.Info(fmt.Sprintf("[main] Feature TLSEnabled:%t", commonfeature.TLSEnabled())) log.Info("[main] CfgParams has been successfully created") log.Info(fmt.Sprintf("[main] %s = %s", config.LogLevelEnvName, cfgParams.Loglevel)) diff --git a/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go b/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go index 59f23239..061606de 100644 --- a/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go +++ b/images/controller/src/pkg/controller/nfs_storage_class_watcher_func.go @@ -591,7 +591,7 @@ func GetSCMountOptions(nsc *v1alpha1.NFSStorageClass) []string { mountOptions = append(mountOptions, "nfsvers="+nsc.Spec.Connection.NFSVersion) } - if commonfeature.TLSEnabled { + if commonfeature.TLSEnabled() { if nsc.Spec.Connection.Mtls { mountOptions = append(mountOptions, "xprtsec=mtls") } else if nsc.Spec.Connection.Tls { diff --git a/images/csi-nfs/patches/0004-add-volume-cleanup.patch b/images/csi-nfs/patches/0004-add-volume-cleanup.patch new file mode 100644 index 00000000..3918e79d --- /dev/null +++ b/images/csi-nfs/patches/0004-add-volume-cleanup.patch @@ -0,0 +1,65014 @@ +From c1743186a58e3d3168bcdf8047a6555555664814 Mon Sep 17 00:00:00 2001 +From: Aleksandr Zimin +Date: Thu, 13 Feb 2025 22:37:13 +0300 +Subject: [PATCH] Add volume cleanup + +Signed-off-by: Aleksandr Zimin +--- + go.mod | 59 +- + go.sum | 97 +- + pkg/nfs/controllerserver.go | 20 +- + .../lib/go/common/pkg/feature/const_ce.go | 23 + + .../lib/go/common/pkg/feature/const_csepro.go | 14 + + .../lib/go/common/pkg/feature/const_ee.go | 14 + + .../lib/go/common/pkg/feature/const_se.go | 14 + + .../lib/go/common/pkg/feature/const_seplus.go | 14 + + .../lib/go/common/pkg/feature/feature.go | 24 + + .../emicklei/go-restful/v3/CHANGES.md | 24 +- + .../emicklei/go-restful/v3/README.md | 5 +- + .../emicklei/go-restful/v3/constants.go | 2 + + .../emicklei/go-restful/v3/request.go | 5 +- + .../emicklei/go-restful/v3/response.go | 3 + + .../emicklei/go-restful/v3/route.go | 17 +- + .../emicklei/go-restful/v3/route_builder.go | 55 +- + .../github.com/fxamacker/cbor/v2/.gitignore | 12 + + .../fxamacker/cbor/v2/.golangci.yml | 104 + + .../fxamacker/cbor/v2/CODE_OF_CONDUCT.md | 133 + + .../fxamacker/cbor/v2/CONTRIBUTING.md | 41 + + vendor/github.com/fxamacker/cbor/v2/LICENSE | 21 + + vendor/github.com/fxamacker/cbor/v2/README.md | 691 +++ + .../github.com/fxamacker/cbor/v2/SECURITY.md | 7 + + .../fxamacker/cbor/v2/bytestring.go | 63 + + vendor/github.com/fxamacker/cbor/v2/cache.go | 363 ++ + vendor/github.com/fxamacker/cbor/v2/common.go | 182 + + vendor/github.com/fxamacker/cbor/v2/decode.go | 3187 ++++++++++ + .../github.com/fxamacker/cbor/v2/diagnose.go | 724 +++ + vendor/github.com/fxamacker/cbor/v2/doc.go | 129 + + vendor/github.com/fxamacker/cbor/v2/encode.go | 1989 ++++++ + .../fxamacker/cbor/v2/encode_map.go | 94 + + .../fxamacker/cbor/v2/encode_map_go117.go | 60 + + .../fxamacker/cbor/v2/simplevalue.go | 69 + + vendor/github.com/fxamacker/cbor/v2/stream.go | 277 + + .../fxamacker/cbor/v2/structfields.go | 260 + + vendor/github.com/fxamacker/cbor/v2/tag.go | 299 + + vendor/github.com/fxamacker/cbor/v2/valid.go | 394 ++ + vendor/github.com/go-logr/logr/README.md | 1 + + vendor/github.com/go-logr/logr/funcr/funcr.go | 169 +- + .../go-openapi/jsonpointer/.golangci.yml | 61 + + .../go-openapi/jsonpointer/README.md | 8 +- + .../go-openapi/jsonpointer/pointer.go | 191 +- + vendor/github.com/go-openapi/swag/.gitignore | 1 + + .../github.com/go-openapi/swag/.golangci.yml | 54 +- + .../github.com/go-openapi/swag/BENCHMARK.md | 52 + + vendor/github.com/go-openapi/swag/README.md | 8 +- + .../go-openapi/swag/initialism_index.go | 202 + + vendor/github.com/go-openapi/swag/loading.go | 105 +- + .../github.com/go-openapi/swag/name_lexem.go | 70 +- + .../github.com/go-openapi/swag/post_go18.go | 24 - + .../github.com/go-openapi/swag/post_go19.go | 68 - + vendor/github.com/go-openapi/swag/pre_go18.go | 24 - + vendor/github.com/go-openapi/swag/pre_go19.go | 70 - + vendor/github.com/go-openapi/swag/split.go | 470 +- + .../go-openapi/swag/string_bytes.go | 8 + + vendor/github.com/go-openapi/swag/util.go | 224 +- + vendor/github.com/go-openapi/swag/yaml.go | 39 +- + .../github.com/google/pprof/profile/encode.go | 5 + + .../github.com/google/pprof/profile/merge.go | 5 + + .../google/pprof/profile/profile.go | 9 +- + .../github.com/moby/spdystream/connection.go | 61 +- + vendor/github.com/moby/spdystream/stream.go | 2 + + vendor/github.com/mxk/go-flowrate/LICENSE | 29 + + .../mxk/go-flowrate/flowrate/flowrate.go | 267 + + .../github.com/mxk/go-flowrate/flowrate/io.go | 133 + + .../mxk/go-flowrate/flowrate/util.go | 67 + + vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md | 72 + + .../github.com/onsi/ginkgo/v2/CONTRIBUTING.md | 10 +- + vendor/github.com/onsi/ginkgo/v2/Makefile | 16 + + .../onsi/ginkgo/v2/formatter/formatter.go | 4 + + .../ginkgo/v2/ginkgo/build/build_command.go | 15 +- + .../onsi/ginkgo/v2/ginkgo/internal/compile.go | 14 +- + .../ginkgo/v2/ginkgo/watch/package_hash.go | 9 + + .../onsi/ginkgo/v2/internal/suite.go | 7 +- + .../ginkgo/v2/reporters/default_reporter.go | 10 +- + .../onsi/ginkgo/v2/reporters/junit_report.go | 1 + + vendor/github.com/onsi/ginkgo/v2/table_dsl.go | 8 +- + .../github.com/onsi/ginkgo/v2/types/config.go | 23 +- + .../onsi/ginkgo/v2/types/label_filter.go | 229 +- + .../github.com/onsi/ginkgo/v2/types/types.go | 10 +- + .../onsi/ginkgo/v2/types/version.go | 2 +- + vendor/github.com/onsi/gomega/CHANGELOG.md | 58 + + vendor/github.com/onsi/gomega/gomega_dsl.go | 30 +- + .../onsi/gomega/internal/async_assertion.go | 12 +- + .../onsi/gomega/internal/duration_bundle.go | 17 +- + .../github.com/onsi/gomega/internal/gomega.go | 8 + + .../gomega/internal/polling_signal_error.go | 11 + + .../gomega/matchers/have_exact_elements.go | 7 +- + .../onsi/gomega/matchers/have_field.go | 36 +- + .../bipartitegraph/bipartitegraphmatching.go | 7 + + vendor/github.com/onsi/gomega/types/types.go | 2 + + vendor/github.com/x448/float16/.travis.yml | 13 + + vendor/github.com/x448/float16/LICENSE | 22 + + vendor/github.com/x448/float16/README.md | 133 + + vendor/github.com/x448/float16/float16.go | 302 + + vendor/golang.org/x/crypto/LICENSE | 4 +- + vendor/golang.org/x/crypto/blowfish/cipher.go | 2 +- + .../x/crypto/chacha20/chacha_noasm.go | 2 +- + .../{chacha_ppc64le.go => chacha_ppc64x.go} | 2 +- + .../{chacha_ppc64le.s => chacha_ppc64x.s} | 114 +- + .../x/crypto/cryptobyte/asn1/asn1.go | 2 +- + .../golang.org/x/crypto/cryptobyte/string.go | 2 +- + .../x/crypto/curve25519/curve25519.go | 39 +- + .../x/crypto/curve25519/curve25519_compat.go | 105 - + .../x/crypto/curve25519/curve25519_go120.go | 46 - + .../x/crypto/curve25519/internal/field/README | 7 - + .../x/crypto/curve25519/internal/field/fe.go | 416 -- + .../curve25519/internal/field/fe_amd64.go | 15 - + .../curve25519/internal/field/fe_amd64.s | 378 -- + .../internal/field/fe_amd64_noasm.go | 11 - + .../curve25519/internal/field/fe_arm64.go | 15 - + .../curve25519/internal/field/fe_arm64.s | 42 - + .../internal/field/fe_arm64_noasm.go | 11 - + .../curve25519/internal/field/fe_generic.go | 264 - + .../curve25519/internal/field/sync.checkpoint | 1 - + .../crypto/curve25519/internal/field/sync.sh | 19 - + vendor/golang.org/x/crypto/hkdf/hkdf.go | 2 +- + .../x/crypto/internal/poly1305/mac_noasm.go | 2 +- + .../x/crypto/internal/poly1305/sum_amd64.s | 133 +- + .../{sum_ppc64le.go => sum_ppc64x.go} | 2 +- + .../poly1305/{sum_ppc64le.s => sum_ppc64x.s} | 30 +- + .../x/crypto/nacl/secretbox/secretbox.go | 2 +- + .../x/crypto/salsa20/salsa/hsalsa20.go | 2 +- + .../x/crypto/salsa20/salsa/salsa20_amd64.s | 1742 +++--- + vendor/golang.org/x/crypto/ssh/client_auth.go | 23 +- + vendor/golang.org/x/crypto/ssh/doc.go | 2 +- + vendor/golang.org/x/crypto/ssh/keys.go | 52 +- + vendor/golang.org/x/crypto/ssh/server.go | 49 +- + vendor/golang.org/x/net/LICENSE | 4 +- + vendor/golang.org/x/net/html/doc.go | 9 +- + vendor/golang.org/x/net/html/doctype.go | 2 +- + vendor/golang.org/x/net/html/foreign.go | 3 +- + vendor/golang.org/x/net/html/iter.go | 56 + + vendor/golang.org/x/net/html/node.go | 4 + + vendor/golang.org/x/net/html/parse.go | 8 +- + .../golang.org/x/net/http/httpguts/httplex.go | 13 +- + .../x/net/http2/client_conn_pool.go | 8 +- + vendor/golang.org/x/net/http2/config.go | 122 + + vendor/golang.org/x/net/http2/config_go124.go | 61 + + .../x/net/http2/config_pre_go124.go | 16 + + vendor/golang.org/x/net/http2/frame.go | 17 +- + vendor/golang.org/x/net/http2/http2.go | 114 +- + vendor/golang.org/x/net/http2/server.go | 323 +- + vendor/golang.org/x/net/http2/testsync.go | 331 - + vendor/golang.org/x/net/http2/timer.go | 20 + + vendor/golang.org/x/net/http2/transport.go | 840 +-- + vendor/golang.org/x/net/http2/unencrypted.go | 32 + + vendor/golang.org/x/net/http2/write.go | 10 + + .../x/net/http2/writesched_priority.go | 4 +- + vendor/golang.org/x/net/proxy/per_host.go | 8 +- + vendor/golang.org/x/net/websocket/hybi.go | 5 +- + .../golang.org/x/net/websocket/websocket.go | 9 +- + vendor/golang.org/x/sync/LICENSE | 4 +- + vendor/golang.org/x/sys/LICENSE | 4 +- + .../golang.org/x/sys/cpu/asm_darwin_x86_gc.s | 17 + + vendor/golang.org/x/sys/cpu/cpu.go | 22 + + vendor/golang.org/x/sys/cpu/cpu_arm64.go | 22 + + vendor/golang.org/x/sys/cpu/cpu_arm64.s | 8 + + vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go | 61 + + vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go | 1 + + vendor/golang.org/x/sys/cpu/cpu_gc_x86.go | 4 +- + .../x/sys/cpu/{cpu_x86.s => cpu_gc_x86.s} | 2 +- + vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go | 6 - + .../golang.org/x/sys/cpu/cpu_linux_arm64.go | 9 + + .../golang.org/x/sys/cpu/cpu_linux_noinit.go | 2 +- + .../golang.org/x/sys/cpu/cpu_linux_riscv64.go | 137 + + vendor/golang.org/x/sys/cpu/cpu_other_x86.go | 11 + + vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 11 +- + vendor/golang.org/x/sys/cpu/cpu_x86.go | 6 +- + .../x/sys/cpu/syscall_darwin_x86_gc.go | 98 + + vendor/golang.org/x/sys/unix/README.md | 2 +- + vendor/golang.org/x/sys/unix/asm_zos_s390x.s | 665 +- + vendor/golang.org/x/sys/unix/bpxsvc_zos.go | 657 ++ + vendor/golang.org/x/sys/unix/bpxsvc_zos.s | 192 + + vendor/golang.org/x/sys/unix/epoll_zos.go | 220 - + vendor/golang.org/x/sys/unix/fstatfs_zos.go | 163 - + vendor/golang.org/x/sys/unix/ioctl_linux.go | 96 + + vendor/golang.org/x/sys/unix/mkerrors.sh | 20 +- + vendor/golang.org/x/sys/unix/mremap.go | 5 + + vendor/golang.org/x/sys/unix/pagesize_unix.go | 2 +- + .../x/sys/unix/readdirent_getdirentries.go | 2 +- + vendor/golang.org/x/sys/unix/sockcmsg_zos.go | 58 + + .../golang.org/x/sys/unix/symaddr_zos_s390x.s | 75 + + vendor/golang.org/x/sys/unix/syscall_aix.go | 2 +- + .../golang.org/x/sys/unix/syscall_darwin.go | 61 + + .../x/sys/unix/syscall_dragonfly.go | 12 + + vendor/golang.org/x/sys/unix/syscall_hurd.go | 1 + + vendor/golang.org/x/sys/unix/syscall_linux.go | 65 +- + .../x/sys/unix/syscall_linux_arm64.go | 2 + + .../x/sys/unix/syscall_linux_loong64.go | 2 + + .../x/sys/unix/syscall_linux_riscv64.go | 2 + + .../golang.org/x/sys/unix/syscall_openbsd.go | 1 + + vendor/golang.org/x/sys/unix/syscall_unix.go | 9 + + .../x/sys/unix/syscall_zos_s390x.go | 1595 ++++- + vendor/golang.org/x/sys/unix/sysvshm_unix.go | 2 +- + .../x/sys/unix/sysvshm_unix_other.go | 2 +- + .../golang.org/x/sys/unix/vgetrandom_linux.go | 13 + + .../x/sys/unix/vgetrandom_unsupported.go | 11 + + .../x/sys/unix/zerrors_darwin_amd64.go | 12 + + .../x/sys/unix/zerrors_darwin_arm64.go | 12 + + vendor/golang.org/x/sys/unix/zerrors_linux.go | 109 +- + .../x/sys/unix/zerrors_linux_386.go | 28 + + .../x/sys/unix/zerrors_linux_amd64.go | 28 + + .../x/sys/unix/zerrors_linux_arm.go | 27 + + .../x/sys/unix/zerrors_linux_arm64.go | 29 + + .../x/sys/unix/zerrors_linux_loong64.go | 27 + + .../x/sys/unix/zerrors_linux_mips.go | 27 + + .../x/sys/unix/zerrors_linux_mips64.go | 27 + + .../x/sys/unix/zerrors_linux_mips64le.go | 27 + + .../x/sys/unix/zerrors_linux_mipsle.go | 27 + + .../x/sys/unix/zerrors_linux_ppc.go | 27 + + .../x/sys/unix/zerrors_linux_ppc64.go | 27 + + .../x/sys/unix/zerrors_linux_ppc64le.go | 27 + + .../x/sys/unix/zerrors_linux_riscv64.go | 27 + + .../x/sys/unix/zerrors_linux_s390x.go | 27 + + .../x/sys/unix/zerrors_linux_sparc64.go | 27 + + .../x/sys/unix/zerrors_zos_s390x.go | 235 +- + .../x/sys/unix/zsymaddr_zos_s390x.s | 364 ++ + .../x/sys/unix/zsyscall_darwin_amd64.go | 101 + + .../x/sys/unix/zsyscall_darwin_amd64.s | 25 + + .../x/sys/unix/zsyscall_darwin_arm64.go | 101 + + .../x/sys/unix/zsyscall_darwin_arm64.s | 25 + + .../golang.org/x/sys/unix/zsyscall_linux.go | 43 +- + .../x/sys/unix/zsyscall_openbsd_386.go | 24 + + .../x/sys/unix/zsyscall_openbsd_386.s | 5 + + .../x/sys/unix/zsyscall_openbsd_amd64.go | 24 + + .../x/sys/unix/zsyscall_openbsd_amd64.s | 5 + + .../x/sys/unix/zsyscall_openbsd_arm.go | 24 + + .../x/sys/unix/zsyscall_openbsd_arm.s | 5 + + .../x/sys/unix/zsyscall_openbsd_arm64.go | 24 + + .../x/sys/unix/zsyscall_openbsd_arm64.s | 5 + + .../x/sys/unix/zsyscall_openbsd_mips64.go | 24 + + .../x/sys/unix/zsyscall_openbsd_mips64.s | 5 + + .../x/sys/unix/zsyscall_openbsd_ppc64.go | 24 + + .../x/sys/unix/zsyscall_openbsd_ppc64.s | 6 + + .../x/sys/unix/zsyscall_openbsd_riscv64.go | 24 + + .../x/sys/unix/zsyscall_openbsd_riscv64.s | 5 + + .../x/sys/unix/zsyscall_zos_s390x.go | 3113 ++++++++-- + .../x/sys/unix/zsysnum_linux_386.go | 6 + + .../x/sys/unix/zsysnum_linux_amd64.go | 7 + + .../x/sys/unix/zsysnum_linux_arm.go | 6 + + .../x/sys/unix/zsysnum_linux_arm64.go | 8 +- + .../x/sys/unix/zsysnum_linux_loong64.go | 8 + + .../x/sys/unix/zsysnum_linux_mips.go | 6 + + .../x/sys/unix/zsysnum_linux_mips64.go | 6 + + .../x/sys/unix/zsysnum_linux_mips64le.go | 6 + + .../x/sys/unix/zsysnum_linux_mipsle.go | 6 + + .../x/sys/unix/zsysnum_linux_ppc.go | 6 + + .../x/sys/unix/zsysnum_linux_ppc64.go | 6 + + .../x/sys/unix/zsysnum_linux_ppc64le.go | 6 + + .../x/sys/unix/zsysnum_linux_riscv64.go | 8 +- + .../x/sys/unix/zsysnum_linux_s390x.go | 6 + + .../x/sys/unix/zsysnum_linux_sparc64.go | 6 + + .../x/sys/unix/zsysnum_zos_s390x.go | 5507 +++++++++-------- + .../x/sys/unix/ztypes_darwin_amd64.go | 73 + + .../x/sys/unix/ztypes_darwin_arm64.go | 73 + + .../x/sys/unix/ztypes_freebsd_386.go | 1 + + .../x/sys/unix/ztypes_freebsd_amd64.go | 1 + + .../x/sys/unix/ztypes_freebsd_arm.go | 1 + + .../x/sys/unix/ztypes_freebsd_arm64.go | 1 + + .../x/sys/unix/ztypes_freebsd_riscv64.go | 1 + + vendor/golang.org/x/sys/unix/ztypes_linux.go | 283 +- + .../golang.org/x/sys/unix/ztypes_linux_386.go | 8 - + .../x/sys/unix/ztypes_linux_amd64.go | 9 - + .../golang.org/x/sys/unix/ztypes_linux_arm.go | 9 - + .../x/sys/unix/ztypes_linux_arm64.go | 9 - + .../x/sys/unix/ztypes_linux_loong64.go | 9 - + .../x/sys/unix/ztypes_linux_mips.go | 9 - + .../x/sys/unix/ztypes_linux_mips64.go | 9 - + .../x/sys/unix/ztypes_linux_mips64le.go | 9 - + .../x/sys/unix/ztypes_linux_mipsle.go | 9 - + .../golang.org/x/sys/unix/ztypes_linux_ppc.go | 9 - + .../x/sys/unix/ztypes_linux_ppc64.go | 9 - + .../x/sys/unix/ztypes_linux_ppc64le.go | 9 - + .../x/sys/unix/ztypes_linux_riscv64.go | 42 +- + .../x/sys/unix/ztypes_linux_s390x.go | 9 - + .../x/sys/unix/ztypes_linux_sparc64.go | 9 - + .../golang.org/x/sys/unix/ztypes_zos_s390x.go | 152 +- + vendor/golang.org/x/sys/windows/aliases.go | 2 +- + .../golang.org/x/sys/windows/dll_windows.go | 13 +- + vendor/golang.org/x/sys/windows/empty.s | 8 - + .../x/sys/windows/security_windows.go | 25 +- + .../x/sys/windows/syscall_windows.go | 52 +- + .../golang.org/x/sys/windows/types_windows.go | 199 +- + .../x/sys/windows/zsyscall_windows.go | 160 + + vendor/golang.org/x/term/LICENSE | 4 +- + vendor/golang.org/x/term/README.md | 11 +- + vendor/golang.org/x/term/term_windows.go | 1 + + vendor/golang.org/x/text/LICENSE | 4 +- + .../x/text/internal/catmsg/codec.go | 2 +- + vendor/golang.org/x/text/message/message.go | 19 +- + vendor/golang.org/x/time/LICENSE | 4 +- + vendor/golang.org/x/time/rate/rate.go | 19 +- + vendor/golang.org/x/tools/LICENSE | 4 +- + .../x/tools/go/ast/inspector/inspector.go | 9 + + .../x/tools/go/ast/inspector/iter.go | 85 + + .../protobuf/encoding/protojson/decode.go | 6 +- + .../protobuf/encoding/protojson/encode.go | 4 +- + .../protobuf/encoding/prototext/decode.go | 4 +- + .../protobuf/internal/descopts/options.go | 20 +- + .../editiondefaults/editions_defaults.binpb | Bin 78 -> 93 bytes + .../internal/editionssupport/editions.go | 2 +- + .../protobuf/internal/encoding/json/decode.go | 2 +- + .../protobuf/internal/encoding/text/decode.go | 2 +- + .../protobuf/internal/errors/errors.go | 6 +- + .../protobuf/internal/filedesc/desc.go | 8 + + .../protobuf/internal/filedesc/desc_init.go | 4 +- + .../protobuf/internal/filedesc/desc_lazy.go | 7 + + .../internal/filedesc/desc_list_gen.go | 11 + + .../protobuf/internal/filedesc/editions.go | 6 +- + .../protobuf/internal/filetype/build.go | 4 +- + .../protobuf/internal/genid/descriptor_gen.go | 49 +- + .../protobuf/internal/genid/doc.go | 2 +- + .../internal/genid/go_features_gen.go | 15 +- + .../protobuf/internal/genid/map_entry.go | 2 +- + .../protobuf/internal/genid/wrappers.go | 2 +- + .../protobuf/internal/impl/api_export.go | 6 +- + .../protobuf/internal/impl/checkinit.go | 2 +- + .../protobuf/internal/impl/codec_extension.go | 33 +- + .../protobuf/internal/impl/codec_field.go | 3 + + .../protobuf/internal/impl/codec_message.go | 3 + + .../internal/impl/codec_messageset.go | 22 + + .../protobuf/internal/impl/codec_reflect.go | 210 - + .../protobuf/internal/impl/codec_unsafe.go | 3 - + .../protobuf/internal/impl/convert.go | 4 +- + .../protobuf/internal/impl/convert_list.go | 2 +- + .../protobuf/internal/impl/convert_map.go | 2 +- + .../protobuf/internal/impl/encode.go | 50 +- + .../protobuf/internal/impl/equal.go | 224 + + .../protobuf/internal/impl/extension.go | 8 +- + .../protobuf/internal/impl/legacy_enum.go | 2 +- + .../internal/impl/legacy_extension.go | 1 + + .../protobuf/internal/impl/legacy_message.go | 4 +- + .../protobuf/internal/impl/message.go | 12 +- + .../protobuf/internal/impl/message_reflect.go | 14 +- + .../internal/impl/message_reflect_gen.go | 4 +- + .../protobuf/internal/impl/pointer_reflect.go | 215 - + .../protobuf/internal/impl/pointer_unsafe.go | 7 +- + .../protobuf/internal/order/range.go | 4 +- + .../protobuf/internal/strs/strings_pure.go | 28 - + .../internal/strs/strings_unsafe_go120.go | 3 +- + .../internal/strs/strings_unsafe_go121.go | 3 +- + .../protobuf/internal/version/version.go | 4 +- + .../google.golang.org/protobuf/proto/equal.go | 9 + + .../protobuf/proto/extension.go | 77 +- + .../protobuf/reflect/protodesc/desc_init.go | 4 + + .../reflect/protodesc/desc_resolve.go | 5 + + .../reflect/protodesc/desc_validate.go | 12 - + .../protobuf/reflect/protodesc/editions.go | 8 +- + .../protobuf/reflect/protoreflect/methods.go | 10 + + .../reflect/protoreflect/source_gen.go | 21 + + .../protobuf/reflect/protoreflect/type.go | 6 +- + .../reflect/protoreflect/value_pure.go | 60 - + .../reflect/protoreflect/value_union.go | 14 +- + .../protoreflect/value_unsafe_go120.go | 9 +- + .../protoreflect/value_unsafe_go121.go | 11 +- + .../reflect/protoregistry/registry.go | 14 +- + .../protobuf/runtime/protoiface/methods.go | 18 + + .../types/descriptorpb/descriptor.pb.go | 1781 +++--- + .../protobuf/types/dynamicpb/dynamic.go | 16 +- + .../types/gofeaturespb/go_features.pb.go | 62 +- + .../protobuf/types/known/anypb/any.pb.go | 26 +- + .../types/known/durationpb/duration.pb.go | 26 +- + .../protobuf/types/known/emptypb/empty.pb.go | 26 +- + .../types/known/fieldmaskpb/field_mask.pb.go | 26 +- + .../types/known/structpb/struct.pb.go | 150 +- + .../types/known/timestamppb/timestamp.pb.go | 26 +- + .../types/known/wrapperspb/wrappers.pb.go | 202 +- + .../apimachinery/pkg/api/errors/errors.go | 7 + + .../k8s.io/apimachinery/pkg/api/meta/OWNERS | 3 +- + .../apimachinery/pkg/api/meta/conditions.go | 37 +- + .../apimachinery/pkg/api/resource/amount.go | 38 + + .../pkg/api/resource/generated.pb.go | 43 +- + .../apimachinery/pkg/api/resource/quantity.go | 78 +- + .../apimachinery/pkg/api/validation/OWNERS | 11 + + .../pkg/api/validation/objectmeta.go | 2 +- + .../meta/internalversion/scheme/register.go | 8 +- + .../apimachinery/pkg/apis/meta/v1/OWNERS | 3 +- + .../pkg/apis/meta/v1/controller_ref.go | 13 +- + .../pkg/apis/meta/v1/generated.pb.go | 746 ++- + .../pkg/apis/meta/v1/generated.proto | 60 +- + .../apimachinery/pkg/apis/meta/v1/helpers.go | 83 +- + .../pkg/apis/meta/v1/micro_time.go | 28 + + .../apimachinery/pkg/apis/meta/v1/time.go | 29 + + .../apimachinery/pkg/apis/meta/v1/types.go | 107 + + .../meta/v1/types_swagger_doc_generated.go | 12 + + .../pkg/apis/meta/v1/unstructured/helpers.go | 26 +- + .../apis/meta/v1/unstructured/unstructured.go | 6 +- + .../pkg/apis/meta/v1/validation/validation.go | 91 +- + .../apis/meta/v1/zz_generated.conversion.go | 7 + + .../pkg/apis/meta/v1/zz_generated.deepcopy.go | 26 + + .../pkg/apis/meta/v1beta1/generated.pb.go | 45 +- + .../pkg/apis/meta/v1beta1/generated.proto | 4 +- + .../apimachinery/pkg/labels/selector.go | 24 +- + .../apimachinery/pkg/runtime/extension.go | 100 +- + .../apimachinery/pkg/runtime/generated.pb.go | 65 +- + .../k8s.io/apimachinery/pkg/runtime/helper.go | 53 +- + .../apimachinery/pkg/runtime/interfaces.go | 13 + + .../pkg/runtime/schema/generated.pb.go | 31 +- + .../runtime/serializer/cbor/direct/direct.go | 61 + + .../serializer/cbor/internal/modes/buffers.go | 65 + + .../serializer/cbor/internal/modes/custom.go | 422 ++ + .../serializer/cbor/internal/modes/decode.go | 158 + + .../cbor/internal/modes/diagnostic.go | 36 + + .../serializer/cbor/internal/modes/encode.go | 155 + + .../pkg/runtime/serializer/codec_factory.go | 149 +- + .../runtime/serializer/streaming/streaming.go | 20 - + .../k8s.io/apimachinery/pkg/runtime/types.go | 8 +- + vendor/k8s.io/apimachinery/pkg/types/patch.go | 4 +- + .../pkg/util/cache/lruexpirecache.go | 13 + + .../apimachinery/pkg/util/framer/framer.go | 18 +- + .../pkg/util/httpstream/httpstream.go | 30 + + .../pkg/util/httpstream/spdy/roundtripper.go | 55 +- + .../pkg/util/httpstream/wsstream/conn.go | 138 +- + .../pkg/util/httpstream/wsstream/doc.go | 52 +- + .../pkg/util/intstr/generated.pb.go | 47 +- + .../apimachinery/pkg/util/intstr/intstr.go | 32 +- + .../pkg/util/managedfields/fieldmanager.go | 7 +- + .../managedfields/internal/structuredmerge.go | 26 +- + .../managedfields/internal/typeconverter.go | 14 +- + .../pkg/util/managedfields/node.yaml | 2 +- + .../pkg/util/portforward/constants.go | 24 + + .../apimachinery/pkg/util/proxy/dial.go | 122 + + .../k8s.io/apimachinery/pkg/util/proxy/doc.go | 18 + + .../apimachinery/pkg/util/proxy/transport.go | 272 + + .../pkg/util/proxy/upgradeaware.go | 558 ++ + .../pkg/util/remotecommand/constants.go | 14 + + .../apimachinery/pkg/util/runtime/runtime.go | 135 +- + .../k8s.io/apimachinery/pkg/util/sets/doc.go | 2 +- + .../apimachinery/pkg/util/sets/ordered.go | 53 - + .../k8s.io/apimachinery/pkg/util/sets/set.go | 17 +- + .../pkg/util/strategicpatch/meta.go | 89 + + .../pkg/util/strategicpatch/patch.go | 4 + + .../apimachinery/pkg/util/validation/OWNERS | 11 + + .../pkg/util/validation/field/errors.go | 30 +- + .../pkg/util/validation/validation.go | 75 +- + .../apimachinery/pkg/util/version/version.go | 154 + + .../k8s.io/apimachinery/pkg/util/wait/loop.go | 38 +- + vendor/k8s.io/apimachinery/pkg/watch/watch.go | 40 +- + vendor/k8s.io/klog/v2/klog.go | 76 +- + .../kube-openapi/pkg/builder3/openapi.go | 22 +- + .../k8s.io/kube-openapi/pkg/cached/cache.go | 268 +- + .../k8s.io/kube-openapi/pkg/common/common.go | 41 +- + .../kube-openapi/pkg/handler/handler.go | 55 +- + .../kube-openapi/pkg/handler3/handler.go | 77 +- + .../k8s.io/kube-openapi/pkg/internal/flags.go | 1 + + .../kube-openapi/pkg/openapiconv/convert.go | 322 - + .../k8s.io/kube-openapi/pkg/schemaconv/smd.go | 3 - + .../k8s.io/kube-openapi/pkg/spec3/encoding.go | 21 + + .../k8s.io/kube-openapi/pkg/spec3/example.go | 14 + + .../pkg/spec3/external_documentation.go | 13 + + vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go | 27 + + .../k8s.io/kube-openapi/pkg/spec3/header.go | 31 + + .../kube-openapi/pkg/spec3/media_type.go | 20 + + .../kube-openapi/pkg/spec3/operation.go | 27 + + .../kube-openapi/pkg/spec3/parameter.go | 31 + + vendor/k8s.io/kube-openapi/pkg/spec3/path.go | 47 +- + .../kube-openapi/pkg/spec3/request_body.go | 21 + + .../k8s.io/kube-openapi/pkg/spec3/response.go | 52 + + .../kube-openapi/pkg/spec3/security_scheme.go | 17 + + .../k8s.io/kube-openapi/pkg/spec3/server.go | 26 + + vendor/k8s.io/kube-openapi/pkg/spec3/spec.go | 25 + + .../kube-openapi/pkg/util/proto/document.go | 2 +- + .../kube-openapi/pkg/validation/spec/fuzz.go | 502 -- + .../kubernetes/pkg/securitycontext/util.go | 3 +- + .../test/e2e/storage/utils/create.go | 4 + + .../storage-csi/external-attacher/rbac.yaml | 4 +- + .../rbac.yaml | 4 +- + .../external-provisioner/rbac.yaml | 14 +- + .../storage-csi/external-resizer/rbac.yaml | 10 +- + .../csi-snapshotter/rbac-csi-snapshotter.yaml | 20 +- + .../storage-csi/hostpath/README.md | 2 +- + .../hostpath/csi-hostpath-driverinfo.yaml | 3 + + .../hostpath/csi-hostpath-plugin.yaml | 20 +- + .../hostpath/csi-hostpath-testing.yaml | 6 +- + .../mock/csi-mock-driver-attacher.yaml | 2 +- + .../mock/csi-mock-driver-resizer.yaml | 2 +- + .../mock/csi-mock-driver-snapshotter.yaml | 2 +- + .../storage-csi/mock/csi-mock-driver.yaml | 6 +- + .../storage-csi/mock/csi-mock-proxy.yaml | 6 +- + .../storage-csi/update-hostpath.sh | 2 +- + .../kubernetes/test/utils/image/manifest.go | 2 +- + .../k8s.io/utils/clock/testing/fake_clock.go | 25 +- + vendor/k8s.io/utils/integer/integer.go | 26 +- + vendor/k8s.io/utils/lru/lru.go | 12 + + vendor/k8s.io/utils/net/multi_listen.go | 195 + + vendor/k8s.io/utils/strings/slices/slices.go | 82 - + vendor/k8s.io/utils/trace/trace.go | 2 +- + vendor/modules.txt | 96 +- + vendor/sigs.k8s.io/json/Makefile | 2 +- + vendor/sigs.k8s.io/json/OWNERS | 2 +- + .../internal/golang/encoding/json/decode.go | 140 +- + .../internal/golang/encoding/json/encode.go | 490 +- + .../internal/golang/encoding/json/fold.go | 150 +- + .../internal/golang/encoding/json/indent.go | 119 +- + .../internal/golang/encoding/json/scanner.go | 4 +- + .../internal/golang/encoding/json/stream.go | 41 +- + .../v4/fieldpath/pathelementmap.go | 45 +- + .../structured-merge-diff/v4/fieldpath/set.go | 277 + + .../v4/merge/conflict.go | 2 +- + .../structured-merge-diff/v4/merge/update.go | 134 +- + .../v4/schema/elements.go | 3 +- + .../v4/schema/schemaschema.go | 3 +- + .../structured-merge-diff/v4/typed/compare.go | 470 ++ + .../structured-merge-diff/v4/typed/helpers.go | 21 +- + .../structured-merge-diff/v4/typed/merge.go | 61 +- + .../structured-merge-diff/v4/typed/parser.go | 14 +- + .../structured-merge-diff/v4/typed/remove.go | 4 +- + .../v4/typed/tofieldset.go | 24 +- + .../structured-merge-diff/v4/typed/typed.go | 232 +- + .../structured-merge-diff/v4/typed/union.go | 276 - + .../v4/typed/validate.go | 14 +- + .../v4/value/mapreflect.go | 2 +- + .../v4/value/mapunstructured.go | 8 +- + .../v4/value/reflectcache.go | 67 +- + .../structured-merge-diff/v4/value/scalar.go | 2 +- + .../structured-merge-diff/v4/value/value.go | 2 +- + 517 files changed, 34469 insertions(+), 13700 deletions(-) + create mode 100644 vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_ce.go + create mode 100644 vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_csepro.go + create mode 100644 vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_ee.go + create mode 100644 vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_se.go + create mode 100644 vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_seplus.go + create mode 100644 vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/feature.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/.gitignore + create mode 100644 vendor/github.com/fxamacker/cbor/v2/.golangci.yml + create mode 100644 vendor/github.com/fxamacker/cbor/v2/CODE_OF_CONDUCT.md + create mode 100644 vendor/github.com/fxamacker/cbor/v2/CONTRIBUTING.md + create mode 100644 vendor/github.com/fxamacker/cbor/v2/LICENSE + create mode 100644 vendor/github.com/fxamacker/cbor/v2/README.md + create mode 100644 vendor/github.com/fxamacker/cbor/v2/SECURITY.md + create mode 100644 vendor/github.com/fxamacker/cbor/v2/bytestring.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/cache.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/common.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/decode.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/diagnose.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/doc.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/encode.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/encode_map.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/encode_map_go117.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/simplevalue.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/stream.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/structfields.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/tag.go + create mode 100644 vendor/github.com/fxamacker/cbor/v2/valid.go + create mode 100644 vendor/github.com/go-openapi/jsonpointer/.golangci.yml + create mode 100644 vendor/github.com/go-openapi/swag/BENCHMARK.md + create mode 100644 vendor/github.com/go-openapi/swag/initialism_index.go + delete mode 100644 vendor/github.com/go-openapi/swag/post_go18.go + delete mode 100644 vendor/github.com/go-openapi/swag/post_go19.go + delete mode 100644 vendor/github.com/go-openapi/swag/pre_go18.go + delete mode 100644 vendor/github.com/go-openapi/swag/pre_go19.go + create mode 100644 vendor/github.com/go-openapi/swag/string_bytes.go + create mode 100644 vendor/github.com/mxk/go-flowrate/LICENSE + create mode 100644 vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go + create mode 100644 vendor/github.com/mxk/go-flowrate/flowrate/io.go + create mode 100644 vendor/github.com/mxk/go-flowrate/flowrate/util.go + create mode 100644 vendor/github.com/onsi/ginkgo/v2/Makefile + create mode 100644 vendor/github.com/x448/float16/.travis.yml + create mode 100644 vendor/github.com/x448/float16/LICENSE + create mode 100644 vendor/github.com/x448/float16/README.md + create mode 100644 vendor/github.com/x448/float16/float16.go + rename vendor/golang.org/x/crypto/chacha20/{chacha_ppc64le.go => chacha_ppc64x.go} (89%) + rename vendor/golang.org/x/crypto/chacha20/{chacha_ppc64le.s => chacha_ppc64x.s} (76%) + delete mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519_compat.go + delete mode 100644 vendor/golang.org/x/crypto/curve25519/curve25519_go120.go + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/README + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe.go + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint + delete mode 100644 vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh + rename vendor/golang.org/x/crypto/internal/poly1305/{sum_ppc64le.go => sum_ppc64x.go} (95%) + rename vendor/golang.org/x/crypto/internal/poly1305/{sum_ppc64le.s => sum_ppc64x.s} (89%) + create mode 100644 vendor/golang.org/x/net/html/iter.go + create mode 100644 vendor/golang.org/x/net/http2/config.go + create mode 100644 vendor/golang.org/x/net/http2/config_go124.go + create mode 100644 vendor/golang.org/x/net/http2/config_pre_go124.go + delete mode 100644 vendor/golang.org/x/net/http2/testsync.go + create mode 100644 vendor/golang.org/x/net/http2/timer.go + create mode 100644 vendor/golang.org/x/net/http2/unencrypted.go + create mode 100644 vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s + create mode 100644 vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go + rename vendor/golang.org/x/sys/cpu/{cpu_x86.s => cpu_gc_x86.s} (94%) + create mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go + create mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_x86.go + create mode 100644 vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go + create mode 100644 vendor/golang.org/x/sys/unix/bpxsvc_zos.go + create mode 100644 vendor/golang.org/x/sys/unix/bpxsvc_zos.s + delete mode 100644 vendor/golang.org/x/sys/unix/epoll_zos.go + delete mode 100644 vendor/golang.org/x/sys/unix/fstatfs_zos.go + create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_zos.go + create mode 100644 vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s + create mode 100644 vendor/golang.org/x/sys/unix/vgetrandom_linux.go + create mode 100644 vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go + create mode 100644 vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s + delete mode 100644 vendor/golang.org/x/sys/windows/empty.s + create mode 100644 vendor/golang.org/x/tools/go/ast/inspector/iter.go + delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go + create mode 100644 vendor/google.golang.org/protobuf/internal/impl/equal.go + delete mode 100644 vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go + delete mode 100644 vendor/google.golang.org/protobuf/internal/strs/strings_pure.go + delete mode 100644 vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS + create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/buffers.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/custom.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/decode.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/diagnostic.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/util/proxy/doc.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go + delete mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go + create mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS + delete mode 100644 vendor/k8s.io/kube-openapi/pkg/openapiconv/convert.go + delete mode 100644 vendor/k8s.io/kube-openapi/pkg/validation/spec/fuzz.go + create mode 100644 vendor/k8s.io/utils/net/multi_listen.go + delete mode 100644 vendor/k8s.io/utils/strings/slices/slices.go + create mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/typed/compare.go + delete mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v4/typed/union.go + +diff --git a/go.mod b/go.mod +index c8e28ec8..4b8882fb 100644 +--- a/go.mod ++++ b/go.mod +@@ -1,31 +1,40 @@ + module github.com/kubernetes-csi/csi-driver-nfs + +-go 1.23.0 ++go 1.23.4 + +-toolchain go1.23.1 ++toolchain go1.23.6 + + require ( + github.com/container-storage-interface/spec v1.8.0 ++ github.com/deckhouse/csi-nfs/lib/go/common v0.0.0-20250213115525-4785a9da80db + github.com/kubernetes-csi/csi-lib-utils v0.9.0 +- github.com/onsi/ginkgo/v2 v2.17.2 +- github.com/onsi/gomega v1.33.0 ++ github.com/onsi/ginkgo/v2 v2.21.0 ++ github.com/onsi/gomega v1.35.1 + github.com/pborman/uuid v1.2.1 + github.com/stretchr/testify v1.9.0 +- golang.org/x/net v0.33.0 ++ golang.org/x/net v0.34.0 + google.golang.org/grpc v1.63.2 +- google.golang.org/protobuf v1.34.0 ++ google.golang.org/protobuf v1.35.1 + k8s.io/api v0.28.9 +- k8s.io/apimachinery v0.28.9 ++ k8s.io/apimachinery v0.32.0 + k8s.io/client-go v0.28.9 +- k8s.io/klog/v2 v2.120.1 ++ k8s.io/klog/v2 v2.130.1 + k8s.io/kubernetes v1.28.12 + k8s.io/mount-utils v0.29.4 + k8s.io/pod-security-admission v0.0.0 +- k8s.io/utils v0.0.0-20230726121419-3b25d923346b ++ k8s.io/utils v0.0.0-20241210054802-24370beab758 + sigs.k8s.io/cloud-provider-azure v1.28.9 + sigs.k8s.io/yaml v1.4.0 + ) + ++replace github.com/deckhouse/csi-nfs/lib/go/common => ../csi-nfs/lib/go/common ++ ++require ( ++ github.com/fxamacker/cbor/v2 v2.7.0 // indirect ++ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect ++ github.com/x448/float16 v0.8.4 // indirect ++) ++ + require ( + github.com/NYTimes/gziphandler v1.1.1 // indirect + github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect +@@ -36,17 +45,17 @@ require ( + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect + github.com/coreos/go-systemd/v22 v22.5.0 // indirect +- github.com/davecgh/go-spew v1.1.1 // indirect ++ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect +- github.com/emicklei/go-restful/v3 v3.9.0 // indirect ++ github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/evanphx/json-patch v5.9.0+incompatible // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect +- github.com/go-logr/logr v1.4.1 // indirect ++ github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect +- github.com/go-openapi/jsonpointer v0.19.6 // indirect ++ github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect +- github.com/go-openapi/swag v0.22.3 // indirect ++ github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect +@@ -55,7 +64,7 @@ require ( + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect +- github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect ++ github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect +@@ -65,7 +74,7 @@ require ( + github.com/json-iterator/go v1.1.12 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect +- github.com/moby/spdystream v0.2.0 // indirect ++ github.com/moby/spdystream v0.5.0 // indirect + github.com/moby/sys/mountinfo v0.6.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect +@@ -73,7 +82,7 @@ require ( + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/selinux v1.10.0 // indirect + github.com/pkg/errors v0.9.1 // indirect +- github.com/pmezard/go-difflib v1.0.0 // indirect ++ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.44.0 // indirect +@@ -96,16 +105,16 @@ require ( + go.uber.org/atomic v1.10.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.19.0 // indirect +- golang.org/x/crypto v0.31.0 // indirect ++ golang.org/x/crypto v0.32.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/mod v0.22.0 + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sync v0.10.0 // indirect +- golang.org/x/sys v0.28.0 // indirect +- golang.org/x/term v0.27.0 // indirect ++ golang.org/x/sys v0.29.0 ++ golang.org/x/term v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect +- golang.org/x/time v0.3.0 // indirect +- golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect ++ golang.org/x/time v0.7.0 // indirect ++ golang.org/x/tools v0.26.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect +@@ -121,12 +130,12 @@ require ( + k8s.io/component-helpers v0.28.9 // indirect + k8s.io/controller-manager v0.28.9 // indirect + k8s.io/kms v0.28.9 // indirect +- k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect ++ k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + k8s.io/kubectl v0.0.0 // indirect + k8s.io/kubelet v0.28.9 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect +- sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect +- sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ++ sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect ++ sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect + ) + + replace ( +diff --git a/go.sum b/go.sum +index 1566701e..ff671294 100644 +--- a/go.sum ++++ b/go.sum +@@ -95,8 +95,9 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV + github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= + github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= + github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= + github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= ++github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= ++github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= + github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= + github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= + github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +@@ -106,8 +107,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp + github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= + github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= + github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +-github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +-github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= ++github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= ++github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= + github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= + github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= + github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +@@ -123,6 +124,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo + github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= + github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= + github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= ++github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= ++github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= + github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= + github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= + github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +@@ -132,22 +135,24 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V + github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= + github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= + github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +-github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +-github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= ++github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= ++github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= + github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= + github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= + github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= + github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= + github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +-github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= + github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= ++github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= ++github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= + github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= + github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= + github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= + github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= + github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +-github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= + github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= ++github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= ++github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= + github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= + github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= + github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +@@ -207,8 +212,8 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi + github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= + github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= + github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +-github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +-github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= ++github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= ++github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= + github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= + github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= + github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +@@ -272,8 +277,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= + github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= + github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +-github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= +-github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= ++github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU= ++github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= + github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= + github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= + github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +@@ -288,16 +293,17 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= + github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= ++github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= + github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= + github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= + github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +-github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= +-github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= ++github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= ++github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= + github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= + github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +-github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= +-github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= ++github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= ++github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= + github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= + github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= + github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= +@@ -309,8 +315,9 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE + github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= + github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= + github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= + github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= ++github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= ++github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= + github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= + github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= + github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +@@ -332,8 +339,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O + github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= + github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= + github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +-github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +-github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= ++github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= ++github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= + github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= + github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= + github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +@@ -367,6 +374,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT + github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= + github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= + github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= ++github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= ++github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= + github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= + github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= + github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +@@ -431,8 +440,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U + golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= + golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +-golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +-golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= ++golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= ++golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= + golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= + golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= + golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +@@ -480,8 +489,8 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R + golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= + golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= + golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +-golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +-golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= ++golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= ++golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= + 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-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +@@ -524,12 +533,12 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w + golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= + golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +-golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +-golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= ++golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= ++golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= + 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.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +-golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= ++golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= ++golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= + 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.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +@@ -541,8 +550,8 @@ golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= + 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-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +-golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +-golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= ++golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= ++golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= + golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= + golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= + golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +@@ -568,8 +577,8 @@ golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapK + golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= + golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= + golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +-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/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= ++golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= + 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +@@ -623,8 +632,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD + google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= + google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= + google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +-google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +-google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= ++google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= ++google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= + gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= + gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +@@ -662,8 +671,8 @@ k8s.io/api v0.28.9/go.mod h1:AnCsDYf3SHjfa8mPG5LGYf+iF4mie+3peLQR51MMCgw= + k8s.io/apiextensions-apiserver v0.28.9 h1:yzPHp+4IASHeu7XIPkAKJrY4UjWdjiAjOcQMd6oNKj0= + k8s.io/apiextensions-apiserver v0.28.9/go.mod h1:Rjhvq5y3JESdZgV2UOByldyefCfRrUguVpBLYOAIbVs= + k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +-k8s.io/apimachinery v0.28.9 h1:aXz4Zxsw+Pk4KhBerAtKRxNN1uSMWKfciL/iOdBfXvA= +-k8s.io/apimachinery v0.28.9/go.mod h1:zUG757HaKs6Dc3iGtKjzIpBfqTM4yiRsEe3/E7NX15o= ++k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= ++k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= + k8s.io/apiserver v0.28.9 h1:koPXvgSXRBDxKJQjJGdZNgPsT9lQv6scJJFipd1m86E= + k8s.io/apiserver v0.28.9/go.mod h1:D51I37WBZojJhmLcjNVE4GSVrjiUHP+yq+N5KvKn2wY= + k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= +@@ -683,13 +692,13 @@ k8s.io/csi-translation-lib v0.28.9/go.mod h1:eOniPQitdkuyVh+gtktg3yeDJQu/IidIUSM + k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= + k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= + k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +-k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +-k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= ++k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= ++k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= + k8s.io/kms v0.28.9 h1:ApCWJulBl+uFRTr2jtTpG1lffmqqMuLnOH/RUbtO4UY= + k8s.io/kms v0.28.9/go.mod h1:VgyAIRMFqZX9lHyixecU/JTI0wnPD1wCIlquvlXRJ+Y= + k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +-k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +-k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= ++k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= ++k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= + k8s.io/kubectl v0.28.9 h1:FTf/aapuuFxPmt8gYUeqUmcsgG0gKC2ei6n+TO5sGOw= + k8s.io/kubectl v0.28.9/go.mod h1:ip/zTUr1MM/H2M+YbPHnSKLt0x6kb85SJtRSjwEGDfs= + k8s.io/kubelet v0.28.9 h1:76v00fFLeniz27kXhGGUIxONdwa9LKcD2Jd5cXYAZko= +@@ -701,18 +710,18 @@ k8s.io/mount-utils v0.29.4/go.mod h1:SHUMR9n3b6tLgEmlyT36cL6fV6Sjwa5CJhc0guCXvb0 + k8s.io/pod-security-admission v0.28.9 h1:towoNqSp7aU7gF8T89zftCuQUfliyib3ds20Kz/hysg= + k8s.io/pod-security-admission v0.28.9/go.mod h1:mfEhECQ+AvP+zehqxemSq1pDL4YLoWCP7liL0YmkpZY= + k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +-k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +-k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= ++k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= ++k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= + rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0= + sigs.k8s.io/cloud-provider-azure v1.28.9 h1:OAF8cQubrNUEiMNbnDFowRl6jciWTt3DqI9FhWGcnpE= + sigs.k8s.io/cloud-provider-azure v1.28.9/go.mod h1:63ByXruYF4XWLdOIRxtSz6RYel5PpdKRsCPKIj4Io58= +-sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +-sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= ++sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= ++sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= + sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +-sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +-sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= ++sigs.k8s.io/structured-merge-diff/v4 v4.5.0 h1:nbCitCK2hfnhyiKo6uf2HxUPTCodY6Qaf85SbDIaMBk= ++sigs.k8s.io/structured-merge-diff/v4 v4.5.0/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= + sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= + sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= + sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +diff --git a/pkg/nfs/controllerserver.go b/pkg/nfs/controllerserver.go +index d8af15da..a78f5110 100644 +--- a/pkg/nfs/controllerserver.go ++++ b/pkg/nfs/controllerserver.go +@@ -258,11 +258,23 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol + return nil, status.Errorf(codes.Internal, "archive subdirectory(%s, %s) failed with %v", internalVolumePath, archivedInternalVolumePath, err.Error()) + } + } else { +- // delete subdirectory under base-dir +- klog.V(2).Infof("removing subdirectory at %v", internalVolumePath) +- if err = os.RemoveAll(internalVolumePath); err != nil { +- return nil, status.Errorf(codes.Internal, "delete subdirectory(%s) failed with %v", internalVolumePath, err.Error()) ++ volumeCleanupMethod, volumeCleanupEnabled, err := getVolumeCleanupMethod(req.GetSecrets()) ++ if err != nil { ++ return nil, status.Errorf(codes.Internal, "failed to get volume cleanup method: %v", err.Error()) ++ } ++ ++ if volumeCleanupEnabled { ++ err = cleanupVolume(internalVolumePath, volumeCleanupMethod) ++ if err != nil { ++ return nil, status.Errorf(codes.Internal, "Volume cleanup failed with %v", err.Error()) ++ } + } ++ ++ // delete subdirectory under base-dir ++ // klog.V(2).Infof("removing subdirectory at %v", internalVolumePath) ++ // if err = os.RemoveAll(internalVolumePath); err != nil { ++ // return nil, status.Errorf(codes.Internal, "delete subdirectory(%s) failed with %v", internalVolumePath, err.Error()) ++ // } + } + } else { + klog.V(2).Infof("DeleteVolume: volume(%s) is set to retain, not deleting/archiving subdirectory", volumeID) +diff --git a/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_ce.go b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_ce.go +new file mode 100644 +index 00000000..0aed5d9a +--- /dev/null ++++ b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_ce.go +@@ -0,0 +1,23 @@ ++//go:build ce ++ ++/* ++Copyright 2025 Flant JSC ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package feature ++ ++const ( ++ tlsEnabled = false ++ volumeCleanupEnabled = false ++) +diff --git a/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_csepro.go b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_csepro.go +new file mode 100644 +index 00000000..c4107cf1 +--- /dev/null ++++ b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_csepro.go +@@ -0,0 +1,14 @@ ++//go:build csepro ++ ++/* ++Copyright 2025 Flant JSC ++Licensed under the Deckhouse Platform Enterprise Edition (EE) license. ++See https://github.com/deckhouse/deckhouse/blob/main/ee/LICENSE ++*/ ++ ++package feature ++ ++const ( ++ tlsEnabled = true ++ volumeCleanupEnabled = true ++) +diff --git a/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_ee.go b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_ee.go +new file mode 100644 +index 00000000..9ca7f617 +--- /dev/null ++++ b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_ee.go +@@ -0,0 +1,14 @@ ++//go:build ee ++ ++/* ++Copyright 2025 Flant JSC ++Licensed under the Deckhouse Platform Enterprise Edition (EE) license. ++See https://github.com/deckhouse/deckhouse/blob/main/ee/LICENSE ++*/ ++ ++package feature ++ ++const ( ++ tlsEnabled = true ++ volumeCleanupEnabled = true ++) +diff --git a/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_se.go b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_se.go +new file mode 100644 +index 00000000..c33f7762 +--- /dev/null ++++ b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_se.go +@@ -0,0 +1,14 @@ ++//go:build se ++ ++/* ++Copyright 2025 Flant JSC ++Licensed under the Deckhouse Platform Enterprise Edition (EE) license. ++See https://github.com/deckhouse/deckhouse/blob/main/ee/LICENSE ++*/ ++ ++package feature ++ ++const ( ++ tlsEnabled = true ++ volumeCleanupEnabled = false ++) +diff --git a/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_seplus.go b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_seplus.go +new file mode 100644 +index 00000000..8169caac +--- /dev/null ++++ b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/const_seplus.go +@@ -0,0 +1,14 @@ ++//go:build seplus ++ ++/* ++Copyright 2025 Flant JSC ++Licensed under the Deckhouse Platform Enterprise Edition (EE) license. ++See https://github.com/deckhouse/deckhouse/blob/main/ee/LICENSE ++*/ ++ ++package feature ++ ++const ( ++ tlsEnabled = true ++ volumeCleanupEnabled = false ++) +diff --git a/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/feature.go b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/feature.go +new file mode 100644 +index 00000000..911c969b +--- /dev/null ++++ b/vendor/github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature/feature.go +@@ -0,0 +1,24 @@ ++/* ++Copyright 2025 Flant JSC ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package feature ++ ++func TLSEnabled() bool { ++ return tlsEnabled ++} ++ ++func VolumeCleanupEnabled() bool { ++ return volumeCleanupEnabled ++} +diff --git a/vendor/github.com/emicklei/go-restful/v3/CHANGES.md b/vendor/github.com/emicklei/go-restful/v3/CHANGES.md +index 74a37815..5edd5a7c 100644 +--- a/vendor/github.com/emicklei/go-restful/v3/CHANGES.md ++++ b/vendor/github.com/emicklei/go-restful/v3/CHANGES.md +@@ -1,10 +1,30 @@ + # Change history of go-restful + +-## [v3.9.0] - 20221-07-21 ++## [v3.11.0] - 2023-08-19 ++ ++- restored behavior as <= v3.9.0 with option to change path strategy using TrimRightSlashEnabled. ++ ++## [v3.10.2] - 2023-03-09 - DO NOT USE ++ ++- introduced MergePathStrategy to be able to revert behaviour of path concatenation to 3.9.0 ++ see comment in Readme how to customize this behaviour. ++ ++## [v3.10.1] - 2022-11-19 - DO NOT USE ++ ++- fix broken 3.10.0 by using path package for joining paths ++ ++## [v3.10.0] - 2022-10-11 - BROKEN ++ ++- changed tokenizer to match std route match behavior; do not trimright the path (#511) ++- Add MIME_ZIP (#512) ++- Add MIME_ZIP and HEADER_ContentDisposition (#513) ++- Changed how to get query parameter issue #510 ++ ++## [v3.9.0] - 2022-07-21 + + - add support for http.Handler implementations to work as FilterFunction, issue #504 (thanks to https://github.com/ggicci) + +-## [v3.8.0] - 20221-06-06 ++## [v3.8.0] - 2022-06-06 + + - use exact matching of allowed domain entries, issue #489 (#493) + - this changes fixes [security] Authorization Bypass Through User-Controlled Key +diff --git a/vendor/github.com/emicklei/go-restful/v3/README.md b/vendor/github.com/emicklei/go-restful/v3/README.md +index 0625359d..e3e30080 100644 +--- a/vendor/github.com/emicklei/go-restful/v3/README.md ++++ b/vendor/github.com/emicklei/go-restful/v3/README.md +@@ -79,7 +79,7 @@ func (u UserResource) findUser(request *restful.Request, response *restful.Respo + - Content encoding (gzip,deflate) of request and response payloads + - Automatic responses on OPTIONS (using a filter) + - Automatic CORS request handling (using a filter) +-- API declaration for Swagger UI ([go-restful-openapi](https://github.com/emicklei/go-restful-openapi), see [go-restful-swagger12](https://github.com/emicklei/go-restful-swagger12)) ++- API declaration for Swagger UI ([go-restful-openapi](https://github.com/emicklei/go-restful-openapi)) + - Panic recovery to produce HTTP 500, customizable using RecoverHandler(...) + - Route errors produce HTTP 404/405/406/415 errors, customizable using ServiceErrorHandler(...) + - Configurable (trace) logging +@@ -96,6 +96,7 @@ There are several hooks to customize the behavior of the go-restful package. + - Compression + - Encoders for other serializers + - Use [jsoniter](https://github.com/json-iterator/go) by building this package using a build tag, e.g. `go build -tags=jsoniter .` ++- Use the package variable `TrimRightSlashEnabled` (default true) to control the behavior of matching routes that end with a slash `/` + + ## Resources + +@@ -108,4 +109,4 @@ There are several hooks to customize the behavior of the go-restful package. + + Type ```git shortlog -s``` for a full list of contributors. + +-© 2012 - 2022, http://ernestmicklei.com. MIT License. Contributions are welcome. ++© 2012 - 2023, http://ernestmicklei.com. MIT License. Contributions are welcome. +diff --git a/vendor/github.com/emicklei/go-restful/v3/constants.go b/vendor/github.com/emicklei/go-restful/v3/constants.go +index 203439c5..2328bde6 100644 +--- a/vendor/github.com/emicklei/go-restful/v3/constants.go ++++ b/vendor/github.com/emicklei/go-restful/v3/constants.go +@@ -7,12 +7,14 @@ package restful + const ( + MIME_XML = "application/xml" // Accept or Content-Type used in Consumes() and/or Produces() + MIME_JSON = "application/json" // Accept or Content-Type used in Consumes() and/or Produces() ++ MIME_ZIP = "application/zip" // Accept or Content-Type used in Consumes() and/or Produces() + MIME_OCTET = "application/octet-stream" // If Content-Type is not present in request, use the default + + HEADER_Allow = "Allow" + HEADER_Accept = "Accept" + HEADER_Origin = "Origin" + HEADER_ContentType = "Content-Type" ++ HEADER_ContentDisposition = "Content-Disposition" + HEADER_LastModified = "Last-Modified" + HEADER_AcceptEncoding = "Accept-Encoding" + HEADER_ContentEncoding = "Content-Encoding" +diff --git a/vendor/github.com/emicklei/go-restful/v3/request.go b/vendor/github.com/emicklei/go-restful/v3/request.go +index 5725a075..0020095e 100644 +--- a/vendor/github.com/emicklei/go-restful/v3/request.go ++++ b/vendor/github.com/emicklei/go-restful/v3/request.go +@@ -31,7 +31,8 @@ func NewRequest(httpRequest *http.Request) *Request { + // a "Unable to unmarshal content of type:" response is returned. + // Valid values are restful.MIME_JSON and restful.MIME_XML + // Example: +-// restful.DefaultRequestContentType(restful.MIME_JSON) ++// ++// restful.DefaultRequestContentType(restful.MIME_JSON) + func DefaultRequestContentType(mime string) { + defaultRequestContentType = mime + } +@@ -48,7 +49,7 @@ func (r *Request) PathParameters() map[string]string { + + // QueryParameter returns the (first) Query parameter value by its name + func (r *Request) QueryParameter(name string) string { +- return r.Request.FormValue(name) ++ return r.Request.URL.Query().Get(name) + } + + // QueryParameters returns the all the query parameters values by name +diff --git a/vendor/github.com/emicklei/go-restful/v3/response.go b/vendor/github.com/emicklei/go-restful/v3/response.go +index 8f0b56aa..a41a92cc 100644 +--- a/vendor/github.com/emicklei/go-restful/v3/response.go ++++ b/vendor/github.com/emicklei/go-restful/v3/response.go +@@ -109,6 +109,9 @@ func (r *Response) EntityWriter() (EntityReaderWriter, bool) { + if DefaultResponseMimeType == MIME_XML { + return entityAccessRegistry.accessorAt(MIME_XML) + } ++ if DefaultResponseMimeType == MIME_ZIP { ++ return entityAccessRegistry.accessorAt(MIME_ZIP) ++ } + // Fallback to whatever the route says it can produce. + // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + for _, each := range r.routeProduces { +diff --git a/vendor/github.com/emicklei/go-restful/v3/route.go b/vendor/github.com/emicklei/go-restful/v3/route.go +index 193f4a6b..306c44be 100644 +--- a/vendor/github.com/emicklei/go-restful/v3/route.go ++++ b/vendor/github.com/emicklei/go-restful/v3/route.go +@@ -40,7 +40,8 @@ type Route struct { + ParameterDocs []*Parameter + ResponseErrors map[int]ResponseError + DefaultResponse *ResponseError +- ReadSample, WriteSample interface{} // structs that model an example request or response payload ++ ReadSample, WriteSample interface{} // structs that model an example request or response payload ++ WriteSamples []interface{} // if more than one return types is possible (oneof) then this will contain multiple values + + // Extra information used to store custom information about the route. + Metadata map[string]interface{} +@@ -164,7 +165,13 @@ func tokenizePath(path string) []string { + if "/" == path { + return nil + } +- return strings.Split(strings.Trim(path, "/"), "/") ++ if TrimRightSlashEnabled { ++ // 3.9.0 ++ return strings.Split(strings.Trim(path, "/"), "/") ++ } else { ++ // 3.10.2 ++ return strings.Split(strings.TrimLeft(path, "/"), "/") ++ } + } + + // for debugging +@@ -176,3 +183,9 @@ func (r *Route) String() string { + func (r *Route) EnableContentEncoding(enabled bool) { + r.contentEncodingEnabled = &enabled + } ++ ++// TrimRightSlashEnabled controls whether ++// - path on route building is using path.Join ++// - the path of the incoming request is trimmed of its slash suffux. ++// Value of true matches the behavior of <= 3.9.0 ++var TrimRightSlashEnabled = true +diff --git a/vendor/github.com/emicklei/go-restful/v3/route_builder.go b/vendor/github.com/emicklei/go-restful/v3/route_builder.go +index 23641b6d..75168c12 100644 +--- a/vendor/github.com/emicklei/go-restful/v3/route_builder.go ++++ b/vendor/github.com/emicklei/go-restful/v3/route_builder.go +@@ -7,6 +7,7 @@ package restful + import ( + "fmt" + "os" ++ "path" + "reflect" + "runtime" + "strings" +@@ -30,27 +31,29 @@ type RouteBuilder struct { + typeNameHandleFunc TypeNameHandleFunction // required + + // documentation +- doc string +- notes string +- operation string +- readSample, writeSample interface{} +- parameters []*Parameter +- errorMap map[int]ResponseError +- defaultResponse *ResponseError +- metadata map[string]interface{} +- extensions map[string]interface{} +- deprecated bool +- contentEncodingEnabled *bool ++ doc string ++ notes string ++ operation string ++ readSample interface{} ++ writeSamples []interface{} ++ parameters []*Parameter ++ errorMap map[int]ResponseError ++ defaultResponse *ResponseError ++ metadata map[string]interface{} ++ extensions map[string]interface{} ++ deprecated bool ++ contentEncodingEnabled *bool + } + + // Do evaluates each argument with the RouteBuilder itself. + // This allows you to follow DRY principles without breaking the fluent programming style. + // Example: +-// ws.Route(ws.DELETE("/{name}").To(t.deletePerson).Do(Returns200, Returns500)) + // +-// func Returns500(b *RouteBuilder) { +-// b.Returns(500, "Internal Server Error", restful.ServiceError{}) +-// } ++// ws.Route(ws.DELETE("/{name}").To(t.deletePerson).Do(Returns200, Returns500)) ++// ++// func Returns500(b *RouteBuilder) { ++// b.Returns(500, "Internal Server Error", restful.ServiceError{}) ++// } + func (b *RouteBuilder) Do(oneArgBlocks ...func(*RouteBuilder)) *RouteBuilder { + for _, each := range oneArgBlocks { + each(b) +@@ -133,9 +136,9 @@ func (b RouteBuilder) ParameterNamed(name string) (p *Parameter) { + return p + } + +-// Writes tells what resource type will be written as the response payload. Optional. +-func (b *RouteBuilder) Writes(sample interface{}) *RouteBuilder { +- b.writeSample = sample ++// Writes tells which one of the resource types will be written as the response payload. Optional. ++func (b *RouteBuilder) Writes(samples ...interface{}) *RouteBuilder { ++ b.writeSamples = samples // oneof + return b + } + +@@ -340,19 +343,29 @@ func (b *RouteBuilder) Build() Route { + ResponseErrors: b.errorMap, + DefaultResponse: b.defaultResponse, + ReadSample: b.readSample, +- WriteSample: b.writeSample, ++ WriteSamples: b.writeSamples, + Metadata: b.metadata, + Deprecated: b.deprecated, + contentEncodingEnabled: b.contentEncodingEnabled, + allowedMethodsWithoutContentType: b.allowedMethodsWithoutContentType, + } ++ // set WriteSample if one specified ++ if len(b.writeSamples) == 1 { ++ route.WriteSample = b.writeSamples[0] ++ } + route.Extensions = b.extensions + route.postBuild() + return route + } + +-func concatPath(path1, path2 string) string { +- return strings.TrimRight(path1, "/") + "/" + strings.TrimLeft(path2, "/") ++// merge two paths using the current (package global) merge path strategy. ++func concatPath(rootPath, routePath string) string { ++ ++ if TrimRightSlashEnabled { ++ return strings.TrimRight(rootPath, "/") + "/" + strings.TrimLeft(routePath, "/") ++ } else { ++ return path.Join(rootPath, routePath) ++ } + } + + var anonymousFuncCount int32 +diff --git a/vendor/github.com/fxamacker/cbor/v2/.gitignore b/vendor/github.com/fxamacker/cbor/v2/.gitignore +new file mode 100644 +index 00000000..f1c181ec +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/.gitignore +@@ -0,0 +1,12 @@ ++# Binaries for programs and plugins ++*.exe ++*.exe~ ++*.dll ++*.so ++*.dylib ++ ++# Test binary, build with `go test -c` ++*.test ++ ++# Output of the go coverage tool, specifically when used with LiteIDE ++*.out +diff --git a/vendor/github.com/fxamacker/cbor/v2/.golangci.yml b/vendor/github.com/fxamacker/cbor/v2/.golangci.yml +new file mode 100644 +index 00000000..38cb9ae1 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/.golangci.yml +@@ -0,0 +1,104 @@ ++# Do not delete linter settings. Linters like gocritic can be enabled on the command line. ++ ++linters-settings: ++ depguard: ++ rules: ++ prevent_unmaintained_packages: ++ list-mode: strict ++ files: ++ - $all ++ - "!$test" ++ allow: ++ - $gostd ++ - github.com/x448/float16 ++ deny: ++ - pkg: io/ioutil ++ desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil" ++ dupl: ++ threshold: 100 ++ funlen: ++ lines: 100 ++ statements: 50 ++ goconst: ++ ignore-tests: true ++ min-len: 2 ++ min-occurrences: 3 ++ gocritic: ++ enabled-tags: ++ - diagnostic ++ - experimental ++ - opinionated ++ - performance ++ - style ++ disabled-checks: ++ - commentedOutCode ++ - dupImport # https://github.com/go-critic/go-critic/issues/845 ++ - ifElseChain ++ - octalLiteral ++ - paramTypeCombine ++ - whyNoLint ++ gofmt: ++ simplify: false ++ goimports: ++ local-prefixes: github.com/fxamacker/cbor ++ golint: ++ min-confidence: 0 ++ govet: ++ check-shadowing: true ++ lll: ++ line-length: 140 ++ maligned: ++ suggest-new: true ++ misspell: ++ locale: US ++ staticcheck: ++ checks: ["all"] ++ ++linters: ++ disable-all: true ++ enable: ++ - asciicheck ++ - bidichk ++ - depguard ++ - errcheck ++ - exportloopref ++ - goconst ++ - gocritic ++ - gocyclo ++ - gofmt ++ - goimports ++ - goprintffuncname ++ - gosec ++ - gosimple ++ - govet ++ - ineffassign ++ - misspell ++ - nilerr ++ - revive ++ - staticcheck ++ - stylecheck ++ - typecheck ++ - unconvert ++ - unused ++ ++issues: ++ # max-issues-per-linter default is 50. Set to 0 to disable limit. ++ max-issues-per-linter: 0 ++ # max-same-issues default is 3. Set to 0 to disable limit. ++ max-same-issues: 0 ++ ++ exclude-rules: ++ - path: decode.go ++ text: "string ` overflows ` has (\\d+) occurrences, make it a constant" ++ - path: decode.go ++ text: "string ` \\(range is \\[` has (\\d+) occurrences, make it a constant" ++ - path: decode.go ++ text: "string `, ` has (\\d+) occurrences, make it a constant" ++ - path: decode.go ++ text: "string ` overflows Go's int64` has (\\d+) occurrences, make it a constant" ++ - path: decode.go ++ text: "string `\\]\\)` has (\\d+) occurrences, make it a constant" ++ - path: valid.go ++ text: "string ` for type ` has (\\d+) occurrences, make it a constant" ++ - path: valid.go ++ text: "string `cbor: ` has (\\d+) occurrences, make it a constant" +diff --git a/vendor/github.com/fxamacker/cbor/v2/CODE_OF_CONDUCT.md b/vendor/github.com/fxamacker/cbor/v2/CODE_OF_CONDUCT.md +new file mode 100644 +index 00000000..c794b2b0 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/CODE_OF_CONDUCT.md +@@ -0,0 +1,133 @@ ++ ++# Contributor Covenant Code of Conduct ++ ++## Our Pledge ++ ++We as members, contributors, and leaders pledge to make participation in our ++community a harassment-free experience for everyone, regardless of age, body ++size, visible or invisible disability, ethnicity, sex characteristics, gender ++identity and expression, level of experience, education, socio-economic status, ++nationality, personal appearance, race, caste, color, religion, or sexual ++identity and orientation. ++ ++We pledge to act and interact in ways that contribute to an open, welcoming, ++diverse, inclusive, and healthy community. ++ ++## Our Standards ++ ++Examples of behavior that contributes to a positive environment for our ++community include: ++ ++* Demonstrating empathy and kindness toward other people ++* Being respectful of differing opinions, viewpoints, and experiences ++* Giving and gracefully accepting constructive feedback ++* Accepting responsibility and apologizing to those affected by our mistakes, ++ and learning from the experience ++* Focusing on what is best not just for us as individuals, but for the overall ++ community ++ ++Examples of unacceptable behavior include: ++ ++* The use of sexualized language or imagery, and sexual attention or advances of ++ any kind ++* Trolling, insulting or derogatory comments, and personal or political attacks ++* Public or private harassment ++* Publishing others' private information, such as a physical or email address, ++ without their explicit permission ++* Other conduct which could reasonably be considered inappropriate in a ++ professional setting ++ ++## Enforcement Responsibilities ++ ++Community leaders are responsible for clarifying and enforcing our standards of ++acceptable behavior and will take appropriate and fair corrective action in ++response to any behavior that they deem inappropriate, threatening, offensive, ++or harmful. ++ ++Community leaders have the right and responsibility to remove, edit, or reject ++comments, commits, code, wiki edits, issues, and other contributions that are ++not aligned to this Code of Conduct, and will communicate reasons for moderation ++decisions when appropriate. ++ ++## Scope ++ ++This Code of Conduct applies within all community spaces, and also applies when ++an individual is officially representing the community in public spaces. ++Examples of representing our community include using an official e-mail address, ++posting via an official social media account, or acting as an appointed ++representative at an online or offline event. ++ ++## Enforcement ++ ++Instances of abusive, harassing, or otherwise unacceptable behavior may be ++reported to the community leaders responsible for enforcement at ++faye.github@gmail.com. ++All complaints will be reviewed and investigated promptly and fairly. ++ ++All community leaders are obligated to respect the privacy and security of the ++reporter of any incident. ++ ++## Enforcement Guidelines ++ ++Community leaders will follow these Community Impact Guidelines in determining ++the consequences for any action they deem in violation of this Code of Conduct: ++ ++### 1. Correction ++ ++**Community Impact**: Use of inappropriate language or other behavior deemed ++unprofessional or unwelcome in the community. ++ ++**Consequence**: A private, written warning from community leaders, providing ++clarity around the nature of the violation and an explanation of why the ++behavior was inappropriate. A public apology may be requested. ++ ++### 2. Warning ++ ++**Community Impact**: A violation through a single incident or series of ++actions. ++ ++**Consequence**: A warning with consequences for continued behavior. No ++interaction with the people involved, including unsolicited interaction with ++those enforcing the Code of Conduct, for a specified period of time. This ++includes avoiding interactions in community spaces as well as external channels ++like social media. Violating these terms may lead to a temporary or permanent ++ban. ++ ++### 3. Temporary Ban ++ ++**Community Impact**: A serious violation of community standards, including ++sustained inappropriate behavior. ++ ++**Consequence**: A temporary ban from any sort of interaction or public ++communication with the community for a specified period of time. No public or ++private interaction with the people involved, including unsolicited interaction ++with those enforcing the Code of Conduct, is allowed during this period. ++Violating these terms may lead to a permanent ban. ++ ++### 4. Permanent Ban ++ ++**Community Impact**: Demonstrating a pattern of violation of community ++standards, including sustained inappropriate behavior, harassment of an ++individual, or aggression toward or disparagement of classes of individuals. ++ ++**Consequence**: A permanent ban from any sort of public interaction within the ++community. ++ ++## Attribution ++ ++This Code of Conduct is adapted from the [Contributor Covenant][homepage], ++version 2.1, available at ++[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. ++ ++Community Impact Guidelines were inspired by ++[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. ++ ++For answers to common questions about this code of conduct, see the FAQ at ++[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at ++[https://www.contributor-covenant.org/translations][translations]. ++ ++[homepage]: https://www.contributor-covenant.org ++[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html ++[Mozilla CoC]: https://github.com/mozilla/diversity ++[FAQ]: https://www.contributor-covenant.org/faq ++[translations]: https://www.contributor-covenant.org/translations +diff --git a/vendor/github.com/fxamacker/cbor/v2/CONTRIBUTING.md b/vendor/github.com/fxamacker/cbor/v2/CONTRIBUTING.md +new file mode 100644 +index 00000000..de0965e1 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/CONTRIBUTING.md +@@ -0,0 +1,41 @@ ++# How to contribute ++ ++You can contribute by using the library, opening issues, or opening pull requests. ++ ++## Bug reports and security vulnerabilities ++ ++Most issues are tracked publicly on [GitHub](https://github.com/fxamacker/cbor/issues). ++ ++To report security vulnerabilities, please email faye.github@gmail.com and allow time for the problem to be resolved before disclosing it to the public. For more info, see [Security Policy](https://github.com/fxamacker/cbor#security-policy). ++ ++Please do not send data that might contain personally identifiable information, even if you think you have permission. That type of support requires payment and a signed contract where I'm indemnified, held harmless, and defended by you for any data you send to me. ++ ++## Pull requests ++ ++Please [create an issue](https://github.com/fxamacker/cbor/issues/new/choose) before you begin work on a PR. The improvement may have already been considered, etc. ++ ++Pull requests have signing requirements and must not be anonymous. Exceptions are usually made for docs and CI scripts. ++ ++See the [Pull Request Template](https://github.com/fxamacker/cbor/blob/master/.github/pull_request_template.md) for details. ++ ++Pull requests have a greater chance of being approved if: ++- it does not reduce speed, increase memory use, reduce security, etc. for people not using the new option or feature. ++- it has > 97% code coverage. ++ ++## Describe your issue ++ ++Clearly describe the issue: ++* If it's a bug, please provide: **version of this library** and **Go** (`go version`), **unmodified error message**, and describe **how to reproduce it**. Also state **what you expected to happen** instead of the error. ++* If you propose a change or addition, try to give an example how the improved code could look like or how to use it. ++* If you found a compilation error, please confirm you're using a supported version of Go. If you are, then provide the output of `go version` first, followed by the complete error message. ++ ++## Please don't ++ ++Please don't send data containing personally identifiable information, even if you think you have permission. That type of support requires payment and a contract where I'm indemnified, held harmless, and defended for any data you send to me. ++ ++Please don't send CBOR data larger than 1024 bytes by email. If you want to send crash-producing CBOR data > 1024 bytes by email, please get my permission before sending it to me. ++ ++## Credits ++ ++- This guide used nlohmann/json contribution guidelines for inspiration as suggested in issue #22. ++- Special thanks to @lukseven for pointing out the contribution guidelines didn't mention signing requirements. +diff --git a/vendor/github.com/fxamacker/cbor/v2/LICENSE b/vendor/github.com/fxamacker/cbor/v2/LICENSE +new file mode 100644 +index 00000000..eaa85049 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/LICENSE +@@ -0,0 +1,21 @@ ++MIT License ++ ++Copyright (c) 2019-present Faye Amacker ++ ++Permission is hereby granted, free of charge, to any person obtaining a copy ++of this software and associated documentation files (the "Software"), to deal ++in the Software without restriction, including without limitation the rights ++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++copies of the Software, and to permit persons to whom the Software is ++furnished to do so, subject to the following conditions: ++ ++The above copyright notice and this permission notice shall be included in all ++copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++SOFTWARE. +\ No newline at end of file +diff --git a/vendor/github.com/fxamacker/cbor/v2/README.md b/vendor/github.com/fxamacker/cbor/v2/README.md +new file mode 100644 +index 00000000..af0a7950 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/README.md +@@ -0,0 +1,691 @@ ++# CBOR Codec in Go ++ ++ ++ ++[fxamacker/cbor](https://github.com/fxamacker/cbor) is a library for encoding and decoding [CBOR](https://www.rfc-editor.org/info/std94) and [CBOR Sequences](https://www.rfc-editor.org/rfc/rfc8742.html). ++ ++CBOR is a [trusted alternative](https://www.rfc-editor.org/rfc/rfc8949.html#name-comparison-of-other-binary-) to JSON, MessagePack, Protocol Buffers, etc.  CBOR is an Internet Standard defined by [IETF STD 94 (RFC 8949)](https://www.rfc-editor.org/info/std94) and is designed to be relevant for decades. ++ ++`fxamacker/cbor` is used in projects by Arm Ltd., Cisco, EdgeX Foundry, Flow Foundation, Fraunhofer‑AISEC, Kubernetes, Let's Encrypt (ISRG), Linux Foundation, Microsoft, Mozilla, Oasis Protocol, Tailscale, Teleport, [etc](https://github.com/fxamacker/cbor#who-uses-fxamackercbor). ++ ++See [Quick Start](#quick-start) and [Releases](https://github.com/fxamacker/cbor/releases/). 🆕 `UnmarshalFirst` and `DiagnoseFirst` can decode CBOR Sequences. `cbor.MarshalToBuffer()` and `UserBufferEncMode` accepts user-specified buffer. ++ ++## fxamacker/cbor ++ ++[![](https://github.com/fxamacker/cbor/workflows/ci/badge.svg)](https://github.com/fxamacker/cbor/actions?query=workflow%3Aci) ++[![](https://github.com/fxamacker/cbor/workflows/cover%20%E2%89%A596%25/badge.svg)](https://github.com/fxamacker/cbor/actions?query=workflow%3A%22cover+%E2%89%A596%25%22) ++[![CodeQL](https://github.com/fxamacker/cbor/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/fxamacker/cbor/actions/workflows/codeql-analysis.yml) ++[![](https://img.shields.io/badge/fuzzing-passing-44c010)](#fuzzing-and-code-coverage) ++[![Go Report Card](https://goreportcard.com/badge/github.com/fxamacker/cbor)](https://goreportcard.com/report/github.com/fxamacker/cbor) ++ ++`fxamacker/cbor` is a CBOR codec in full conformance with [IETF STD 94 (RFC 8949)](https://www.rfc-editor.org/info/std94). It also supports CBOR Sequences ([RFC 8742](https://www.rfc-editor.org/rfc/rfc8742.html)) and Extended Diagnostic Notation ([Appendix G of RFC 8610](https://www.rfc-editor.org/rfc/rfc8610.html#appendix-G)). ++ ++Features include full support for CBOR tags, [Core Deterministic Encoding](https://www.rfc-editor.org/rfc/rfc8949.html#name-core-deterministic-encoding), duplicate map key detection, etc. ++ ++Design balances trade-offs between security, speed, concurrency, encoded data size, usability, etc. ++ ++
Highlights

++ ++__🚀  Speed__ ++ ++Encoding and decoding is fast without using Go's `unsafe` package. Slower settings are opt-in. Default limits allow very fast and memory efficient rejection of malformed CBOR data. ++ ++__🔒  Security__ ++ ++Decoder has configurable limits that defend against malicious inputs. Duplicate map key detection is supported. By contrast, `encoding/gob` is [not designed to be hardened against adversarial inputs](https://pkg.go.dev/encoding/gob#hdr-Security). ++ ++Codec passed multiple confidential security assessments in 2022. No vulnerabilities found in subset of codec in a [nonconfidential security assessment](https://github.com/veraison/go-cose/blob/v1.0.0-rc.1/reports/NCC_Microsoft-go-cose-Report_2022-05-26_v1.0.pdf) prepared by NCC Group for Microsoft Corporation. ++ ++__🗜️  Data Size__ ++ ++Struct tags (`toarray`, `keyasint`, `omitempty`) automatically reduce size of encoded structs. Encoding optionally shrinks float64→32→16 when values fit. ++ ++__:jigsaw:  Usability__ ++ ++API is mostly same as `encoding/json` plus interfaces that simplify concurrency for CBOR options. Encoding and decoding modes can be created at startup and reused by any goroutines. ++ ++Presets include Core Deterministic Encoding, Preferred Serialization, CTAP2 Canonical CBOR, etc. ++ ++__📆  Extensibility__ ++ ++Features include CBOR [extension points](https://www.rfc-editor.org/rfc/rfc8949.html#section-7.1) (e.g. CBOR tags) and extensive settings. API has interfaces that allow users to create custom encoding and decoding without modifying this library. ++ ++


++ ++
++ ++### Secure Decoding with Configurable Settings ++ ++`fxamacker/cbor` has configurable limits, etc. that defend against malicious CBOR data. ++ ++By contrast, `encoding/gob` is [not designed to be hardened against adversarial inputs](https://pkg.go.dev/encoding/gob#hdr-Security). ++ ++
Example decoding with encoding/gob 💥 fatal error (out of memory)

++ ++```Go ++// Example of encoding/gob having "fatal error: runtime: out of memory" ++// while decoding 181 bytes. ++package main ++import ( ++ "bytes" ++ "encoding/gob" ++ "encoding/hex" ++ "fmt" ++) ++ ++// Example data is from https://github.com/golang/go/issues/24446 ++// (shortened to 181 bytes). ++const data = "4dffb503010102303001ff30000109010130010800010130010800010130" + ++ "01ffb80001014a01ffb60001014b01ff860001013001ff860001013001ff" + ++ "860001013001ff860001013001ffb80000001eff850401010e3030303030" + ++ "30303030303030303001ff3000010c0104000016ffb70201010830303030" + ++ "3030303001ff3000010c000030ffb6040405fcff00303030303030303030" + ++ "303030303030303030303030303030303030303030303030303030303030" + ++ "30" ++ ++type X struct { ++ J *X ++ K map[string]int ++} ++ ++func main() { ++ raw, _ := hex.DecodeString(data) ++ decoder := gob.NewDecoder(bytes.NewReader(raw)) ++ ++ var x X ++ decoder.Decode(&x) // fatal error: runtime: out of memory ++ fmt.Println("Decoding finished.") ++} ++``` ++ ++


++ ++
++ ++`fxamacker/cbor` is fast at rejecting malformed CBOR data. E.g. attempts to ++decode 10 bytes of malicious CBOR data to `[]byte` (with default settings): ++ ++| Codec | Speed (ns/op) | Memory | Allocs | ++| :---- | ------------: | -----: | -----: | ++| fxamacker/cbor 2.5.0 | 44 ± 5% | 32 B/op | 2 allocs/op | ++| ugorji/go 1.2.11 | 5353261 ± 4% | 67111321 B/op | 13 allocs/op | ++ ++
Benchmark details

++ ++Latest comparison used: ++- Input: `[]byte{0x9B, 0x00, 0x00, 0x42, 0xFA, 0x42, 0xFA, 0x42, 0xFA, 0x42}` ++- go1.19.10, linux/amd64, i5-13600K (disabled all e-cores, DDR4 @2933) ++- go test -bench=. -benchmem -count=20 ++ ++#### Prior comparisons ++ ++| Codec | Speed (ns/op) | Memory | Allocs | ++| :---- | ------------: | -----: | -----: | ++| fxamacker/cbor 2.5.0-beta2 | 44.33 ± 2% | 32 B/op | 2 allocs/op | ++| fxamacker/cbor 0.1.0 - 2.4.0 | ~44.68 ± 6% | 32 B/op | 2 allocs/op | ++| ugorji/go 1.2.10 | 5524792.50 ± 3% | 67110491 B/op | 12 allocs/op | ++| ugorji/go 1.1.0 - 1.2.6 | 💥 runtime: | out of memory: | cannot allocate | ++ ++- Input: `[]byte{0x9B, 0x00, 0x00, 0x42, 0xFA, 0x42, 0xFA, 0x42, 0xFA, 0x42}` ++- go1.19.6, linux/amd64, i5-13600K (DDR4) ++- go test -bench=. -benchmem -count=20 ++ ++


++ ++
++ ++### Smaller Encodings with Struct Tags ++ ++Struct tags (`toarray`, `keyasint`, `omitempty`) reduce encoded size of structs. ++ ++
Example encoding 3-level nested Go struct to 1 byte CBOR

++ ++https://go.dev/play/p/YxwvfPdFQG2 ++ ++```Go ++// Example encoding nested struct (with omitempty tag) ++// - encoding/json: 18 byte JSON ++// - fxamacker/cbor: 1 byte CBOR ++package main ++ ++import ( ++ "encoding/hex" ++ "encoding/json" ++ "fmt" ++ ++ "github.com/fxamacker/cbor/v2" ++) ++ ++type GrandChild struct { ++ Quux int `json:",omitempty"` ++} ++ ++type Child struct { ++ Baz int `json:",omitempty"` ++ Qux GrandChild `json:",omitempty"` ++} ++ ++type Parent struct { ++ Foo Child `json:",omitempty"` ++ Bar int `json:",omitempty"` ++} ++ ++func cb() { ++ results, _ := cbor.Marshal(Parent{}) ++ fmt.Println("hex(CBOR): " + hex.EncodeToString(results)) ++ ++ text, _ := cbor.Diagnose(results) // Diagnostic Notation ++ fmt.Println("DN: " + text) ++} ++ ++func js() { ++ results, _ := json.Marshal(Parent{}) ++ fmt.Println("hex(JSON): " + hex.EncodeToString(results)) ++ ++ text := string(results) // JSON ++ fmt.Println("JSON: " + text) ++} ++ ++func main() { ++ cb() ++ fmt.Println("-------------") ++ js() ++} ++``` ++ ++Output (DN is Diagnostic Notation): ++``` ++hex(CBOR): a0 ++DN: {} ++------------- ++hex(JSON): 7b22466f6f223a7b22517578223a7b7d7d7d ++JSON: {"Foo":{"Qux":{}}} ++``` ++ ++


++ ++
++ ++Example using different struct tags together: ++ ++![alt text](https://github.com/fxamacker/images/raw/master/cbor/v2.3.0/cbor_struct_tags_api.svg?sanitize=1 "CBOR API and Go Struct Tags") ++ ++API is mostly same as `encoding/json`, plus interfaces that simplify concurrency for CBOR options. ++ ++## Quick Start ++ ++__Install__: `go get github.com/fxamacker/cbor/v2` and `import "github.com/fxamacker/cbor/v2"`. ++ ++### Key Points ++ ++This library can encode and decode CBOR (RFC 8949) and CBOR Sequences (RFC 8742). ++ ++- __CBOR data item__ is a single piece of CBOR data and its structure may contain 0 or more nested data items. ++- __CBOR sequence__ is a concatenation of 0 or more encoded CBOR data items. ++ ++Configurable limits and options can be used to balance trade-offs. ++ ++- Encoding and decoding modes are created from options (settings). ++- Modes can be created at startup and reused. ++- Modes are safe for concurrent use. ++ ++### Default Mode ++ ++Package level functions only use this library's default settings. ++They provide the "default mode" of encoding and decoding. ++ ++```go ++// API matches encoding/json for Marshal, Unmarshal, Encode, Decode, etc. ++b, err = cbor.Marshal(v) // encode v to []byte b ++err = cbor.Unmarshal(b, &v) // decode []byte b to v ++decoder = cbor.NewDecoder(r) // create decoder with io.Reader r ++err = decoder.Decode(&v) // decode a CBOR data item to v ++ ++// v2.7.0 added MarshalToBuffer() and UserBufferEncMode interface. ++err = cbor.MarshalToBuffer(v, b) // encode v to b instead of using built-in buf pool. ++ ++// v2.5.0 added new functions that return remaining bytes. ++ ++// UnmarshalFirst decodes first CBOR data item and returns remaining bytes. ++rest, err = cbor.UnmarshalFirst(b, &v) // decode []byte b to v ++ ++// DiagnoseFirst translates first CBOR data item to text and returns remaining bytes. ++text, rest, err = cbor.DiagnoseFirst(b) // decode []byte b to Diagnostic Notation text ++ ++// NOTE: Unmarshal returns ExtraneousDataError if there are remaining bytes, ++// but new funcs UnmarshalFirst and DiagnoseFirst do not. ++``` ++ ++__IMPORTANT__: 👉 CBOR settings allow trade-offs between speed, security, encoding size, etc. ++ ++- Different CBOR libraries may use different default settings. ++- CBOR-based formats or protocols usually require specific settings. ++ ++For example, WebAuthn uses "CTAP2 Canonical CBOR" which is available as a preset. ++ ++### Presets ++ ++Presets can be used as-is or as a starting point for custom settings. ++ ++```go ++// EncOptions is a struct of encoder settings. ++func CoreDetEncOptions() EncOptions // RFC 8949 Core Deterministic Encoding ++func PreferredUnsortedEncOptions() EncOptions // RFC 8949 Preferred Serialization ++func CanonicalEncOptions() EncOptions // RFC 7049 Canonical CBOR ++func CTAP2EncOptions() EncOptions // FIDO2 CTAP2 Canonical CBOR ++``` ++ ++Presets are used to create custom modes. ++ ++### Custom Modes ++ ++Modes are created from settings. Once created, modes have immutable settings. ++ ++💡 Create the mode at startup and reuse it. It is safe for concurrent use. ++ ++```Go ++// Create encoding mode. ++opts := cbor.CoreDetEncOptions() // use preset options as a starting point ++opts.Time = cbor.TimeUnix // change any settings if needed ++em, err := opts.EncMode() // create an immutable encoding mode ++ ++// Reuse the encoding mode. It is safe for concurrent use. ++ ++// API matches encoding/json. ++b, err := em.Marshal(v) // encode v to []byte b ++encoder := em.NewEncoder(w) // create encoder with io.Writer w ++err := encoder.Encode(v) // encode v to io.Writer w ++``` ++ ++Default mode and custom modes automatically apply struct tags. ++ ++### User Specified Buffer for Encoding (v2.7.0) ++ ++`UserBufferEncMode` interface extends `EncMode` interface to add `MarshalToBuffer()`. It accepts a user-specified buffer instead of using built-in buffer pool. ++ ++```Go ++em, err := myEncOptions.UserBufferEncMode() // create UserBufferEncMode mode ++ ++var buf bytes.Buffer ++err = em.MarshalToBuffer(v, &buf) // encode v to provided buf ++``` ++ ++### Struct Tags ++ ++Struct tags (`toarray`, `keyasint`, `omitempty`) reduce encoded size of structs. ++ ++
Example encoding 3-level nested Go struct to 1 byte CBOR

++ ++https://go.dev/play/p/YxwvfPdFQG2 ++ ++```Go ++// Example encoding nested struct (with omitempty tag) ++// - encoding/json: 18 byte JSON ++// - fxamacker/cbor: 1 byte CBOR ++package main ++ ++import ( ++ "encoding/hex" ++ "encoding/json" ++ "fmt" ++ ++ "github.com/fxamacker/cbor/v2" ++) ++ ++type GrandChild struct { ++ Quux int `json:",omitempty"` ++} ++ ++type Child struct { ++ Baz int `json:",omitempty"` ++ Qux GrandChild `json:",omitempty"` ++} ++ ++type Parent struct { ++ Foo Child `json:",omitempty"` ++ Bar int `json:",omitempty"` ++} ++ ++func cb() { ++ results, _ := cbor.Marshal(Parent{}) ++ fmt.Println("hex(CBOR): " + hex.EncodeToString(results)) ++ ++ text, _ := cbor.Diagnose(results) // Diagnostic Notation ++ fmt.Println("DN: " + text) ++} ++ ++func js() { ++ results, _ := json.Marshal(Parent{}) ++ fmt.Println("hex(JSON): " + hex.EncodeToString(results)) ++ ++ text := string(results) // JSON ++ fmt.Println("JSON: " + text) ++} ++ ++func main() { ++ cb() ++ fmt.Println("-------------") ++ js() ++} ++``` ++ ++Output (DN is Diagnostic Notation): ++``` ++hex(CBOR): a0 ++DN: {} ++------------- ++hex(JSON): 7b22466f6f223a7b22517578223a7b7d7d7d ++JSON: {"Foo":{"Qux":{}}} ++``` ++ ++


++ ++
++ ++
Example using several struct tags

++ ++![alt text](https://github.com/fxamacker/images/raw/master/cbor/v2.3.0/cbor_struct_tags_api.svg?sanitize=1 "CBOR API and Go Struct Tags") ++ ++

++ ++Struct tags simplify use of CBOR-based protocols that require CBOR arrays or maps with integer keys. ++ ++### CBOR Tags ++ ++CBOR tags are specified in a `TagSet`. ++ ++Custom modes can be created with a `TagSet` to handle CBOR tags. ++ ++```go ++em, err := opts.EncMode() // no CBOR tags ++em, err := opts.EncModeWithTags(ts) // immutable CBOR tags ++em, err := opts.EncModeWithSharedTags(ts) // mutable shared CBOR tags ++``` ++ ++`TagSet` and modes using it are safe for concurrent use. Equivalent API is available for `DecMode`. ++ ++
Example using TagSet and TagOptions

++ ++```go ++// Use signedCWT struct defined in "Decoding CWT" example. ++ ++// Create TagSet (safe for concurrency). ++tags := cbor.NewTagSet() ++// Register tag COSE_Sign1 18 with signedCWT type. ++tags.Add( ++ cbor.TagOptions{EncTag: cbor.EncTagRequired, DecTag: cbor.DecTagRequired}, ++ reflect.TypeOf(signedCWT{}), ++ 18) ++ ++// Create DecMode with immutable tags. ++dm, _ := cbor.DecOptions{}.DecModeWithTags(tags) ++ ++// Unmarshal to signedCWT with tag support. ++var v signedCWT ++if err := dm.Unmarshal(data, &v); err != nil { ++ return err ++} ++ ++// Create EncMode with immutable tags. ++em, _ := cbor.EncOptions{}.EncModeWithTags(tags) ++ ++// Marshal signedCWT with tag number. ++if data, err := cbor.Marshal(v); err != nil { ++ return err ++} ++``` ++ ++

++ ++### Functions and Interfaces ++ ++
Functions and interfaces at a glance

++ ++Common functions with same API as `encoding/json`: ++- `Marshal`, `Unmarshal` ++- `NewEncoder`, `(*Encoder).Encode` ++- `NewDecoder`, `(*Decoder).Decode` ++ ++NOTE: `Unmarshal` will return `ExtraneousDataError` if there are remaining bytes ++because RFC 8949 treats CBOR data item with remaining bytes as malformed. ++- 💡 Use `UnmarshalFirst` to decode first CBOR data item and return any remaining bytes. ++ ++Other useful functions: ++- `Diagnose`, `DiagnoseFirst` produce human-readable [Extended Diagnostic Notation](https://www.rfc-editor.org/rfc/rfc8610.html#appendix-G) from CBOR data. ++- `UnmarshalFirst` decodes first CBOR data item and return any remaining bytes. ++- `Wellformed` returns true if the the CBOR data item is well-formed. ++ ++Interfaces identical or comparable to Go `encoding` packages include: ++`Marshaler`, `Unmarshaler`, `BinaryMarshaler`, and `BinaryUnmarshaler`. ++ ++The `RawMessage` type can be used to delay CBOR decoding or precompute CBOR encoding. ++ ++

++ ++### Security Tips ++ ++🔒 Use Go's `io.LimitReader` to limit size when decoding very large or indefinite size data. ++ ++Default limits may need to be increased for systems handling very large data (e.g. blockchains). ++ ++`DecOptions` can be used to modify default limits for `MaxArrayElements`, `MaxMapPairs`, and `MaxNestedLevels`. ++ ++## Status ++ ++v2.7.0 (June 23, 2024) adds features and improvements that help large projects (e.g. Kubernetes) use CBOR as an alternative to JSON and Protocol Buffers. Other improvements include speedups, improved memory use, bug fixes, new serialization options, etc. It passed fuzz tests (5+ billion executions) and is production quality. ++ ++For more details, see [release notes](https://github.com/fxamacker/cbor/releases). ++ ++### Prior Release ++ ++[v2.6.0](https://github.com/fxamacker/cbor/releases/tag/v2.6.0) (February 2024) adds important new features, optimizations, and bug fixes. It is especially useful to systems that need to convert data between CBOR and JSON. New options and optimizations improve handling of bignum, integers, maps, and strings. ++ ++v2.5.0 was released on Sunday, August 13, 2023 with new features and important bug fixes. It is fuzz tested and production quality after extended beta [v2.5.0-beta](https://github.com/fxamacker/cbor/releases/tag/v2.5.0-beta) (Dec 2022) -> [v2.5.0](https://github.com/fxamacker/cbor/releases/tag/v2.5.0) (Aug 2023). ++ ++__IMPORTANT__: 👉 Before upgrading from v2.4 or older release, please read the notable changes highlighted in the release notes. v2.5.0 is a large release with bug fixes to error handling for extraneous data in `Unmarshal`, etc. that should be reviewed before upgrading. ++ ++See [v2.5.0 release notes](https://github.com/fxamacker/cbor/releases/tag/v2.5.0) for list of new features, improvements, and bug fixes. ++ ++See ["Version and API Changes"](https://github.com/fxamacker/cbor#versions-and-api-changes) section for more info about version numbering, etc. ++ ++ ++ ++## Who uses fxamacker/cbor ++ ++`fxamacker/cbor` is used in projects by Arm Ltd., Berlin Institute of Health at Charité, Chainlink, Cisco, Confidential Computing Consortium, ConsenSys, Dapper Labs, EdgeX Foundry, F5, FIDO Alliance, Fraunhofer‑AISEC, Kubernetes, Let's Encrypt (ISRG), Linux Foundation, Matrix.org, Microsoft, Mozilla, National Cybersecurity Agency of France (govt), Netherlands (govt), Oasis Protocol, Smallstep, Tailscale, Taurus SA, Teleport, TIBCO, and others. ++ ++`fxamacker/cbor` passed multiple confidential security assessments. A [nonconfidential security assessment](https://github.com/veraison/go-cose/blob/v1.0.0-rc.1/reports/NCC_Microsoft-go-cose-Report_2022-05-26_v1.0.pdf) (prepared by NCC Group for Microsoft Corporation) includes a subset of fxamacker/cbor v2.4.0 in its scope. ++ ++## Standards ++ ++`fxamacker/cbor` is a CBOR codec in full conformance with [IETF STD 94 (RFC 8949)](https://www.rfc-editor.org/info/std94). It also supports CBOR Sequences ([RFC 8742](https://www.rfc-editor.org/rfc/rfc8742.html)) and Extended Diagnostic Notation ([Appendix G of RFC 8610](https://www.rfc-editor.org/rfc/rfc8610.html#appendix-G)). ++ ++Notable CBOR features include: ++ ++| CBOR Feature | Description | ++| :--- | :--- | ++| CBOR tags | API supports built-in and user-defined tags. | ++| Preferred serialization | Integers encode to fewest bytes. Optional float64 → float32 → float16. | ++| Map key sorting | Unsorted, length-first (Canonical CBOR), and bytewise-lexicographic (CTAP2). | ++| Duplicate map keys | Always forbid for encoding and option to allow/forbid for decoding. | ++| Indefinite length data | Option to allow/forbid for encoding and decoding. | ++| Well-formedness | Always checked and enforced. | ++| Basic validity checks | Optionally check UTF-8 validity and duplicate map keys. | ++| Security considerations | Prevent integer overflow and resource exhaustion (RFC 8949 Section 10). | ++ ++Known limitations are noted in the [Limitations section](#limitations). ++ ++Go nil values for slices, maps, pointers, etc. are encoded as CBOR null. Empty slices, maps, etc. are encoded as empty CBOR arrays and maps. ++ ++Decoder checks for all required well-formedness errors, including all "subkinds" of syntax errors and too little data. ++ ++After well-formedness is verified, basic validity errors are handled as follows: ++ ++* Invalid UTF-8 string: Decoder has option to check and return invalid UTF-8 string error. This check is enabled by default. ++* Duplicate keys in a map: Decoder has options to ignore or enforce rejection of duplicate map keys. ++ ++When decoding well-formed CBOR arrays and maps, decoder saves the first error it encounters and continues with the next item. Options to handle this differently may be added in the future. ++ ++By default, decoder treats time values of floating-point NaN and Infinity as if they are CBOR Null or CBOR Undefined. ++ ++__Click to expand topic:__ ++ ++
++ Duplicate Map Keys

++ ++This library provides options for fast detection and rejection of duplicate map keys based on applying a Go-specific data model to CBOR's extended generic data model in order to determine duplicate vs distinct map keys. Detection relies on whether the CBOR map key would be a duplicate "key" when decoded and applied to the user-provided Go map or struct. ++ ++`DupMapKeyQuiet` turns off detection of duplicate map keys. It tries to use a "keep fastest" method by choosing either "keep first" or "keep last" depending on the Go data type. ++ ++`DupMapKeyEnforcedAPF` enforces detection and rejection of duplidate map keys. Decoding stops immediately and returns `DupMapKeyError` when the first duplicate key is detected. The error includes the duplicate map key and the index number. ++ ++APF suffix means "Allow Partial Fill" so the destination map or struct can contain some decoded values at the time of error. It is the caller's responsibility to respond to the `DupMapKeyError` by discarding the partially filled result if that's required by their protocol. ++ ++

++ ++
++ Tag Validity

++ ++This library checks tag validity for built-in tags (currently tag numbers 0, 1, 2, 3, and 55799): ++ ++* Inadmissible type for tag content ++* Inadmissible value for tag content ++ ++Unknown tag data items (not tag number 0, 1, 2, 3, or 55799) are handled in two ways: ++ ++* When decoding into an empty interface, unknown tag data item will be decoded into `cbor.Tag` data type, which contains tag number and tag content. The tag content will be decoded into the default Go data type for the CBOR data type. ++* When decoding into other Go types, unknown tag data item is decoded into the specified Go type. If Go type is registered with a tag number, the tag number can optionally be verified. ++ ++Decoder also has an option to forbid tag data items (treat any tag data item as error) which is specified by protocols such as CTAP2 Canonical CBOR. ++ ++For more information, see [decoding options](#decoding-options-1) and [tag options](#tag-options). ++ ++

++ ++## Limitations ++ ++If any of these limitations prevent you from using this library, please open an issue along with a link to your project. ++ ++* CBOR `Undefined` (0xf7) value decodes to Go's `nil` value. CBOR `Null` (0xf6) more closely matches Go's `nil`. ++* CBOR map keys with data types not supported by Go for map keys are ignored and an error is returned after continuing to decode remaining items. ++* When decoding registered CBOR tag data to interface type, decoder creates a pointer to registered Go type matching CBOR tag number. Requiring a pointer for this is a Go limitation. ++ ++## Fuzzing and Code Coverage ++ ++__Code coverage__ is always 95% or higher (with `go test -cover`) when tagging a release. ++ ++__Coverage-guided fuzzing__ must pass billions of execs using before tagging a release. Fuzzing is done using nonpublic code which may eventually get merged into this project. Until then, reports like OpenSSF Scorecard can't detect fuzz tests being used by this project. ++ ++
++ ++## Versions and API Changes ++This project uses [Semantic Versioning](https://semver.org), so the API is always backwards compatible unless the major version number changes. ++ ++These functions have signatures identical to encoding/json and their API will continue to match `encoding/json` even after major new releases: ++`Marshal`, `Unmarshal`, `NewEncoder`, `NewDecoder`, `(*Encoder).Encode`, and `(*Decoder).Decode`. ++ ++Exclusions from SemVer: ++- Newly added API documented as "subject to change". ++- Newly added API in the master branch that has never been tagged in non-beta release. ++- If function parameters are unchanged, bug fixes that change behavior (e.g. return error for edge case was missed in prior version). We try to highlight these in the release notes and add extended beta period. E.g. [v2.5.0-beta](https://github.com/fxamacker/cbor/releases/tag/v2.5.0-beta) (Dec 2022) -> [v2.5.0](https://github.com/fxamacker/cbor/releases/tag/v2.5.0) (Aug 2023). ++ ++This project avoids breaking changes to behavior of encoding and decoding functions unless required to improve conformance with supported RFCs (e.g. RFC 8949, RFC 8742, etc.) Visible changes that don't improve conformance to standards are typically made available as new opt-in settings or new functions. ++ ++## Code of Conduct ++ ++This project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). Contact [faye.github@gmail.com](mailto:faye.github@gmail.com) with any questions or comments. ++ ++## Contributing ++ ++Please open an issue before beginning work on a PR. The improvement may have already been considered, etc. ++ ++For more info, see [How to Contribute](CONTRIBUTING.md). ++ ++## Security Policy ++ ++Security fixes are provided for the latest released version of fxamacker/cbor. ++ ++For the full text of the Security Policy, see [SECURITY.md](SECURITY.md). ++ ++## Acknowledgements ++ ++Many thanks to all the contributors on this project! ++ ++I'm especially grateful to Bastian Müller and Dieter Shirley for suggesting and collaborating on CBOR stream mode, and much more. ++ ++I'm very grateful to Stefan Tatschner, Yawning Angel, Jernej Kos, x448, ZenGround0, and Jakob Borg for their contributions or support in the very early days. ++ ++Big thanks to Ben Luddy for his contributions in v2.6.0 and v2.7.0. ++ ++This library clearly wouldn't be possible without Carsten Bormann authoring CBOR RFCs. ++ ++Special thanks to Laurence Lundblade and Jeffrey Yasskin for their help on IETF mailing list or at [7049bis](https://github.com/cbor-wg/CBORbis). ++ ++Huge thanks to The Go Authors for creating a fun and practical programming language with batteries included! ++ ++This library uses `x448/float16` which used to be included. As a standalone package, `x448/float16` is useful to other projects as well. ++ ++## License ++ ++Copyright © 2019-2024 [Faye Amacker](https://github.com/fxamacker). ++ ++fxamacker/cbor is licensed under the MIT License. See [LICENSE](LICENSE) for the full license text. ++ ++
+diff --git a/vendor/github.com/fxamacker/cbor/v2/SECURITY.md b/vendor/github.com/fxamacker/cbor/v2/SECURITY.md +new file mode 100644 +index 00000000..9c05146d +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/SECURITY.md +@@ -0,0 +1,7 @@ ++# Security Policy ++ ++Security fixes are provided for the latest released version of fxamacker/cbor. ++ ++If the security vulnerability is already known to the public, then you can open an issue as a bug report. ++ ++To report security vulnerabilities not yet known to the public, please email faye.github@gmail.com and allow time for the problem to be resolved before reporting it to the public. +diff --git a/vendor/github.com/fxamacker/cbor/v2/bytestring.go b/vendor/github.com/fxamacker/cbor/v2/bytestring.go +new file mode 100644 +index 00000000..823bff12 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/bytestring.go +@@ -0,0 +1,63 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++package cbor ++ ++import ( ++ "errors" ++) ++ ++// ByteString represents CBOR byte string (major type 2). ByteString can be used ++// when using a Go []byte is not possible or convenient. For example, Go doesn't ++// allow []byte as map key, so ByteString can be used to support data formats ++// having CBOR map with byte string keys. ByteString can also be used to ++// encode invalid UTF-8 string as CBOR byte string. ++// See DecOption.MapKeyByteStringMode for more details. ++type ByteString string ++ ++// Bytes returns bytes representing ByteString. ++func (bs ByteString) Bytes() []byte { ++ return []byte(bs) ++} ++ ++// MarshalCBOR encodes ByteString as CBOR byte string (major type 2). ++func (bs ByteString) MarshalCBOR() ([]byte, error) { ++ e := getEncodeBuffer() ++ defer putEncodeBuffer(e) ++ ++ // Encode length ++ encodeHead(e, byte(cborTypeByteString), uint64(len(bs))) ++ ++ // Encode data ++ buf := make([]byte, e.Len()+len(bs)) ++ n := copy(buf, e.Bytes()) ++ copy(buf[n:], bs) ++ ++ return buf, nil ++} ++ ++// UnmarshalCBOR decodes CBOR byte string (major type 2) to ByteString. ++// Decoding CBOR null and CBOR undefined sets ByteString to be empty. ++func (bs *ByteString) UnmarshalCBOR(data []byte) error { ++ if bs == nil { ++ return errors.New("cbor.ByteString: UnmarshalCBOR on nil pointer") ++ } ++ ++ // Decoding CBOR null and CBOR undefined to ByteString resets data. ++ // This behavior is similar to decoding CBOR null and CBOR undefined to []byte. ++ if len(data) == 1 && (data[0] == 0xf6 || data[0] == 0xf7) { ++ *bs = "" ++ return nil ++ } ++ ++ d := decoder{data: data, dm: defaultDecMode} ++ ++ // Check if CBOR data type is byte string ++ if typ := d.nextCBORType(); typ != cborTypeByteString { ++ return &UnmarshalTypeError{CBORType: typ.String(), GoType: typeByteString.String()} ++ } ++ ++ b, _ := d.parseByteString() ++ *bs = ByteString(b) ++ return nil ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/cache.go b/vendor/github.com/fxamacker/cbor/v2/cache.go +new file mode 100644 +index 00000000..ea0f39e2 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/cache.go +@@ -0,0 +1,363 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++package cbor ++ ++import ( ++ "bytes" ++ "errors" ++ "fmt" ++ "reflect" ++ "sort" ++ "strconv" ++ "strings" ++ "sync" ++) ++ ++type encodeFuncs struct { ++ ef encodeFunc ++ ief isEmptyFunc ++} ++ ++var ( ++ decodingStructTypeCache sync.Map // map[reflect.Type]*decodingStructType ++ encodingStructTypeCache sync.Map // map[reflect.Type]*encodingStructType ++ encodeFuncCache sync.Map // map[reflect.Type]encodeFuncs ++ typeInfoCache sync.Map // map[reflect.Type]*typeInfo ++) ++ ++type specialType int ++ ++const ( ++ specialTypeNone specialType = iota ++ specialTypeUnmarshalerIface ++ specialTypeEmptyIface ++ specialTypeIface ++ specialTypeTag ++ specialTypeTime ++) ++ ++type typeInfo struct { ++ elemTypeInfo *typeInfo ++ keyTypeInfo *typeInfo ++ typ reflect.Type ++ kind reflect.Kind ++ nonPtrType reflect.Type ++ nonPtrKind reflect.Kind ++ spclType specialType ++} ++ ++func newTypeInfo(t reflect.Type) *typeInfo { ++ tInfo := typeInfo{typ: t, kind: t.Kind()} ++ ++ for t.Kind() == reflect.Ptr { ++ t = t.Elem() ++ } ++ ++ k := t.Kind() ++ ++ tInfo.nonPtrType = t ++ tInfo.nonPtrKind = k ++ ++ if k == reflect.Interface { ++ if t.NumMethod() == 0 { ++ tInfo.spclType = specialTypeEmptyIface ++ } else { ++ tInfo.spclType = specialTypeIface ++ } ++ } else if t == typeTag { ++ tInfo.spclType = specialTypeTag ++ } else if t == typeTime { ++ tInfo.spclType = specialTypeTime ++ } else if reflect.PtrTo(t).Implements(typeUnmarshaler) { ++ tInfo.spclType = specialTypeUnmarshalerIface ++ } ++ ++ switch k { ++ case reflect.Array, reflect.Slice: ++ tInfo.elemTypeInfo = getTypeInfo(t.Elem()) ++ case reflect.Map: ++ tInfo.keyTypeInfo = getTypeInfo(t.Key()) ++ tInfo.elemTypeInfo = getTypeInfo(t.Elem()) ++ } ++ ++ return &tInfo ++} ++ ++type decodingStructType struct { ++ fields fields ++ fieldIndicesByName map[string]int ++ err error ++ toArray bool ++} ++ ++// The stdlib errors.Join was introduced in Go 1.20, and we still support Go 1.17, so instead, ++// here's a very basic implementation of an aggregated error. ++type multierror []error ++ ++func (m multierror) Error() string { ++ var sb strings.Builder ++ for i, err := range m { ++ sb.WriteString(err.Error()) ++ if i < len(m)-1 { ++ sb.WriteString(", ") ++ } ++ } ++ return sb.String() ++} ++ ++func getDecodingStructType(t reflect.Type) *decodingStructType { ++ if v, _ := decodingStructTypeCache.Load(t); v != nil { ++ return v.(*decodingStructType) ++ } ++ ++ flds, structOptions := getFields(t) ++ ++ toArray := hasToArrayOption(structOptions) ++ ++ var errs []error ++ for i := 0; i < len(flds); i++ { ++ if flds[i].keyAsInt { ++ nameAsInt, numErr := strconv.Atoi(flds[i].name) ++ if numErr != nil { ++ errs = append(errs, errors.New("cbor: failed to parse field name \""+flds[i].name+"\" to int ("+numErr.Error()+")")) ++ break ++ } ++ flds[i].nameAsInt = int64(nameAsInt) ++ } ++ ++ flds[i].typInfo = getTypeInfo(flds[i].typ) ++ } ++ ++ fieldIndicesByName := make(map[string]int, len(flds)) ++ for i, fld := range flds { ++ if _, ok := fieldIndicesByName[fld.name]; ok { ++ errs = append(errs, fmt.Errorf("cbor: two or more fields of %v have the same name %q", t, fld.name)) ++ continue ++ } ++ fieldIndicesByName[fld.name] = i ++ } ++ ++ var err error ++ { ++ var multi multierror ++ for _, each := range errs { ++ if each != nil { ++ multi = append(multi, each) ++ } ++ } ++ if len(multi) == 1 { ++ err = multi[0] ++ } else if len(multi) > 1 { ++ err = multi ++ } ++ } ++ ++ structType := &decodingStructType{ ++ fields: flds, ++ fieldIndicesByName: fieldIndicesByName, ++ err: err, ++ toArray: toArray, ++ } ++ decodingStructTypeCache.Store(t, structType) ++ return structType ++} ++ ++type encodingStructType struct { ++ fields fields ++ bytewiseFields fields ++ lengthFirstFields fields ++ omitEmptyFieldsIdx []int ++ err error ++ toArray bool ++} ++ ++func (st *encodingStructType) getFields(em *encMode) fields { ++ switch em.sort { ++ case SortNone, SortFastShuffle: ++ return st.fields ++ case SortLengthFirst: ++ return st.lengthFirstFields ++ default: ++ return st.bytewiseFields ++ } ++} ++ ++type bytewiseFieldSorter struct { ++ fields fields ++} ++ ++func (x *bytewiseFieldSorter) Len() int { ++ return len(x.fields) ++} ++ ++func (x *bytewiseFieldSorter) Swap(i, j int) { ++ x.fields[i], x.fields[j] = x.fields[j], x.fields[i] ++} ++ ++func (x *bytewiseFieldSorter) Less(i, j int) bool { ++ return bytes.Compare(x.fields[i].cborName, x.fields[j].cborName) <= 0 ++} ++ ++type lengthFirstFieldSorter struct { ++ fields fields ++} ++ ++func (x *lengthFirstFieldSorter) Len() int { ++ return len(x.fields) ++} ++ ++func (x *lengthFirstFieldSorter) Swap(i, j int) { ++ x.fields[i], x.fields[j] = x.fields[j], x.fields[i] ++} ++ ++func (x *lengthFirstFieldSorter) Less(i, j int) bool { ++ if len(x.fields[i].cborName) != len(x.fields[j].cborName) { ++ return len(x.fields[i].cborName) < len(x.fields[j].cborName) ++ } ++ return bytes.Compare(x.fields[i].cborName, x.fields[j].cborName) <= 0 ++} ++ ++func getEncodingStructType(t reflect.Type) (*encodingStructType, error) { ++ if v, _ := encodingStructTypeCache.Load(t); v != nil { ++ structType := v.(*encodingStructType) ++ return structType, structType.err ++ } ++ ++ flds, structOptions := getFields(t) ++ ++ if hasToArrayOption(structOptions) { ++ return getEncodingStructToArrayType(t, flds) ++ } ++ ++ var err error ++ var hasKeyAsInt bool ++ var hasKeyAsStr bool ++ var omitEmptyIdx []int ++ e := getEncodeBuffer() ++ for i := 0; i < len(flds); i++ { ++ // Get field's encodeFunc ++ flds[i].ef, flds[i].ief = getEncodeFunc(flds[i].typ) ++ if flds[i].ef == nil { ++ err = &UnsupportedTypeError{t} ++ break ++ } ++ ++ // Encode field name ++ if flds[i].keyAsInt { ++ nameAsInt, numErr := strconv.Atoi(flds[i].name) ++ if numErr != nil { ++ err = errors.New("cbor: failed to parse field name \"" + flds[i].name + "\" to int (" + numErr.Error() + ")") ++ break ++ } ++ flds[i].nameAsInt = int64(nameAsInt) ++ if nameAsInt >= 0 { ++ encodeHead(e, byte(cborTypePositiveInt), uint64(nameAsInt)) ++ } else { ++ n := nameAsInt*(-1) - 1 ++ encodeHead(e, byte(cborTypeNegativeInt), uint64(n)) ++ } ++ flds[i].cborName = make([]byte, e.Len()) ++ copy(flds[i].cborName, e.Bytes()) ++ e.Reset() ++ ++ hasKeyAsInt = true ++ } else { ++ encodeHead(e, byte(cborTypeTextString), uint64(len(flds[i].name))) ++ flds[i].cborName = make([]byte, e.Len()+len(flds[i].name)) ++ n := copy(flds[i].cborName, e.Bytes()) ++ copy(flds[i].cborName[n:], flds[i].name) ++ e.Reset() ++ ++ // If cborName contains a text string, then cborNameByteString contains a ++ // string that has the byte string major type but is otherwise identical to ++ // cborName. ++ flds[i].cborNameByteString = make([]byte, len(flds[i].cborName)) ++ copy(flds[i].cborNameByteString, flds[i].cborName) ++ // Reset encoded CBOR type to byte string, preserving the "additional ++ // information" bits: ++ flds[i].cborNameByteString[0] = byte(cborTypeByteString) | ++ getAdditionalInformation(flds[i].cborNameByteString[0]) ++ ++ hasKeyAsStr = true ++ } ++ ++ // Check if field can be omitted when empty ++ if flds[i].omitEmpty { ++ omitEmptyIdx = append(omitEmptyIdx, i) ++ } ++ } ++ putEncodeBuffer(e) ++ ++ if err != nil { ++ structType := &encodingStructType{err: err} ++ encodingStructTypeCache.Store(t, structType) ++ return structType, structType.err ++ } ++ ++ // Sort fields by canonical order ++ bytewiseFields := make(fields, len(flds)) ++ copy(bytewiseFields, flds) ++ sort.Sort(&bytewiseFieldSorter{bytewiseFields}) ++ ++ lengthFirstFields := bytewiseFields ++ if hasKeyAsInt && hasKeyAsStr { ++ lengthFirstFields = make(fields, len(flds)) ++ copy(lengthFirstFields, flds) ++ sort.Sort(&lengthFirstFieldSorter{lengthFirstFields}) ++ } ++ ++ structType := &encodingStructType{ ++ fields: flds, ++ bytewiseFields: bytewiseFields, ++ lengthFirstFields: lengthFirstFields, ++ omitEmptyFieldsIdx: omitEmptyIdx, ++ } ++ ++ encodingStructTypeCache.Store(t, structType) ++ return structType, structType.err ++} ++ ++func getEncodingStructToArrayType(t reflect.Type, flds fields) (*encodingStructType, error) { ++ for i := 0; i < len(flds); i++ { ++ // Get field's encodeFunc ++ flds[i].ef, flds[i].ief = getEncodeFunc(flds[i].typ) ++ if flds[i].ef == nil { ++ structType := &encodingStructType{err: &UnsupportedTypeError{t}} ++ encodingStructTypeCache.Store(t, structType) ++ return structType, structType.err ++ } ++ } ++ ++ structType := &encodingStructType{ ++ fields: flds, ++ toArray: true, ++ } ++ encodingStructTypeCache.Store(t, structType) ++ return structType, structType.err ++} ++ ++func getEncodeFunc(t reflect.Type) (encodeFunc, isEmptyFunc) { ++ if v, _ := encodeFuncCache.Load(t); v != nil { ++ fs := v.(encodeFuncs) ++ return fs.ef, fs.ief ++ } ++ ef, ief := getEncodeFuncInternal(t) ++ encodeFuncCache.Store(t, encodeFuncs{ef, ief}) ++ return ef, ief ++} ++ ++func getTypeInfo(t reflect.Type) *typeInfo { ++ if v, _ := typeInfoCache.Load(t); v != nil { ++ return v.(*typeInfo) ++ } ++ tInfo := newTypeInfo(t) ++ typeInfoCache.Store(t, tInfo) ++ return tInfo ++} ++ ++func hasToArrayOption(tag string) bool { ++ s := ",toarray" ++ idx := strings.Index(tag, s) ++ return idx >= 0 && (len(tag) == idx+len(s) || tag[idx+len(s)] == ',') ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/common.go b/vendor/github.com/fxamacker/cbor/v2/common.go +new file mode 100644 +index 00000000..ec038a49 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/common.go +@@ -0,0 +1,182 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++package cbor ++ ++import ( ++ "fmt" ++ "strconv" ++) ++ ++type cborType uint8 ++ ++const ( ++ cborTypePositiveInt cborType = 0x00 ++ cborTypeNegativeInt cborType = 0x20 ++ cborTypeByteString cborType = 0x40 ++ cborTypeTextString cborType = 0x60 ++ cborTypeArray cborType = 0x80 ++ cborTypeMap cborType = 0xa0 ++ cborTypeTag cborType = 0xc0 ++ cborTypePrimitives cborType = 0xe0 ++) ++ ++func (t cborType) String() string { ++ switch t { ++ case cborTypePositiveInt: ++ return "positive integer" ++ case cborTypeNegativeInt: ++ return "negative integer" ++ case cborTypeByteString: ++ return "byte string" ++ case cborTypeTextString: ++ return "UTF-8 text string" ++ case cborTypeArray: ++ return "array" ++ case cborTypeMap: ++ return "map" ++ case cborTypeTag: ++ return "tag" ++ case cborTypePrimitives: ++ return "primitives" ++ default: ++ return "Invalid type " + strconv.Itoa(int(t)) ++ } ++} ++ ++type additionalInformation uint8 ++ ++const ( ++ maxAdditionalInformationWithoutArgument = 23 ++ additionalInformationWith1ByteArgument = 24 ++ additionalInformationWith2ByteArgument = 25 ++ additionalInformationWith4ByteArgument = 26 ++ additionalInformationWith8ByteArgument = 27 ++ ++ // For major type 7. ++ additionalInformationAsFalse = 20 ++ additionalInformationAsTrue = 21 ++ additionalInformationAsNull = 22 ++ additionalInformationAsUndefined = 23 ++ additionalInformationAsFloat16 = 25 ++ additionalInformationAsFloat32 = 26 ++ additionalInformationAsFloat64 = 27 ++ ++ // For major type 2, 3, 4, 5. ++ additionalInformationAsIndefiniteLengthFlag = 31 ++) ++ ++const ( ++ maxSimpleValueInAdditionalInformation = 23 ++ minSimpleValueIn1ByteArgument = 32 ++) ++ ++func (ai additionalInformation) isIndefiniteLength() bool { ++ return ai == additionalInformationAsIndefiniteLengthFlag ++} ++ ++const ( ++ // From RFC 8949 Section 3: ++ // "The initial byte of each encoded data item contains both information about the major type ++ // (the high-order 3 bits, described in Section 3.1) and additional information ++ // (the low-order 5 bits)." ++ ++ // typeMask is used to extract major type in initial byte of encoded data item. ++ typeMask = 0xe0 ++ ++ // additionalInformationMask is used to extract additional information in initial byte of encoded data item. ++ additionalInformationMask = 0x1f ++) ++ ++func getType(raw byte) cborType { ++ return cborType(raw & typeMask) ++} ++ ++func getAdditionalInformation(raw byte) byte { ++ return raw & additionalInformationMask ++} ++ ++func isBreakFlag(raw byte) bool { ++ return raw == cborBreakFlag ++} ++ ++func parseInitialByte(b byte) (t cborType, ai byte) { ++ return getType(b), getAdditionalInformation(b) ++} ++ ++const ( ++ tagNumRFC3339Time = 0 ++ tagNumEpochTime = 1 ++ tagNumUnsignedBignum = 2 ++ tagNumNegativeBignum = 3 ++ tagNumExpectedLaterEncodingBase64URL = 21 ++ tagNumExpectedLaterEncodingBase64 = 22 ++ tagNumExpectedLaterEncodingBase16 = 23 ++ tagNumSelfDescribedCBOR = 55799 ++) ++ ++const ( ++ cborBreakFlag = byte(0xff) ++ cborByteStringWithIndefiniteLengthHead = byte(0x5f) ++ cborTextStringWithIndefiniteLengthHead = byte(0x7f) ++ cborArrayWithIndefiniteLengthHead = byte(0x9f) ++ cborMapWithIndefiniteLengthHead = byte(0xbf) ++) ++ ++var ( ++ cborFalse = []byte{0xf4} ++ cborTrue = []byte{0xf5} ++ cborNil = []byte{0xf6} ++ cborNaN = []byte{0xf9, 0x7e, 0x00} ++ cborPositiveInfinity = []byte{0xf9, 0x7c, 0x00} ++ cborNegativeInfinity = []byte{0xf9, 0xfc, 0x00} ++) ++ ++// validBuiltinTag checks that supported built-in tag numbers are followed by expected content types. ++func validBuiltinTag(tagNum uint64, contentHead byte) error { ++ t := getType(contentHead) ++ switch tagNum { ++ case tagNumRFC3339Time: ++ // Tag content (date/time text string in RFC 3339 format) must be string type. ++ if t != cborTypeTextString { ++ return newInadmissibleTagContentTypeError( ++ tagNumRFC3339Time, ++ "text string", ++ t.String()) ++ } ++ return nil ++ ++ case tagNumEpochTime: ++ // Tag content (epoch date/time) must be uint, int, or float type. ++ if t != cborTypePositiveInt && t != cborTypeNegativeInt && (contentHead < 0xf9 || contentHead > 0xfb) { ++ return newInadmissibleTagContentTypeError( ++ tagNumEpochTime, ++ "integer or floating-point number", ++ t.String()) ++ } ++ return nil ++ ++ case tagNumUnsignedBignum, tagNumNegativeBignum: ++ // Tag content (bignum) must be byte type. ++ if t != cborTypeByteString { ++ return newInadmissibleTagContentTypeErrorf( ++ fmt.Sprintf( ++ "tag number %d or %d must be followed by byte string, got %s", ++ tagNumUnsignedBignum, ++ tagNumNegativeBignum, ++ t.String(), ++ )) ++ } ++ return nil ++ ++ case tagNumExpectedLaterEncodingBase64URL, tagNumExpectedLaterEncodingBase64, tagNumExpectedLaterEncodingBase16: ++ // From RFC 8949 3.4.5.2: ++ // The data item tagged can be a byte string or any other data item. In the latter ++ // case, the tag applies to all of the byte string data items contained in the data ++ // item, except for those contained in a nested data item tagged with an expected ++ // conversion. ++ return nil ++ } ++ ++ return nil ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/decode.go b/vendor/github.com/fxamacker/cbor/v2/decode.go +new file mode 100644 +index 00000000..85842ac7 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/decode.go +@@ -0,0 +1,3187 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++package cbor ++ ++import ( ++ "encoding" ++ "encoding/base64" ++ "encoding/binary" ++ "encoding/hex" ++ "errors" ++ "fmt" ++ "io" ++ "math" ++ "math/big" ++ "reflect" ++ "strconv" ++ "strings" ++ "time" ++ "unicode/utf8" ++ ++ "github.com/x448/float16" ++) ++ ++// Unmarshal parses the CBOR-encoded data into the value pointed to by v ++// using default decoding options. If v is nil, not a pointer, or ++// a nil pointer, Unmarshal returns an error. ++// ++// To unmarshal CBOR into a value implementing the Unmarshaler interface, ++// Unmarshal calls that value's UnmarshalCBOR method with a valid ++// CBOR value. ++// ++// To unmarshal CBOR byte string into a value implementing the ++// encoding.BinaryUnmarshaler interface, Unmarshal calls that value's ++// UnmarshalBinary method with decoded CBOR byte string. ++// ++// To unmarshal CBOR into a pointer, Unmarshal sets the pointer to nil ++// if CBOR data is null (0xf6) or undefined (0xf7). Otherwise, Unmarshal ++// unmarshals CBOR into the value pointed to by the pointer. If the ++// pointer is nil, Unmarshal creates a new value for it to point to. ++// ++// To unmarshal CBOR into an empty interface value, Unmarshal uses the ++// following rules: ++// ++// CBOR booleans decode to bool. ++// CBOR positive integers decode to uint64. ++// CBOR negative integers decode to int64 (big.Int if value overflows). ++// CBOR floating points decode to float64. ++// CBOR byte strings decode to []byte. ++// CBOR text strings decode to string. ++// CBOR arrays decode to []interface{}. ++// CBOR maps decode to map[interface{}]interface{}. ++// CBOR null and undefined values decode to nil. ++// CBOR times (tag 0 and 1) decode to time.Time. ++// CBOR bignums (tag 2 and 3) decode to big.Int. ++// CBOR tags with an unrecognized number decode to cbor.Tag ++// ++// To unmarshal a CBOR array into a slice, Unmarshal allocates a new slice ++// if the CBOR array is empty or slice capacity is less than CBOR array length. ++// Otherwise Unmarshal overwrites existing elements, and sets slice length ++// to CBOR array length. ++// ++// To unmarshal a CBOR array into a Go array, Unmarshal decodes CBOR array ++// elements into Go array elements. If the Go array is smaller than the ++// CBOR array, the extra CBOR array elements are discarded. If the CBOR ++// array is smaller than the Go array, the extra Go array elements are ++// set to zero values. ++// ++// To unmarshal a CBOR array into a struct, struct must have a special field "_" ++// with struct tag `cbor:",toarray"`. Go array elements are decoded into struct ++// fields. Any "omitempty" struct field tag option is ignored in this case. ++// ++// To unmarshal a CBOR map into a map, Unmarshal allocates a new map only if the ++// map is nil. Otherwise Unmarshal reuses the existing map and keeps existing ++// entries. Unmarshal stores key-value pairs from the CBOR map into Go map. ++// See DecOptions.DupMapKey to enable duplicate map key detection. ++// ++// To unmarshal a CBOR map into a struct, Unmarshal matches CBOR map keys to the ++// keys in the following priority: ++// ++// 1. "cbor" key in struct field tag, ++// 2. "json" key in struct field tag, ++// 3. struct field name. ++// ++// Unmarshal tries an exact match for field name, then a case-insensitive match. ++// Map key-value pairs without corresponding struct fields are ignored. See ++// DecOptions.ExtraReturnErrors to return error at unknown field. ++// ++// To unmarshal a CBOR text string into a time.Time value, Unmarshal parses text ++// string formatted in RFC3339. To unmarshal a CBOR integer/float into a ++// time.Time value, Unmarshal creates an unix time with integer/float as seconds ++// and fractional seconds since January 1, 1970 UTC. As a special case, Infinite ++// and NaN float values decode to time.Time's zero value. ++// ++// To unmarshal CBOR null (0xf6) and undefined (0xf7) values into a ++// slice/map/pointer, Unmarshal sets Go value to nil. Because null is often ++// used to mean "not present", unmarshalling CBOR null and undefined value ++// into any other Go type has no effect and returns no error. ++// ++// Unmarshal supports CBOR tag 55799 (self-describe CBOR), tag 0 and 1 (time), ++// and tag 2 and 3 (bignum). ++// ++// Unmarshal returns ExtraneousDataError error (without decoding into v) ++// if there are any remaining bytes following the first valid CBOR data item. ++// See UnmarshalFirst, if you want to unmarshal only the first ++// CBOR data item without ExtraneousDataError caused by remaining bytes. ++func Unmarshal(data []byte, v interface{}) error { ++ return defaultDecMode.Unmarshal(data, v) ++} ++ ++// UnmarshalFirst parses the first CBOR data item into the value pointed to by v ++// using default decoding options. Any remaining bytes are returned in rest. ++// ++// If v is nil, not a pointer, or a nil pointer, UnmarshalFirst returns an error. ++// ++// See the documentation for Unmarshal for details. ++func UnmarshalFirst(data []byte, v interface{}) (rest []byte, err error) { ++ return defaultDecMode.UnmarshalFirst(data, v) ++} ++ ++// Valid checks whether data is a well-formed encoded CBOR data item and ++// that it complies with default restrictions such as MaxNestedLevels, ++// MaxArrayElements, MaxMapPairs, etc. ++// ++// If there are any remaining bytes after the CBOR data item, ++// an ExtraneousDataError is returned. ++// ++// WARNING: Valid doesn't check if encoded CBOR data item is valid (i.e. validity) ++// and RFC 8949 distinctly defines what is "Valid" and what is "Well-formed". ++// ++// Deprecated: Valid is kept for compatibility and should not be used. ++// Use Wellformed instead because it has a more appropriate name. ++func Valid(data []byte) error { ++ return defaultDecMode.Valid(data) ++} ++ ++// Wellformed checks whether data is a well-formed encoded CBOR data item and ++// that it complies with default restrictions such as MaxNestedLevels, ++// MaxArrayElements, MaxMapPairs, etc. ++// ++// If there are any remaining bytes after the CBOR data item, ++// an ExtraneousDataError is returned. ++func Wellformed(data []byte) error { ++ return defaultDecMode.Wellformed(data) ++} ++ ++// Unmarshaler is the interface implemented by types that wish to unmarshal ++// CBOR data themselves. The input is a valid CBOR value. UnmarshalCBOR ++// must copy the CBOR data if it needs to use it after returning. ++type Unmarshaler interface { ++ UnmarshalCBOR([]byte) error ++} ++ ++// InvalidUnmarshalError describes an invalid argument passed to Unmarshal. ++type InvalidUnmarshalError struct { ++ s string ++} ++ ++func (e *InvalidUnmarshalError) Error() string { ++ return e.s ++} ++ ++// UnmarshalTypeError describes a CBOR value that can't be decoded to a Go type. ++type UnmarshalTypeError struct { ++ CBORType string // type of CBOR value ++ GoType string // type of Go value it could not be decoded into ++ StructFieldName string // name of the struct field holding the Go value (optional) ++ errorMsg string // additional error message (optional) ++} ++ ++func (e *UnmarshalTypeError) Error() string { ++ var s string ++ if e.StructFieldName != "" { ++ s = "cbor: cannot unmarshal " + e.CBORType + " into Go struct field " + e.StructFieldName + " of type " + e.GoType ++ } else { ++ s = "cbor: cannot unmarshal " + e.CBORType + " into Go value of type " + e.GoType ++ } ++ if e.errorMsg != "" { ++ s += " (" + e.errorMsg + ")" ++ } ++ return s ++} ++ ++// InvalidMapKeyTypeError describes invalid Go map key type when decoding CBOR map. ++// For example, Go doesn't allow slice as map key. ++type InvalidMapKeyTypeError struct { ++ GoType string ++} ++ ++func (e *InvalidMapKeyTypeError) Error() string { ++ return "cbor: invalid map key type: " + e.GoType ++} ++ ++// DupMapKeyError describes detected duplicate map key in CBOR map. ++type DupMapKeyError struct { ++ Key interface{} ++ Index int ++} ++ ++func (e *DupMapKeyError) Error() string { ++ return fmt.Sprintf("cbor: found duplicate map key \"%v\" at map element index %d", e.Key, e.Index) ++} ++ ++// UnknownFieldError describes detected unknown field in CBOR map when decoding to Go struct. ++type UnknownFieldError struct { ++ Index int ++} ++ ++func (e *UnknownFieldError) Error() string { ++ return fmt.Sprintf("cbor: found unknown field at map element index %d", e.Index) ++} ++ ++// UnacceptableDataItemError is returned when unmarshaling a CBOR input that contains a data item ++// that is not acceptable to a specific CBOR-based application protocol ("invalid or unexpected" as ++// described in RFC 8949 Section 5 Paragraph 3). ++type UnacceptableDataItemError struct { ++ CBORType string ++ Message string ++} ++ ++func (e UnacceptableDataItemError) Error() string { ++ return fmt.Sprintf("cbor: data item of cbor type %s is not accepted by protocol: %s", e.CBORType, e.Message) ++} ++ ++// ByteStringExpectedFormatError is returned when unmarshaling CBOR byte string fails when ++// using non-default ByteStringExpectedFormat decoding option that makes decoder expect ++// a specified format such as base64, hex, etc. ++type ByteStringExpectedFormatError struct { ++ expectedFormatOption ByteStringExpectedFormatMode ++ err error ++} ++ ++func newByteStringExpectedFormatError(expectedFormatOption ByteStringExpectedFormatMode, err error) *ByteStringExpectedFormatError { ++ return &ByteStringExpectedFormatError{expectedFormatOption, err} ++} ++ ++func (e *ByteStringExpectedFormatError) Error() string { ++ switch e.expectedFormatOption { ++ case ByteStringExpectedBase64URL: ++ return fmt.Sprintf("cbor: failed to decode base64url from byte string: %s", e.err) ++ ++ case ByteStringExpectedBase64: ++ return fmt.Sprintf("cbor: failed to decode base64 from byte string: %s", e.err) ++ ++ case ByteStringExpectedBase16: ++ return fmt.Sprintf("cbor: failed to decode hex from byte string: %s", e.err) ++ ++ default: ++ return fmt.Sprintf("cbor: failed to decode byte string in expected format %d: %s", e.expectedFormatOption, e.err) ++ } ++} ++ ++func (e *ByteStringExpectedFormatError) Unwrap() error { ++ return e.err ++} ++ ++// InadmissibleTagContentTypeError is returned when unmarshaling built-in CBOR tags ++// fails because of inadmissible type for tag content. Currently, the built-in ++// CBOR tags in this codec are tags 0-3 and 21-23. ++// See "Tag validity" in RFC 8949 Section 5.3.2. ++type InadmissibleTagContentTypeError struct { ++ s string ++ tagNum int ++ expectedTagContentType string ++ gotTagContentType string ++} ++ ++func newInadmissibleTagContentTypeError( ++ tagNum int, ++ expectedTagContentType string, ++ gotTagContentType string, ++) *InadmissibleTagContentTypeError { ++ return &InadmissibleTagContentTypeError{ ++ tagNum: tagNum, ++ expectedTagContentType: expectedTagContentType, ++ gotTagContentType: gotTagContentType, ++ } ++} ++ ++func newInadmissibleTagContentTypeErrorf(s string) *InadmissibleTagContentTypeError { ++ return &InadmissibleTagContentTypeError{s: "cbor: " + s} //nolint:goconst // ignore "cbor" ++} ++ ++func (e *InadmissibleTagContentTypeError) Error() string { ++ if e.s == "" { ++ return fmt.Sprintf( ++ "cbor: tag number %d must be followed by %s, got %s", ++ e.tagNum, ++ e.expectedTagContentType, ++ e.gotTagContentType, ++ ) ++ } ++ return e.s ++} ++ ++// DupMapKeyMode specifies how to enforce duplicate map key. Two map keys are considered duplicates if: ++// 1. When decoding into a struct, both keys match the same struct field. The keys are also ++// considered duplicates if neither matches any field and decoding to interface{} would produce ++// equal (==) values for both keys. ++// 2. When decoding into a map, both keys are equal (==) when decoded into values of the ++// destination map's key type. ++type DupMapKeyMode int ++ ++const ( ++ // DupMapKeyQuiet doesn't enforce duplicate map key. Decoder quietly (no error) ++ // uses faster of "keep first" or "keep last" depending on Go data type and other factors. ++ DupMapKeyQuiet DupMapKeyMode = iota ++ ++ // DupMapKeyEnforcedAPF enforces detection and rejection of duplicate map keys. ++ // APF means "Allow Partial Fill" and the destination map or struct can be partially filled. ++ // If a duplicate map key is detected, DupMapKeyError is returned without further decoding ++ // of the map. It's the caller's responsibility to respond to DupMapKeyError by ++ // discarding the partially filled result if their protocol requires it. ++ // WARNING: using DupMapKeyEnforcedAPF will decrease performance and increase memory use. ++ DupMapKeyEnforcedAPF ++ ++ maxDupMapKeyMode ++) ++ ++func (dmkm DupMapKeyMode) valid() bool { ++ return dmkm >= 0 && dmkm < maxDupMapKeyMode ++} ++ ++// IndefLengthMode specifies whether to allow indefinite length items. ++type IndefLengthMode int ++ ++const ( ++ // IndefLengthAllowed allows indefinite length items. ++ IndefLengthAllowed IndefLengthMode = iota ++ ++ // IndefLengthForbidden disallows indefinite length items. ++ IndefLengthForbidden ++ ++ maxIndefLengthMode ++) ++ ++func (m IndefLengthMode) valid() bool { ++ return m >= 0 && m < maxIndefLengthMode ++} ++ ++// TagsMode specifies whether to allow CBOR tags. ++type TagsMode int ++ ++const ( ++ // TagsAllowed allows CBOR tags. ++ TagsAllowed TagsMode = iota ++ ++ // TagsForbidden disallows CBOR tags. ++ TagsForbidden ++ ++ maxTagsMode ++) ++ ++func (tm TagsMode) valid() bool { ++ return tm >= 0 && tm < maxTagsMode ++} ++ ++// IntDecMode specifies which Go type (int64, uint64, or big.Int) should ++// be used when decoding CBOR integers (major type 0 and 1) to Go interface{}. ++type IntDecMode int ++ ++const ( ++ // IntDecConvertNone affects how CBOR integers (major type 0 and 1) decode to Go interface{}. ++ // It decodes CBOR unsigned integer (major type 0) to: ++ // - uint64 ++ // It decodes CBOR negative integer (major type 1) to: ++ // - int64 if value fits ++ // - big.Int or *big.Int (see BigIntDecMode) if value doesn't fit into int64 ++ IntDecConvertNone IntDecMode = iota ++ ++ // IntDecConvertSigned affects how CBOR integers (major type 0 and 1) decode to Go interface{}. ++ // It decodes CBOR integers (major type 0 and 1) to: ++ // - int64 if value fits ++ // - big.Int or *big.Int (see BigIntDecMode) if value < math.MinInt64 ++ // - return UnmarshalTypeError if value > math.MaxInt64 ++ // Deprecated: IntDecConvertSigned should not be used. ++ // Please use other options, such as IntDecConvertSignedOrError, IntDecConvertSignedOrBigInt, IntDecConvertNone. ++ IntDecConvertSigned ++ ++ // IntDecConvertSignedOrFail affects how CBOR integers (major type 0 and 1) decode to Go interface{}. ++ // It decodes CBOR integers (major type 0 and 1) to: ++ // - int64 if value fits ++ // - return UnmarshalTypeError if value doesn't fit into int64 ++ IntDecConvertSignedOrFail ++ ++ // IntDecConvertSigned affects how CBOR integers (major type 0 and 1) decode to Go interface{}. ++ // It makes CBOR integers (major type 0 and 1) decode to: ++ // - int64 if value fits ++ // - big.Int or *big.Int (see BigIntDecMode) if value doesn't fit into int64 ++ IntDecConvertSignedOrBigInt ++ ++ maxIntDec ++) ++ ++func (idm IntDecMode) valid() bool { ++ return idm >= 0 && idm < maxIntDec ++} ++ ++// MapKeyByteStringMode specifies how to decode CBOR byte string (major type 2) ++// as Go map key when decoding CBOR map key into an empty Go interface value. ++// Specifically, this option applies when decoding CBOR map into ++// - Go empty interface, or ++// - Go map with empty interface as key type. ++// The CBOR map key types handled by this option are ++// - byte string ++// - tagged byte string ++// - nested tagged byte string ++type MapKeyByteStringMode int ++ ++const ( ++ // MapKeyByteStringAllowed allows CBOR byte string to be decoded as Go map key. ++ // Since Go doesn't allow []byte as map key, CBOR byte string is decoded to ++ // ByteString which has underlying string type. ++ // This is the default setting. ++ MapKeyByteStringAllowed MapKeyByteStringMode = iota ++ ++ // MapKeyByteStringForbidden forbids CBOR byte string being decoded as Go map key. ++ // Attempting to decode CBOR byte string as map key into empty interface value ++ // returns a decoding error. ++ MapKeyByteStringForbidden ++ ++ maxMapKeyByteStringMode ++) ++ ++func (mkbsm MapKeyByteStringMode) valid() bool { ++ return mkbsm >= 0 && mkbsm < maxMapKeyByteStringMode ++} ++ ++// ExtraDecErrorCond specifies extra conditions that should be treated as errors. ++type ExtraDecErrorCond uint ++ ++// ExtraDecErrorNone indicates no extra error condition. ++const ExtraDecErrorNone ExtraDecErrorCond = 0 ++ ++const ( ++ // ExtraDecErrorUnknownField indicates error condition when destination ++ // Go struct doesn't have a field matching a CBOR map key. ++ ExtraDecErrorUnknownField ExtraDecErrorCond = 1 << iota ++ ++ maxExtraDecError ++) ++ ++func (ec ExtraDecErrorCond) valid() bool { ++ return ec < maxExtraDecError ++} ++ ++// UTF8Mode option specifies if decoder should ++// decode CBOR Text containing invalid UTF-8 string. ++type UTF8Mode int ++ ++const ( ++ // UTF8RejectInvalid rejects CBOR Text containing ++ // invalid UTF-8 string. ++ UTF8RejectInvalid UTF8Mode = iota ++ ++ // UTF8DecodeInvalid allows decoding CBOR Text containing ++ // invalid UTF-8 string. ++ UTF8DecodeInvalid ++ ++ maxUTF8Mode ++) ++ ++func (um UTF8Mode) valid() bool { ++ return um >= 0 && um < maxUTF8Mode ++} ++ ++// FieldNameMatchingMode specifies how string keys in CBOR maps are matched to Go struct field names. ++type FieldNameMatchingMode int ++ ++const ( ++ // FieldNameMatchingPreferCaseSensitive prefers to decode map items into struct fields whose names (or tag ++ // names) exactly match the item's key. If there is no such field, a map item will be decoded into a field whose ++ // name is a case-insensitive match for the item's key. ++ FieldNameMatchingPreferCaseSensitive FieldNameMatchingMode = iota ++ ++ // FieldNameMatchingCaseSensitive decodes map items only into a struct field whose name (or tag name) is an ++ // exact match for the item's key. ++ FieldNameMatchingCaseSensitive ++ ++ maxFieldNameMatchingMode ++) ++ ++func (fnmm FieldNameMatchingMode) valid() bool { ++ return fnmm >= 0 && fnmm < maxFieldNameMatchingMode ++} ++ ++// BigIntDecMode specifies how to decode CBOR bignum to Go interface{}. ++type BigIntDecMode int ++ ++const ( ++ // BigIntDecodeValue makes CBOR bignum decode to big.Int (instead of *big.Int) ++ // when unmarshalling into a Go interface{}. ++ BigIntDecodeValue BigIntDecMode = iota ++ ++ // BigIntDecodePointer makes CBOR bignum decode to *big.Int when ++ // unmarshalling into a Go interface{}. ++ BigIntDecodePointer ++ ++ maxBigIntDecMode ++) ++ ++func (bidm BigIntDecMode) valid() bool { ++ return bidm >= 0 && bidm < maxBigIntDecMode ++} ++ ++// ByteStringToStringMode specifies the behavior when decoding a CBOR byte string into a Go string. ++type ByteStringToStringMode int ++ ++const ( ++ // ByteStringToStringForbidden generates an error on an attempt to decode a CBOR byte string into a Go string. ++ ByteStringToStringForbidden ByteStringToStringMode = iota ++ ++ // ByteStringToStringAllowed permits decoding a CBOR byte string into a Go string. ++ ByteStringToStringAllowed ++ ++ // ByteStringToStringAllowedWithExpectedLaterEncoding permits decoding a CBOR byte string ++ // into a Go string. Also, if the byte string is enclosed (directly or indirectly) by one of ++ // the "expected later encoding" tags (numbers 21 through 23), the destination string will ++ // be populated by applying the designated text encoding to the contents of the input byte ++ // string. ++ ByteStringToStringAllowedWithExpectedLaterEncoding ++ ++ maxByteStringToStringMode ++) ++ ++func (bstsm ByteStringToStringMode) valid() bool { ++ return bstsm >= 0 && bstsm < maxByteStringToStringMode ++} ++ ++// FieldNameByteStringMode specifies the behavior when decoding a CBOR byte string map key as a Go struct field name. ++type FieldNameByteStringMode int ++ ++const ( ++ // FieldNameByteStringForbidden generates an error on an attempt to decode a CBOR byte string map key as a Go struct field name. ++ FieldNameByteStringForbidden FieldNameByteStringMode = iota ++ ++ // FieldNameByteStringAllowed permits CBOR byte string map keys to be recognized as Go struct field names. ++ FieldNameByteStringAllowed ++ ++ maxFieldNameByteStringMode ++) ++ ++func (fnbsm FieldNameByteStringMode) valid() bool { ++ return fnbsm >= 0 && fnbsm < maxFieldNameByteStringMode ++} ++ ++// UnrecognizedTagToAnyMode specifies how to decode unrecognized CBOR tag into an empty interface (any). ++// Currently, recognized CBOR tag numbers are 0, 1, 2, 3, or registered by TagSet. ++type UnrecognizedTagToAnyMode int ++ ++const ( ++ // UnrecognizedTagNumAndContentToAny decodes CBOR tag number and tag content to cbor.Tag ++ // when decoding unrecognized CBOR tag into an empty interface. ++ UnrecognizedTagNumAndContentToAny UnrecognizedTagToAnyMode = iota ++ ++ // UnrecognizedTagContentToAny decodes only CBOR tag content (into its default type) ++ // when decoding unrecognized CBOR tag into an empty interface. ++ UnrecognizedTagContentToAny ++ ++ maxUnrecognizedTagToAny ++) ++ ++func (uttam UnrecognizedTagToAnyMode) valid() bool { ++ return uttam >= 0 && uttam < maxUnrecognizedTagToAny ++} ++ ++// TimeTagToAnyMode specifies how to decode CBOR tag 0 and 1 into an empty interface (any). ++// Based on the specified mode, Unmarshal can return a time.Time value or a time string in a specific format. ++type TimeTagToAnyMode int ++ ++const ( ++ // TimeTagToTime decodes CBOR tag 0 and 1 into a time.Time value ++ // when decoding tag 0 or 1 into an empty interface. ++ TimeTagToTime TimeTagToAnyMode = iota ++ ++ // TimeTagToRFC3339 decodes CBOR tag 0 and 1 into a time string in RFC3339 format ++ // when decoding tag 0 or 1 into an empty interface. ++ TimeTagToRFC3339 ++ ++ // TimeTagToRFC3339Nano decodes CBOR tag 0 and 1 into a time string in RFC3339Nano format ++ // when decoding tag 0 or 1 into an empty interface. ++ TimeTagToRFC3339Nano ++ ++ maxTimeTagToAnyMode ++) ++ ++func (tttam TimeTagToAnyMode) valid() bool { ++ return tttam >= 0 && tttam < maxTimeTagToAnyMode ++} ++ ++// SimpleValueRegistry is a registry of unmarshaling behaviors for each possible CBOR simple value ++// number (0...23 and 32...255). ++type SimpleValueRegistry struct { ++ rejected [256]bool ++} ++ ++// WithRejectedSimpleValue registers the given simple value as rejected. If the simple value is ++// encountered in a CBOR input during unmarshaling, an UnacceptableDataItemError is returned. ++func WithRejectedSimpleValue(sv SimpleValue) func(*SimpleValueRegistry) error { ++ return func(r *SimpleValueRegistry) error { ++ if sv >= 24 && sv <= 31 { ++ return fmt.Errorf("cbor: cannot set analog for reserved simple value %d", sv) ++ } ++ r.rejected[sv] = true ++ return nil ++ } ++} ++ ++// Creates a new SimpleValueRegistry. The registry state is initialized by executing the provided ++// functions in order against a registry that is pre-populated with the defaults for all well-formed ++// simple value numbers. ++func NewSimpleValueRegistryFromDefaults(fns ...func(*SimpleValueRegistry) error) (*SimpleValueRegistry, error) { ++ var r SimpleValueRegistry ++ for _, fn := range fns { ++ if err := fn(&r); err != nil { ++ return nil, err ++ } ++ } ++ return &r, nil ++} ++ ++// NaNMode specifies how to decode floating-point values (major type 7, additional information 25 ++// through 27) representing NaN (not-a-number). ++type NaNMode int ++ ++const ( ++ // NaNDecodeAllowed will decode NaN values to Go float32 or float64. ++ NaNDecodeAllowed NaNMode = iota ++ ++ // NaNDecodeForbidden will return an UnacceptableDataItemError on an attempt to decode a NaN value. ++ NaNDecodeForbidden ++ ++ maxNaNDecode ++) ++ ++func (ndm NaNMode) valid() bool { ++ return ndm >= 0 && ndm < maxNaNDecode ++} ++ ++// InfMode specifies how to decode floating-point values (major type 7, additional information 25 ++// through 27) representing positive or negative infinity. ++type InfMode int ++ ++const ( ++ // InfDecodeAllowed will decode infinite values to Go float32 or float64. ++ InfDecodeAllowed InfMode = iota ++ ++ // InfDecodeForbidden will return an UnacceptableDataItemError on an attempt to decode an ++ // infinite value. ++ InfDecodeForbidden ++ ++ maxInfDecode ++) ++ ++func (idm InfMode) valid() bool { ++ return idm >= 0 && idm < maxInfDecode ++} ++ ++// ByteStringToTimeMode specifies the behavior when decoding a CBOR byte string into a Go time.Time. ++type ByteStringToTimeMode int ++ ++const ( ++ // ByteStringToTimeForbidden generates an error on an attempt to decode a CBOR byte string into a Go time.Time. ++ ByteStringToTimeForbidden ByteStringToTimeMode = iota ++ ++ // ByteStringToTimeAllowed permits decoding a CBOR byte string into a Go time.Time. ++ ByteStringToTimeAllowed ++ ++ maxByteStringToTimeMode ++) ++ ++func (bttm ByteStringToTimeMode) valid() bool { ++ return bttm >= 0 && bttm < maxByteStringToTimeMode ++} ++ ++// ByteStringExpectedFormatMode specifies how to decode CBOR byte string into Go byte slice ++// when the byte string is NOT enclosed in CBOR tag 21, 22, or 23. An error is returned if ++// the CBOR byte string does not contain the expected format (e.g. base64) specified. ++// For tags 21-23, see "Expected Later Encoding for CBOR-to-JSON Converters" ++// in RFC 8949 Section 3.4.5.2. ++type ByteStringExpectedFormatMode int ++ ++const ( ++ // ByteStringExpectedFormatNone copies the unmodified CBOR byte string into Go byte slice ++ // if the byte string is not tagged by CBOR tag 21-23. ++ ByteStringExpectedFormatNone ByteStringExpectedFormatMode = iota ++ ++ // ByteStringExpectedBase64URL expects CBOR byte strings to contain base64url-encoded bytes ++ // if the byte string is not tagged by CBOR tag 21-23. The decoder will attempt to decode ++ // the base64url-encoded bytes into Go slice. ++ ByteStringExpectedBase64URL ++ ++ // ByteStringExpectedBase64 expects CBOR byte strings to contain base64-encoded bytes ++ // if the byte string is not tagged by CBOR tag 21-23. The decoder will attempt to decode ++ // the base64-encoded bytes into Go slice. ++ ByteStringExpectedBase64 ++ ++ // ByteStringExpectedBase16 expects CBOR byte strings to contain base16-encoded bytes ++ // if the byte string is not tagged by CBOR tag 21-23. The decoder will attempt to decode ++ // the base16-encoded bytes into Go slice. ++ ByteStringExpectedBase16 ++ ++ maxByteStringExpectedFormatMode ++) ++ ++func (bsefm ByteStringExpectedFormatMode) valid() bool { ++ return bsefm >= 0 && bsefm < maxByteStringExpectedFormatMode ++} ++ ++// BignumTagMode specifies whether or not the "bignum" tags 2 and 3 (RFC 8949 Section 3.4.3) can be ++// decoded. ++type BignumTagMode int ++ ++const ( ++ // BignumTagAllowed allows bignum tags to be decoded. ++ BignumTagAllowed BignumTagMode = iota ++ ++ // BignumTagForbidden produces an UnacceptableDataItemError during Unmarshal if a bignum tag ++ // is encountered in the input. ++ BignumTagForbidden ++ ++ maxBignumTag ++) ++ ++func (btm BignumTagMode) valid() bool { ++ return btm >= 0 && btm < maxBignumTag ++} ++ ++// BinaryUnmarshalerMode specifies how to decode into types that implement ++// encoding.BinaryUnmarshaler. ++type BinaryUnmarshalerMode int ++ ++const ( ++ // BinaryUnmarshalerByteString will invoke UnmarshalBinary on the contents of a CBOR byte ++ // string when decoding into a value that implements BinaryUnmarshaler. ++ BinaryUnmarshalerByteString BinaryUnmarshalerMode = iota ++ ++ // BinaryUnmarshalerNone does not recognize BinaryUnmarshaler implementations during decode. ++ BinaryUnmarshalerNone ++ ++ maxBinaryUnmarshalerMode ++) ++ ++func (bum BinaryUnmarshalerMode) valid() bool { ++ return bum >= 0 && bum < maxBinaryUnmarshalerMode ++} ++ ++// DecOptions specifies decoding options. ++type DecOptions struct { ++ // DupMapKey specifies whether to enforce duplicate map key. ++ DupMapKey DupMapKeyMode ++ ++ // TimeTag specifies whether or not untagged data items, or tags other ++ // than tag 0 and tag 1, can be decoded to time.Time. If tag 0 or tag 1 ++ // appears in an input, the type of its content is always validated as ++ // specified in RFC 8949. That behavior is not controlled by this ++ // option. The behavior of the supported modes are: ++ // ++ // DecTagIgnored (default): Untagged text strings and text strings ++ // enclosed in tags other than 0 and 1 are decoded as though enclosed ++ // in tag 0. Untagged unsigned integers, negative integers, and ++ // floating-point numbers (or those enclosed in tags other than 0 and ++ // 1) are decoded as though enclosed in tag 1. Decoding a tag other ++ // than 0 or 1 enclosing simple values null or undefined into a ++ // time.Time does not modify the destination value. ++ // ++ // DecTagOptional: Untagged text strings are decoded as though ++ // enclosed in tag 0. Untagged unsigned integers, negative integers, ++ // and floating-point numbers are decoded as though enclosed in tag ++ // 1. Tags other than 0 and 1 will produce an error on attempts to ++ // decode them into a time.Time. ++ // ++ // DecTagRequired: Only tags 0 and 1 can be decoded to time.Time. Any ++ // other input will produce an error. ++ TimeTag DecTagMode ++ ++ // MaxNestedLevels specifies the max nested levels allowed for any combination of CBOR array, maps, and tags. ++ // Default is 32 levels and it can be set to [4, 65535]. Note that higher maximum levels of nesting can ++ // require larger amounts of stack to deserialize. Don't increase this higher than you require. ++ MaxNestedLevels int ++ ++ // MaxArrayElements specifies the max number of elements for CBOR arrays. ++ // Default is 128*1024=131072 and it can be set to [16, 2147483647] ++ MaxArrayElements int ++ ++ // MaxMapPairs specifies the max number of key-value pairs for CBOR maps. ++ // Default is 128*1024=131072 and it can be set to [16, 2147483647] ++ MaxMapPairs int ++ ++ // IndefLength specifies whether to allow indefinite length CBOR items. ++ IndefLength IndefLengthMode ++ ++ // TagsMd specifies whether to allow CBOR tags (major type 6). ++ TagsMd TagsMode ++ ++ // IntDec specifies which Go integer type (int64 or uint64) to use ++ // when decoding CBOR int (major type 0 and 1) to Go interface{}. ++ IntDec IntDecMode ++ ++ // MapKeyByteString specifies how to decode CBOR byte string as map key ++ // when decoding CBOR map with byte string key into an empty interface value. ++ // By default, an error is returned when attempting to decode CBOR byte string ++ // as map key because Go doesn't allow []byte as map key. ++ MapKeyByteString MapKeyByteStringMode ++ ++ // ExtraReturnErrors specifies extra conditions that should be treated as errors. ++ ExtraReturnErrors ExtraDecErrorCond ++ ++ // DefaultMapType specifies Go map type to create and decode to ++ // when unmarshalling CBOR into an empty interface value. ++ // By default, unmarshal uses map[interface{}]interface{}. ++ DefaultMapType reflect.Type ++ ++ // UTF8 specifies if decoder should decode CBOR Text containing invalid UTF-8. ++ // By default, unmarshal rejects CBOR text containing invalid UTF-8. ++ UTF8 UTF8Mode ++ ++ // FieldNameMatching specifies how string keys in CBOR maps are matched to Go struct field names. ++ FieldNameMatching FieldNameMatchingMode ++ ++ // BigIntDec specifies how to decode CBOR bignum to Go interface{}. ++ BigIntDec BigIntDecMode ++ ++ // DefaultByteStringType is the Go type that should be produced when decoding a CBOR byte ++ // string into an empty interface value. Types to which a []byte is convertible are valid ++ // for this option, except for array and pointer-to-array types. If nil, the default is ++ // []byte. ++ DefaultByteStringType reflect.Type ++ ++ // ByteStringToString specifies the behavior when decoding a CBOR byte string into a Go string. ++ ByteStringToString ByteStringToStringMode ++ ++ // FieldNameByteString specifies the behavior when decoding a CBOR byte string map key as a ++ // Go struct field name. ++ FieldNameByteString FieldNameByteStringMode ++ ++ // UnrecognizedTagToAny specifies how to decode unrecognized CBOR tag into an empty interface. ++ // Currently, recognized CBOR tag numbers are 0, 1, 2, 3, or registered by TagSet. ++ UnrecognizedTagToAny UnrecognizedTagToAnyMode ++ ++ // TimeTagToAny specifies how to decode CBOR tag 0 and 1 into an empty interface (any). ++ // Based on the specified mode, Unmarshal can return a time.Time value or a time string in a specific format. ++ TimeTagToAny TimeTagToAnyMode ++ ++ // SimpleValues is an immutable mapping from each CBOR simple value to a corresponding ++ // unmarshal behavior. If nil, the simple values false, true, null, and undefined are mapped ++ // to the Go analog values false, true, nil, and nil, respectively, and all other simple ++ // values N (except the reserved simple values 24 through 31) are mapped to ++ // cbor.SimpleValue(N). In other words, all well-formed simple values can be decoded. ++ // ++ // Users may provide a custom SimpleValueRegistry constructed via ++ // NewSimpleValueRegistryFromDefaults. ++ SimpleValues *SimpleValueRegistry ++ ++ // NaN specifies how to decode floating-point values (major type 7, additional information ++ // 25 through 27) representing NaN (not-a-number). ++ NaN NaNMode ++ ++ // Inf specifies how to decode floating-point values (major type 7, additional information ++ // 25 through 27) representing positive or negative infinity. ++ Inf InfMode ++ ++ // ByteStringToTime specifies how to decode CBOR byte string into Go time.Time. ++ ByteStringToTime ByteStringToTimeMode ++ ++ // ByteStringExpectedFormat specifies how to decode CBOR byte string into Go byte slice ++ // when the byte string is NOT enclosed in CBOR tag 21, 22, or 23. An error is returned if ++ // the CBOR byte string does not contain the expected format (e.g. base64) specified. ++ // For tags 21-23, see "Expected Later Encoding for CBOR-to-JSON Converters" ++ // in RFC 8949 Section 3.4.5.2. ++ ByteStringExpectedFormat ByteStringExpectedFormatMode ++ ++ // BignumTag specifies whether or not the "bignum" tags 2 and 3 (RFC 8949 Section 3.4.3) can ++ // be decoded. Unlike BigIntDec, this option applies to all bignum tags encountered in a ++ // CBOR input, independent of the type of the destination value of a particular Unmarshal ++ // operation. ++ BignumTag BignumTagMode ++ ++ // BinaryUnmarshaler specifies how to decode into types that implement ++ // encoding.BinaryUnmarshaler. ++ BinaryUnmarshaler BinaryUnmarshalerMode ++} ++ ++// DecMode returns DecMode with immutable options and no tags (safe for concurrency). ++func (opts DecOptions) DecMode() (DecMode, error) { //nolint:gocritic // ignore hugeParam ++ return opts.decMode() ++} ++ ++// validForTags checks that the provided tag set is compatible with these options and returns a ++// non-nil error if and only if the provided tag set is incompatible. ++func (opts DecOptions) validForTags(tags TagSet) error { //nolint:gocritic // ignore hugeParam ++ if opts.TagsMd == TagsForbidden { ++ return errors.New("cbor: cannot create DecMode with TagSet when TagsMd is TagsForbidden") ++ } ++ if tags == nil { ++ return errors.New("cbor: cannot create DecMode with nil value as TagSet") ++ } ++ if opts.ByteStringToString == ByteStringToStringAllowedWithExpectedLaterEncoding || ++ opts.ByteStringExpectedFormat != ByteStringExpectedFormatNone { ++ for _, tagNum := range []uint64{ ++ tagNumExpectedLaterEncodingBase64URL, ++ tagNumExpectedLaterEncodingBase64, ++ tagNumExpectedLaterEncodingBase16, ++ } { ++ if rt := tags.getTypeFromTagNum([]uint64{tagNum}); rt != nil { ++ return fmt.Errorf("cbor: DecMode with non-default StringExpectedEncoding or ByteSliceExpectedEncoding treats tag %d as built-in and conflicts with the provided TagSet's registration of %v", tagNum, rt) ++ } ++ } ++ ++ } ++ return nil ++} ++ ++// DecModeWithTags returns DecMode with options and tags that are both immutable (safe for concurrency). ++func (opts DecOptions) DecModeWithTags(tags TagSet) (DecMode, error) { //nolint:gocritic // ignore hugeParam ++ if err := opts.validForTags(tags); err != nil { ++ return nil, err ++ } ++ dm, err := opts.decMode() ++ if err != nil { ++ return nil, err ++ } ++ ++ // Copy tags ++ ts := tagSet(make(map[reflect.Type]*tagItem)) ++ syncTags := tags.(*syncTagSet) ++ syncTags.RLock() ++ for contentType, tag := range syncTags.t { ++ if tag.opts.DecTag != DecTagIgnored { ++ ts[contentType] = tag ++ } ++ } ++ syncTags.RUnlock() ++ ++ if len(ts) > 0 { ++ dm.tags = ts ++ } ++ ++ return dm, nil ++} ++ ++// DecModeWithSharedTags returns DecMode with immutable options and mutable shared tags (safe for concurrency). ++func (opts DecOptions) DecModeWithSharedTags(tags TagSet) (DecMode, error) { //nolint:gocritic // ignore hugeParam ++ if err := opts.validForTags(tags); err != nil { ++ return nil, err ++ } ++ dm, err := opts.decMode() ++ if err != nil { ++ return nil, err ++ } ++ dm.tags = tags ++ return dm, nil ++} ++ ++const ( ++ defaultMaxArrayElements = 131072 ++ minMaxArrayElements = 16 ++ maxMaxArrayElements = 2147483647 ++ ++ defaultMaxMapPairs = 131072 ++ minMaxMapPairs = 16 ++ maxMaxMapPairs = 2147483647 ++ ++ defaultMaxNestedLevels = 32 ++ minMaxNestedLevels = 4 ++ maxMaxNestedLevels = 65535 ++) ++ ++var defaultSimpleValues = func() *SimpleValueRegistry { ++ registry, err := NewSimpleValueRegistryFromDefaults() ++ if err != nil { ++ panic(err) ++ } ++ return registry ++}() ++ ++//nolint:gocyclo // Each option comes with some manageable boilerplate ++func (opts DecOptions) decMode() (*decMode, error) { //nolint:gocritic // ignore hugeParam ++ if !opts.DupMapKey.valid() { ++ return nil, errors.New("cbor: invalid DupMapKey " + strconv.Itoa(int(opts.DupMapKey))) ++ } ++ ++ if !opts.TimeTag.valid() { ++ return nil, errors.New("cbor: invalid TimeTag " + strconv.Itoa(int(opts.TimeTag))) ++ } ++ ++ if !opts.IndefLength.valid() { ++ return nil, errors.New("cbor: invalid IndefLength " + strconv.Itoa(int(opts.IndefLength))) ++ } ++ ++ if !opts.TagsMd.valid() { ++ return nil, errors.New("cbor: invalid TagsMd " + strconv.Itoa(int(opts.TagsMd))) ++ } ++ ++ if !opts.IntDec.valid() { ++ return nil, errors.New("cbor: invalid IntDec " + strconv.Itoa(int(opts.IntDec))) ++ } ++ ++ if !opts.MapKeyByteString.valid() { ++ return nil, errors.New("cbor: invalid MapKeyByteString " + strconv.Itoa(int(opts.MapKeyByteString))) ++ } ++ ++ if opts.MaxNestedLevels == 0 { ++ opts.MaxNestedLevels = defaultMaxNestedLevels ++ } else if opts.MaxNestedLevels < minMaxNestedLevels || opts.MaxNestedLevels > maxMaxNestedLevels { ++ return nil, errors.New("cbor: invalid MaxNestedLevels " + strconv.Itoa(opts.MaxNestedLevels) + ++ " (range is [" + strconv.Itoa(minMaxNestedLevels) + ", " + strconv.Itoa(maxMaxNestedLevels) + "])") ++ } ++ ++ if opts.MaxArrayElements == 0 { ++ opts.MaxArrayElements = defaultMaxArrayElements ++ } else if opts.MaxArrayElements < minMaxArrayElements || opts.MaxArrayElements > maxMaxArrayElements { ++ return nil, errors.New("cbor: invalid MaxArrayElements " + strconv.Itoa(opts.MaxArrayElements) + ++ " (range is [" + strconv.Itoa(minMaxArrayElements) + ", " + strconv.Itoa(maxMaxArrayElements) + "])") ++ } ++ ++ if opts.MaxMapPairs == 0 { ++ opts.MaxMapPairs = defaultMaxMapPairs ++ } else if opts.MaxMapPairs < minMaxMapPairs || opts.MaxMapPairs > maxMaxMapPairs { ++ return nil, errors.New("cbor: invalid MaxMapPairs " + strconv.Itoa(opts.MaxMapPairs) + ++ " (range is [" + strconv.Itoa(minMaxMapPairs) + ", " + strconv.Itoa(maxMaxMapPairs) + "])") ++ } ++ ++ if !opts.ExtraReturnErrors.valid() { ++ return nil, errors.New("cbor: invalid ExtraReturnErrors " + strconv.Itoa(int(opts.ExtraReturnErrors))) ++ } ++ ++ if opts.DefaultMapType != nil && opts.DefaultMapType.Kind() != reflect.Map { ++ return nil, fmt.Errorf("cbor: invalid DefaultMapType %s", opts.DefaultMapType) ++ } ++ ++ if !opts.UTF8.valid() { ++ return nil, errors.New("cbor: invalid UTF8 " + strconv.Itoa(int(opts.UTF8))) ++ } ++ ++ if !opts.FieldNameMatching.valid() { ++ return nil, errors.New("cbor: invalid FieldNameMatching " + strconv.Itoa(int(opts.FieldNameMatching))) ++ } ++ ++ if !opts.BigIntDec.valid() { ++ return nil, errors.New("cbor: invalid BigIntDec " + strconv.Itoa(int(opts.BigIntDec))) ++ } ++ ++ if opts.DefaultByteStringType != nil && ++ opts.DefaultByteStringType.Kind() != reflect.String && ++ (opts.DefaultByteStringType.Kind() != reflect.Slice || opts.DefaultByteStringType.Elem().Kind() != reflect.Uint8) { ++ return nil, fmt.Errorf("cbor: invalid DefaultByteStringType: %s is not of kind string or []uint8", opts.DefaultByteStringType) ++ } ++ ++ if !opts.ByteStringToString.valid() { ++ return nil, errors.New("cbor: invalid ByteStringToString " + strconv.Itoa(int(opts.ByteStringToString))) ++ } ++ ++ if !opts.FieldNameByteString.valid() { ++ return nil, errors.New("cbor: invalid FieldNameByteString " + strconv.Itoa(int(opts.FieldNameByteString))) ++ } ++ ++ if !opts.UnrecognizedTagToAny.valid() { ++ return nil, errors.New("cbor: invalid UnrecognizedTagToAnyMode " + strconv.Itoa(int(opts.UnrecognizedTagToAny))) ++ } ++ simpleValues := opts.SimpleValues ++ if simpleValues == nil { ++ simpleValues = defaultSimpleValues ++ } ++ ++ if !opts.TimeTagToAny.valid() { ++ return nil, errors.New("cbor: invalid TimeTagToAny " + strconv.Itoa(int(opts.TimeTagToAny))) ++ } ++ ++ if !opts.NaN.valid() { ++ return nil, errors.New("cbor: invalid NaNDec " + strconv.Itoa(int(opts.NaN))) ++ } ++ ++ if !opts.Inf.valid() { ++ return nil, errors.New("cbor: invalid InfDec " + strconv.Itoa(int(opts.Inf))) ++ } ++ ++ if !opts.ByteStringToTime.valid() { ++ return nil, errors.New("cbor: invalid ByteStringToTime " + strconv.Itoa(int(opts.ByteStringToTime))) ++ } ++ ++ if !opts.ByteStringExpectedFormat.valid() { ++ return nil, errors.New("cbor: invalid ByteStringExpectedFormat " + strconv.Itoa(int(opts.ByteStringExpectedFormat))) ++ } ++ ++ if !opts.BignumTag.valid() { ++ return nil, errors.New("cbor: invalid BignumTag " + strconv.Itoa(int(opts.BignumTag))) ++ } ++ ++ if !opts.BinaryUnmarshaler.valid() { ++ return nil, errors.New("cbor: invalid BinaryUnmarshaler " + strconv.Itoa(int(opts.BinaryUnmarshaler))) ++ } ++ ++ dm := decMode{ ++ dupMapKey: opts.DupMapKey, ++ timeTag: opts.TimeTag, ++ maxNestedLevels: opts.MaxNestedLevels, ++ maxArrayElements: opts.MaxArrayElements, ++ maxMapPairs: opts.MaxMapPairs, ++ indefLength: opts.IndefLength, ++ tagsMd: opts.TagsMd, ++ intDec: opts.IntDec, ++ mapKeyByteString: opts.MapKeyByteString, ++ extraReturnErrors: opts.ExtraReturnErrors, ++ defaultMapType: opts.DefaultMapType, ++ utf8: opts.UTF8, ++ fieldNameMatching: opts.FieldNameMatching, ++ bigIntDec: opts.BigIntDec, ++ defaultByteStringType: opts.DefaultByteStringType, ++ byteStringToString: opts.ByteStringToString, ++ fieldNameByteString: opts.FieldNameByteString, ++ unrecognizedTagToAny: opts.UnrecognizedTagToAny, ++ timeTagToAny: opts.TimeTagToAny, ++ simpleValues: simpleValues, ++ nanDec: opts.NaN, ++ infDec: opts.Inf, ++ byteStringToTime: opts.ByteStringToTime, ++ byteStringExpectedFormat: opts.ByteStringExpectedFormat, ++ bignumTag: opts.BignumTag, ++ binaryUnmarshaler: opts.BinaryUnmarshaler, ++ } ++ ++ return &dm, nil ++} ++ ++// DecMode is the main interface for CBOR decoding. ++type DecMode interface { ++ // Unmarshal parses the CBOR-encoded data into the value pointed to by v ++ // using the decoding mode. If v is nil, not a pointer, or a nil pointer, ++ // Unmarshal returns an error. ++ // ++ // See the documentation for Unmarshal for details. ++ Unmarshal(data []byte, v interface{}) error ++ ++ // UnmarshalFirst parses the first CBOR data item into the value pointed to by v ++ // using the decoding mode. Any remaining bytes are returned in rest. ++ // ++ // If v is nil, not a pointer, or a nil pointer, UnmarshalFirst returns an error. ++ // ++ // See the documentation for Unmarshal for details. ++ UnmarshalFirst(data []byte, v interface{}) (rest []byte, err error) ++ ++ // Valid checks whether data is a well-formed encoded CBOR data item and ++ // that it complies with configurable restrictions such as MaxNestedLevels, ++ // MaxArrayElements, MaxMapPairs, etc. ++ // ++ // If there are any remaining bytes after the CBOR data item, ++ // an ExtraneousDataError is returned. ++ // ++ // WARNING: Valid doesn't check if encoded CBOR data item is valid (i.e. validity) ++ // and RFC 8949 distinctly defines what is "Valid" and what is "Well-formed". ++ // ++ // Deprecated: Valid is kept for compatibility and should not be used. ++ // Use Wellformed instead because it has a more appropriate name. ++ Valid(data []byte) error ++ ++ // Wellformed checks whether data is a well-formed encoded CBOR data item and ++ // that it complies with configurable restrictions such as MaxNestedLevels, ++ // MaxArrayElements, MaxMapPairs, etc. ++ // ++ // If there are any remaining bytes after the CBOR data item, ++ // an ExtraneousDataError is returned. ++ Wellformed(data []byte) error ++ ++ // NewDecoder returns a new decoder that reads from r using dm DecMode. ++ NewDecoder(r io.Reader) *Decoder ++ ++ // DecOptions returns user specified options used to create this DecMode. ++ DecOptions() DecOptions ++} ++ ++type decMode struct { ++ tags tagProvider ++ dupMapKey DupMapKeyMode ++ timeTag DecTagMode ++ maxNestedLevels int ++ maxArrayElements int ++ maxMapPairs int ++ indefLength IndefLengthMode ++ tagsMd TagsMode ++ intDec IntDecMode ++ mapKeyByteString MapKeyByteStringMode ++ extraReturnErrors ExtraDecErrorCond ++ defaultMapType reflect.Type ++ utf8 UTF8Mode ++ fieldNameMatching FieldNameMatchingMode ++ bigIntDec BigIntDecMode ++ defaultByteStringType reflect.Type ++ byteStringToString ByteStringToStringMode ++ fieldNameByteString FieldNameByteStringMode ++ unrecognizedTagToAny UnrecognizedTagToAnyMode ++ timeTagToAny TimeTagToAnyMode ++ simpleValues *SimpleValueRegistry ++ nanDec NaNMode ++ infDec InfMode ++ byteStringToTime ByteStringToTimeMode ++ byteStringExpectedFormat ByteStringExpectedFormatMode ++ bignumTag BignumTagMode ++ binaryUnmarshaler BinaryUnmarshalerMode ++} ++ ++var defaultDecMode, _ = DecOptions{}.decMode() ++ ++// DecOptions returns user specified options used to create this DecMode. ++func (dm *decMode) DecOptions() DecOptions { ++ simpleValues := dm.simpleValues ++ if simpleValues == defaultSimpleValues { ++ // Users can't explicitly set this to defaultSimpleValues. It must have been nil in ++ // the original DecOptions. ++ simpleValues = nil ++ } ++ ++ return DecOptions{ ++ DupMapKey: dm.dupMapKey, ++ TimeTag: dm.timeTag, ++ MaxNestedLevels: dm.maxNestedLevels, ++ MaxArrayElements: dm.maxArrayElements, ++ MaxMapPairs: dm.maxMapPairs, ++ IndefLength: dm.indefLength, ++ TagsMd: dm.tagsMd, ++ IntDec: dm.intDec, ++ MapKeyByteString: dm.mapKeyByteString, ++ ExtraReturnErrors: dm.extraReturnErrors, ++ DefaultMapType: dm.defaultMapType, ++ UTF8: dm.utf8, ++ FieldNameMatching: dm.fieldNameMatching, ++ BigIntDec: dm.bigIntDec, ++ DefaultByteStringType: dm.defaultByteStringType, ++ ByteStringToString: dm.byteStringToString, ++ FieldNameByteString: dm.fieldNameByteString, ++ UnrecognizedTagToAny: dm.unrecognizedTagToAny, ++ TimeTagToAny: dm.timeTagToAny, ++ SimpleValues: simpleValues, ++ NaN: dm.nanDec, ++ Inf: dm.infDec, ++ ByteStringToTime: dm.byteStringToTime, ++ ByteStringExpectedFormat: dm.byteStringExpectedFormat, ++ BignumTag: dm.bignumTag, ++ BinaryUnmarshaler: dm.binaryUnmarshaler, ++ } ++} ++ ++// Unmarshal parses the CBOR-encoded data into the value pointed to by v ++// using dm decoding mode. If v is nil, not a pointer, or a nil pointer, ++// Unmarshal returns an error. ++// ++// See the documentation for Unmarshal for details. ++func (dm *decMode) Unmarshal(data []byte, v interface{}) error { ++ d := decoder{data: data, dm: dm} ++ ++ // Check well-formedness. ++ off := d.off // Save offset before data validation ++ err := d.wellformed(false, false) // don't allow any extra data after valid data item. ++ d.off = off // Restore offset ++ if err != nil { ++ return err ++ } ++ ++ return d.value(v) ++} ++ ++// UnmarshalFirst parses the first CBOR data item into the value pointed to by v ++// using dm decoding mode. Any remaining bytes are returned in rest. ++// ++// If v is nil, not a pointer, or a nil pointer, UnmarshalFirst returns an error. ++// ++// See the documentation for Unmarshal for details. ++func (dm *decMode) UnmarshalFirst(data []byte, v interface{}) (rest []byte, err error) { ++ d := decoder{data: data, dm: dm} ++ ++ // check well-formedness. ++ off := d.off // Save offset before data validation ++ err = d.wellformed(true, false) // allow extra data after well-formed data item ++ d.off = off // Restore offset ++ ++ // If it is well-formed, parse the value. This is structured like this to allow ++ // better test coverage ++ if err == nil { ++ err = d.value(v) ++ } ++ ++ // If either wellformed or value returned an error, do not return rest bytes ++ if err != nil { ++ return nil, err ++ } ++ ++ // Return the rest of the data slice (which might be len 0) ++ return d.data[d.off:], nil ++} ++ ++// Valid checks whether data is a well-formed encoded CBOR data item and ++// that it complies with configurable restrictions such as MaxNestedLevels, ++// MaxArrayElements, MaxMapPairs, etc. ++// ++// If there are any remaining bytes after the CBOR data item, ++// an ExtraneousDataError is returned. ++// ++// WARNING: Valid doesn't check if encoded CBOR data item is valid (i.e. validity) ++// and RFC 8949 distinctly defines what is "Valid" and what is "Well-formed". ++// ++// Deprecated: Valid is kept for compatibility and should not be used. ++// Use Wellformed instead because it has a more appropriate name. ++func (dm *decMode) Valid(data []byte) error { ++ return dm.Wellformed(data) ++} ++ ++// Wellformed checks whether data is a well-formed encoded CBOR data item and ++// that it complies with configurable restrictions such as MaxNestedLevels, ++// MaxArrayElements, MaxMapPairs, etc. ++// ++// If there are any remaining bytes after the CBOR data item, ++// an ExtraneousDataError is returned. ++func (dm *decMode) Wellformed(data []byte) error { ++ d := decoder{data: data, dm: dm} ++ return d.wellformed(false, false) ++} ++ ++// NewDecoder returns a new decoder that reads from r using dm DecMode. ++func (dm *decMode) NewDecoder(r io.Reader) *Decoder { ++ return &Decoder{r: r, d: decoder{dm: dm}} ++} ++ ++type decoder struct { ++ data []byte ++ off int // next read offset in data ++ dm *decMode ++ ++ // expectedLaterEncodingTags stores a stack of encountered "Expected Later Encoding" tags, ++ // if any. ++ // ++ // The "Expected Later Encoding" tags (21 to 23) are valid for any data item. When decoding ++ // byte strings, the effective encoding comes from the tag nearest to the byte string being ++ // decoded. For example, the effective encoding of the byte string 21(22(h'41')) would be ++ // controlled by tag 22,and in the data item 23(h'42', 22([21(h'43')])]) the effective ++ // encoding of the byte strings h'42' and h'43' would be controlled by tag 23 and 21, ++ // respectively. ++ expectedLaterEncodingTags []uint64 ++} ++ ++// value decodes CBOR data item into the value pointed to by v. ++// If CBOR data item fails to be decoded into v, ++// error is returned and offset is moved to the next CBOR data item. ++// Precondition: d.data contains at least one well-formed CBOR data item. ++func (d *decoder) value(v interface{}) error { ++ // v can't be nil, non-pointer, or nil pointer value. ++ if v == nil { ++ return &InvalidUnmarshalError{"cbor: Unmarshal(nil)"} ++ } ++ rv := reflect.ValueOf(v) ++ if rv.Kind() != reflect.Ptr { ++ return &InvalidUnmarshalError{"cbor: Unmarshal(non-pointer " + rv.Type().String() + ")"} ++ } else if rv.IsNil() { ++ return &InvalidUnmarshalError{"cbor: Unmarshal(nil " + rv.Type().String() + ")"} ++ } ++ rv = rv.Elem() ++ return d.parseToValue(rv, getTypeInfo(rv.Type())) ++} ++ ++// parseToValue decodes CBOR data to value. It assumes data is well-formed, ++// and does not perform bounds checking. ++func (d *decoder) parseToValue(v reflect.Value, tInfo *typeInfo) error { //nolint:gocyclo ++ ++ // Decode CBOR nil or CBOR undefined to pointer value by setting pointer value to nil. ++ if d.nextCBORNil() && v.Kind() == reflect.Ptr { ++ d.skip() ++ v.Set(reflect.Zero(v.Type())) ++ return nil ++ } ++ ++ if tInfo.spclType == specialTypeIface { ++ if !v.IsNil() { ++ // Use value type ++ v = v.Elem() ++ tInfo = getTypeInfo(v.Type()) ++ } else { //nolint:gocritic ++ // Create and use registered type if CBOR data is registered tag ++ if d.dm.tags != nil && d.nextCBORType() == cborTypeTag { ++ ++ off := d.off ++ var tagNums []uint64 ++ for d.nextCBORType() == cborTypeTag { ++ _, _, tagNum := d.getHead() ++ tagNums = append(tagNums, tagNum) ++ } ++ d.off = off ++ ++ registeredType := d.dm.tags.getTypeFromTagNum(tagNums) ++ if registeredType != nil { ++ if registeredType.Implements(tInfo.nonPtrType) || ++ reflect.PtrTo(registeredType).Implements(tInfo.nonPtrType) { ++ v.Set(reflect.New(registeredType)) ++ v = v.Elem() ++ tInfo = getTypeInfo(registeredType) ++ } ++ } ++ } ++ } ++ } ++ ++ // Create new value for the pointer v to point to. ++ // At this point, CBOR value is not nil/undefined if v is a pointer. ++ for v.Kind() == reflect.Ptr { ++ if v.IsNil() { ++ if !v.CanSet() { ++ d.skip() ++ return errors.New("cbor: cannot set new value for " + v.Type().String()) ++ } ++ v.Set(reflect.New(v.Type().Elem())) ++ } ++ v = v.Elem() ++ } ++ ++ // Strip self-described CBOR tag number. ++ for d.nextCBORType() == cborTypeTag { ++ off := d.off ++ _, _, tagNum := d.getHead() ++ if tagNum != tagNumSelfDescribedCBOR { ++ d.off = off ++ break ++ } ++ } ++ ++ // Check validity of supported built-in tags. ++ off := d.off ++ for d.nextCBORType() == cborTypeTag { ++ _, _, tagNum := d.getHead() ++ if err := validBuiltinTag(tagNum, d.data[d.off]); err != nil { ++ d.skip() ++ return err ++ } ++ } ++ d.off = off ++ ++ if tInfo.spclType != specialTypeNone { ++ switch tInfo.spclType { ++ case specialTypeEmptyIface: ++ iv, err := d.parse(false) // Skipped self-described CBOR tag number already. ++ if iv != nil { ++ v.Set(reflect.ValueOf(iv)) ++ } ++ return err ++ ++ case specialTypeTag: ++ return d.parseToTag(v) ++ ++ case specialTypeTime: ++ if d.nextCBORNil() { ++ // Decoding CBOR null and undefined to time.Time is no-op. ++ d.skip() ++ return nil ++ } ++ tm, ok, err := d.parseToTime() ++ if err != nil { ++ return err ++ } ++ if ok { ++ v.Set(reflect.ValueOf(tm)) ++ } ++ return nil ++ ++ case specialTypeUnmarshalerIface: ++ return d.parseToUnmarshaler(v) ++ } ++ } ++ ++ // Check registered tag number ++ if tagItem := d.getRegisteredTagItem(tInfo.nonPtrType); tagItem != nil { ++ t := d.nextCBORType() ++ if t != cborTypeTag { ++ if tagItem.opts.DecTag == DecTagRequired { ++ d.skip() // Required tag number is absent, skip entire tag ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: tInfo.typ.String(), ++ errorMsg: "expect CBOR tag value"} ++ } ++ } else if err := d.validRegisteredTagNums(tagItem); err != nil { ++ d.skip() // Skip tag content ++ return err ++ } ++ } ++ ++ t := d.nextCBORType() ++ ++ switch t { ++ case cborTypePositiveInt: ++ _, _, val := d.getHead() ++ return fillPositiveInt(t, val, v) ++ ++ case cborTypeNegativeInt: ++ _, _, val := d.getHead() ++ if val > math.MaxInt64 { ++ // CBOR negative integer overflows int64, use big.Int to store value. ++ bi := new(big.Int) ++ bi.SetUint64(val) ++ bi.Add(bi, big.NewInt(1)) ++ bi.Neg(bi) ++ ++ if tInfo.nonPtrType == typeBigInt { ++ v.Set(reflect.ValueOf(*bi)) ++ return nil ++ } ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: tInfo.nonPtrType.String(), ++ errorMsg: bi.String() + " overflows Go's int64", ++ } ++ } ++ nValue := int64(-1) ^ int64(val) ++ return fillNegativeInt(t, nValue, v) ++ ++ case cborTypeByteString: ++ b, copied := d.parseByteString() ++ b, converted, err := d.applyByteStringTextConversion(b, v.Type()) ++ if err != nil { ++ return err ++ } ++ copied = copied || converted ++ return fillByteString(t, b, !copied, v, d.dm.byteStringToString, d.dm.binaryUnmarshaler) ++ ++ case cborTypeTextString: ++ b, err := d.parseTextString() ++ if err != nil { ++ return err ++ } ++ return fillTextString(t, b, v) ++ ++ case cborTypePrimitives: ++ _, ai, val := d.getHead() ++ switch ai { ++ case additionalInformationAsFloat16: ++ f := float64(float16.Frombits(uint16(val)).Float32()) ++ return fillFloat(t, f, v) ++ ++ case additionalInformationAsFloat32: ++ f := float64(math.Float32frombits(uint32(val))) ++ return fillFloat(t, f, v) ++ ++ case additionalInformationAsFloat64: ++ f := math.Float64frombits(val) ++ return fillFloat(t, f, v) ++ ++ default: // ai <= 24 ++ if d.dm.simpleValues.rejected[SimpleValue(val)] { ++ return &UnacceptableDataItemError{ ++ CBORType: t.String(), ++ Message: "simple value " + strconv.FormatInt(int64(val), 10) + " is not recognized", ++ } ++ } ++ ++ switch ai { ++ case additionalInformationAsFalse, ++ additionalInformationAsTrue: ++ return fillBool(t, ai == additionalInformationAsTrue, v) ++ ++ case additionalInformationAsNull, ++ additionalInformationAsUndefined: ++ return fillNil(t, v) ++ ++ default: ++ return fillPositiveInt(t, val, v) ++ } ++ } ++ ++ case cborTypeTag: ++ _, _, tagNum := d.getHead() ++ switch tagNum { ++ case tagNumUnsignedBignum: ++ // Bignum (tag 2) can be decoded to uint, int, float, slice, array, or big.Int. ++ b, copied := d.parseByteString() ++ bi := new(big.Int).SetBytes(b) ++ ++ if tInfo.nonPtrType == typeBigInt { ++ v.Set(reflect.ValueOf(*bi)) ++ return nil ++ } ++ if tInfo.nonPtrKind == reflect.Slice || tInfo.nonPtrKind == reflect.Array { ++ return fillByteString(t, b, !copied, v, ByteStringToStringForbidden, d.dm.binaryUnmarshaler) ++ } ++ if bi.IsUint64() { ++ return fillPositiveInt(t, bi.Uint64(), v) ++ } ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: tInfo.nonPtrType.String(), ++ errorMsg: bi.String() + " overflows " + v.Type().String(), ++ } ++ ++ case tagNumNegativeBignum: ++ // Bignum (tag 3) can be decoded to int, float, slice, array, or big.Int. ++ b, copied := d.parseByteString() ++ bi := new(big.Int).SetBytes(b) ++ bi.Add(bi, big.NewInt(1)) ++ bi.Neg(bi) ++ ++ if tInfo.nonPtrType == typeBigInt { ++ v.Set(reflect.ValueOf(*bi)) ++ return nil ++ } ++ if tInfo.nonPtrKind == reflect.Slice || tInfo.nonPtrKind == reflect.Array { ++ return fillByteString(t, b, !copied, v, ByteStringToStringForbidden, d.dm.binaryUnmarshaler) ++ } ++ if bi.IsInt64() { ++ return fillNegativeInt(t, bi.Int64(), v) ++ } ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: tInfo.nonPtrType.String(), ++ errorMsg: bi.String() + " overflows " + v.Type().String(), ++ } ++ ++ case tagNumExpectedLaterEncodingBase64URL, tagNumExpectedLaterEncodingBase64, tagNumExpectedLaterEncodingBase16: ++ // If conversion for interoperability with text encodings is not configured, ++ // treat tags 21-23 as unregistered tags. ++ if d.dm.byteStringToString == ByteStringToStringAllowedWithExpectedLaterEncoding || d.dm.byteStringExpectedFormat != ByteStringExpectedFormatNone { ++ d.expectedLaterEncodingTags = append(d.expectedLaterEncodingTags, tagNum) ++ defer func() { ++ d.expectedLaterEncodingTags = d.expectedLaterEncodingTags[:len(d.expectedLaterEncodingTags)-1] ++ }() ++ } ++ } ++ ++ return d.parseToValue(v, tInfo) ++ ++ case cborTypeArray: ++ if tInfo.nonPtrKind == reflect.Slice { ++ return d.parseArrayToSlice(v, tInfo) ++ } else if tInfo.nonPtrKind == reflect.Array { ++ return d.parseArrayToArray(v, tInfo) ++ } else if tInfo.nonPtrKind == reflect.Struct { ++ return d.parseArrayToStruct(v, tInfo) ++ } ++ d.skip() ++ return &UnmarshalTypeError{CBORType: t.String(), GoType: tInfo.nonPtrType.String()} ++ ++ case cborTypeMap: ++ if tInfo.nonPtrKind == reflect.Struct { ++ return d.parseMapToStruct(v, tInfo) ++ } else if tInfo.nonPtrKind == reflect.Map { ++ return d.parseMapToMap(v, tInfo) ++ } ++ d.skip() ++ return &UnmarshalTypeError{CBORType: t.String(), GoType: tInfo.nonPtrType.String()} ++ } ++ ++ return nil ++} ++ ++func (d *decoder) parseToTag(v reflect.Value) error { ++ if d.nextCBORNil() { ++ // Decoding CBOR null and undefined to cbor.Tag is no-op. ++ d.skip() ++ return nil ++ } ++ ++ t := d.nextCBORType() ++ if t != cborTypeTag { ++ d.skip() ++ return &UnmarshalTypeError{CBORType: t.String(), GoType: typeTag.String()} ++ } ++ ++ // Unmarshal tag number ++ _, _, num := d.getHead() ++ ++ // Unmarshal tag content ++ content, err := d.parse(false) ++ if err != nil { ++ return err ++ } ++ ++ v.Set(reflect.ValueOf(Tag{num, content})) ++ return nil ++} ++ ++// parseToTime decodes the current data item as a time.Time. The bool return value is false if and ++// only if the destination value should remain unmodified. ++func (d *decoder) parseToTime() (time.Time, bool, error) { ++ // Verify that tag number or absence of tag number is acceptable to specified timeTag. ++ if t := d.nextCBORType(); t == cborTypeTag { ++ if d.dm.timeTag == DecTagIgnored { ++ // Skip all enclosing tags ++ for t == cborTypeTag { ++ d.getHead() ++ t = d.nextCBORType() ++ } ++ if d.nextCBORNil() { ++ d.skip() ++ return time.Time{}, false, nil ++ } ++ } else { ++ // Read tag number ++ _, _, tagNum := d.getHead() ++ if tagNum != 0 && tagNum != 1 { ++ d.skip() // skip tag content ++ return time.Time{}, false, errors.New("cbor: wrong tag number for time.Time, got " + strconv.Itoa(int(tagNum)) + ", expect 0 or 1") ++ } ++ } ++ } else { ++ if d.dm.timeTag == DecTagRequired { ++ d.skip() ++ return time.Time{}, false, &UnmarshalTypeError{CBORType: t.String(), GoType: typeTime.String(), errorMsg: "expect CBOR tag value"} ++ } ++ } ++ ++ switch t := d.nextCBORType(); t { ++ case cborTypeByteString: ++ if d.dm.byteStringToTime == ByteStringToTimeAllowed { ++ b, _ := d.parseByteString() ++ t, err := time.Parse(time.RFC3339, string(b)) ++ if err != nil { ++ return time.Time{}, false, fmt.Errorf("cbor: cannot set %q for time.Time: %w", string(b), err) ++ } ++ return t, true, nil ++ } ++ return time.Time{}, false, &UnmarshalTypeError{CBORType: t.String(), GoType: typeTime.String()} ++ ++ case cborTypeTextString: ++ s, err := d.parseTextString() ++ if err != nil { ++ return time.Time{}, false, err ++ } ++ t, err := time.Parse(time.RFC3339, string(s)) ++ if err != nil { ++ return time.Time{}, false, errors.New("cbor: cannot set " + string(s) + " for time.Time: " + err.Error()) ++ } ++ return t, true, nil ++ ++ case cborTypePositiveInt: ++ _, _, val := d.getHead() ++ if val > math.MaxInt64 { ++ return time.Time{}, false, &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: typeTime.String(), ++ errorMsg: fmt.Sprintf("%d overflows Go's int64", val), ++ } ++ } ++ return time.Unix(int64(val), 0), true, nil ++ ++ case cborTypeNegativeInt: ++ _, _, val := d.getHead() ++ if val > math.MaxInt64 { ++ if val == math.MaxUint64 { ++ // Maximum absolute value representable by negative integer is 2^64, ++ // not 2^64-1, so it overflows uint64. ++ return time.Time{}, false, &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: typeTime.String(), ++ errorMsg: "-18446744073709551616 overflows Go's int64", ++ } ++ } ++ return time.Time{}, false, &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: typeTime.String(), ++ errorMsg: fmt.Sprintf("-%d overflows Go's int64", val+1), ++ } ++ } ++ return time.Unix(int64(-1)^int64(val), 0), true, nil ++ ++ case cborTypePrimitives: ++ _, ai, val := d.getHead() ++ var f float64 ++ switch ai { ++ case additionalInformationAsFloat16: ++ f = float64(float16.Frombits(uint16(val)).Float32()) ++ ++ case additionalInformationAsFloat32: ++ f = float64(math.Float32frombits(uint32(val))) ++ ++ case additionalInformationAsFloat64: ++ f = math.Float64frombits(val) ++ ++ default: ++ return time.Time{}, false, &UnmarshalTypeError{CBORType: t.String(), GoType: typeTime.String()} ++ } ++ ++ if math.IsNaN(f) || math.IsInf(f, 0) { ++ // https://www.rfc-editor.org/rfc/rfc8949.html#section-3.4.2-6 ++ return time.Time{}, true, nil ++ } ++ seconds, fractional := math.Modf(f) ++ return time.Unix(int64(seconds), int64(fractional*1e9)), true, nil ++ ++ default: ++ return time.Time{}, false, &UnmarshalTypeError{CBORType: t.String(), GoType: typeTime.String()} ++ } ++} ++ ++// parseToUnmarshaler parses CBOR data to value implementing Unmarshaler interface. ++// It assumes data is well-formed, and does not perform bounds checking. ++func (d *decoder) parseToUnmarshaler(v reflect.Value) error { ++ if d.nextCBORNil() && v.Kind() == reflect.Ptr && v.IsNil() { ++ d.skip() ++ return nil ++ } ++ ++ if v.Kind() != reflect.Ptr && v.CanAddr() { ++ v = v.Addr() ++ } ++ if u, ok := v.Interface().(Unmarshaler); ok { ++ start := d.off ++ d.skip() ++ return u.UnmarshalCBOR(d.data[start:d.off]) ++ } ++ d.skip() ++ return errors.New("cbor: failed to assert " + v.Type().String() + " as cbor.Unmarshaler") ++} ++ ++// parse parses CBOR data and returns value in default Go type. ++// It assumes data is well-formed, and does not perform bounds checking. ++func (d *decoder) parse(skipSelfDescribedTag bool) (interface{}, error) { //nolint:gocyclo ++ // Strip self-described CBOR tag number. ++ if skipSelfDescribedTag { ++ for d.nextCBORType() == cborTypeTag { ++ off := d.off ++ _, _, tagNum := d.getHead() ++ if tagNum != tagNumSelfDescribedCBOR { ++ d.off = off ++ break ++ } ++ } ++ } ++ ++ // Check validity of supported built-in tags. ++ off := d.off ++ for d.nextCBORType() == cborTypeTag { ++ _, _, tagNum := d.getHead() ++ if err := validBuiltinTag(tagNum, d.data[d.off]); err != nil { ++ d.skip() ++ return nil, err ++ } ++ } ++ d.off = off ++ ++ t := d.nextCBORType() ++ switch t { ++ case cborTypePositiveInt: ++ _, _, val := d.getHead() ++ ++ switch d.dm.intDec { ++ case IntDecConvertNone: ++ return val, nil ++ ++ case IntDecConvertSigned, IntDecConvertSignedOrFail: ++ if val > math.MaxInt64 { ++ return nil, &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: reflect.TypeOf(int64(0)).String(), ++ errorMsg: strconv.FormatUint(val, 10) + " overflows Go's int64", ++ } ++ } ++ ++ return int64(val), nil ++ ++ case IntDecConvertSignedOrBigInt: ++ if val > math.MaxInt64 { ++ bi := new(big.Int).SetUint64(val) ++ if d.dm.bigIntDec == BigIntDecodePointer { ++ return bi, nil ++ } ++ return *bi, nil ++ } ++ ++ return int64(val), nil ++ ++ default: ++ // not reachable ++ } ++ ++ case cborTypeNegativeInt: ++ _, _, val := d.getHead() ++ ++ if val > math.MaxInt64 { ++ // CBOR negative integer value overflows Go int64, use big.Int instead. ++ bi := new(big.Int).SetUint64(val) ++ bi.Add(bi, big.NewInt(1)) ++ bi.Neg(bi) ++ ++ if d.dm.intDec == IntDecConvertSignedOrFail { ++ return nil, &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: reflect.TypeOf(int64(0)).String(), ++ errorMsg: bi.String() + " overflows Go's int64", ++ } ++ } ++ ++ if d.dm.bigIntDec == BigIntDecodePointer { ++ return bi, nil ++ } ++ return *bi, nil ++ } ++ ++ nValue := int64(-1) ^ int64(val) ++ return nValue, nil ++ ++ case cborTypeByteString: ++ b, copied := d.parseByteString() ++ var effectiveByteStringType = d.dm.defaultByteStringType ++ if effectiveByteStringType == nil { ++ effectiveByteStringType = typeByteSlice ++ } ++ b, converted, err := d.applyByteStringTextConversion(b, effectiveByteStringType) ++ if err != nil { ++ return nil, err ++ } ++ copied = copied || converted ++ ++ switch effectiveByteStringType { ++ case typeByteSlice: ++ if copied { ++ return b, nil ++ } ++ clone := make([]byte, len(b)) ++ copy(clone, b) ++ return clone, nil ++ ++ case typeString: ++ return string(b), nil ++ ++ default: ++ if copied || d.dm.defaultByteStringType.Kind() == reflect.String { ++ // Avoid an unnecessary copy since the conversion to string must ++ // copy the underlying bytes. ++ return reflect.ValueOf(b).Convert(d.dm.defaultByteStringType).Interface(), nil ++ } ++ clone := make([]byte, len(b)) ++ copy(clone, b) ++ return reflect.ValueOf(clone).Convert(d.dm.defaultByteStringType).Interface(), nil ++ } ++ ++ case cborTypeTextString: ++ b, err := d.parseTextString() ++ if err != nil { ++ return nil, err ++ } ++ return string(b), nil ++ ++ case cborTypeTag: ++ tagOff := d.off ++ _, _, tagNum := d.getHead() ++ contentOff := d.off ++ ++ switch tagNum { ++ case tagNumRFC3339Time, tagNumEpochTime: ++ d.off = tagOff ++ tm, _, err := d.parseToTime() ++ if err != nil { ++ return nil, err ++ } ++ ++ switch d.dm.timeTagToAny { ++ case TimeTagToTime: ++ return tm, nil ++ ++ case TimeTagToRFC3339: ++ if tagNum == 1 { ++ tm = tm.UTC() ++ } ++ // Call time.MarshalText() to format decoded time to RFC3339 format, ++ // and return error on time value that cannot be represented in ++ // RFC3339 format. E.g. year cannot exceed 9999, etc. ++ text, err := tm.Truncate(time.Second).MarshalText() ++ if err != nil { ++ return nil, fmt.Errorf("cbor: decoded time cannot be represented in RFC3339 format: %v", err) ++ } ++ return string(text), nil ++ ++ case TimeTagToRFC3339Nano: ++ if tagNum == 1 { ++ tm = tm.UTC() ++ } ++ // Call time.MarshalText() to format decoded time to RFC3339 format, ++ // and return error on time value that cannot be represented in ++ // RFC3339 format with sub-second precision. ++ text, err := tm.MarshalText() ++ if err != nil { ++ return nil, fmt.Errorf("cbor: decoded time cannot be represented in RFC3339 format with sub-second precision: %v", err) ++ } ++ return string(text), nil ++ ++ default: ++ // not reachable ++ } ++ ++ case tagNumUnsignedBignum: ++ b, _ := d.parseByteString() ++ bi := new(big.Int).SetBytes(b) ++ ++ if d.dm.bigIntDec == BigIntDecodePointer { ++ return bi, nil ++ } ++ return *bi, nil ++ ++ case tagNumNegativeBignum: ++ b, _ := d.parseByteString() ++ bi := new(big.Int).SetBytes(b) ++ bi.Add(bi, big.NewInt(1)) ++ bi.Neg(bi) ++ ++ if d.dm.bigIntDec == BigIntDecodePointer { ++ return bi, nil ++ } ++ return *bi, nil ++ ++ case tagNumExpectedLaterEncodingBase64URL, tagNumExpectedLaterEncodingBase64, tagNumExpectedLaterEncodingBase16: ++ // If conversion for interoperability with text encodings is not configured, ++ // treat tags 21-23 as unregistered tags. ++ if d.dm.byteStringToString == ByteStringToStringAllowedWithExpectedLaterEncoding || ++ d.dm.byteStringExpectedFormat != ByteStringExpectedFormatNone { ++ d.expectedLaterEncodingTags = append(d.expectedLaterEncodingTags, tagNum) ++ defer func() { ++ d.expectedLaterEncodingTags = d.expectedLaterEncodingTags[:len(d.expectedLaterEncodingTags)-1] ++ }() ++ return d.parse(false) ++ } ++ } ++ ++ if d.dm.tags != nil { ++ // Parse to specified type if tag number is registered. ++ tagNums := []uint64{tagNum} ++ for d.nextCBORType() == cborTypeTag { ++ _, _, num := d.getHead() ++ tagNums = append(tagNums, num) ++ } ++ registeredType := d.dm.tags.getTypeFromTagNum(tagNums) ++ if registeredType != nil { ++ d.off = tagOff ++ rv := reflect.New(registeredType) ++ if err := d.parseToValue(rv.Elem(), getTypeInfo(registeredType)); err != nil { ++ return nil, err ++ } ++ return rv.Elem().Interface(), nil ++ } ++ } ++ ++ // Parse tag content ++ d.off = contentOff ++ content, err := d.parse(false) ++ if err != nil { ++ return nil, err ++ } ++ if d.dm.unrecognizedTagToAny == UnrecognizedTagContentToAny { ++ return content, nil ++ } ++ return Tag{tagNum, content}, nil ++ ++ case cborTypePrimitives: ++ _, ai, val := d.getHead() ++ if ai <= 24 && d.dm.simpleValues.rejected[SimpleValue(val)] { ++ return nil, &UnacceptableDataItemError{ ++ CBORType: t.String(), ++ Message: "simple value " + strconv.FormatInt(int64(val), 10) + " is not recognized", ++ } ++ } ++ if ai < 20 || ai == 24 { ++ return SimpleValue(val), nil ++ } ++ ++ switch ai { ++ case additionalInformationAsFalse, ++ additionalInformationAsTrue: ++ return (ai == additionalInformationAsTrue), nil ++ ++ case additionalInformationAsNull, ++ additionalInformationAsUndefined: ++ return nil, nil ++ ++ case additionalInformationAsFloat16: ++ f := float64(float16.Frombits(uint16(val)).Float32()) ++ return f, nil ++ ++ case additionalInformationAsFloat32: ++ f := float64(math.Float32frombits(uint32(val))) ++ return f, nil ++ ++ case additionalInformationAsFloat64: ++ f := math.Float64frombits(val) ++ return f, nil ++ } ++ ++ case cborTypeArray: ++ return d.parseArray() ++ ++ case cborTypeMap: ++ if d.dm.defaultMapType != nil { ++ m := reflect.New(d.dm.defaultMapType) ++ err := d.parseToValue(m, getTypeInfo(m.Elem().Type())) ++ if err != nil { ++ return nil, err ++ } ++ return m.Elem().Interface(), nil ++ } ++ return d.parseMap() ++ } ++ ++ return nil, nil ++} ++ ++// parseByteString parses a CBOR encoded byte string. The returned byte slice ++// may be backed directly by the input. The second return value will be true if ++// and only if the slice is backed by a copy of the input. Callers are ++// responsible for making a copy if necessary. ++func (d *decoder) parseByteString() ([]byte, bool) { ++ _, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ if !indefiniteLength { ++ b := d.data[d.off : d.off+int(val)] ++ d.off += int(val) ++ return b, false ++ } ++ // Process indefinite length string chunks. ++ b := []byte{} ++ for !d.foundBreak() { ++ _, _, val = d.getHead() ++ b = append(b, d.data[d.off:d.off+int(val)]...) ++ d.off += int(val) ++ } ++ return b, true ++} ++ ++// applyByteStringTextConversion converts bytes read from a byte string to or from a configured text ++// encoding. If no transformation was performed (because it was not required), the original byte ++// slice is returned and the bool return value is false. Otherwise, a new slice containing the ++// converted bytes is returned along with the bool value true. ++func (d *decoder) applyByteStringTextConversion( ++ src []byte, ++ dstType reflect.Type, ++) ( ++ dst []byte, ++ transformed bool, ++ err error, ++) { ++ switch dstType.Kind() { ++ case reflect.String: ++ if d.dm.byteStringToString != ByteStringToStringAllowedWithExpectedLaterEncoding || len(d.expectedLaterEncodingTags) == 0 { ++ return src, false, nil ++ } ++ ++ switch d.expectedLaterEncodingTags[len(d.expectedLaterEncodingTags)-1] { ++ case tagNumExpectedLaterEncodingBase64URL: ++ encoded := make([]byte, base64.RawURLEncoding.EncodedLen(len(src))) ++ base64.RawURLEncoding.Encode(encoded, src) ++ return encoded, true, nil ++ ++ case tagNumExpectedLaterEncodingBase64: ++ encoded := make([]byte, base64.StdEncoding.EncodedLen(len(src))) ++ base64.StdEncoding.Encode(encoded, src) ++ return encoded, true, nil ++ ++ case tagNumExpectedLaterEncodingBase16: ++ encoded := make([]byte, hex.EncodedLen(len(src))) ++ hex.Encode(encoded, src) ++ return encoded, true, nil ++ ++ default: ++ // If this happens, there is a bug: the decoder has pushed an invalid ++ // "expected later encoding" tag to the stack. ++ panic(fmt.Sprintf("unrecognized expected later encoding tag: %d", d.expectedLaterEncodingTags)) ++ } ++ ++ case reflect.Slice: ++ if dstType.Elem().Kind() != reflect.Uint8 || len(d.expectedLaterEncodingTags) > 0 { ++ // Either the destination is not a slice of bytes, or the encoder that ++ // produced the input indicated an expected text encoding tag and therefore ++ // the content of the byte string has NOT been text encoded. ++ return src, false, nil ++ } ++ ++ switch d.dm.byteStringExpectedFormat { ++ case ByteStringExpectedBase64URL: ++ decoded := make([]byte, base64.RawURLEncoding.DecodedLen(len(src))) ++ n, err := base64.RawURLEncoding.Decode(decoded, src) ++ if err != nil { ++ return nil, false, newByteStringExpectedFormatError(ByteStringExpectedBase64URL, err) ++ } ++ return decoded[:n], true, nil ++ ++ case ByteStringExpectedBase64: ++ decoded := make([]byte, base64.StdEncoding.DecodedLen(len(src))) ++ n, err := base64.StdEncoding.Decode(decoded, src) ++ if err != nil { ++ return nil, false, newByteStringExpectedFormatError(ByteStringExpectedBase64, err) ++ } ++ return decoded[:n], true, nil ++ ++ case ByteStringExpectedBase16: ++ decoded := make([]byte, hex.DecodedLen(len(src))) ++ n, err := hex.Decode(decoded, src) ++ if err != nil { ++ return nil, false, newByteStringExpectedFormatError(ByteStringExpectedBase16, err) ++ } ++ return decoded[:n], true, nil ++ } ++ } ++ ++ return src, false, nil ++} ++ ++// parseTextString parses CBOR encoded text string. It returns a byte slice ++// to prevent creating an extra copy of string. Caller should wrap returned ++// byte slice as string when needed. ++func (d *decoder) parseTextString() ([]byte, error) { ++ _, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ if !indefiniteLength { ++ b := d.data[d.off : d.off+int(val)] ++ d.off += int(val) ++ if d.dm.utf8 == UTF8RejectInvalid && !utf8.Valid(b) { ++ return nil, &SemanticError{"cbor: invalid UTF-8 string"} ++ } ++ return b, nil ++ } ++ // Process indefinite length string chunks. ++ b := []byte{} ++ for !d.foundBreak() { ++ _, _, val = d.getHead() ++ x := d.data[d.off : d.off+int(val)] ++ d.off += int(val) ++ if d.dm.utf8 == UTF8RejectInvalid && !utf8.Valid(x) { ++ for !d.foundBreak() { ++ d.skip() // Skip remaining chunk on error ++ } ++ return nil, &SemanticError{"cbor: invalid UTF-8 string"} ++ } ++ b = append(b, x...) ++ } ++ return b, nil ++} ++ ++func (d *decoder) parseArray() ([]interface{}, error) { ++ _, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ hasSize := !indefiniteLength ++ count := int(val) ++ if !hasSize { ++ count = d.numOfItemsUntilBreak() // peek ahead to get array size to preallocate slice for better performance ++ } ++ v := make([]interface{}, count) ++ var e interface{} ++ var err, lastErr error ++ for i := 0; (hasSize && i < count) || (!hasSize && !d.foundBreak()); i++ { ++ if e, lastErr = d.parse(true); lastErr != nil { ++ if err == nil { ++ err = lastErr ++ } ++ continue ++ } ++ v[i] = e ++ } ++ return v, err ++} ++ ++func (d *decoder) parseArrayToSlice(v reflect.Value, tInfo *typeInfo) error { ++ _, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ hasSize := !indefiniteLength ++ count := int(val) ++ if !hasSize { ++ count = d.numOfItemsUntilBreak() // peek ahead to get array size to preallocate slice for better performance ++ } ++ if v.IsNil() || v.Cap() < count || count == 0 { ++ v.Set(reflect.MakeSlice(tInfo.nonPtrType, count, count)) ++ } ++ v.SetLen(count) ++ var err error ++ for i := 0; (hasSize && i < count) || (!hasSize && !d.foundBreak()); i++ { ++ if lastErr := d.parseToValue(v.Index(i), tInfo.elemTypeInfo); lastErr != nil { ++ if err == nil { ++ err = lastErr ++ } ++ } ++ } ++ return err ++} ++ ++func (d *decoder) parseArrayToArray(v reflect.Value, tInfo *typeInfo) error { ++ _, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ hasSize := !indefiniteLength ++ count := int(val) ++ gi := 0 ++ vLen := v.Len() ++ var err error ++ for ci := 0; (hasSize && ci < count) || (!hasSize && !d.foundBreak()); ci++ { ++ if gi < vLen { ++ // Read CBOR array element and set array element ++ if lastErr := d.parseToValue(v.Index(gi), tInfo.elemTypeInfo); lastErr != nil { ++ if err == nil { ++ err = lastErr ++ } ++ } ++ gi++ ++ } else { ++ d.skip() // Skip remaining CBOR array element ++ } ++ } ++ // Set remaining Go array elements to zero values. ++ if gi < vLen { ++ zeroV := reflect.Zero(tInfo.elemTypeInfo.typ) ++ for ; gi < vLen; gi++ { ++ v.Index(gi).Set(zeroV) ++ } ++ } ++ return err ++} ++ ++func (d *decoder) parseMap() (interface{}, error) { ++ _, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ hasSize := !indefiniteLength ++ count := int(val) ++ m := make(map[interface{}]interface{}) ++ var k, e interface{} ++ var err, lastErr error ++ keyCount := 0 ++ for i := 0; (hasSize && i < count) || (!hasSize && !d.foundBreak()); i++ { ++ // Parse CBOR map key. ++ if k, lastErr = d.parse(true); lastErr != nil { ++ if err == nil { ++ err = lastErr ++ } ++ d.skip() ++ continue ++ } ++ ++ // Detect if CBOR map key can be used as Go map key. ++ rv := reflect.ValueOf(k) ++ if !isHashableValue(rv) { ++ var converted bool ++ if d.dm.mapKeyByteString == MapKeyByteStringAllowed { ++ k, converted = convertByteSliceToByteString(k) ++ } ++ if !converted { ++ if err == nil { ++ err = &InvalidMapKeyTypeError{rv.Type().String()} ++ } ++ d.skip() ++ continue ++ } ++ } ++ ++ // Parse CBOR map value. ++ if e, lastErr = d.parse(true); lastErr != nil { ++ if err == nil { ++ err = lastErr ++ } ++ continue ++ } ++ ++ // Add key-value pair to Go map. ++ m[k] = e ++ ++ // Detect duplicate map key. ++ if d.dm.dupMapKey == DupMapKeyEnforcedAPF { ++ newKeyCount := len(m) ++ if newKeyCount == keyCount { ++ m[k] = nil ++ err = &DupMapKeyError{k, i} ++ i++ ++ // skip the rest of the map ++ for ; (hasSize && i < count) || (!hasSize && !d.foundBreak()); i++ { ++ d.skip() // Skip map key ++ d.skip() // Skip map value ++ } ++ return m, err ++ } ++ keyCount = newKeyCount ++ } ++ } ++ return m, err ++} ++ ++func (d *decoder) parseMapToMap(v reflect.Value, tInfo *typeInfo) error { //nolint:gocyclo ++ _, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ hasSize := !indefiniteLength ++ count := int(val) ++ if v.IsNil() { ++ mapsize := count ++ if !hasSize { ++ mapsize = 0 ++ } ++ v.Set(reflect.MakeMapWithSize(tInfo.nonPtrType, mapsize)) ++ } ++ keyType, eleType := tInfo.keyTypeInfo.typ, tInfo.elemTypeInfo.typ ++ reuseKey, reuseEle := isImmutableKind(tInfo.keyTypeInfo.kind), isImmutableKind(tInfo.elemTypeInfo.kind) ++ var keyValue, eleValue, zeroKeyValue, zeroEleValue reflect.Value ++ keyIsInterfaceType := keyType == typeIntf // If key type is interface{}, need to check if key value is hashable. ++ var err, lastErr error ++ keyCount := v.Len() ++ var existingKeys map[interface{}]bool // Store existing map keys, used for detecting duplicate map key. ++ if d.dm.dupMapKey == DupMapKeyEnforcedAPF { ++ existingKeys = make(map[interface{}]bool, keyCount) ++ if keyCount > 0 { ++ vKeys := v.MapKeys() ++ for i := 0; i < len(vKeys); i++ { ++ existingKeys[vKeys[i].Interface()] = true ++ } ++ } ++ } ++ for i := 0; (hasSize && i < count) || (!hasSize && !d.foundBreak()); i++ { ++ // Parse CBOR map key. ++ if !keyValue.IsValid() { ++ keyValue = reflect.New(keyType).Elem() ++ } else if !reuseKey { ++ if !zeroKeyValue.IsValid() { ++ zeroKeyValue = reflect.Zero(keyType) ++ } ++ keyValue.Set(zeroKeyValue) ++ } ++ if lastErr = d.parseToValue(keyValue, tInfo.keyTypeInfo); lastErr != nil { ++ if err == nil { ++ err = lastErr ++ } ++ d.skip() ++ continue ++ } ++ ++ // Detect if CBOR map key can be used as Go map key. ++ if keyIsInterfaceType && keyValue.Elem().IsValid() { ++ if !isHashableValue(keyValue.Elem()) { ++ var converted bool ++ if d.dm.mapKeyByteString == MapKeyByteStringAllowed { ++ var k interface{} ++ k, converted = convertByteSliceToByteString(keyValue.Elem().Interface()) ++ if converted { ++ keyValue.Set(reflect.ValueOf(k)) ++ } ++ } ++ if !converted { ++ if err == nil { ++ err = &InvalidMapKeyTypeError{keyValue.Elem().Type().String()} ++ } ++ d.skip() ++ continue ++ } ++ } ++ } ++ ++ // Parse CBOR map value. ++ if !eleValue.IsValid() { ++ eleValue = reflect.New(eleType).Elem() ++ } else if !reuseEle { ++ if !zeroEleValue.IsValid() { ++ zeroEleValue = reflect.Zero(eleType) ++ } ++ eleValue.Set(zeroEleValue) ++ } ++ if lastErr := d.parseToValue(eleValue, tInfo.elemTypeInfo); lastErr != nil { ++ if err == nil { ++ err = lastErr ++ } ++ continue ++ } ++ ++ // Add key-value pair to Go map. ++ v.SetMapIndex(keyValue, eleValue) ++ ++ // Detect duplicate map key. ++ if d.dm.dupMapKey == DupMapKeyEnforcedAPF { ++ newKeyCount := v.Len() ++ if newKeyCount == keyCount { ++ kvi := keyValue.Interface() ++ if !existingKeys[kvi] { ++ v.SetMapIndex(keyValue, reflect.New(eleType).Elem()) ++ err = &DupMapKeyError{kvi, i} ++ i++ ++ // skip the rest of the map ++ for ; (hasSize && i < count) || (!hasSize && !d.foundBreak()); i++ { ++ d.skip() // skip map key ++ d.skip() // skip map value ++ } ++ return err ++ } ++ delete(existingKeys, kvi) ++ } ++ keyCount = newKeyCount ++ } ++ } ++ return err ++} ++ ++func (d *decoder) parseArrayToStruct(v reflect.Value, tInfo *typeInfo) error { ++ structType := getDecodingStructType(tInfo.nonPtrType) ++ if structType.err != nil { ++ return structType.err ++ } ++ ++ if !structType.toArray { ++ t := d.nextCBORType() ++ d.skip() ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: tInfo.nonPtrType.String(), ++ errorMsg: "cannot decode CBOR array to struct without toarray option", ++ } ++ } ++ ++ start := d.off ++ _, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ hasSize := !indefiniteLength ++ count := int(val) ++ if !hasSize { ++ count = d.numOfItemsUntilBreak() // peek ahead to get array size ++ } ++ if count != len(structType.fields) { ++ d.off = start ++ d.skip() ++ return &UnmarshalTypeError{ ++ CBORType: cborTypeArray.String(), ++ GoType: tInfo.typ.String(), ++ errorMsg: "cannot decode CBOR array to struct with different number of elements", ++ } ++ } ++ var err, lastErr error ++ for i := 0; (hasSize && i < count) || (!hasSize && !d.foundBreak()); i++ { ++ f := structType.fields[i] ++ ++ // Get field value by index ++ var fv reflect.Value ++ if len(f.idx) == 1 { ++ fv = v.Field(f.idx[0]) ++ } else { ++ fv, lastErr = getFieldValue(v, f.idx, func(v reflect.Value) (reflect.Value, error) { ++ // Return a new value for embedded field null pointer to point to, or return error. ++ if !v.CanSet() { ++ return reflect.Value{}, errors.New("cbor: cannot set embedded pointer to unexported struct: " + v.Type().String()) ++ } ++ v.Set(reflect.New(v.Type().Elem())) ++ return v, nil ++ }) ++ if lastErr != nil && err == nil { ++ err = lastErr ++ } ++ if !fv.IsValid() { ++ d.skip() ++ continue ++ } ++ } ++ ++ if lastErr = d.parseToValue(fv, f.typInfo); lastErr != nil { ++ if err == nil { ++ if typeError, ok := lastErr.(*UnmarshalTypeError); ok { ++ typeError.StructFieldName = tInfo.typ.String() + "." + f.name ++ err = typeError ++ } else { ++ err = lastErr ++ } ++ } ++ } ++ } ++ return err ++} ++ ++// parseMapToStruct needs to be fast so gocyclo can be ignored for now. ++func (d *decoder) parseMapToStruct(v reflect.Value, tInfo *typeInfo) error { //nolint:gocyclo ++ structType := getDecodingStructType(tInfo.nonPtrType) ++ if structType.err != nil { ++ return structType.err ++ } ++ ++ if structType.toArray { ++ t := d.nextCBORType() ++ d.skip() ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: tInfo.nonPtrType.String(), ++ errorMsg: "cannot decode CBOR map to struct with toarray option", ++ } ++ } ++ ++ var err, lastErr error ++ ++ // Get CBOR map size ++ _, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ hasSize := !indefiniteLength ++ count := int(val) ++ ++ // Keeps track of matched struct fields ++ var foundFldIdx []bool ++ { ++ const maxStackFields = 128 ++ if nfields := len(structType.fields); nfields <= maxStackFields { ++ // For structs with typical field counts, expect that this can be ++ // stack-allocated. ++ var a [maxStackFields]bool ++ foundFldIdx = a[:nfields] ++ } else { ++ foundFldIdx = make([]bool, len(structType.fields)) ++ } ++ } ++ ++ // Keeps track of CBOR map keys to detect duplicate map key ++ keyCount := 0 ++ var mapKeys map[interface{}]struct{} ++ ++ errOnUnknownField := (d.dm.extraReturnErrors & ExtraDecErrorUnknownField) > 0 ++ ++MapEntryLoop: ++ for j := 0; (hasSize && j < count) || (!hasSize && !d.foundBreak()); j++ { ++ var f *field ++ ++ // If duplicate field detection is enabled and the key at index j did not match any ++ // field, k will hold the map key. ++ var k interface{} ++ ++ t := d.nextCBORType() ++ if t == cborTypeTextString || (t == cborTypeByteString && d.dm.fieldNameByteString == FieldNameByteStringAllowed) { ++ var keyBytes []byte ++ if t == cborTypeTextString { ++ keyBytes, lastErr = d.parseTextString() ++ if lastErr != nil { ++ if err == nil { ++ err = lastErr ++ } ++ d.skip() // skip value ++ continue ++ } ++ } else { // cborTypeByteString ++ keyBytes, _ = d.parseByteString() ++ } ++ ++ // Check for exact match on field name. ++ if i, ok := structType.fieldIndicesByName[string(keyBytes)]; ok { ++ fld := structType.fields[i] ++ ++ if !foundFldIdx[i] { ++ f = fld ++ foundFldIdx[i] = true ++ } else if d.dm.dupMapKey == DupMapKeyEnforcedAPF { ++ err = &DupMapKeyError{fld.name, j} ++ d.skip() // skip value ++ j++ ++ // skip the rest of the map ++ for ; (hasSize && j < count) || (!hasSize && !d.foundBreak()); j++ { ++ d.skip() ++ d.skip() ++ } ++ return err ++ } else { ++ // discard repeated match ++ d.skip() ++ continue MapEntryLoop ++ } ++ } ++ ++ // Find field with case-insensitive match ++ if f == nil && d.dm.fieldNameMatching == FieldNameMatchingPreferCaseSensitive { ++ keyLen := len(keyBytes) ++ keyString := string(keyBytes) ++ for i := 0; i < len(structType.fields); i++ { ++ fld := structType.fields[i] ++ if len(fld.name) == keyLen && strings.EqualFold(fld.name, keyString) { ++ if !foundFldIdx[i] { ++ f = fld ++ foundFldIdx[i] = true ++ } else if d.dm.dupMapKey == DupMapKeyEnforcedAPF { ++ err = &DupMapKeyError{keyString, j} ++ d.skip() // skip value ++ j++ ++ // skip the rest of the map ++ for ; (hasSize && j < count) || (!hasSize && !d.foundBreak()); j++ { ++ d.skip() ++ d.skip() ++ } ++ return err ++ } else { ++ // discard repeated match ++ d.skip() ++ continue MapEntryLoop ++ } ++ break ++ } ++ } ++ } ++ ++ if d.dm.dupMapKey == DupMapKeyEnforcedAPF && f == nil { ++ k = string(keyBytes) ++ } ++ } else if t <= cborTypeNegativeInt { // uint/int ++ var nameAsInt int64 ++ ++ if t == cborTypePositiveInt { ++ _, _, val := d.getHead() ++ nameAsInt = int64(val) ++ } else { ++ _, _, val := d.getHead() ++ if val > math.MaxInt64 { ++ if err == nil { ++ err = &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: reflect.TypeOf(int64(0)).String(), ++ errorMsg: "-1-" + strconv.FormatUint(val, 10) + " overflows Go's int64", ++ } ++ } ++ d.skip() // skip value ++ continue ++ } ++ nameAsInt = int64(-1) ^ int64(val) ++ } ++ ++ // Find field ++ for i := 0; i < len(structType.fields); i++ { ++ fld := structType.fields[i] ++ if fld.keyAsInt && fld.nameAsInt == nameAsInt { ++ if !foundFldIdx[i] { ++ f = fld ++ foundFldIdx[i] = true ++ } else if d.dm.dupMapKey == DupMapKeyEnforcedAPF { ++ err = &DupMapKeyError{nameAsInt, j} ++ d.skip() // skip value ++ j++ ++ // skip the rest of the map ++ for ; (hasSize && j < count) || (!hasSize && !d.foundBreak()); j++ { ++ d.skip() ++ d.skip() ++ } ++ return err ++ } else { ++ // discard repeated match ++ d.skip() ++ continue MapEntryLoop ++ } ++ break ++ } ++ } ++ ++ if d.dm.dupMapKey == DupMapKeyEnforcedAPF && f == nil { ++ k = nameAsInt ++ } ++ } else { ++ if err == nil { ++ err = &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: reflect.TypeOf("").String(), ++ errorMsg: "map key is of type " + t.String() + " and cannot be used to match struct field name", ++ } ++ } ++ if d.dm.dupMapKey == DupMapKeyEnforcedAPF { ++ // parse key ++ k, lastErr = d.parse(true) ++ if lastErr != nil { ++ d.skip() // skip value ++ continue ++ } ++ // Detect if CBOR map key can be used as Go map key. ++ if !isHashableValue(reflect.ValueOf(k)) { ++ d.skip() // skip value ++ continue ++ } ++ } else { ++ d.skip() // skip key ++ } ++ } ++ ++ if f == nil { ++ if errOnUnknownField { ++ err = &UnknownFieldError{j} ++ d.skip() // Skip value ++ j++ ++ // skip the rest of the map ++ for ; (hasSize && j < count) || (!hasSize && !d.foundBreak()); j++ { ++ d.skip() ++ d.skip() ++ } ++ return err ++ } ++ ++ // Two map keys that match the same struct field are immediately considered ++ // duplicates. This check detects duplicates between two map keys that do ++ // not match a struct field. If unknown field errors are enabled, then this ++ // check is never reached. ++ if d.dm.dupMapKey == DupMapKeyEnforcedAPF { ++ if mapKeys == nil { ++ mapKeys = make(map[interface{}]struct{}, 1) ++ } ++ mapKeys[k] = struct{}{} ++ newKeyCount := len(mapKeys) ++ if newKeyCount == keyCount { ++ err = &DupMapKeyError{k, j} ++ d.skip() // skip value ++ j++ ++ // skip the rest of the map ++ for ; (hasSize && j < count) || (!hasSize && !d.foundBreak()); j++ { ++ d.skip() ++ d.skip() ++ } ++ return err ++ } ++ keyCount = newKeyCount ++ } ++ ++ d.skip() // Skip value ++ continue ++ } ++ ++ // Get field value by index ++ var fv reflect.Value ++ if len(f.idx) == 1 { ++ fv = v.Field(f.idx[0]) ++ } else { ++ fv, lastErr = getFieldValue(v, f.idx, func(v reflect.Value) (reflect.Value, error) { ++ // Return a new value for embedded field null pointer to point to, or return error. ++ if !v.CanSet() { ++ return reflect.Value{}, errors.New("cbor: cannot set embedded pointer to unexported struct: " + v.Type().String()) ++ } ++ v.Set(reflect.New(v.Type().Elem())) ++ return v, nil ++ }) ++ if lastErr != nil && err == nil { ++ err = lastErr ++ } ++ if !fv.IsValid() { ++ d.skip() ++ continue ++ } ++ } ++ ++ if lastErr = d.parseToValue(fv, f.typInfo); lastErr != nil { ++ if err == nil { ++ if typeError, ok := lastErr.(*UnmarshalTypeError); ok { ++ typeError.StructFieldName = tInfo.nonPtrType.String() + "." + f.name ++ err = typeError ++ } else { ++ err = lastErr ++ } ++ } ++ } ++ } ++ return err ++} ++ ++// validRegisteredTagNums verifies that tag numbers match registered tag numbers of type t. ++// validRegisteredTagNums assumes next CBOR data type is tag. It scans all tag numbers, and stops at tag content. ++func (d *decoder) validRegisteredTagNums(registeredTag *tagItem) error { ++ // Scan until next cbor data is tag content. ++ tagNums := make([]uint64, 0, 1) ++ for d.nextCBORType() == cborTypeTag { ++ _, _, val := d.getHead() ++ tagNums = append(tagNums, val) ++ } ++ ++ if !registeredTag.equalTagNum(tagNums) { ++ return &WrongTagError{registeredTag.contentType, registeredTag.num, tagNums} ++ } ++ return nil ++} ++ ++func (d *decoder) getRegisteredTagItem(vt reflect.Type) *tagItem { ++ if d.dm.tags != nil { ++ return d.dm.tags.getTagItemFromType(vt) ++ } ++ return nil ++} ++ ++// skip moves data offset to the next item. skip assumes data is well-formed, ++// and does not perform bounds checking. ++func (d *decoder) skip() { ++ t, _, val, indefiniteLength := d.getHeadWithIndefiniteLengthFlag() ++ ++ if indefiniteLength { ++ switch t { ++ case cborTypeByteString, cborTypeTextString, cborTypeArray, cborTypeMap: ++ for { ++ if isBreakFlag(d.data[d.off]) { ++ d.off++ ++ return ++ } ++ d.skip() ++ } ++ } ++ } ++ ++ switch t { ++ case cborTypeByteString, cborTypeTextString: ++ d.off += int(val) ++ ++ case cborTypeArray: ++ for i := 0; i < int(val); i++ { ++ d.skip() ++ } ++ ++ case cborTypeMap: ++ for i := 0; i < int(val)*2; i++ { ++ d.skip() ++ } ++ ++ case cborTypeTag: ++ d.skip() ++ } ++} ++ ++func (d *decoder) getHeadWithIndefiniteLengthFlag() ( ++ t cborType, ++ ai byte, ++ val uint64, ++ indefiniteLength bool, ++) { ++ t, ai, val = d.getHead() ++ indefiniteLength = additionalInformation(ai).isIndefiniteLength() ++ return ++} ++ ++// getHead assumes data is well-formed, and does not perform bounds checking. ++func (d *decoder) getHead() (t cborType, ai byte, val uint64) { ++ t, ai = parseInitialByte(d.data[d.off]) ++ val = uint64(ai) ++ d.off++ ++ ++ if ai <= maxAdditionalInformationWithoutArgument { ++ return ++ } ++ ++ if ai == additionalInformationWith1ByteArgument { ++ val = uint64(d.data[d.off]) ++ d.off++ ++ return ++ } ++ ++ if ai == additionalInformationWith2ByteArgument { ++ const argumentSize = 2 ++ val = uint64(binary.BigEndian.Uint16(d.data[d.off : d.off+argumentSize])) ++ d.off += argumentSize ++ return ++ } ++ ++ if ai == additionalInformationWith4ByteArgument { ++ const argumentSize = 4 ++ val = uint64(binary.BigEndian.Uint32(d.data[d.off : d.off+argumentSize])) ++ d.off += argumentSize ++ return ++ } ++ ++ if ai == additionalInformationWith8ByteArgument { ++ const argumentSize = 8 ++ val = binary.BigEndian.Uint64(d.data[d.off : d.off+argumentSize]) ++ d.off += argumentSize ++ return ++ } ++ return ++} ++ ++func (d *decoder) numOfItemsUntilBreak() int { ++ savedOff := d.off ++ i := 0 ++ for !d.foundBreak() { ++ d.skip() ++ i++ ++ } ++ d.off = savedOff ++ return i ++} ++ ++// foundBreak returns true if next byte is CBOR break code and moves cursor by 1, ++// otherwise it returns false. ++// foundBreak assumes data is well-formed, and does not perform bounds checking. ++func (d *decoder) foundBreak() bool { ++ if isBreakFlag(d.data[d.off]) { ++ d.off++ ++ return true ++ } ++ return false ++} ++ ++func (d *decoder) reset(data []byte) { ++ d.data = data ++ d.off = 0 ++ d.expectedLaterEncodingTags = d.expectedLaterEncodingTags[:0] ++} ++ ++func (d *decoder) nextCBORType() cborType { ++ return getType(d.data[d.off]) ++} ++ ++func (d *decoder) nextCBORNil() bool { ++ return d.data[d.off] == 0xf6 || d.data[d.off] == 0xf7 ++} ++ ++var ( ++ typeIntf = reflect.TypeOf([]interface{}(nil)).Elem() ++ typeTime = reflect.TypeOf(time.Time{}) ++ typeBigInt = reflect.TypeOf(big.Int{}) ++ typeUnmarshaler = reflect.TypeOf((*Unmarshaler)(nil)).Elem() ++ typeBinaryUnmarshaler = reflect.TypeOf((*encoding.BinaryUnmarshaler)(nil)).Elem() ++ typeString = reflect.TypeOf("") ++ typeByteSlice = reflect.TypeOf([]byte(nil)) ++) ++ ++func fillNil(_ cborType, v reflect.Value) error { ++ switch v.Kind() { ++ case reflect.Slice, reflect.Map, reflect.Interface, reflect.Ptr: ++ v.Set(reflect.Zero(v.Type())) ++ return nil ++ } ++ return nil ++} ++ ++func fillPositiveInt(t cborType, val uint64, v reflect.Value) error { ++ switch v.Kind() { ++ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: ++ if val > math.MaxInt64 { ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: v.Type().String(), ++ errorMsg: strconv.FormatUint(val, 10) + " overflows " + v.Type().String(), ++ } ++ } ++ if v.OverflowInt(int64(val)) { ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: v.Type().String(), ++ errorMsg: strconv.FormatUint(val, 10) + " overflows " + v.Type().String(), ++ } ++ } ++ v.SetInt(int64(val)) ++ return nil ++ ++ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: ++ if v.OverflowUint(val) { ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: v.Type().String(), ++ errorMsg: strconv.FormatUint(val, 10) + " overflows " + v.Type().String(), ++ } ++ } ++ v.SetUint(val) ++ return nil ++ ++ case reflect.Float32, reflect.Float64: ++ f := float64(val) ++ v.SetFloat(f) ++ return nil ++ } ++ ++ if v.Type() == typeBigInt { ++ i := new(big.Int).SetUint64(val) ++ v.Set(reflect.ValueOf(*i)) ++ return nil ++ } ++ return &UnmarshalTypeError{CBORType: t.String(), GoType: v.Type().String()} ++} ++ ++func fillNegativeInt(t cborType, val int64, v reflect.Value) error { ++ switch v.Kind() { ++ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: ++ if v.OverflowInt(val) { ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: v.Type().String(), ++ errorMsg: strconv.FormatInt(val, 10) + " overflows " + v.Type().String(), ++ } ++ } ++ v.SetInt(val) ++ return nil ++ ++ case reflect.Float32, reflect.Float64: ++ f := float64(val) ++ v.SetFloat(f) ++ return nil ++ } ++ if v.Type() == typeBigInt { ++ i := new(big.Int).SetInt64(val) ++ v.Set(reflect.ValueOf(*i)) ++ return nil ++ } ++ return &UnmarshalTypeError{CBORType: t.String(), GoType: v.Type().String()} ++} ++ ++func fillBool(t cborType, val bool, v reflect.Value) error { ++ if v.Kind() == reflect.Bool { ++ v.SetBool(val) ++ return nil ++ } ++ return &UnmarshalTypeError{CBORType: t.String(), GoType: v.Type().String()} ++} ++ ++func fillFloat(t cborType, val float64, v reflect.Value) error { ++ switch v.Kind() { ++ case reflect.Float32, reflect.Float64: ++ if v.OverflowFloat(val) { ++ return &UnmarshalTypeError{ ++ CBORType: t.String(), ++ GoType: v.Type().String(), ++ errorMsg: strconv.FormatFloat(val, 'E', -1, 64) + " overflows " + v.Type().String(), ++ } ++ } ++ v.SetFloat(val) ++ return nil ++ } ++ return &UnmarshalTypeError{CBORType: t.String(), GoType: v.Type().String()} ++} ++ ++func fillByteString(t cborType, val []byte, shared bool, v reflect.Value, bsts ByteStringToStringMode, bum BinaryUnmarshalerMode) error { ++ if bum == BinaryUnmarshalerByteString && reflect.PtrTo(v.Type()).Implements(typeBinaryUnmarshaler) { ++ if v.CanAddr() { ++ v = v.Addr() ++ if u, ok := v.Interface().(encoding.BinaryUnmarshaler); ok { ++ // The contract of BinaryUnmarshaler forbids ++ // retaining the input bytes, so no copying is ++ // required even if val is shared. ++ return u.UnmarshalBinary(val) ++ } ++ } ++ return errors.New("cbor: cannot set new value for " + v.Type().String()) ++ } ++ if bsts != ByteStringToStringForbidden && v.Kind() == reflect.String { ++ v.SetString(string(val)) ++ return nil ++ } ++ if v.Kind() == reflect.Slice && v.Type().Elem().Kind() == reflect.Uint8 { ++ src := val ++ if shared { ++ // SetBytes shares the underlying bytes of the source slice. ++ src = make([]byte, len(val)) ++ copy(src, val) ++ } ++ v.SetBytes(src) ++ return nil ++ } ++ if v.Kind() == reflect.Array && v.Type().Elem().Kind() == reflect.Uint8 { ++ vLen := v.Len() ++ i := 0 ++ for ; i < vLen && i < len(val); i++ { ++ v.Index(i).SetUint(uint64(val[i])) ++ } ++ // Set remaining Go array elements to zero values. ++ if i < vLen { ++ zeroV := reflect.Zero(reflect.TypeOf(byte(0))) ++ for ; i < vLen; i++ { ++ v.Index(i).Set(zeroV) ++ } ++ } ++ return nil ++ } ++ return &UnmarshalTypeError{CBORType: t.String(), GoType: v.Type().String()} ++} ++ ++func fillTextString(t cborType, val []byte, v reflect.Value) error { ++ if v.Kind() == reflect.String { ++ v.SetString(string(val)) ++ return nil ++ } ++ return &UnmarshalTypeError{CBORType: t.String(), GoType: v.Type().String()} ++} ++ ++func isImmutableKind(k reflect.Kind) bool { ++ switch k { ++ case reflect.Bool, ++ reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, ++ reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, ++ reflect.Float32, reflect.Float64, ++ reflect.String: ++ return true ++ ++ default: ++ return false ++ } ++} ++ ++func isHashableValue(rv reflect.Value) bool { ++ switch rv.Kind() { ++ case reflect.Slice, reflect.Map, reflect.Func: ++ return false ++ ++ case reflect.Struct: ++ switch rv.Type() { ++ case typeTag: ++ tag := rv.Interface().(Tag) ++ return isHashableValue(reflect.ValueOf(tag.Content)) ++ case typeBigInt: ++ return false ++ } ++ } ++ return true ++} ++ ++// convertByteSliceToByteString converts []byte to ByteString if ++// - v is []byte type, or ++// - v is Tag type and tag content type is []byte ++// This function also handles nested tags. ++// CBOR data is already verified to be well-formed before this function is used, ++// so the recursion won't exceed max nested levels. ++func convertByteSliceToByteString(v interface{}) (interface{}, bool) { ++ switch v := v.(type) { ++ case []byte: ++ return ByteString(v), true ++ ++ case Tag: ++ content, converted := convertByteSliceToByteString(v.Content) ++ if converted { ++ return Tag{Number: v.Number, Content: content}, true ++ } ++ } ++ return v, false ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/diagnose.go b/vendor/github.com/fxamacker/cbor/v2/diagnose.go +new file mode 100644 +index 00000000..44afb866 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/diagnose.go +@@ -0,0 +1,724 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++package cbor ++ ++import ( ++ "bytes" ++ "encoding/base32" ++ "encoding/base64" ++ "encoding/hex" ++ "errors" ++ "fmt" ++ "io" ++ "math" ++ "math/big" ++ "strconv" ++ "unicode/utf16" ++ "unicode/utf8" ++ ++ "github.com/x448/float16" ++) ++ ++// DiagMode is the main interface for CBOR diagnostic notation. ++type DiagMode interface { ++ // Diagnose returns extended diagnostic notation (EDN) of CBOR data items using this DiagMode. ++ Diagnose([]byte) (string, error) ++ ++ // DiagnoseFirst returns extended diagnostic notation (EDN) of the first CBOR data item using the DiagMode. Any remaining bytes are returned in rest. ++ DiagnoseFirst([]byte) (string, []byte, error) ++ ++ // DiagOptions returns user specified options used to create this DiagMode. ++ DiagOptions() DiagOptions ++} ++ ++// ByteStringEncoding specifies the base encoding that byte strings are notated. ++type ByteStringEncoding uint8 ++ ++const ( ++ // ByteStringBase16Encoding encodes byte strings in base16, without padding. ++ ByteStringBase16Encoding ByteStringEncoding = iota ++ ++ // ByteStringBase32Encoding encodes byte strings in base32, without padding. ++ ByteStringBase32Encoding ++ ++ // ByteStringBase32HexEncoding encodes byte strings in base32hex, without padding. ++ ByteStringBase32HexEncoding ++ ++ // ByteStringBase64Encoding encodes byte strings in base64url, without padding. ++ ByteStringBase64Encoding ++ ++ maxByteStringEncoding ++) ++ ++func (bse ByteStringEncoding) valid() error { ++ if bse >= maxByteStringEncoding { ++ return errors.New("cbor: invalid ByteStringEncoding " + strconv.Itoa(int(bse))) ++ } ++ return nil ++} ++ ++// DiagOptions specifies Diag options. ++type DiagOptions struct { ++ // ByteStringEncoding specifies the base encoding that byte strings are notated. ++ // Default is ByteStringBase16Encoding. ++ ByteStringEncoding ByteStringEncoding ++ ++ // ByteStringHexWhitespace specifies notating with whitespace in byte string ++ // when ByteStringEncoding is ByteStringBase16Encoding. ++ ByteStringHexWhitespace bool ++ ++ // ByteStringText specifies notating with text in byte string ++ // if it is a valid UTF-8 text. ++ ByteStringText bool ++ ++ // ByteStringEmbeddedCBOR specifies notating embedded CBOR in byte string ++ // if it is a valid CBOR bytes. ++ ByteStringEmbeddedCBOR bool ++ ++ // CBORSequence specifies notating CBOR sequences. ++ // otherwise, it returns an error if there are more bytes after the first CBOR. ++ CBORSequence bool ++ ++ // FloatPrecisionIndicator specifies appending a suffix to indicate float precision. ++ // Refer to https://www.rfc-editor.org/rfc/rfc8949.html#name-encoding-indicators. ++ FloatPrecisionIndicator bool ++ ++ // MaxNestedLevels specifies the max nested levels allowed for any combination of CBOR array, maps, and tags. ++ // Default is 32 levels and it can be set to [4, 65535]. Note that higher maximum levels of nesting can ++ // require larger amounts of stack to deserialize. Don't increase this higher than you require. ++ MaxNestedLevels int ++ ++ // MaxArrayElements specifies the max number of elements for CBOR arrays. ++ // Default is 128*1024=131072 and it can be set to [16, 2147483647] ++ MaxArrayElements int ++ ++ // MaxMapPairs specifies the max number of key-value pairs for CBOR maps. ++ // Default is 128*1024=131072 and it can be set to [16, 2147483647] ++ MaxMapPairs int ++} ++ ++// DiagMode returns a DiagMode with immutable options. ++func (opts DiagOptions) DiagMode() (DiagMode, error) { ++ return opts.diagMode() ++} ++ ++func (opts DiagOptions) diagMode() (*diagMode, error) { ++ if err := opts.ByteStringEncoding.valid(); err != nil { ++ return nil, err ++ } ++ ++ decMode, err := DecOptions{ ++ MaxNestedLevels: opts.MaxNestedLevels, ++ MaxArrayElements: opts.MaxArrayElements, ++ MaxMapPairs: opts.MaxMapPairs, ++ }.decMode() ++ if err != nil { ++ return nil, err ++ } ++ ++ return &diagMode{ ++ byteStringEncoding: opts.ByteStringEncoding, ++ byteStringHexWhitespace: opts.ByteStringHexWhitespace, ++ byteStringText: opts.ByteStringText, ++ byteStringEmbeddedCBOR: opts.ByteStringEmbeddedCBOR, ++ cborSequence: opts.CBORSequence, ++ floatPrecisionIndicator: opts.FloatPrecisionIndicator, ++ decMode: decMode, ++ }, nil ++} ++ ++type diagMode struct { ++ byteStringEncoding ByteStringEncoding ++ byteStringHexWhitespace bool ++ byteStringText bool ++ byteStringEmbeddedCBOR bool ++ cborSequence bool ++ floatPrecisionIndicator bool ++ decMode *decMode ++} ++ ++// DiagOptions returns user specified options used to create this DiagMode. ++func (dm *diagMode) DiagOptions() DiagOptions { ++ return DiagOptions{ ++ ByteStringEncoding: dm.byteStringEncoding, ++ ByteStringHexWhitespace: dm.byteStringHexWhitespace, ++ ByteStringText: dm.byteStringText, ++ ByteStringEmbeddedCBOR: dm.byteStringEmbeddedCBOR, ++ CBORSequence: dm.cborSequence, ++ FloatPrecisionIndicator: dm.floatPrecisionIndicator, ++ MaxNestedLevels: dm.decMode.maxNestedLevels, ++ MaxArrayElements: dm.decMode.maxArrayElements, ++ MaxMapPairs: dm.decMode.maxMapPairs, ++ } ++} ++ ++// Diagnose returns extended diagnostic notation (EDN) of CBOR data items using the DiagMode. ++func (dm *diagMode) Diagnose(data []byte) (string, error) { ++ return newDiagnose(data, dm.decMode, dm).diag(dm.cborSequence) ++} ++ ++// DiagnoseFirst returns extended diagnostic notation (EDN) of the first CBOR data item using the DiagMode. Any remaining bytes are returned in rest. ++func (dm *diagMode) DiagnoseFirst(data []byte) (diagNotation string, rest []byte, err error) { ++ return newDiagnose(data, dm.decMode, dm).diagFirst() ++} ++ ++var defaultDiagMode, _ = DiagOptions{}.diagMode() ++ ++// Diagnose returns extended diagnostic notation (EDN) of CBOR data items ++// using the default diagnostic mode. ++// ++// Refer to https://www.rfc-editor.org/rfc/rfc8949.html#name-diagnostic-notation. ++func Diagnose(data []byte) (string, error) { ++ return defaultDiagMode.Diagnose(data) ++} ++ ++// Diagnose returns extended diagnostic notation (EDN) of the first CBOR data item using the DiagMode. Any remaining bytes are returned in rest. ++func DiagnoseFirst(data []byte) (diagNotation string, rest []byte, err error) { ++ return defaultDiagMode.DiagnoseFirst(data) ++} ++ ++type diagnose struct { ++ dm *diagMode ++ d *decoder ++ w *bytes.Buffer ++} ++ ++func newDiagnose(data []byte, decm *decMode, diagm *diagMode) *diagnose { ++ return &diagnose{ ++ dm: diagm, ++ d: &decoder{data: data, dm: decm}, ++ w: &bytes.Buffer{}, ++ } ++} ++ ++func (di *diagnose) diag(cborSequence bool) (string, error) { ++ // CBOR Sequence ++ firstItem := true ++ for { ++ switch err := di.wellformed(cborSequence); err { ++ case nil: ++ if !firstItem { ++ di.w.WriteString(", ") ++ } ++ firstItem = false ++ if itemErr := di.item(); itemErr != nil { ++ return di.w.String(), itemErr ++ } ++ ++ case io.EOF: ++ if firstItem { ++ return di.w.String(), err ++ } ++ return di.w.String(), nil ++ ++ default: ++ return di.w.String(), err ++ } ++ } ++} ++ ++func (di *diagnose) diagFirst() (diagNotation string, rest []byte, err error) { ++ err = di.wellformed(true) ++ if err == nil { ++ err = di.item() ++ } ++ ++ if err == nil { ++ // Return EDN and the rest of the data slice (which might be len 0) ++ return di.w.String(), di.d.data[di.d.off:], nil ++ } ++ ++ return di.w.String(), nil, err ++} ++ ++func (di *diagnose) wellformed(allowExtraData bool) error { ++ off := di.d.off ++ err := di.d.wellformed(allowExtraData, false) ++ di.d.off = off ++ return err ++} ++ ++func (di *diagnose) item() error { //nolint:gocyclo ++ initialByte := di.d.data[di.d.off] ++ switch initialByte { ++ case cborByteStringWithIndefiniteLengthHead, ++ cborTextStringWithIndefiniteLengthHead: // indefinite-length byte/text string ++ di.d.off++ ++ if isBreakFlag(di.d.data[di.d.off]) { ++ di.d.off++ ++ switch initialByte { ++ case cborByteStringWithIndefiniteLengthHead: ++ // indefinite-length bytes with no chunks. ++ di.w.WriteString(`''_`) ++ return nil ++ case cborTextStringWithIndefiniteLengthHead: ++ // indefinite-length text with no chunks. ++ di.w.WriteString(`""_`) ++ return nil ++ } ++ } ++ ++ di.w.WriteString("(_ ") ++ ++ i := 0 ++ for !di.d.foundBreak() { ++ if i > 0 { ++ di.w.WriteString(", ") ++ } ++ ++ i++ ++ // wellformedIndefiniteString() already checked that the next item is a byte/text string. ++ if err := di.item(); err != nil { ++ return err ++ } ++ } ++ ++ di.w.WriteByte(')') ++ return nil ++ ++ case cborArrayWithIndefiniteLengthHead: // indefinite-length array ++ di.d.off++ ++ di.w.WriteString("[_ ") ++ ++ i := 0 ++ for !di.d.foundBreak() { ++ if i > 0 { ++ di.w.WriteString(", ") ++ } ++ ++ i++ ++ if err := di.item(); err != nil { ++ return err ++ } ++ } ++ ++ di.w.WriteByte(']') ++ return nil ++ ++ case cborMapWithIndefiniteLengthHead: // indefinite-length map ++ di.d.off++ ++ di.w.WriteString("{_ ") ++ ++ i := 0 ++ for !di.d.foundBreak() { ++ if i > 0 { ++ di.w.WriteString(", ") ++ } ++ ++ i++ ++ // key ++ if err := di.item(); err != nil { ++ return err ++ } ++ ++ di.w.WriteString(": ") ++ ++ // value ++ if err := di.item(); err != nil { ++ return err ++ } ++ } ++ ++ di.w.WriteByte('}') ++ return nil ++ } ++ ++ t := di.d.nextCBORType() ++ switch t { ++ case cborTypePositiveInt: ++ _, _, val := di.d.getHead() ++ di.w.WriteString(strconv.FormatUint(val, 10)) ++ return nil ++ ++ case cborTypeNegativeInt: ++ _, _, val := di.d.getHead() ++ if val > math.MaxInt64 { ++ // CBOR negative integer overflows int64, use big.Int to store value. ++ bi := new(big.Int) ++ bi.SetUint64(val) ++ bi.Add(bi, big.NewInt(1)) ++ bi.Neg(bi) ++ di.w.WriteString(bi.String()) ++ return nil ++ } ++ ++ nValue := int64(-1) ^ int64(val) ++ di.w.WriteString(strconv.FormatInt(nValue, 10)) ++ return nil ++ ++ case cborTypeByteString: ++ b, _ := di.d.parseByteString() ++ return di.encodeByteString(b) ++ ++ case cborTypeTextString: ++ b, err := di.d.parseTextString() ++ if err != nil { ++ return err ++ } ++ return di.encodeTextString(string(b), '"') ++ ++ case cborTypeArray: ++ _, _, val := di.d.getHead() ++ count := int(val) ++ di.w.WriteByte('[') ++ ++ for i := 0; i < count; i++ { ++ if i > 0 { ++ di.w.WriteString(", ") ++ } ++ if err := di.item(); err != nil { ++ return err ++ } ++ } ++ di.w.WriteByte(']') ++ return nil ++ ++ case cborTypeMap: ++ _, _, val := di.d.getHead() ++ count := int(val) ++ di.w.WriteByte('{') ++ ++ for i := 0; i < count; i++ { ++ if i > 0 { ++ di.w.WriteString(", ") ++ } ++ // key ++ if err := di.item(); err != nil { ++ return err ++ } ++ di.w.WriteString(": ") ++ // value ++ if err := di.item(); err != nil { ++ return err ++ } ++ } ++ di.w.WriteByte('}') ++ return nil ++ ++ case cborTypeTag: ++ _, _, tagNum := di.d.getHead() ++ switch tagNum { ++ case tagNumUnsignedBignum: ++ if nt := di.d.nextCBORType(); nt != cborTypeByteString { ++ return newInadmissibleTagContentTypeError( ++ tagNumUnsignedBignum, ++ "byte string", ++ nt.String()) ++ } ++ ++ b, _ := di.d.parseByteString() ++ bi := new(big.Int).SetBytes(b) ++ di.w.WriteString(bi.String()) ++ return nil ++ ++ case tagNumNegativeBignum: ++ if nt := di.d.nextCBORType(); nt != cborTypeByteString { ++ return newInadmissibleTagContentTypeError( ++ tagNumNegativeBignum, ++ "byte string", ++ nt.String(), ++ ) ++ } ++ ++ b, _ := di.d.parseByteString() ++ bi := new(big.Int).SetBytes(b) ++ bi.Add(bi, big.NewInt(1)) ++ bi.Neg(bi) ++ di.w.WriteString(bi.String()) ++ return nil ++ ++ default: ++ di.w.WriteString(strconv.FormatUint(tagNum, 10)) ++ di.w.WriteByte('(') ++ if err := di.item(); err != nil { ++ return err ++ } ++ di.w.WriteByte(')') ++ return nil ++ } ++ ++ case cborTypePrimitives: ++ _, ai, val := di.d.getHead() ++ switch ai { ++ case additionalInformationAsFalse: ++ di.w.WriteString("false") ++ return nil ++ ++ case additionalInformationAsTrue: ++ di.w.WriteString("true") ++ return nil ++ ++ case additionalInformationAsNull: ++ di.w.WriteString("null") ++ return nil ++ ++ case additionalInformationAsUndefined: ++ di.w.WriteString("undefined") ++ return nil ++ ++ case additionalInformationAsFloat16, ++ additionalInformationAsFloat32, ++ additionalInformationAsFloat64: ++ return di.encodeFloat(ai, val) ++ ++ default: ++ di.w.WriteString("simple(") ++ di.w.WriteString(strconv.FormatUint(val, 10)) ++ di.w.WriteByte(')') ++ return nil ++ } ++ } ++ ++ return nil ++} ++ ++// writeU16 format a rune as "\uxxxx" ++func (di *diagnose) writeU16(val rune) { ++ di.w.WriteString("\\u") ++ var in [2]byte ++ in[0] = byte(val >> 8) ++ in[1] = byte(val) ++ sz := hex.EncodedLen(len(in)) ++ di.w.Grow(sz) ++ dst := di.w.Bytes()[di.w.Len() : di.w.Len()+sz] ++ hex.Encode(dst, in[:]) ++ di.w.Write(dst) ++} ++ ++var rawBase32Encoding = base32.StdEncoding.WithPadding(base32.NoPadding) ++var rawBase32HexEncoding = base32.HexEncoding.WithPadding(base32.NoPadding) ++ ++func (di *diagnose) encodeByteString(val []byte) error { ++ if len(val) > 0 { ++ if di.dm.byteStringText && utf8.Valid(val) { ++ return di.encodeTextString(string(val), '\'') ++ } ++ ++ if di.dm.byteStringEmbeddedCBOR { ++ di2 := newDiagnose(val, di.dm.decMode, di.dm) ++ // should always notating embedded CBOR sequence. ++ if str, err := di2.diag(true); err == nil { ++ di.w.WriteString("<<") ++ di.w.WriteString(str) ++ di.w.WriteString(">>") ++ return nil ++ } ++ } ++ } ++ ++ switch di.dm.byteStringEncoding { ++ case ByteStringBase16Encoding: ++ di.w.WriteString("h'") ++ if di.dm.byteStringHexWhitespace { ++ sz := hex.EncodedLen(len(val)) ++ if len(val) > 0 { ++ sz += len(val) - 1 ++ } ++ di.w.Grow(sz) ++ ++ dst := di.w.Bytes()[di.w.Len():] ++ for i := range val { ++ if i > 0 { ++ dst = append(dst, ' ') ++ } ++ hex.Encode(dst[len(dst):len(dst)+2], val[i:i+1]) ++ dst = dst[:len(dst)+2] ++ } ++ di.w.Write(dst) ++ } else { ++ sz := hex.EncodedLen(len(val)) ++ di.w.Grow(sz) ++ dst := di.w.Bytes()[di.w.Len() : di.w.Len()+sz] ++ hex.Encode(dst, val) ++ di.w.Write(dst) ++ } ++ di.w.WriteByte('\'') ++ return nil ++ ++ case ByteStringBase32Encoding: ++ di.w.WriteString("b32'") ++ sz := rawBase32Encoding.EncodedLen(len(val)) ++ di.w.Grow(sz) ++ dst := di.w.Bytes()[di.w.Len() : di.w.Len()+sz] ++ rawBase32Encoding.Encode(dst, val) ++ di.w.Write(dst) ++ di.w.WriteByte('\'') ++ return nil ++ ++ case ByteStringBase32HexEncoding: ++ di.w.WriteString("h32'") ++ sz := rawBase32HexEncoding.EncodedLen(len(val)) ++ di.w.Grow(sz) ++ dst := di.w.Bytes()[di.w.Len() : di.w.Len()+sz] ++ rawBase32HexEncoding.Encode(dst, val) ++ di.w.Write(dst) ++ di.w.WriteByte('\'') ++ return nil ++ ++ case ByteStringBase64Encoding: ++ di.w.WriteString("b64'") ++ sz := base64.RawURLEncoding.EncodedLen(len(val)) ++ di.w.Grow(sz) ++ dst := di.w.Bytes()[di.w.Len() : di.w.Len()+sz] ++ base64.RawURLEncoding.Encode(dst, val) ++ di.w.Write(dst) ++ di.w.WriteByte('\'') ++ return nil ++ ++ default: ++ // It should not be possible for users to construct a *diagMode with an invalid byte ++ // string encoding. ++ panic(fmt.Sprintf("diagmode has invalid ByteStringEncoding %v", di.dm.byteStringEncoding)) ++ } ++} ++ ++const utf16SurrSelf = rune(0x10000) ++ ++// quote should be either `'` or `"` ++func (di *diagnose) encodeTextString(val string, quote byte) error { ++ di.w.WriteByte(quote) ++ ++ for i := 0; i < len(val); { ++ if b := val[i]; b < utf8.RuneSelf { ++ switch { ++ case b == '\t', b == '\n', b == '\r', b == '\\', b == quote: ++ di.w.WriteByte('\\') ++ ++ switch b { ++ case '\t': ++ b = 't' ++ case '\n': ++ b = 'n' ++ case '\r': ++ b = 'r' ++ } ++ di.w.WriteByte(b) ++ ++ case b >= ' ' && b <= '~': ++ di.w.WriteByte(b) ++ ++ default: ++ di.writeU16(rune(b)) ++ } ++ ++ i++ ++ continue ++ } ++ ++ c, size := utf8.DecodeRuneInString(val[i:]) ++ switch { ++ case c == utf8.RuneError: ++ return &SemanticError{"cbor: invalid UTF-8 string"} ++ ++ case c < utf16SurrSelf: ++ di.writeU16(c) ++ ++ default: ++ c1, c2 := utf16.EncodeRune(c) ++ di.writeU16(c1) ++ di.writeU16(c2) ++ } ++ ++ i += size ++ } ++ ++ di.w.WriteByte(quote) ++ return nil ++} ++ ++func (di *diagnose) encodeFloat(ai byte, val uint64) error { ++ f64 := float64(0) ++ switch ai { ++ case additionalInformationAsFloat16: ++ f16 := float16.Frombits(uint16(val)) ++ switch { ++ case f16.IsNaN(): ++ di.w.WriteString("NaN") ++ return nil ++ case f16.IsInf(1): ++ di.w.WriteString("Infinity") ++ return nil ++ case f16.IsInf(-1): ++ di.w.WriteString("-Infinity") ++ return nil ++ default: ++ f64 = float64(f16.Float32()) ++ } ++ ++ case additionalInformationAsFloat32: ++ f32 := math.Float32frombits(uint32(val)) ++ switch { ++ case f32 != f32: ++ di.w.WriteString("NaN") ++ return nil ++ case f32 > math.MaxFloat32: ++ di.w.WriteString("Infinity") ++ return nil ++ case f32 < -math.MaxFloat32: ++ di.w.WriteString("-Infinity") ++ return nil ++ default: ++ f64 = float64(f32) ++ } ++ ++ case additionalInformationAsFloat64: ++ f64 = math.Float64frombits(val) ++ switch { ++ case f64 != f64: ++ di.w.WriteString("NaN") ++ return nil ++ case f64 > math.MaxFloat64: ++ di.w.WriteString("Infinity") ++ return nil ++ case f64 < -math.MaxFloat64: ++ di.w.WriteString("-Infinity") ++ return nil ++ } ++ } ++ // Use ES6 number to string conversion which should match most JSON generators. ++ // Inspired by https://github.com/golang/go/blob/4df10fba1687a6d4f51d7238a403f8f2298f6a16/src/encoding/json/encode.go#L585 ++ const bitSize = 64 ++ b := make([]byte, 0, 32) ++ if abs := math.Abs(f64); abs != 0 && (abs < 1e-6 || abs >= 1e21) { ++ b = strconv.AppendFloat(b, f64, 'e', -1, bitSize) ++ // clean up e-09 to e-9 ++ n := len(b) ++ if n >= 4 && string(b[n-4:n-1]) == "e-0" { ++ b = append(b[:n-2], b[n-1]) ++ } ++ } else { ++ b = strconv.AppendFloat(b, f64, 'f', -1, bitSize) ++ } ++ ++ // add decimal point and trailing zero if needed ++ if bytes.IndexByte(b, '.') < 0 { ++ if i := bytes.IndexByte(b, 'e'); i < 0 { ++ b = append(b, '.', '0') ++ } else { ++ b = append(b[:i+2], b[i:]...) ++ b[i] = '.' ++ b[i+1] = '0' ++ } ++ } ++ ++ di.w.WriteString(string(b)) ++ ++ if di.dm.floatPrecisionIndicator { ++ switch ai { ++ case additionalInformationAsFloat16: ++ di.w.WriteString("_1") ++ return nil ++ ++ case additionalInformationAsFloat32: ++ di.w.WriteString("_2") ++ return nil ++ ++ case additionalInformationAsFloat64: ++ di.w.WriteString("_3") ++ return nil ++ } ++ } ++ ++ return nil ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/doc.go b/vendor/github.com/fxamacker/cbor/v2/doc.go +new file mode 100644 +index 00000000..23f68b98 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/doc.go +@@ -0,0 +1,129 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++/* ++Package cbor is a modern CBOR codec (RFC 8949 & RFC 7049) with CBOR tags, ++Go struct tags (toarray/keyasint/omitempty), Core Deterministic Encoding, ++CTAP2, Canonical CBOR, float64->32->16, and duplicate map key detection. ++ ++Encoding options allow "preferred serialization" by encoding integers and floats ++to their smallest forms (e.g. float16) when values fit. ++ ++Struct tags like "keyasint", "toarray" and "omitempty" make CBOR data smaller ++and easier to use with structs. ++ ++For example, "toarray" tag makes struct fields encode to CBOR array elements. And ++"keyasint" makes a field encode to an element of CBOR map with specified int key. ++ ++Latest docs can be viewed at https://github.com/fxamacker/cbor#cbor-library-in-go ++ ++# Basics ++ ++The Quick Start guide is at https://github.com/fxamacker/cbor#quick-start ++ ++Function signatures identical to encoding/json include: ++ ++ Marshal, Unmarshal, NewEncoder, NewDecoder, (*Encoder).Encode, (*Decoder).Decode. ++ ++Standard interfaces include: ++ ++ BinaryMarshaler, BinaryUnmarshaler, Marshaler, and Unmarshaler. ++ ++Custom encoding and decoding is possible by implementing standard interfaces for ++user-defined Go types. ++ ++Codec functions are available at package-level (using defaults options) or by ++creating modes from options at runtime. ++ ++"Mode" in this API means definite way of encoding (EncMode) or decoding (DecMode). ++ ++EncMode and DecMode interfaces are created from EncOptions or DecOptions structs. ++ ++ em, err := cbor.EncOptions{...}.EncMode() ++ em, err := cbor.CanonicalEncOptions().EncMode() ++ em, err := cbor.CTAP2EncOptions().EncMode() ++ ++Modes use immutable options to avoid side-effects and simplify concurrency. Behavior of ++modes won't accidentally change at runtime after they're created. ++ ++Modes are intended to be reused and are safe for concurrent use. ++ ++EncMode and DecMode Interfaces ++ ++ // EncMode interface uses immutable options and is safe for concurrent use. ++ type EncMode interface { ++ Marshal(v interface{}) ([]byte, error) ++ NewEncoder(w io.Writer) *Encoder ++ EncOptions() EncOptions // returns copy of options ++ } ++ ++ // DecMode interface uses immutable options and is safe for concurrent use. ++ type DecMode interface { ++ Unmarshal(data []byte, v interface{}) error ++ NewDecoder(r io.Reader) *Decoder ++ DecOptions() DecOptions // returns copy of options ++ } ++ ++Using Default Encoding Mode ++ ++ b, err := cbor.Marshal(v) ++ ++ encoder := cbor.NewEncoder(w) ++ err = encoder.Encode(v) ++ ++Using Default Decoding Mode ++ ++ err := cbor.Unmarshal(b, &v) ++ ++ decoder := cbor.NewDecoder(r) ++ err = decoder.Decode(&v) ++ ++Creating and Using Encoding Modes ++ ++ // Create EncOptions using either struct literal or a function. ++ opts := cbor.CanonicalEncOptions() ++ ++ // If needed, modify encoding options ++ opts.Time = cbor.TimeUnix ++ ++ // Create reusable EncMode interface with immutable options, safe for concurrent use. ++ em, err := opts.EncMode() ++ ++ // Use EncMode like encoding/json, with same function signatures. ++ b, err := em.Marshal(v) ++ // or ++ encoder := em.NewEncoder(w) ++ err := encoder.Encode(v) ++ ++ // NOTE: Both em.Marshal(v) and encoder.Encode(v) use encoding options ++ // specified during creation of em (encoding mode). ++ ++# CBOR Options ++ ++Predefined Encoding Options: https://github.com/fxamacker/cbor#predefined-encoding-options ++ ++Encoding Options: https://github.com/fxamacker/cbor#encoding-options ++ ++Decoding Options: https://github.com/fxamacker/cbor#decoding-options ++ ++# Struct Tags ++ ++Struct tags like `cbor:"name,omitempty"` and `json:"name,omitempty"` work as expected. ++If both struct tags are specified then `cbor` is used. ++ ++Struct tags like "keyasint", "toarray", and "omitempty" make it easy to use ++very compact formats like COSE and CWT (CBOR Web Tokens) with structs. ++ ++For example, "toarray" makes struct fields encode to array elements. And "keyasint" ++makes struct fields encode to elements of CBOR map with int keys. ++ ++https://raw.githubusercontent.com/fxamacker/images/master/cbor/v2.0.0/cbor_easy_api.png ++ ++Struct tags are listed at https://github.com/fxamacker/cbor#struct-tags-1 ++ ++# Tests and Fuzzing ++ ++Over 375 tests are included in this package. Cover-guided fuzzing is handled by ++a private fuzzer that replaced fxamacker/cbor-fuzz years ago. ++*/ ++package cbor +diff --git a/vendor/github.com/fxamacker/cbor/v2/encode.go b/vendor/github.com/fxamacker/cbor/v2/encode.go +new file mode 100644 +index 00000000..6508e291 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/encode.go +@@ -0,0 +1,1989 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++package cbor ++ ++import ( ++ "bytes" ++ "encoding" ++ "encoding/binary" ++ "errors" ++ "fmt" ++ "io" ++ "math" ++ "math/big" ++ "math/rand" ++ "reflect" ++ "sort" ++ "strconv" ++ "sync" ++ "time" ++ ++ "github.com/x448/float16" ++) ++ ++// Marshal returns the CBOR encoding of v using default encoding options. ++// See EncOptions for encoding options. ++// ++// Marshal uses the following encoding rules: ++// ++// If value implements the Marshaler interface, Marshal calls its ++// MarshalCBOR method. ++// ++// If value implements encoding.BinaryMarshaler, Marhsal calls its ++// MarshalBinary method and encode it as CBOR byte string. ++// ++// Boolean values encode as CBOR booleans (type 7). ++// ++// Positive integer values encode as CBOR positive integers (type 0). ++// ++// Negative integer values encode as CBOR negative integers (type 1). ++// ++// Floating point values encode as CBOR floating points (type 7). ++// ++// String values encode as CBOR text strings (type 3). ++// ++// []byte values encode as CBOR byte strings (type 2). ++// ++// Array and slice values encode as CBOR arrays (type 4). ++// ++// Map values encode as CBOR maps (type 5). ++// ++// Struct values encode as CBOR maps (type 5). Each exported struct field ++// becomes a pair with field name encoded as CBOR text string (type 3) and ++// field value encoded based on its type. See struct tag option "keyasint" ++// to encode field name as CBOR integer (type 0 and 1). Also see struct ++// tag option "toarray" for special field "_" to encode struct values as ++// CBOR array (type 4). ++// ++// Marshal supports format string stored under the "cbor" key in the struct ++// field's tag. CBOR format string can specify the name of the field, ++// "omitempty" and "keyasint" options, and special case "-" for field omission. ++// If "cbor" key is absent, Marshal uses "json" key. ++// ++// Struct field name is treated as integer if it has "keyasint" option in ++// its format string. The format string must specify an integer as its ++// field name. ++// ++// Special struct field "_" is used to specify struct level options, such as ++// "toarray". "toarray" option enables Go struct to be encoded as CBOR array. ++// "omitempty" is disabled by "toarray" to ensure that the same number ++// of elements are encoded every time. ++// ++// Anonymous struct fields are marshaled as if their exported fields ++// were fields in the outer struct. Marshal follows the same struct fields ++// visibility rules used by JSON encoding package. ++// ++// time.Time values encode as text strings specified in RFC3339 or numerical ++// representation of seconds since January 1, 1970 UTC depending on ++// EncOptions.Time setting. Also See EncOptions.TimeTag to encode ++// time.Time as CBOR tag with tag number 0 or 1. ++// ++// big.Int values encode as CBOR integers (type 0 and 1) if values fit. ++// Otherwise, big.Int values encode as CBOR bignums (tag 2 and 3). See ++// EncOptions.BigIntConvert to always encode big.Int values as CBOR ++// bignums. ++// ++// Pointer values encode as the value pointed to. ++// ++// Interface values encode as the value stored in the interface. ++// ++// Nil slice/map/pointer/interface values encode as CBOR nulls (type 7). ++// ++// Values of other types cannot be encoded in CBOR. Attempting ++// to encode such a value causes Marshal to return an UnsupportedTypeError. ++func Marshal(v interface{}) ([]byte, error) { ++ return defaultEncMode.Marshal(v) ++} ++ ++// MarshalToBuffer encodes v into provided buffer (instead of using built-in buffer pool) ++// and uses default encoding options. ++// ++// NOTE: Unlike Marshal, the buffer provided to MarshalToBuffer can contain ++// partially encoded data if error is returned. ++// ++// See Marshal for more details. ++func MarshalToBuffer(v interface{}, buf *bytes.Buffer) error { ++ return defaultEncMode.MarshalToBuffer(v, buf) ++} ++ ++// Marshaler is the interface implemented by types that can marshal themselves ++// into valid CBOR. ++type Marshaler interface { ++ MarshalCBOR() ([]byte, error) ++} ++ ++// MarshalerError represents error from checking encoded CBOR data item ++// returned from MarshalCBOR for well-formedness and some very limited tag validation. ++type MarshalerError struct { ++ typ reflect.Type ++ err error ++} ++ ++func (e *MarshalerError) Error() string { ++ return "cbor: error calling MarshalCBOR for type " + ++ e.typ.String() + ++ ": " + e.err.Error() ++} ++ ++func (e *MarshalerError) Unwrap() error { ++ return e.err ++} ++ ++// UnsupportedTypeError is returned by Marshal when attempting to encode value ++// of an unsupported type. ++type UnsupportedTypeError struct { ++ Type reflect.Type ++} ++ ++func (e *UnsupportedTypeError) Error() string { ++ return "cbor: unsupported type: " + e.Type.String() ++} ++ ++// UnsupportedValueError is returned by Marshal when attempting to encode an ++// unsupported value. ++type UnsupportedValueError struct { ++ msg string ++} ++ ++func (e *UnsupportedValueError) Error() string { ++ return "cbor: unsupported value: " + e.msg ++} ++ ++// SortMode identifies supported sorting order. ++type SortMode int ++ ++const ( ++ // SortNone encodes map pairs and struct fields in an arbitrary order. ++ SortNone SortMode = 0 ++ ++ // SortLengthFirst causes map keys or struct fields to be sorted such that: ++ // - If two keys have different lengths, the shorter one sorts earlier; ++ // - If two keys have the same length, the one with the lower value in ++ // (byte-wise) lexical order sorts earlier. ++ // It is used in "Canonical CBOR" encoding in RFC 7049 3.9. ++ SortLengthFirst SortMode = 1 ++ ++ // SortBytewiseLexical causes map keys or struct fields to be sorted in the ++ // bytewise lexicographic order of their deterministic CBOR encodings. ++ // It is used in "CTAP2 Canonical CBOR" and "Core Deterministic Encoding" ++ // in RFC 7049bis. ++ SortBytewiseLexical SortMode = 2 ++ ++ // SortShuffle encodes map pairs and struct fields in a shuffled ++ // order. This mode does not guarantee an unbiased permutation, but it ++ // does guarantee that the runtime of the shuffle algorithm used will be ++ // constant. ++ SortFastShuffle SortMode = 3 ++ ++ // SortCanonical is used in "Canonical CBOR" encoding in RFC 7049 3.9. ++ SortCanonical SortMode = SortLengthFirst ++ ++ // SortCTAP2 is used in "CTAP2 Canonical CBOR". ++ SortCTAP2 SortMode = SortBytewiseLexical ++ ++ // SortCoreDeterministic is used in "Core Deterministic Encoding" in RFC 7049bis. ++ SortCoreDeterministic SortMode = SortBytewiseLexical ++ ++ maxSortMode SortMode = 4 ++) ++ ++func (sm SortMode) valid() bool { ++ return sm >= 0 && sm < maxSortMode ++} ++ ++// StringMode specifies how to encode Go string values. ++type StringMode int ++ ++const ( ++ // StringToTextString encodes Go string to CBOR text string (major type 3). ++ StringToTextString StringMode = iota ++ ++ // StringToByteString encodes Go string to CBOR byte string (major type 2). ++ StringToByteString ++) ++ ++func (st StringMode) cborType() (cborType, error) { ++ switch st { ++ case StringToTextString: ++ return cborTypeTextString, nil ++ ++ case StringToByteString: ++ return cborTypeByteString, nil ++ } ++ return 0, errors.New("cbor: invalid StringType " + strconv.Itoa(int(st))) ++} ++ ++// ShortestFloatMode specifies which floating-point format should ++// be used as the shortest possible format for CBOR encoding. ++// It is not used for encoding Infinity and NaN values. ++type ShortestFloatMode int ++ ++const ( ++ // ShortestFloatNone makes float values encode without any conversion. ++ // This is the default for ShortestFloatMode in v1. ++ // E.g. a float32 in Go will encode to CBOR float32. And ++ // a float64 in Go will encode to CBOR float64. ++ ShortestFloatNone ShortestFloatMode = iota ++ ++ // ShortestFloat16 specifies float16 as the shortest form that preserves value. ++ // E.g. if float64 can convert to float32 while preserving value, then ++ // encoding will also try to convert float32 to float16. So a float64 might ++ // encode as CBOR float64, float32 or float16 depending on the value. ++ ShortestFloat16 ++ ++ maxShortestFloat ++) ++ ++func (sfm ShortestFloatMode) valid() bool { ++ return sfm >= 0 && sfm < maxShortestFloat ++} ++ ++// NaNConvertMode specifies how to encode NaN and overrides ShortestFloatMode. ++// ShortestFloatMode is not used for encoding Infinity and NaN values. ++type NaNConvertMode int ++ ++const ( ++ // NaNConvert7e00 always encodes NaN to 0xf97e00 (CBOR float16 = 0x7e00). ++ NaNConvert7e00 NaNConvertMode = iota ++ ++ // NaNConvertNone never modifies or converts NaN to other representations ++ // (float64 NaN stays float64, etc. even if it can use float16 without losing ++ // any bits). ++ NaNConvertNone ++ ++ // NaNConvertPreserveSignal converts NaN to the smallest form that preserves ++ // value (quiet bit + payload) as described in RFC 7049bis Draft 12. ++ NaNConvertPreserveSignal ++ ++ // NaNConvertQuiet always forces quiet bit = 1 and shortest form that preserves ++ // NaN payload. ++ NaNConvertQuiet ++ ++ // NaNConvertReject returns UnsupportedValueError on attempts to encode a NaN value. ++ NaNConvertReject ++ ++ maxNaNConvert ++) ++ ++func (ncm NaNConvertMode) valid() bool { ++ return ncm >= 0 && ncm < maxNaNConvert ++} ++ ++// InfConvertMode specifies how to encode Infinity and overrides ShortestFloatMode. ++// ShortestFloatMode is not used for encoding Infinity and NaN values. ++type InfConvertMode int ++ ++const ( ++ // InfConvertFloat16 always converts Inf to lossless IEEE binary16 (float16). ++ InfConvertFloat16 InfConvertMode = iota ++ ++ // InfConvertNone never converts (used by CTAP2 Canonical CBOR). ++ InfConvertNone ++ ++ // InfConvertReject returns UnsupportedValueError on attempts to encode an infinite value. ++ InfConvertReject ++ ++ maxInfConvert ++) ++ ++func (icm InfConvertMode) valid() bool { ++ return icm >= 0 && icm < maxInfConvert ++} ++ ++// TimeMode specifies how to encode time.Time values. ++type TimeMode int ++ ++const ( ++ // TimeUnix causes time.Time to be encoded as epoch time in integer with second precision. ++ TimeUnix TimeMode = iota ++ ++ // TimeUnixMicro causes time.Time to be encoded as epoch time in float-point rounded to microsecond precision. ++ TimeUnixMicro ++ ++ // TimeUnixDynamic causes time.Time to be encoded as integer if time.Time doesn't have fractional seconds, ++ // otherwise float-point rounded to microsecond precision. ++ TimeUnixDynamic ++ ++ // TimeRFC3339 causes time.Time to be encoded as RFC3339 formatted string with second precision. ++ TimeRFC3339 ++ ++ // TimeRFC3339Nano causes time.Time to be encoded as RFC3339 formatted string with nanosecond precision. ++ TimeRFC3339Nano ++ ++ maxTimeMode ++) ++ ++func (tm TimeMode) valid() bool { ++ return tm >= 0 && tm < maxTimeMode ++} ++ ++// BigIntConvertMode specifies how to encode big.Int values. ++type BigIntConvertMode int ++ ++const ( ++ // BigIntConvertShortest makes big.Int encode to CBOR integer if value fits. ++ // E.g. if big.Int value can be converted to CBOR integer while preserving ++ // value, encoder will encode it to CBOR integer (major type 0 or 1). ++ BigIntConvertShortest BigIntConvertMode = iota ++ ++ // BigIntConvertNone makes big.Int encode to CBOR bignum (tag 2 or 3) without ++ // converting it to another CBOR type. ++ BigIntConvertNone ++ ++ // BigIntConvertReject returns an UnsupportedTypeError instead of marshaling a big.Int. ++ BigIntConvertReject ++ ++ maxBigIntConvert ++) ++ ++func (bim BigIntConvertMode) valid() bool { ++ return bim >= 0 && bim < maxBigIntConvert ++} ++ ++// NilContainersMode specifies how to encode nil slices and maps. ++type NilContainersMode int ++ ++const ( ++ // NilContainerAsNull encodes nil slices and maps as CBOR null. ++ // This is the default. ++ NilContainerAsNull NilContainersMode = iota ++ ++ // NilContainerAsEmpty encodes nil slices and maps as ++ // empty container (CBOR bytestring, array, or map). ++ NilContainerAsEmpty ++ ++ maxNilContainersMode ++) ++ ++func (m NilContainersMode) valid() bool { ++ return m >= 0 && m < maxNilContainersMode ++} ++ ++// OmitEmptyMode specifies how to encode struct fields with omitempty tag. ++// The default behavior omits if field value would encode as empty CBOR value. ++type OmitEmptyMode int ++ ++const ( ++ // OmitEmptyCBORValue specifies that struct fields tagged with "omitempty" ++ // should be omitted from encoding if the field would be encoded as an empty ++ // CBOR value, such as CBOR false, 0, 0.0, nil, empty byte, empty string, ++ // empty array, or empty map. ++ OmitEmptyCBORValue OmitEmptyMode = iota ++ ++ // OmitEmptyGoValue specifies that struct fields tagged with "omitempty" ++ // should be omitted from encoding if the field has an empty Go value, ++ // defined as false, 0, 0.0, a nil pointer, a nil interface value, and ++ // any empty array, slice, map, or string. ++ // This behavior is the same as the current (aka v1) encoding/json package ++ // included in Go. ++ OmitEmptyGoValue ++ ++ maxOmitEmptyMode ++) ++ ++func (om OmitEmptyMode) valid() bool { ++ return om >= 0 && om < maxOmitEmptyMode ++} ++ ++// FieldNameMode specifies the CBOR type to use when encoding struct field names. ++type FieldNameMode int ++ ++const ( ++ // FieldNameToTextString encodes struct fields to CBOR text string (major type 3). ++ FieldNameToTextString FieldNameMode = iota ++ ++ // FieldNameToTextString encodes struct fields to CBOR byte string (major type 2). ++ FieldNameToByteString ++ ++ maxFieldNameMode ++) ++ ++func (fnm FieldNameMode) valid() bool { ++ return fnm >= 0 && fnm < maxFieldNameMode ++} ++ ++// ByteSliceLaterFormatMode specifies which later format conversion hint (CBOR tag 21-23) ++// to include (if any) when encoding Go byte slice to CBOR byte string. The encoder will ++// always encode unmodified bytes from the byte slice and just wrap it within ++// CBOR tag 21, 22, or 23 if specified. ++// See "Expected Later Encoding for CBOR-to-JSON Converters" in RFC 8949 Section 3.4.5.2. ++type ByteSliceLaterFormatMode int ++ ++const ( ++ // ByteSliceLaterFormatNone encodes unmodified bytes from Go byte slice to CBOR byte string (major type 2) ++ // without adding CBOR tag 21, 22, or 23. ++ ByteSliceLaterFormatNone ByteSliceLaterFormatMode = iota ++ ++ // ByteSliceLaterFormatBase64URL encodes unmodified bytes from Go byte slice to CBOR byte string (major type 2) ++ // inside CBOR tag 21 (expected later conversion to base64url encoding, see RFC 8949 Section 3.4.5.2). ++ ByteSliceLaterFormatBase64URL ++ ++ // ByteSliceLaterFormatBase64 encodes unmodified bytes from Go byte slice to CBOR byte string (major type 2) ++ // inside CBOR tag 22 (expected later conversion to base64 encoding, see RFC 8949 Section 3.4.5.2). ++ ByteSliceLaterFormatBase64 ++ ++ // ByteSliceLaterFormatBase16 encodes unmodified bytes from Go byte slice to CBOR byte string (major type 2) ++ // inside CBOR tag 23 (expected later conversion to base16 encoding, see RFC 8949 Section 3.4.5.2). ++ ByteSliceLaterFormatBase16 ++) ++ ++func (bsefm ByteSliceLaterFormatMode) encodingTag() (uint64, error) { ++ switch bsefm { ++ case ByteSliceLaterFormatNone: ++ return 0, nil ++ ++ case ByteSliceLaterFormatBase64URL: ++ return tagNumExpectedLaterEncodingBase64URL, nil ++ ++ case ByteSliceLaterFormatBase64: ++ return tagNumExpectedLaterEncodingBase64, nil ++ ++ case ByteSliceLaterFormatBase16: ++ return tagNumExpectedLaterEncodingBase16, nil ++ } ++ return 0, errors.New("cbor: invalid ByteSliceLaterFormat " + strconv.Itoa(int(bsefm))) ++} ++ ++// ByteArrayMode specifies how to encode byte arrays. ++type ByteArrayMode int ++ ++const ( ++ // ByteArrayToByteSlice encodes byte arrays the same way that a byte slice with identical ++ // length and contents is encoded. ++ ByteArrayToByteSlice ByteArrayMode = iota ++ ++ // ByteArrayToArray encodes byte arrays to the CBOR array type with one unsigned integer ++ // item for each byte in the array. ++ ByteArrayToArray ++ ++ maxByteArrayMode ++) ++ ++func (bam ByteArrayMode) valid() bool { ++ return bam >= 0 && bam < maxByteArrayMode ++} ++ ++// BinaryMarshalerMode specifies how to encode types that implement encoding.BinaryMarshaler. ++type BinaryMarshalerMode int ++ ++const ( ++ // BinaryMarshalerByteString encodes the output of MarshalBinary to a CBOR byte string. ++ BinaryMarshalerByteString BinaryMarshalerMode = iota ++ ++ // BinaryMarshalerNone does not recognize BinaryMarshaler implementations during encode. ++ BinaryMarshalerNone ++ ++ maxBinaryMarshalerMode ++) ++ ++func (bmm BinaryMarshalerMode) valid() bool { ++ return bmm >= 0 && bmm < maxBinaryMarshalerMode ++} ++ ++// EncOptions specifies encoding options. ++type EncOptions struct { ++ // Sort specifies sorting order. ++ Sort SortMode ++ ++ // ShortestFloat specifies the shortest floating-point encoding that preserves ++ // the value being encoded. ++ ShortestFloat ShortestFloatMode ++ ++ // NaNConvert specifies how to encode NaN and it overrides ShortestFloatMode. ++ NaNConvert NaNConvertMode ++ ++ // InfConvert specifies how to encode Inf and it overrides ShortestFloatMode. ++ InfConvert InfConvertMode ++ ++ // BigIntConvert specifies how to encode big.Int values. ++ BigIntConvert BigIntConvertMode ++ ++ // Time specifies how to encode time.Time. ++ Time TimeMode ++ ++ // TimeTag allows time.Time to be encoded with a tag number. ++ // RFC3339 format gets tag number 0, and numeric epoch time tag number 1. ++ TimeTag EncTagMode ++ ++ // IndefLength specifies whether to allow indefinite length CBOR items. ++ IndefLength IndefLengthMode ++ ++ // NilContainers specifies how to encode nil slices and maps. ++ NilContainers NilContainersMode ++ ++ // TagsMd specifies whether to allow CBOR tags (major type 6). ++ TagsMd TagsMode ++ ++ // OmitEmptyMode specifies how to encode struct fields with omitempty tag. ++ OmitEmpty OmitEmptyMode ++ ++ // String specifies which CBOR type to use when encoding Go strings. ++ // - CBOR text string (major type 3) is default ++ // - CBOR byte string (major type 2) ++ String StringMode ++ ++ // FieldName specifies the CBOR type to use when encoding struct field names. ++ FieldName FieldNameMode ++ ++ // ByteSliceLaterFormat specifies which later format conversion hint (CBOR tag 21-23) ++ // to include (if any) when encoding Go byte slice to CBOR byte string. The encoder will ++ // always encode unmodified bytes from the byte slice and just wrap it within ++ // CBOR tag 21, 22, or 23 if specified. ++ // See "Expected Later Encoding for CBOR-to-JSON Converters" in RFC 8949 Section 3.4.5.2. ++ ByteSliceLaterFormat ByteSliceLaterFormatMode ++ ++ // ByteArray specifies how to encode byte arrays. ++ ByteArray ByteArrayMode ++ ++ // BinaryMarshaler specifies how to encode types that implement encoding.BinaryMarshaler. ++ BinaryMarshaler BinaryMarshalerMode ++} ++ ++// CanonicalEncOptions returns EncOptions for "Canonical CBOR" encoding, ++// defined in RFC 7049 Section 3.9 with the following rules: ++// ++// 1. "Integers must be as small as possible." ++// 2. "The expression of lengths in major types 2 through 5 must be as short as possible." ++// 3. The keys in every map must be sorted in length-first sorting order. ++// See SortLengthFirst for details. ++// 4. "Indefinite-length items must be made into definite-length items." ++// 5. "If a protocol allows for IEEE floats, then additional canonicalization rules might ++// need to be added. One example rule might be to have all floats start as a 64-bit ++// float, then do a test conversion to a 32-bit float; if the result is the same numeric ++// value, use the shorter value and repeat the process with a test conversion to a ++// 16-bit float. (This rule selects 16-bit float for positive and negative Infinity ++// as well.) Also, there are many representations for NaN. If NaN is an allowed value, ++// it must always be represented as 0xf97e00." ++func CanonicalEncOptions() EncOptions { ++ return EncOptions{ ++ Sort: SortCanonical, ++ ShortestFloat: ShortestFloat16, ++ NaNConvert: NaNConvert7e00, ++ InfConvert: InfConvertFloat16, ++ IndefLength: IndefLengthForbidden, ++ } ++} ++ ++// CTAP2EncOptions returns EncOptions for "CTAP2 Canonical CBOR" encoding, ++// defined in CTAP specification, with the following rules: ++// ++// 1. "Integers must be encoded as small as possible." ++// 2. "The representations of any floating-point values are not changed." ++// 3. "The expression of lengths in major types 2 through 5 must be as short as possible." ++// 4. "Indefinite-length items must be made into definite-length items."" ++// 5. The keys in every map must be sorted in bytewise lexicographic order. ++// See SortBytewiseLexical for details. ++// 6. "Tags as defined in Section 2.4 in [RFC7049] MUST NOT be present." ++func CTAP2EncOptions() EncOptions { ++ return EncOptions{ ++ Sort: SortCTAP2, ++ ShortestFloat: ShortestFloatNone, ++ NaNConvert: NaNConvertNone, ++ InfConvert: InfConvertNone, ++ IndefLength: IndefLengthForbidden, ++ TagsMd: TagsForbidden, ++ } ++} ++ ++// CoreDetEncOptions returns EncOptions for "Core Deterministic" encoding, ++// defined in RFC 7049bis with the following rules: ++// ++// 1. "Preferred serialization MUST be used. In particular, this means that arguments ++// (see Section 3) for integers, lengths in major types 2 through 5, and tags MUST ++// be as short as possible" ++// "Floating point values also MUST use the shortest form that preserves the value" ++// 2. "Indefinite-length items MUST NOT appear." ++// 3. "The keys in every map MUST be sorted in the bytewise lexicographic order of ++// their deterministic encodings." ++func CoreDetEncOptions() EncOptions { ++ return EncOptions{ ++ Sort: SortCoreDeterministic, ++ ShortestFloat: ShortestFloat16, ++ NaNConvert: NaNConvert7e00, ++ InfConvert: InfConvertFloat16, ++ IndefLength: IndefLengthForbidden, ++ } ++} ++ ++// PreferredUnsortedEncOptions returns EncOptions for "Preferred Serialization" encoding, ++// defined in RFC 7049bis with the following rules: ++// ++// 1. "The preferred serialization always uses the shortest form of representing the argument ++// (Section 3);" ++// 2. "it also uses the shortest floating-point encoding that preserves the value being ++// encoded (see Section 5.5)." ++// "The preferred encoding for a floating-point value is the shortest floating-point encoding ++// that preserves its value, e.g., 0xf94580 for the number 5.5, and 0xfa45ad9c00 for the ++// number 5555.5, unless the CBOR-based protocol specifically excludes the use of the shorter ++// floating-point encodings. For NaN values, a shorter encoding is preferred if zero-padding ++// the shorter significand towards the right reconstitutes the original NaN value (for many ++// applications, the single NaN encoding 0xf97e00 will suffice)." ++// 3. "Definite length encoding is preferred whenever the length is known at the time the ++// serialization of the item starts." ++func PreferredUnsortedEncOptions() EncOptions { ++ return EncOptions{ ++ Sort: SortNone, ++ ShortestFloat: ShortestFloat16, ++ NaNConvert: NaNConvert7e00, ++ InfConvert: InfConvertFloat16, ++ } ++} ++ ++// EncMode returns EncMode with immutable options and no tags (safe for concurrency). ++func (opts EncOptions) EncMode() (EncMode, error) { //nolint:gocritic // ignore hugeParam ++ return opts.encMode() ++} ++ ++// UserBufferEncMode returns UserBufferEncMode with immutable options and no tags (safe for concurrency). ++func (opts EncOptions) UserBufferEncMode() (UserBufferEncMode, error) { //nolint:gocritic // ignore hugeParam ++ return opts.encMode() ++} ++ ++// EncModeWithTags returns EncMode with options and tags that are both immutable (safe for concurrency). ++func (opts EncOptions) EncModeWithTags(tags TagSet) (EncMode, error) { //nolint:gocritic // ignore hugeParam ++ return opts.UserBufferEncModeWithTags(tags) ++} ++ ++// UserBufferEncModeWithTags returns UserBufferEncMode with options and tags that are both immutable (safe for concurrency). ++func (opts EncOptions) UserBufferEncModeWithTags(tags TagSet) (UserBufferEncMode, error) { //nolint:gocritic // ignore hugeParam ++ if opts.TagsMd == TagsForbidden { ++ return nil, errors.New("cbor: cannot create EncMode with TagSet when TagsMd is TagsForbidden") ++ } ++ if tags == nil { ++ return nil, errors.New("cbor: cannot create EncMode with nil value as TagSet") ++ } ++ em, err := opts.encMode() ++ if err != nil { ++ return nil, err ++ } ++ // Copy tags ++ ts := tagSet(make(map[reflect.Type]*tagItem)) ++ syncTags := tags.(*syncTagSet) ++ syncTags.RLock() ++ for contentType, tag := range syncTags.t { ++ if tag.opts.EncTag != EncTagNone { ++ ts[contentType] = tag ++ } ++ } ++ syncTags.RUnlock() ++ if len(ts) > 0 { ++ em.tags = ts ++ } ++ return em, nil ++} ++ ++// EncModeWithSharedTags returns EncMode with immutable options and mutable shared tags (safe for concurrency). ++func (opts EncOptions) EncModeWithSharedTags(tags TagSet) (EncMode, error) { //nolint:gocritic // ignore hugeParam ++ return opts.UserBufferEncModeWithSharedTags(tags) ++} ++ ++// UserBufferEncModeWithSharedTags returns UserBufferEncMode with immutable options and mutable shared tags (safe for concurrency). ++func (opts EncOptions) UserBufferEncModeWithSharedTags(tags TagSet) (UserBufferEncMode, error) { //nolint:gocritic // ignore hugeParam ++ if opts.TagsMd == TagsForbidden { ++ return nil, errors.New("cbor: cannot create EncMode with TagSet when TagsMd is TagsForbidden") ++ } ++ if tags == nil { ++ return nil, errors.New("cbor: cannot create EncMode with nil value as TagSet") ++ } ++ em, err := opts.encMode() ++ if err != nil { ++ return nil, err ++ } ++ em.tags = tags ++ return em, nil ++} ++ ++func (opts EncOptions) encMode() (*encMode, error) { //nolint:gocritic // ignore hugeParam ++ if !opts.Sort.valid() { ++ return nil, errors.New("cbor: invalid SortMode " + strconv.Itoa(int(opts.Sort))) ++ } ++ if !opts.ShortestFloat.valid() { ++ return nil, errors.New("cbor: invalid ShortestFloatMode " + strconv.Itoa(int(opts.ShortestFloat))) ++ } ++ if !opts.NaNConvert.valid() { ++ return nil, errors.New("cbor: invalid NaNConvertMode " + strconv.Itoa(int(opts.NaNConvert))) ++ } ++ if !opts.InfConvert.valid() { ++ return nil, errors.New("cbor: invalid InfConvertMode " + strconv.Itoa(int(opts.InfConvert))) ++ } ++ if !opts.BigIntConvert.valid() { ++ return nil, errors.New("cbor: invalid BigIntConvertMode " + strconv.Itoa(int(opts.BigIntConvert))) ++ } ++ if !opts.Time.valid() { ++ return nil, errors.New("cbor: invalid TimeMode " + strconv.Itoa(int(opts.Time))) ++ } ++ if !opts.TimeTag.valid() { ++ return nil, errors.New("cbor: invalid TimeTag " + strconv.Itoa(int(opts.TimeTag))) ++ } ++ if !opts.IndefLength.valid() { ++ return nil, errors.New("cbor: invalid IndefLength " + strconv.Itoa(int(opts.IndefLength))) ++ } ++ if !opts.NilContainers.valid() { ++ return nil, errors.New("cbor: invalid NilContainers " + strconv.Itoa(int(opts.NilContainers))) ++ } ++ if !opts.TagsMd.valid() { ++ return nil, errors.New("cbor: invalid TagsMd " + strconv.Itoa(int(opts.TagsMd))) ++ } ++ if opts.TagsMd == TagsForbidden && opts.TimeTag == EncTagRequired { ++ return nil, errors.New("cbor: cannot set TagsMd to TagsForbidden when TimeTag is EncTagRequired") ++ } ++ if !opts.OmitEmpty.valid() { ++ return nil, errors.New("cbor: invalid OmitEmpty " + strconv.Itoa(int(opts.OmitEmpty))) ++ } ++ stringMajorType, err := opts.String.cborType() ++ if err != nil { ++ return nil, err ++ } ++ if !opts.FieldName.valid() { ++ return nil, errors.New("cbor: invalid FieldName " + strconv.Itoa(int(opts.FieldName))) ++ } ++ byteSliceLaterEncodingTag, err := opts.ByteSliceLaterFormat.encodingTag() ++ if err != nil { ++ return nil, err ++ } ++ if !opts.ByteArray.valid() { ++ return nil, errors.New("cbor: invalid ByteArray " + strconv.Itoa(int(opts.ByteArray))) ++ } ++ if !opts.BinaryMarshaler.valid() { ++ return nil, errors.New("cbor: invalid BinaryMarshaler " + strconv.Itoa(int(opts.BinaryMarshaler))) ++ } ++ em := encMode{ ++ sort: opts.Sort, ++ shortestFloat: opts.ShortestFloat, ++ nanConvert: opts.NaNConvert, ++ infConvert: opts.InfConvert, ++ bigIntConvert: opts.BigIntConvert, ++ time: opts.Time, ++ timeTag: opts.TimeTag, ++ indefLength: opts.IndefLength, ++ nilContainers: opts.NilContainers, ++ tagsMd: opts.TagsMd, ++ omitEmpty: opts.OmitEmpty, ++ stringType: opts.String, ++ stringMajorType: stringMajorType, ++ fieldName: opts.FieldName, ++ byteSliceLaterFormat: opts.ByteSliceLaterFormat, ++ byteSliceLaterEncodingTag: byteSliceLaterEncodingTag, ++ byteArray: opts.ByteArray, ++ binaryMarshaler: opts.BinaryMarshaler, ++ } ++ return &em, nil ++} ++ ++// EncMode is the main interface for CBOR encoding. ++type EncMode interface { ++ Marshal(v interface{}) ([]byte, error) ++ NewEncoder(w io.Writer) *Encoder ++ EncOptions() EncOptions ++} ++ ++// UserBufferEncMode is an interface for CBOR encoding, which extends EncMode by ++// adding MarshalToBuffer to support user specified buffer rather than encoding ++// into the built-in buffer pool. ++type UserBufferEncMode interface { ++ EncMode ++ MarshalToBuffer(v interface{}, buf *bytes.Buffer) error ++ ++ // This private method is to prevent users implementing ++ // this interface and so future additions to it will ++ // not be breaking changes. ++ // See https://go.dev/blog/module-compatibility ++ unexport() ++} ++ ++type encMode struct { ++ tags tagProvider ++ sort SortMode ++ shortestFloat ShortestFloatMode ++ nanConvert NaNConvertMode ++ infConvert InfConvertMode ++ bigIntConvert BigIntConvertMode ++ time TimeMode ++ timeTag EncTagMode ++ indefLength IndefLengthMode ++ nilContainers NilContainersMode ++ tagsMd TagsMode ++ omitEmpty OmitEmptyMode ++ stringType StringMode ++ stringMajorType cborType ++ fieldName FieldNameMode ++ byteSliceLaterFormat ByteSliceLaterFormatMode ++ byteSliceLaterEncodingTag uint64 ++ byteArray ByteArrayMode ++ binaryMarshaler BinaryMarshalerMode ++} ++ ++var defaultEncMode, _ = EncOptions{}.encMode() ++ ++// These four decoding modes are used by getMarshalerDecMode. ++// maxNestedLevels, maxArrayElements, and maxMapPairs are ++// set to max allowed limits to avoid rejecting Marshaler ++// output that would have been the allowable output of a ++// non-Marshaler object that exceeds default limits. ++var ( ++ marshalerForbidIndefLengthForbidTagsDecMode = decMode{ ++ maxNestedLevels: maxMaxNestedLevels, ++ maxArrayElements: maxMaxArrayElements, ++ maxMapPairs: maxMaxMapPairs, ++ indefLength: IndefLengthForbidden, ++ tagsMd: TagsForbidden, ++ } ++ ++ marshalerAllowIndefLengthForbidTagsDecMode = decMode{ ++ maxNestedLevels: maxMaxNestedLevels, ++ maxArrayElements: maxMaxArrayElements, ++ maxMapPairs: maxMaxMapPairs, ++ indefLength: IndefLengthAllowed, ++ tagsMd: TagsForbidden, ++ } ++ ++ marshalerForbidIndefLengthAllowTagsDecMode = decMode{ ++ maxNestedLevels: maxMaxNestedLevels, ++ maxArrayElements: maxMaxArrayElements, ++ maxMapPairs: maxMaxMapPairs, ++ indefLength: IndefLengthForbidden, ++ tagsMd: TagsAllowed, ++ } ++ ++ marshalerAllowIndefLengthAllowTagsDecMode = decMode{ ++ maxNestedLevels: maxMaxNestedLevels, ++ maxArrayElements: maxMaxArrayElements, ++ maxMapPairs: maxMaxMapPairs, ++ indefLength: IndefLengthAllowed, ++ tagsMd: TagsAllowed, ++ } ++) ++ ++// getMarshalerDecMode returns one of four existing decoding modes ++// which can be reused (safe for parallel use) for the purpose of ++// checking if data returned by Marshaler is well-formed. ++func getMarshalerDecMode(indefLength IndefLengthMode, tagsMd TagsMode) *decMode { ++ switch { ++ case indefLength == IndefLengthAllowed && tagsMd == TagsAllowed: ++ return &marshalerAllowIndefLengthAllowTagsDecMode ++ ++ case indefLength == IndefLengthAllowed && tagsMd == TagsForbidden: ++ return &marshalerAllowIndefLengthForbidTagsDecMode ++ ++ case indefLength == IndefLengthForbidden && tagsMd == TagsAllowed: ++ return &marshalerForbidIndefLengthAllowTagsDecMode ++ ++ case indefLength == IndefLengthForbidden && tagsMd == TagsForbidden: ++ return &marshalerForbidIndefLengthForbidTagsDecMode ++ ++ default: ++ // This should never happen, unless we add new options to ++ // IndefLengthMode or TagsMode without updating this function. ++ return &decMode{ ++ maxNestedLevels: maxMaxNestedLevels, ++ maxArrayElements: maxMaxArrayElements, ++ maxMapPairs: maxMaxMapPairs, ++ indefLength: indefLength, ++ tagsMd: tagsMd, ++ } ++ } ++} ++ ++// EncOptions returns user specified options used to create this EncMode. ++func (em *encMode) EncOptions() EncOptions { ++ return EncOptions{ ++ Sort: em.sort, ++ ShortestFloat: em.shortestFloat, ++ NaNConvert: em.nanConvert, ++ InfConvert: em.infConvert, ++ BigIntConvert: em.bigIntConvert, ++ Time: em.time, ++ TimeTag: em.timeTag, ++ IndefLength: em.indefLength, ++ NilContainers: em.nilContainers, ++ TagsMd: em.tagsMd, ++ OmitEmpty: em.omitEmpty, ++ String: em.stringType, ++ FieldName: em.fieldName, ++ ByteSliceLaterFormat: em.byteSliceLaterFormat, ++ ByteArray: em.byteArray, ++ BinaryMarshaler: em.binaryMarshaler, ++ } ++} ++ ++func (em *encMode) unexport() {} ++ ++func (em *encMode) encTagBytes(t reflect.Type) []byte { ++ if em.tags != nil { ++ if tagItem := em.tags.getTagItemFromType(t); tagItem != nil { ++ return tagItem.cborTagNum ++ } ++ } ++ return nil ++} ++ ++// Marshal returns the CBOR encoding of v using em encoding mode. ++// ++// See the documentation for Marshal for details. ++func (em *encMode) Marshal(v interface{}) ([]byte, error) { ++ e := getEncodeBuffer() ++ ++ if err := encode(e, em, reflect.ValueOf(v)); err != nil { ++ putEncodeBuffer(e) ++ return nil, err ++ } ++ ++ buf := make([]byte, e.Len()) ++ copy(buf, e.Bytes()) ++ ++ putEncodeBuffer(e) ++ return buf, nil ++} ++ ++// MarshalToBuffer encodes v into provided buffer (instead of using built-in buffer pool) ++// and uses em encoding mode. ++// ++// NOTE: Unlike Marshal, the buffer provided to MarshalToBuffer can contain ++// partially encoded data if error is returned. ++// ++// See Marshal for more details. ++func (em *encMode) MarshalToBuffer(v interface{}, buf *bytes.Buffer) error { ++ if buf == nil { ++ return fmt.Errorf("cbor: encoding buffer provided by user is nil") ++ } ++ return encode(buf, em, reflect.ValueOf(v)) ++} ++ ++// NewEncoder returns a new encoder that writes to w using em EncMode. ++func (em *encMode) NewEncoder(w io.Writer) *Encoder { ++ return &Encoder{w: w, em: em} ++} ++ ++// encodeBufferPool caches unused bytes.Buffer objects for later reuse. ++var encodeBufferPool = sync.Pool{ ++ New: func() interface{} { ++ e := new(bytes.Buffer) ++ e.Grow(32) // TODO: make this configurable ++ return e ++ }, ++} ++ ++func getEncodeBuffer() *bytes.Buffer { ++ return encodeBufferPool.Get().(*bytes.Buffer) ++} ++ ++func putEncodeBuffer(e *bytes.Buffer) { ++ e.Reset() ++ encodeBufferPool.Put(e) ++} ++ ++type encodeFunc func(e *bytes.Buffer, em *encMode, v reflect.Value) error ++type isEmptyFunc func(em *encMode, v reflect.Value) (empty bool, err error) ++ ++func encode(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if !v.IsValid() { ++ // v is zero value ++ e.Write(cborNil) ++ return nil ++ } ++ vt := v.Type() ++ f, _ := getEncodeFunc(vt) ++ if f == nil { ++ return &UnsupportedTypeError{vt} ++ } ++ ++ return f(e, em, v) ++} ++ ++func encodeBool(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ b := cborFalse ++ if v.Bool() { ++ b = cborTrue ++ } ++ e.Write(b) ++ return nil ++} ++ ++func encodeInt(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ i := v.Int() ++ if i >= 0 { ++ encodeHead(e, byte(cborTypePositiveInt), uint64(i)) ++ return nil ++ } ++ i = i*(-1) - 1 ++ encodeHead(e, byte(cborTypeNegativeInt), uint64(i)) ++ return nil ++} ++ ++func encodeUint(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ encodeHead(e, byte(cborTypePositiveInt), v.Uint()) ++ return nil ++} ++ ++func encodeFloat(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ f64 := v.Float() ++ if math.IsNaN(f64) { ++ return encodeNaN(e, em, v) ++ } ++ if math.IsInf(f64, 0) { ++ return encodeInf(e, em, v) ++ } ++ fopt := em.shortestFloat ++ if v.Kind() == reflect.Float64 && (fopt == ShortestFloatNone || cannotFitFloat32(f64)) { ++ // Encode float64 ++ // Don't use encodeFloat64() because it cannot be inlined. ++ const argumentSize = 8 ++ const headSize = 1 + argumentSize ++ var scratch [headSize]byte ++ scratch[0] = byte(cborTypePrimitives) | byte(additionalInformationAsFloat64) ++ binary.BigEndian.PutUint64(scratch[1:], math.Float64bits(f64)) ++ e.Write(scratch[:]) ++ return nil ++ } ++ ++ f32 := float32(f64) ++ if fopt == ShortestFloat16 { ++ var f16 float16.Float16 ++ p := float16.PrecisionFromfloat32(f32) ++ if p == float16.PrecisionExact { ++ // Roundtrip float32->float16->float32 test isn't needed. ++ f16 = float16.Fromfloat32(f32) ++ } else if p == float16.PrecisionUnknown { ++ // Try roundtrip float32->float16->float32 to determine if float32 can fit into float16. ++ f16 = float16.Fromfloat32(f32) ++ if f16.Float32() == f32 { ++ p = float16.PrecisionExact ++ } ++ } ++ if p == float16.PrecisionExact { ++ // Encode float16 ++ // Don't use encodeFloat16() because it cannot be inlined. ++ const argumentSize = 2 ++ const headSize = 1 + argumentSize ++ var scratch [headSize]byte ++ scratch[0] = byte(cborTypePrimitives) | additionalInformationAsFloat16 ++ binary.BigEndian.PutUint16(scratch[1:], uint16(f16)) ++ e.Write(scratch[:]) ++ return nil ++ } ++ } ++ ++ // Encode float32 ++ // Don't use encodeFloat32() because it cannot be inlined. ++ const argumentSize = 4 ++ const headSize = 1 + argumentSize ++ var scratch [headSize]byte ++ scratch[0] = byte(cborTypePrimitives) | additionalInformationAsFloat32 ++ binary.BigEndian.PutUint32(scratch[1:], math.Float32bits(f32)) ++ e.Write(scratch[:]) ++ return nil ++} ++ ++func encodeInf(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ f64 := v.Float() ++ switch em.infConvert { ++ case InfConvertReject: ++ return &UnsupportedValueError{msg: "floating-point infinity"} ++ ++ case InfConvertFloat16: ++ if f64 > 0 { ++ e.Write(cborPositiveInfinity) ++ } else { ++ e.Write(cborNegativeInfinity) ++ } ++ return nil ++ } ++ if v.Kind() == reflect.Float64 { ++ return encodeFloat64(e, f64) ++ } ++ return encodeFloat32(e, float32(f64)) ++} ++ ++func encodeNaN(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ switch em.nanConvert { ++ case NaNConvert7e00: ++ e.Write(cborNaN) ++ return nil ++ ++ case NaNConvertNone: ++ if v.Kind() == reflect.Float64 { ++ return encodeFloat64(e, v.Float()) ++ } ++ f32 := float32NaNFromReflectValue(v) ++ return encodeFloat32(e, f32) ++ ++ case NaNConvertReject: ++ return &UnsupportedValueError{msg: "floating-point NaN"} ++ ++ default: // NaNConvertPreserveSignal, NaNConvertQuiet ++ if v.Kind() == reflect.Float64 { ++ f64 := v.Float() ++ f64bits := math.Float64bits(f64) ++ if em.nanConvert == NaNConvertQuiet && f64bits&(1<<51) == 0 { ++ f64bits |= 1 << 51 // Set quiet bit = 1 ++ f64 = math.Float64frombits(f64bits) ++ } ++ // The lower 29 bits are dropped when converting from float64 to float32. ++ if f64bits&0x1fffffff != 0 { ++ // Encode NaN as float64 because dropped coef bits from float64 to float32 are not all 0s. ++ return encodeFloat64(e, f64) ++ } ++ // Create float32 from float64 manually because float32(f64) always turns on NaN's quiet bits. ++ sign := uint32(f64bits>>32) & (1 << 31) ++ exp := uint32(0x7f800000) ++ coef := uint32((f64bits & 0xfffffffffffff) >> 29) ++ f32bits := sign | exp | coef ++ f32 := math.Float32frombits(f32bits) ++ // The lower 13 bits are dropped when converting from float32 to float16. ++ if f32bits&0x1fff != 0 { ++ // Encode NaN as float32 because dropped coef bits from float32 to float16 are not all 0s. ++ return encodeFloat32(e, f32) ++ } ++ // Encode NaN as float16 ++ f16, _ := float16.FromNaN32ps(f32) // Ignore err because it only returns error when f32 is not a NaN. ++ return encodeFloat16(e, f16) ++ } ++ ++ f32 := float32NaNFromReflectValue(v) ++ f32bits := math.Float32bits(f32) ++ if em.nanConvert == NaNConvertQuiet && f32bits&(1<<22) == 0 { ++ f32bits |= 1 << 22 // Set quiet bit = 1 ++ f32 = math.Float32frombits(f32bits) ++ } ++ // The lower 13 bits are dropped coef bits when converting from float32 to float16. ++ if f32bits&0x1fff != 0 { ++ // Encode NaN as float32 because dropped coef bits from float32 to float16 are not all 0s. ++ return encodeFloat32(e, f32) ++ } ++ f16, _ := float16.FromNaN32ps(f32) // Ignore err because it only returns error when f32 is not a NaN. ++ return encodeFloat16(e, f16) ++ } ++} ++ ++func encodeFloat16(e *bytes.Buffer, f16 float16.Float16) error { ++ const argumentSize = 2 ++ const headSize = 1 + argumentSize ++ var scratch [headSize]byte ++ scratch[0] = byte(cborTypePrimitives) | additionalInformationAsFloat16 ++ binary.BigEndian.PutUint16(scratch[1:], uint16(f16)) ++ e.Write(scratch[:]) ++ return nil ++} ++ ++func encodeFloat32(e *bytes.Buffer, f32 float32) error { ++ const argumentSize = 4 ++ const headSize = 1 + argumentSize ++ var scratch [headSize]byte ++ scratch[0] = byte(cborTypePrimitives) | additionalInformationAsFloat32 ++ binary.BigEndian.PutUint32(scratch[1:], math.Float32bits(f32)) ++ e.Write(scratch[:]) ++ return nil ++} ++ ++func encodeFloat64(e *bytes.Buffer, f64 float64) error { ++ const argumentSize = 8 ++ const headSize = 1 + argumentSize ++ var scratch [headSize]byte ++ scratch[0] = byte(cborTypePrimitives) | additionalInformationAsFloat64 ++ binary.BigEndian.PutUint64(scratch[1:], math.Float64bits(f64)) ++ e.Write(scratch[:]) ++ return nil ++} ++ ++func encodeByteString(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ vk := v.Kind() ++ if vk == reflect.Slice && v.IsNil() && em.nilContainers == NilContainerAsNull { ++ e.Write(cborNil) ++ return nil ++ } ++ if vk == reflect.Slice && v.Type().Elem().Kind() == reflect.Uint8 && em.byteSliceLaterEncodingTag != 0 { ++ encodeHead(e, byte(cborTypeTag), em.byteSliceLaterEncodingTag) ++ } ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ slen := v.Len() ++ if slen == 0 { ++ return e.WriteByte(byte(cborTypeByteString)) ++ } ++ encodeHead(e, byte(cborTypeByteString), uint64(slen)) ++ if vk == reflect.Array { ++ for i := 0; i < slen; i++ { ++ e.WriteByte(byte(v.Index(i).Uint())) ++ } ++ return nil ++ } ++ e.Write(v.Bytes()) ++ return nil ++} ++ ++func encodeString(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ s := v.String() ++ encodeHead(e, byte(em.stringMajorType), uint64(len(s))) ++ e.WriteString(s) ++ return nil ++} ++ ++type arrayEncodeFunc struct { ++ f encodeFunc ++} ++ ++func (ae arrayEncodeFunc) encode(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if em.byteArray == ByteArrayToByteSlice && v.Type().Elem().Kind() == reflect.Uint8 { ++ return encodeByteString(e, em, v) ++ } ++ if v.Kind() == reflect.Slice && v.IsNil() && em.nilContainers == NilContainerAsNull { ++ e.Write(cborNil) ++ return nil ++ } ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ alen := v.Len() ++ if alen == 0 { ++ return e.WriteByte(byte(cborTypeArray)) ++ } ++ encodeHead(e, byte(cborTypeArray), uint64(alen)) ++ for i := 0; i < alen; i++ { ++ if err := ae.f(e, em, v.Index(i)); err != nil { ++ return err ++ } ++ } ++ return nil ++} ++ ++// encodeKeyValueFunc encodes key/value pairs in map (v). ++// If kvs is provided (having the same length as v), length of encoded key and value are stored in kvs. ++// kvs is used for canonical encoding of map. ++type encodeKeyValueFunc func(e *bytes.Buffer, em *encMode, v reflect.Value, kvs []keyValue) error ++ ++type mapEncodeFunc struct { ++ e encodeKeyValueFunc ++} ++ ++func (me mapEncodeFunc) encode(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if v.IsNil() && em.nilContainers == NilContainerAsNull { ++ e.Write(cborNil) ++ return nil ++ } ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ mlen := v.Len() ++ if mlen == 0 { ++ return e.WriteByte(byte(cborTypeMap)) ++ } ++ ++ encodeHead(e, byte(cborTypeMap), uint64(mlen)) ++ if em.sort == SortNone || em.sort == SortFastShuffle || mlen <= 1 { ++ return me.e(e, em, v, nil) ++ } ++ ++ kvsp := getKeyValues(v.Len()) // for sorting keys ++ defer putKeyValues(kvsp) ++ kvs := *kvsp ++ ++ kvBeginOffset := e.Len() ++ if err := me.e(e, em, v, kvs); err != nil { ++ return err ++ } ++ kvTotalLen := e.Len() - kvBeginOffset ++ ++ // Use the capacity at the tail of the encode buffer as a staging area to rearrange the ++ // encoded pairs into sorted order. ++ e.Grow(kvTotalLen) ++ tmp := e.Bytes()[e.Len() : e.Len()+kvTotalLen] // Can use e.AvailableBuffer() in Go 1.21+. ++ dst := e.Bytes()[kvBeginOffset:] ++ ++ if em.sort == SortBytewiseLexical { ++ sort.Sort(&bytewiseKeyValueSorter{kvs: kvs, data: dst}) ++ } else { ++ sort.Sort(&lengthFirstKeyValueSorter{kvs: kvs, data: dst}) ++ } ++ ++ // This is where the encoded bytes are actually rearranged in the output buffer to reflect ++ // the desired order. ++ sortedOffset := 0 ++ for _, kv := range kvs { ++ copy(tmp[sortedOffset:], dst[kv.offset:kv.nextOffset]) ++ sortedOffset += kv.nextOffset - kv.offset ++ } ++ copy(dst, tmp[:kvTotalLen]) ++ ++ return nil ++ ++} ++ ++// keyValue is the position of an encoded pair in a buffer. All offsets are zero-based and relative ++// to the first byte of the first encoded pair. ++type keyValue struct { ++ offset int ++ valueOffset int ++ nextOffset int ++} ++ ++type bytewiseKeyValueSorter struct { ++ kvs []keyValue ++ data []byte ++} ++ ++func (x *bytewiseKeyValueSorter) Len() int { ++ return len(x.kvs) ++} ++ ++func (x *bytewiseKeyValueSorter) Swap(i, j int) { ++ x.kvs[i], x.kvs[j] = x.kvs[j], x.kvs[i] ++} ++ ++func (x *bytewiseKeyValueSorter) Less(i, j int) bool { ++ kvi, kvj := x.kvs[i], x.kvs[j] ++ return bytes.Compare(x.data[kvi.offset:kvi.valueOffset], x.data[kvj.offset:kvj.valueOffset]) <= 0 ++} ++ ++type lengthFirstKeyValueSorter struct { ++ kvs []keyValue ++ data []byte ++} ++ ++func (x *lengthFirstKeyValueSorter) Len() int { ++ return len(x.kvs) ++} ++ ++func (x *lengthFirstKeyValueSorter) Swap(i, j int) { ++ x.kvs[i], x.kvs[j] = x.kvs[j], x.kvs[i] ++} ++ ++func (x *lengthFirstKeyValueSorter) Less(i, j int) bool { ++ kvi, kvj := x.kvs[i], x.kvs[j] ++ if keyLengthDifference := (kvi.valueOffset - kvi.offset) - (kvj.valueOffset - kvj.offset); keyLengthDifference != 0 { ++ return keyLengthDifference < 0 ++ } ++ return bytes.Compare(x.data[kvi.offset:kvi.valueOffset], x.data[kvj.offset:kvj.valueOffset]) <= 0 ++} ++ ++var keyValuePool = sync.Pool{} ++ ++func getKeyValues(length int) *[]keyValue { ++ v := keyValuePool.Get() ++ if v == nil { ++ y := make([]keyValue, length) ++ return &y ++ } ++ x := v.(*[]keyValue) ++ if cap(*x) >= length { ++ *x = (*x)[:length] ++ return x ++ } ++ // []keyValue from the pool does not have enough capacity. ++ // Return it back to the pool and create a new one. ++ keyValuePool.Put(x) ++ y := make([]keyValue, length) ++ return &y ++} ++ ++func putKeyValues(x *[]keyValue) { ++ *x = (*x)[:0] ++ keyValuePool.Put(x) ++} ++ ++func encodeStructToArray(e *bytes.Buffer, em *encMode, v reflect.Value) (err error) { ++ structType, err := getEncodingStructType(v.Type()) ++ if err != nil { ++ return err ++ } ++ ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ ++ flds := structType.fields ++ ++ encodeHead(e, byte(cborTypeArray), uint64(len(flds))) ++ for i := 0; i < len(flds); i++ { ++ f := flds[i] ++ ++ var fv reflect.Value ++ if len(f.idx) == 1 { ++ fv = v.Field(f.idx[0]) ++ } else { ++ // Get embedded field value. No error is expected. ++ fv, _ = getFieldValue(v, f.idx, func(reflect.Value) (reflect.Value, error) { ++ // Write CBOR nil for null pointer to embedded struct ++ e.Write(cborNil) ++ return reflect.Value{}, nil ++ }) ++ if !fv.IsValid() { ++ continue ++ } ++ } ++ ++ if err := f.ef(e, em, fv); err != nil { ++ return err ++ } ++ } ++ return nil ++} ++ ++func encodeStruct(e *bytes.Buffer, em *encMode, v reflect.Value) (err error) { ++ structType, err := getEncodingStructType(v.Type()) ++ if err != nil { ++ return err ++ } ++ ++ flds := structType.getFields(em) ++ ++ start := 0 ++ if em.sort == SortFastShuffle && len(flds) > 0 { ++ start = rand.Intn(len(flds)) //nolint:gosec // Don't need a CSPRNG for deck cutting. ++ } ++ ++ if b := em.encTagBytes(v.Type()); b != nil { ++ e.Write(b) ++ } ++ ++ // Encode head with struct field count. ++ // Head is rewritten later if actual encoded field count is different from struct field count. ++ encodedHeadLen := encodeHead(e, byte(cborTypeMap), uint64(len(flds))) ++ ++ kvbegin := e.Len() ++ kvcount := 0 ++ for offset := 0; offset < len(flds); offset++ { ++ f := flds[(start+offset)%len(flds)] ++ ++ var fv reflect.Value ++ if len(f.idx) == 1 { ++ fv = v.Field(f.idx[0]) ++ } else { ++ // Get embedded field value. No error is expected. ++ fv, _ = getFieldValue(v, f.idx, func(reflect.Value) (reflect.Value, error) { ++ // Skip null pointer to embedded struct ++ return reflect.Value{}, nil ++ }) ++ if !fv.IsValid() { ++ continue ++ } ++ } ++ if f.omitEmpty { ++ empty, err := f.ief(em, fv) ++ if err != nil { ++ return err ++ } ++ if empty { ++ continue ++ } ++ } ++ ++ if !f.keyAsInt && em.fieldName == FieldNameToByteString { ++ e.Write(f.cborNameByteString) ++ } else { // int or text string ++ e.Write(f.cborName) ++ } ++ ++ if err := f.ef(e, em, fv); err != nil { ++ return err ++ } ++ ++ kvcount++ ++ } ++ ++ if len(flds) == kvcount { ++ // Encoded element count in head is the same as actual element count. ++ return nil ++ } ++ ++ // Overwrite the bytes that were reserved for the head before encoding the map entries. ++ var actualHeadLen int ++ { ++ headbuf := *bytes.NewBuffer(e.Bytes()[kvbegin-encodedHeadLen : kvbegin-encodedHeadLen : kvbegin]) ++ actualHeadLen = encodeHead(&headbuf, byte(cborTypeMap), uint64(kvcount)) ++ } ++ ++ if actualHeadLen == encodedHeadLen { ++ // The bytes reserved for the encoded head were exactly the right size, so the ++ // encoded entries are already in their final positions. ++ return nil ++ } ++ ++ // We reserved more bytes than needed for the encoded head, based on the number of fields ++ // encoded. The encoded entries are offset to the right by the number of excess reserved ++ // bytes. Shift the entries left to remove the gap. ++ excessReservedBytes := encodedHeadLen - actualHeadLen ++ dst := e.Bytes()[kvbegin-excessReservedBytes : e.Len()-excessReservedBytes] ++ src := e.Bytes()[kvbegin:e.Len()] ++ copy(dst, src) ++ ++ // After shifting, the excess bytes are at the end of the output buffer and they are ++ // garbage. ++ e.Truncate(e.Len() - excessReservedBytes) ++ return nil ++} ++ ++func encodeIntf(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if v.IsNil() { ++ e.Write(cborNil) ++ return nil ++ } ++ return encode(e, em, v.Elem()) ++} ++ ++func encodeTime(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ t := v.Interface().(time.Time) ++ if t.IsZero() { ++ e.Write(cborNil) // Even if tag is required, encode as CBOR null. ++ return nil ++ } ++ if em.timeTag == EncTagRequired { ++ tagNumber := 1 ++ if em.time == TimeRFC3339 || em.time == TimeRFC3339Nano { ++ tagNumber = 0 ++ } ++ encodeHead(e, byte(cborTypeTag), uint64(tagNumber)) ++ } ++ switch em.time { ++ case TimeUnix: ++ secs := t.Unix() ++ return encodeInt(e, em, reflect.ValueOf(secs)) ++ ++ case TimeUnixMicro: ++ t = t.UTC().Round(time.Microsecond) ++ f := float64(t.UnixNano()) / 1e9 ++ return encodeFloat(e, em, reflect.ValueOf(f)) ++ ++ case TimeUnixDynamic: ++ t = t.UTC().Round(time.Microsecond) ++ secs, nsecs := t.Unix(), uint64(t.Nanosecond()) ++ if nsecs == 0 { ++ return encodeInt(e, em, reflect.ValueOf(secs)) ++ } ++ f := float64(secs) + float64(nsecs)/1e9 ++ return encodeFloat(e, em, reflect.ValueOf(f)) ++ ++ case TimeRFC3339: ++ s := t.Format(time.RFC3339) ++ return encodeString(e, em, reflect.ValueOf(s)) ++ ++ default: // TimeRFC3339Nano ++ s := t.Format(time.RFC3339Nano) ++ return encodeString(e, em, reflect.ValueOf(s)) ++ } ++} ++ ++func encodeBigInt(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if em.bigIntConvert == BigIntConvertReject { ++ return &UnsupportedTypeError{Type: typeBigInt} ++ } ++ ++ vbi := v.Interface().(big.Int) ++ sign := vbi.Sign() ++ bi := new(big.Int).SetBytes(vbi.Bytes()) // bi is absolute value of v ++ if sign < 0 { ++ // For negative number, convert to CBOR encoded number (-v-1). ++ bi.Sub(bi, big.NewInt(1)) ++ } ++ ++ if em.bigIntConvert == BigIntConvertShortest { ++ if bi.IsUint64() { ++ if sign >= 0 { ++ // Encode as CBOR pos int (major type 0) ++ encodeHead(e, byte(cborTypePositiveInt), bi.Uint64()) ++ return nil ++ } ++ // Encode as CBOR neg int (major type 1) ++ encodeHead(e, byte(cborTypeNegativeInt), bi.Uint64()) ++ return nil ++ } ++ } ++ ++ tagNum := 2 ++ if sign < 0 { ++ tagNum = 3 ++ } ++ // Write tag number ++ encodeHead(e, byte(cborTypeTag), uint64(tagNum)) ++ // Write bignum byte string ++ b := bi.Bytes() ++ encodeHead(e, byte(cborTypeByteString), uint64(len(b))) ++ e.Write(b) ++ return nil ++} ++ ++type binaryMarshalerEncoder struct { ++ alternateEncode encodeFunc ++ alternateIsEmpty isEmptyFunc ++} ++ ++func (bme binaryMarshalerEncoder) encode(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if em.binaryMarshaler != BinaryMarshalerByteString { ++ return bme.alternateEncode(e, em, v) ++ } ++ ++ vt := v.Type() ++ m, ok := v.Interface().(encoding.BinaryMarshaler) ++ if !ok { ++ pv := reflect.New(vt) ++ pv.Elem().Set(v) ++ m = pv.Interface().(encoding.BinaryMarshaler) ++ } ++ data, err := m.MarshalBinary() ++ if err != nil { ++ return err ++ } ++ if b := em.encTagBytes(vt); b != nil { ++ e.Write(b) ++ } ++ encodeHead(e, byte(cborTypeByteString), uint64(len(data))) ++ e.Write(data) ++ return nil ++} ++ ++func (bme binaryMarshalerEncoder) isEmpty(em *encMode, v reflect.Value) (bool, error) { ++ if em.binaryMarshaler != BinaryMarshalerByteString { ++ return bme.alternateIsEmpty(em, v) ++ } ++ ++ m, ok := v.Interface().(encoding.BinaryMarshaler) ++ if !ok { ++ pv := reflect.New(v.Type()) ++ pv.Elem().Set(v) ++ m = pv.Interface().(encoding.BinaryMarshaler) ++ } ++ data, err := m.MarshalBinary() ++ if err != nil { ++ return false, err ++ } ++ return len(data) == 0, nil ++} ++ ++func encodeMarshalerType(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if em.tagsMd == TagsForbidden && v.Type() == typeRawTag { ++ return errors.New("cbor: cannot encode cbor.RawTag when TagsMd is TagsForbidden") ++ } ++ m, ok := v.Interface().(Marshaler) ++ if !ok { ++ pv := reflect.New(v.Type()) ++ pv.Elem().Set(v) ++ m = pv.Interface().(Marshaler) ++ } ++ data, err := m.MarshalCBOR() ++ if err != nil { ++ return err ++ } ++ ++ // Verify returned CBOR data item from MarshalCBOR() is well-formed and passes tag validity for builtin tags 0-3. ++ d := decoder{data: data, dm: getMarshalerDecMode(em.indefLength, em.tagsMd)} ++ err = d.wellformed(false, true) ++ if err != nil { ++ return &MarshalerError{typ: v.Type(), err: err} ++ } ++ ++ e.Write(data) ++ return nil ++} ++ ++func encodeTag(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ if em.tagsMd == TagsForbidden { ++ return errors.New("cbor: cannot encode cbor.Tag when TagsMd is TagsForbidden") ++ } ++ ++ t := v.Interface().(Tag) ++ ++ if t.Number == 0 && t.Content == nil { ++ // Marshal uninitialized cbor.Tag ++ e.Write(cborNil) ++ return nil ++ } ++ ++ // Marshal tag number ++ encodeHead(e, byte(cborTypeTag), t.Number) ++ ++ vem := *em // shallow copy ++ ++ // For built-in tags, disable settings that may introduce tag validity errors when ++ // marshaling certain Content values. ++ switch t.Number { ++ case tagNumRFC3339Time: ++ vem.stringType = StringToTextString ++ vem.stringMajorType = cborTypeTextString ++ case tagNumUnsignedBignum, tagNumNegativeBignum: ++ vem.byteSliceLaterFormat = ByteSliceLaterFormatNone ++ vem.byteSliceLaterEncodingTag = 0 ++ } ++ ++ // Marshal tag content ++ return encode(e, &vem, reflect.ValueOf(t.Content)) ++} ++ ++// encodeHead writes CBOR head of specified type t and returns number of bytes written. ++func encodeHead(e *bytes.Buffer, t byte, n uint64) int { ++ if n <= maxAdditionalInformationWithoutArgument { ++ const headSize = 1 ++ e.WriteByte(t | byte(n)) ++ return headSize ++ } ++ ++ if n <= math.MaxUint8 { ++ const headSize = 2 ++ scratch := [headSize]byte{ ++ t | byte(additionalInformationWith1ByteArgument), ++ byte(n), ++ } ++ e.Write(scratch[:]) ++ return headSize ++ } ++ ++ if n <= math.MaxUint16 { ++ const headSize = 3 ++ var scratch [headSize]byte ++ scratch[0] = t | byte(additionalInformationWith2ByteArgument) ++ binary.BigEndian.PutUint16(scratch[1:], uint16(n)) ++ e.Write(scratch[:]) ++ return headSize ++ } ++ ++ if n <= math.MaxUint32 { ++ const headSize = 5 ++ var scratch [headSize]byte ++ scratch[0] = t | byte(additionalInformationWith4ByteArgument) ++ binary.BigEndian.PutUint32(scratch[1:], uint32(n)) ++ e.Write(scratch[:]) ++ return headSize ++ } ++ ++ const headSize = 9 ++ var scratch [headSize]byte ++ scratch[0] = t | byte(additionalInformationWith8ByteArgument) ++ binary.BigEndian.PutUint64(scratch[1:], n) ++ e.Write(scratch[:]) ++ return headSize ++} ++ ++var ( ++ typeMarshaler = reflect.TypeOf((*Marshaler)(nil)).Elem() ++ typeBinaryMarshaler = reflect.TypeOf((*encoding.BinaryMarshaler)(nil)).Elem() ++ typeRawMessage = reflect.TypeOf(RawMessage(nil)) ++ typeByteString = reflect.TypeOf(ByteString("")) ++) ++ ++func getEncodeFuncInternal(t reflect.Type) (ef encodeFunc, ief isEmptyFunc) { ++ k := t.Kind() ++ if k == reflect.Ptr { ++ return getEncodeIndirectValueFunc(t), isEmptyPtr ++ } ++ switch t { ++ case typeSimpleValue: ++ return encodeMarshalerType, isEmptyUint ++ ++ case typeTag: ++ return encodeTag, alwaysNotEmpty ++ ++ case typeTime: ++ return encodeTime, alwaysNotEmpty ++ ++ case typeBigInt: ++ return encodeBigInt, alwaysNotEmpty ++ ++ case typeRawMessage: ++ return encodeMarshalerType, isEmptySlice ++ ++ case typeByteString: ++ return encodeMarshalerType, isEmptyString ++ } ++ if reflect.PtrTo(t).Implements(typeMarshaler) { ++ return encodeMarshalerType, alwaysNotEmpty ++ } ++ if reflect.PtrTo(t).Implements(typeBinaryMarshaler) { ++ defer func() { ++ // capture encoding method used for modes that disable BinaryMarshaler ++ bme := binaryMarshalerEncoder{ ++ alternateEncode: ef, ++ alternateIsEmpty: ief, ++ } ++ ef = bme.encode ++ ief = bme.isEmpty ++ }() ++ } ++ switch k { ++ case reflect.Bool: ++ return encodeBool, isEmptyBool ++ ++ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: ++ return encodeInt, isEmptyInt ++ ++ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: ++ return encodeUint, isEmptyUint ++ ++ case reflect.Float32, reflect.Float64: ++ return encodeFloat, isEmptyFloat ++ ++ case reflect.String: ++ return encodeString, isEmptyString ++ ++ case reflect.Slice: ++ if t.Elem().Kind() == reflect.Uint8 { ++ return encodeByteString, isEmptySlice ++ } ++ fallthrough ++ ++ case reflect.Array: ++ f, _ := getEncodeFunc(t.Elem()) ++ if f == nil { ++ return nil, nil ++ } ++ return arrayEncodeFunc{f: f}.encode, isEmptySlice ++ ++ case reflect.Map: ++ f := getEncodeMapFunc(t) ++ if f == nil { ++ return nil, nil ++ } ++ return f, isEmptyMap ++ ++ case reflect.Struct: ++ // Get struct's special field "_" tag options ++ if f, ok := t.FieldByName("_"); ok { ++ tag := f.Tag.Get("cbor") ++ if tag != "-" { ++ if hasToArrayOption(tag) { ++ return encodeStructToArray, isEmptyStruct ++ } ++ } ++ } ++ return encodeStruct, isEmptyStruct ++ ++ case reflect.Interface: ++ return encodeIntf, isEmptyIntf ++ } ++ return nil, nil ++} ++ ++func getEncodeIndirectValueFunc(t reflect.Type) encodeFunc { ++ for t.Kind() == reflect.Ptr { ++ t = t.Elem() ++ } ++ f, _ := getEncodeFunc(t) ++ if f == nil { ++ return nil ++ } ++ return func(e *bytes.Buffer, em *encMode, v reflect.Value) error { ++ for v.Kind() == reflect.Ptr && !v.IsNil() { ++ v = v.Elem() ++ } ++ if v.Kind() == reflect.Ptr && v.IsNil() { ++ e.Write(cborNil) ++ return nil ++ } ++ return f(e, em, v) ++ } ++} ++ ++func alwaysNotEmpty(_ *encMode, _ reflect.Value) (empty bool, err error) { ++ return false, nil ++} ++ ++func isEmptyBool(_ *encMode, v reflect.Value) (bool, error) { ++ return !v.Bool(), nil ++} ++ ++func isEmptyInt(_ *encMode, v reflect.Value) (bool, error) { ++ return v.Int() == 0, nil ++} ++ ++func isEmptyUint(_ *encMode, v reflect.Value) (bool, error) { ++ return v.Uint() == 0, nil ++} ++ ++func isEmptyFloat(_ *encMode, v reflect.Value) (bool, error) { ++ return v.Float() == 0.0, nil ++} ++ ++func isEmptyString(_ *encMode, v reflect.Value) (bool, error) { ++ return v.Len() == 0, nil ++} ++ ++func isEmptySlice(_ *encMode, v reflect.Value) (bool, error) { ++ return v.Len() == 0, nil ++} ++ ++func isEmptyMap(_ *encMode, v reflect.Value) (bool, error) { ++ return v.Len() == 0, nil ++} ++ ++func isEmptyPtr(_ *encMode, v reflect.Value) (bool, error) { ++ return v.IsNil(), nil ++} ++ ++func isEmptyIntf(_ *encMode, v reflect.Value) (bool, error) { ++ return v.IsNil(), nil ++} ++ ++func isEmptyStruct(em *encMode, v reflect.Value) (bool, error) { ++ structType, err := getEncodingStructType(v.Type()) ++ if err != nil { ++ return false, err ++ } ++ ++ if em.omitEmpty == OmitEmptyGoValue { ++ return false, nil ++ } ++ ++ if structType.toArray { ++ return len(structType.fields) == 0, nil ++ } ++ ++ if len(structType.fields) > len(structType.omitEmptyFieldsIdx) { ++ return false, nil ++ } ++ ++ for _, i := range structType.omitEmptyFieldsIdx { ++ f := structType.fields[i] ++ ++ // Get field value ++ var fv reflect.Value ++ if len(f.idx) == 1 { ++ fv = v.Field(f.idx[0]) ++ } else { ++ // Get embedded field value. No error is expected. ++ fv, _ = getFieldValue(v, f.idx, func(reflect.Value) (reflect.Value, error) { ++ // Skip null pointer to embedded struct ++ return reflect.Value{}, nil ++ }) ++ if !fv.IsValid() { ++ continue ++ } ++ } ++ ++ empty, err := f.ief(em, fv) ++ if err != nil { ++ return false, err ++ } ++ if !empty { ++ return false, nil ++ } ++ } ++ return true, nil ++} ++ ++func cannotFitFloat32(f64 float64) bool { ++ f32 := float32(f64) ++ return float64(f32) != f64 ++} ++ ++// float32NaNFromReflectValue extracts float32 NaN from reflect.Value while preserving NaN's quiet bit. ++func float32NaNFromReflectValue(v reflect.Value) float32 { ++ // Keith Randall's workaround for issue https://github.com/golang/go/issues/36400 ++ p := reflect.New(v.Type()) ++ p.Elem().Set(v) ++ f32 := p.Convert(reflect.TypeOf((*float32)(nil))).Elem().Interface().(float32) ++ return f32 ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/encode_map.go b/vendor/github.com/fxamacker/cbor/v2/encode_map.go +new file mode 100644 +index 00000000..8b4b4bbc +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/encode_map.go +@@ -0,0 +1,94 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++//go:build go1.20 ++ ++package cbor ++ ++import ( ++ "bytes" ++ "reflect" ++ "sync" ++) ++ ++type mapKeyValueEncodeFunc struct { ++ kf, ef encodeFunc ++ kpool, vpool sync.Pool ++} ++ ++func (me *mapKeyValueEncodeFunc) encodeKeyValues(e *bytes.Buffer, em *encMode, v reflect.Value, kvs []keyValue) error { ++ iterk := me.kpool.Get().(*reflect.Value) ++ defer func() { ++ iterk.SetZero() ++ me.kpool.Put(iterk) ++ }() ++ iterv := me.vpool.Get().(*reflect.Value) ++ defer func() { ++ iterv.SetZero() ++ me.vpool.Put(iterv) ++ }() ++ ++ if kvs == nil { ++ for i, iter := 0, v.MapRange(); iter.Next(); i++ { ++ iterk.SetIterKey(iter) ++ iterv.SetIterValue(iter) ++ ++ if err := me.kf(e, em, *iterk); err != nil { ++ return err ++ } ++ if err := me.ef(e, em, *iterv); err != nil { ++ return err ++ } ++ } ++ return nil ++ } ++ ++ initial := e.Len() ++ for i, iter := 0, v.MapRange(); iter.Next(); i++ { ++ iterk.SetIterKey(iter) ++ iterv.SetIterValue(iter) ++ ++ offset := e.Len() ++ if err := me.kf(e, em, *iterk); err != nil { ++ return err ++ } ++ valueOffset := e.Len() ++ if err := me.ef(e, em, *iterv); err != nil { ++ return err ++ } ++ kvs[i] = keyValue{ ++ offset: offset - initial, ++ valueOffset: valueOffset - initial, ++ nextOffset: e.Len() - initial, ++ } ++ } ++ ++ return nil ++} ++ ++func getEncodeMapFunc(t reflect.Type) encodeFunc { ++ kf, _ := getEncodeFunc(t.Key()) ++ ef, _ := getEncodeFunc(t.Elem()) ++ if kf == nil || ef == nil { ++ return nil ++ } ++ mkv := &mapKeyValueEncodeFunc{ ++ kf: kf, ++ ef: ef, ++ kpool: sync.Pool{ ++ New: func() interface{} { ++ rk := reflect.New(t.Key()).Elem() ++ return &rk ++ }, ++ }, ++ vpool: sync.Pool{ ++ New: func() interface{} { ++ rv := reflect.New(t.Elem()).Elem() ++ return &rv ++ }, ++ }, ++ } ++ return mapEncodeFunc{ ++ e: mkv.encodeKeyValues, ++ }.encode ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/encode_map_go117.go b/vendor/github.com/fxamacker/cbor/v2/encode_map_go117.go +new file mode 100644 +index 00000000..31c39336 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/encode_map_go117.go +@@ -0,0 +1,60 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++//go:build !go1.20 ++ ++package cbor ++ ++import ( ++ "bytes" ++ "reflect" ++) ++ ++type mapKeyValueEncodeFunc struct { ++ kf, ef encodeFunc ++} ++ ++func (me *mapKeyValueEncodeFunc) encodeKeyValues(e *bytes.Buffer, em *encMode, v reflect.Value, kvs []keyValue) error { ++ if kvs == nil { ++ for i, iter := 0, v.MapRange(); iter.Next(); i++ { ++ if err := me.kf(e, em, iter.Key()); err != nil { ++ return err ++ } ++ if err := me.ef(e, em, iter.Value()); err != nil { ++ return err ++ } ++ } ++ return nil ++ } ++ ++ initial := e.Len() ++ for i, iter := 0, v.MapRange(); iter.Next(); i++ { ++ offset := e.Len() ++ if err := me.kf(e, em, iter.Key()); err != nil { ++ return err ++ } ++ valueOffset := e.Len() ++ if err := me.ef(e, em, iter.Value()); err != nil { ++ return err ++ } ++ kvs[i] = keyValue{ ++ offset: offset - initial, ++ valueOffset: valueOffset - initial, ++ nextOffset: e.Len() - initial, ++ } ++ } ++ ++ return nil ++} ++ ++func getEncodeMapFunc(t reflect.Type) encodeFunc { ++ kf, _ := getEncodeFunc(t.Key()) ++ ef, _ := getEncodeFunc(t.Elem()) ++ if kf == nil || ef == nil { ++ return nil ++ } ++ mkv := &mapKeyValueEncodeFunc{kf: kf, ef: ef} ++ return mapEncodeFunc{ ++ e: mkv.encodeKeyValues, ++ }.encode ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/simplevalue.go b/vendor/github.com/fxamacker/cbor/v2/simplevalue.go +new file mode 100644 +index 00000000..de175cee +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/simplevalue.go +@@ -0,0 +1,69 @@ ++package cbor ++ ++import ( ++ "errors" ++ "fmt" ++ "reflect" ++) ++ ++// SimpleValue represents CBOR simple value. ++// CBOR simple value is: ++// - an extension point like CBOR tag. ++// - a subset of CBOR major type 7 that isn't floating-point. ++// - "identified by a number between 0 and 255, but distinct from that number itself". ++// For example, "a simple value 2 is not equivalent to an integer 2" as a CBOR map key. ++// ++// CBOR simple values identified by 20..23 are: "false", "true" , "null", and "undefined". ++// Other CBOR simple values are currently unassigned/reserved by IANA. ++type SimpleValue uint8 ++ ++var ( ++ typeSimpleValue = reflect.TypeOf(SimpleValue(0)) ++) ++ ++// MarshalCBOR encodes SimpleValue as CBOR simple value (major type 7). ++func (sv SimpleValue) MarshalCBOR() ([]byte, error) { ++ // RFC 8949 3.3. Floating-Point Numbers and Values with No Content says: ++ // "An encoder MUST NOT issue two-byte sequences that start with 0xf8 ++ // (major type 7, additional information 24) and continue with a byte ++ // less than 0x20 (32 decimal). Such sequences are not well-formed. ++ // (This implies that an encoder cannot encode false, true, null, or ++ // undefined in two-byte sequences and that only the one-byte variants ++ // of these are well-formed; more generally speaking, each simple value ++ // only has a single representation variant)." ++ ++ switch { ++ case sv <= maxSimpleValueInAdditionalInformation: ++ return []byte{byte(cborTypePrimitives) | byte(sv)}, nil ++ ++ case sv >= minSimpleValueIn1ByteArgument: ++ return []byte{byte(cborTypePrimitives) | additionalInformationWith1ByteArgument, byte(sv)}, nil ++ ++ default: ++ return nil, &UnsupportedValueError{msg: fmt.Sprintf("SimpleValue(%d)", sv)} ++ } ++} ++ ++// UnmarshalCBOR decodes CBOR simple value (major type 7) to SimpleValue. ++func (sv *SimpleValue) UnmarshalCBOR(data []byte) error { ++ if sv == nil { ++ return errors.New("cbor.SimpleValue: UnmarshalCBOR on nil pointer") ++ } ++ ++ d := decoder{data: data, dm: defaultDecMode} ++ ++ typ, ai, val := d.getHead() ++ ++ if typ != cborTypePrimitives { ++ return &UnmarshalTypeError{CBORType: typ.String(), GoType: "SimpleValue"} ++ } ++ if ai > additionalInformationWith1ByteArgument { ++ return &UnmarshalTypeError{CBORType: typ.String(), GoType: "SimpleValue", errorMsg: "not simple values"} ++ } ++ ++ // It is safe to cast val to uint8 here because ++ // - data is already verified to be well-formed CBOR simple value and ++ // - val is <= math.MaxUint8. ++ *sv = SimpleValue(val) ++ return nil ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/stream.go b/vendor/github.com/fxamacker/cbor/v2/stream.go +new file mode 100644 +index 00000000..507ab6c1 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/stream.go +@@ -0,0 +1,277 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++package cbor ++ ++import ( ++ "bytes" ++ "errors" ++ "io" ++ "reflect" ++) ++ ++// Decoder reads and decodes CBOR values from io.Reader. ++type Decoder struct { ++ r io.Reader ++ d decoder ++ buf []byte ++ off int // next read offset in buf ++ bytesRead int ++} ++ ++// NewDecoder returns a new decoder that reads and decodes from r using ++// the default decoding options. ++func NewDecoder(r io.Reader) *Decoder { ++ return defaultDecMode.NewDecoder(r) ++} ++ ++// Decode reads CBOR value and decodes it into the value pointed to by v. ++func (dec *Decoder) Decode(v interface{}) error { ++ _, err := dec.readNext() ++ if err != nil { ++ // Return validation error or read error. ++ return err ++ } ++ ++ dec.d.reset(dec.buf[dec.off:]) ++ err = dec.d.value(v) ++ ++ // Increment dec.off even if decoding err is not nil because ++ // dec.d.off points to the next CBOR data item if current ++ // CBOR data item is valid but failed to be decoded into v. ++ // This allows next CBOR data item to be decoded in next ++ // call to this function. ++ dec.off += dec.d.off ++ dec.bytesRead += dec.d.off ++ ++ return err ++} ++ ++// Skip skips to the next CBOR data item (if there is any), ++// otherwise it returns error such as io.EOF, io.UnexpectedEOF, etc. ++func (dec *Decoder) Skip() error { ++ n, err := dec.readNext() ++ if err != nil { ++ // Return validation error or read error. ++ return err ++ } ++ ++ dec.off += n ++ dec.bytesRead += n ++ return nil ++} ++ ++// NumBytesRead returns the number of bytes read. ++func (dec *Decoder) NumBytesRead() int { ++ return dec.bytesRead ++} ++ ++// Buffered returns a reader for data remaining in Decoder's buffer. ++// Returned reader is valid until the next call to Decode or Skip. ++func (dec *Decoder) Buffered() io.Reader { ++ return bytes.NewReader(dec.buf[dec.off:]) ++} ++ ++// readNext() reads next CBOR data item from Reader to buffer. ++// It returns the size of next CBOR data item. ++// It also returns validation error or read error if any. ++func (dec *Decoder) readNext() (int, error) { ++ var readErr error ++ var validErr error ++ ++ for { ++ // Process any unread data in dec.buf. ++ if dec.off < len(dec.buf) { ++ dec.d.reset(dec.buf[dec.off:]) ++ off := dec.off // Save offset before data validation ++ validErr = dec.d.wellformed(true, false) ++ dec.off = off // Restore offset ++ ++ if validErr == nil { ++ return dec.d.off, nil ++ } ++ ++ if validErr != io.ErrUnexpectedEOF { ++ return 0, validErr ++ } ++ ++ // Process last read error on io.ErrUnexpectedEOF. ++ if readErr != nil { ++ if readErr == io.EOF { ++ // current CBOR data item is incomplete. ++ return 0, io.ErrUnexpectedEOF ++ } ++ return 0, readErr ++ } ++ } ++ ++ // More data is needed and there was no read error. ++ var n int ++ for n == 0 { ++ n, readErr = dec.read() ++ if n == 0 && readErr != nil { ++ // No more data can be read and read error is encountered. ++ // At this point, validErr is either nil or io.ErrUnexpectedEOF. ++ if readErr == io.EOF { ++ if validErr == io.ErrUnexpectedEOF { ++ // current CBOR data item is incomplete. ++ return 0, io.ErrUnexpectedEOF ++ } ++ } ++ return 0, readErr ++ } ++ } ++ ++ // At this point, dec.buf contains new data from last read (n > 0). ++ } ++} ++ ++// read() reads data from Reader to buffer. ++// It returns number of bytes read and any read error encountered. ++// Postconditions: ++// - dec.buf contains previously unread data and new data. ++// - dec.off is 0. ++func (dec *Decoder) read() (int, error) { ++ // Grow buf if needed. ++ const minRead = 512 ++ if cap(dec.buf)-len(dec.buf)+dec.off < minRead { ++ oldUnreadBuf := dec.buf[dec.off:] ++ dec.buf = make([]byte, len(dec.buf)-dec.off, 2*cap(dec.buf)+minRead) ++ dec.overwriteBuf(oldUnreadBuf) ++ } ++ ++ // Copy unread data over read data and reset off to 0. ++ if dec.off > 0 { ++ dec.overwriteBuf(dec.buf[dec.off:]) ++ } ++ ++ // Read from reader and reslice buf. ++ n, err := dec.r.Read(dec.buf[len(dec.buf):cap(dec.buf)]) ++ dec.buf = dec.buf[0 : len(dec.buf)+n] ++ return n, err ++} ++ ++func (dec *Decoder) overwriteBuf(newBuf []byte) { ++ n := copy(dec.buf, newBuf) ++ dec.buf = dec.buf[:n] ++ dec.off = 0 ++} ++ ++// Encoder writes CBOR values to io.Writer. ++type Encoder struct { ++ w io.Writer ++ em *encMode ++ indefTypes []cborType ++} ++ ++// NewEncoder returns a new encoder that writes to w using the default encoding options. ++func NewEncoder(w io.Writer) *Encoder { ++ return defaultEncMode.NewEncoder(w) ++} ++ ++// Encode writes the CBOR encoding of v. ++func (enc *Encoder) Encode(v interface{}) error { ++ if len(enc.indefTypes) > 0 && v != nil { ++ indefType := enc.indefTypes[len(enc.indefTypes)-1] ++ if indefType == cborTypeTextString { ++ k := reflect.TypeOf(v).Kind() ++ if k != reflect.String { ++ return errors.New("cbor: cannot encode item type " + k.String() + " for indefinite-length text string") ++ } ++ } else if indefType == cborTypeByteString { ++ t := reflect.TypeOf(v) ++ k := t.Kind() ++ if (k != reflect.Array && k != reflect.Slice) || t.Elem().Kind() != reflect.Uint8 { ++ return errors.New("cbor: cannot encode item type " + k.String() + " for indefinite-length byte string") ++ } ++ } ++ } ++ ++ buf := getEncodeBuffer() ++ ++ err := encode(buf, enc.em, reflect.ValueOf(v)) ++ if err == nil { ++ _, err = enc.w.Write(buf.Bytes()) ++ } ++ ++ putEncodeBuffer(buf) ++ return err ++} ++ ++// StartIndefiniteByteString starts byte string encoding of indefinite length. ++// Subsequent calls of (*Encoder).Encode() encodes definite length byte strings ++// ("chunks") as one contiguous string until EndIndefinite is called. ++func (enc *Encoder) StartIndefiniteByteString() error { ++ return enc.startIndefinite(cborTypeByteString) ++} ++ ++// StartIndefiniteTextString starts text string encoding of indefinite length. ++// Subsequent calls of (*Encoder).Encode() encodes definite length text strings ++// ("chunks") as one contiguous string until EndIndefinite is called. ++func (enc *Encoder) StartIndefiniteTextString() error { ++ return enc.startIndefinite(cborTypeTextString) ++} ++ ++// StartIndefiniteArray starts array encoding of indefinite length. ++// Subsequent calls of (*Encoder).Encode() encodes elements of the array ++// until EndIndefinite is called. ++func (enc *Encoder) StartIndefiniteArray() error { ++ return enc.startIndefinite(cborTypeArray) ++} ++ ++// StartIndefiniteMap starts array encoding of indefinite length. ++// Subsequent calls of (*Encoder).Encode() encodes elements of the map ++// until EndIndefinite is called. ++func (enc *Encoder) StartIndefiniteMap() error { ++ return enc.startIndefinite(cborTypeMap) ++} ++ ++// EndIndefinite closes last opened indefinite length value. ++func (enc *Encoder) EndIndefinite() error { ++ if len(enc.indefTypes) == 0 { ++ return errors.New("cbor: cannot encode \"break\" code outside indefinite length values") ++ } ++ _, err := enc.w.Write([]byte{cborBreakFlag}) ++ if err == nil { ++ enc.indefTypes = enc.indefTypes[:len(enc.indefTypes)-1] ++ } ++ return err ++} ++ ++var cborIndefHeader = map[cborType][]byte{ ++ cborTypeByteString: {cborByteStringWithIndefiniteLengthHead}, ++ cborTypeTextString: {cborTextStringWithIndefiniteLengthHead}, ++ cborTypeArray: {cborArrayWithIndefiniteLengthHead}, ++ cborTypeMap: {cborMapWithIndefiniteLengthHead}, ++} ++ ++func (enc *Encoder) startIndefinite(typ cborType) error { ++ if enc.em.indefLength == IndefLengthForbidden { ++ return &IndefiniteLengthError{typ} ++ } ++ _, err := enc.w.Write(cborIndefHeader[typ]) ++ if err == nil { ++ enc.indefTypes = append(enc.indefTypes, typ) ++ } ++ return err ++} ++ ++// RawMessage is a raw encoded CBOR value. ++type RawMessage []byte ++ ++// MarshalCBOR returns m or CBOR nil if m is nil. ++func (m RawMessage) MarshalCBOR() ([]byte, error) { ++ if len(m) == 0 { ++ return cborNil, nil ++ } ++ return m, nil ++} ++ ++// UnmarshalCBOR creates a copy of data and saves to *m. ++func (m *RawMessage) UnmarshalCBOR(data []byte) error { ++ if m == nil { ++ return errors.New("cbor.RawMessage: UnmarshalCBOR on nil pointer") ++ } ++ *m = append((*m)[0:0], data...) ++ return nil ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/structfields.go b/vendor/github.com/fxamacker/cbor/v2/structfields.go +new file mode 100644 +index 00000000..81228acf +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/structfields.go +@@ -0,0 +1,260 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++package cbor ++ ++import ( ++ "reflect" ++ "sort" ++ "strings" ++) ++ ++type field struct { ++ name string ++ nameAsInt int64 // used to decoder to match field name with CBOR int ++ cborName []byte ++ cborNameByteString []byte // major type 2 name encoding iff cborName has major type 3 ++ idx []int ++ typ reflect.Type ++ ef encodeFunc ++ ief isEmptyFunc ++ typInfo *typeInfo // used to decoder to reuse type info ++ tagged bool // used to choose dominant field (at the same level tagged fields dominate untagged fields) ++ omitEmpty bool // used to skip empty field ++ keyAsInt bool // used to encode/decode field name as int ++} ++ ++type fields []*field ++ ++// indexFieldSorter sorts fields by field idx at each level, breaking ties with idx depth. ++type indexFieldSorter struct { ++ fields fields ++} ++ ++func (x *indexFieldSorter) Len() int { ++ return len(x.fields) ++} ++ ++func (x *indexFieldSorter) Swap(i, j int) { ++ x.fields[i], x.fields[j] = x.fields[j], x.fields[i] ++} ++ ++func (x *indexFieldSorter) Less(i, j int) bool { ++ iIdx, jIdx := x.fields[i].idx, x.fields[j].idx ++ for k := 0; k < len(iIdx) && k < len(jIdx); k++ { ++ if iIdx[k] != jIdx[k] { ++ return iIdx[k] < jIdx[k] ++ } ++ } ++ return len(iIdx) <= len(jIdx) ++} ++ ++// nameLevelAndTagFieldSorter sorts fields by field name, idx depth, and presence of tag. ++type nameLevelAndTagFieldSorter struct { ++ fields fields ++} ++ ++func (x *nameLevelAndTagFieldSorter) Len() int { ++ return len(x.fields) ++} ++ ++func (x *nameLevelAndTagFieldSorter) Swap(i, j int) { ++ x.fields[i], x.fields[j] = x.fields[j], x.fields[i] ++} ++ ++func (x *nameLevelAndTagFieldSorter) Less(i, j int) bool { ++ fi, fj := x.fields[i], x.fields[j] ++ if fi.name != fj.name { ++ return fi.name < fj.name ++ } ++ if len(fi.idx) != len(fj.idx) { ++ return len(fi.idx) < len(fj.idx) ++ } ++ if fi.tagged != fj.tagged { ++ return fi.tagged ++ } ++ return i < j // Field i and j have the same name, depth, and tagged status. Nothing else matters. ++} ++ ++// getFields returns visible fields of struct type t following visibility rules for JSON encoding. ++func getFields(t reflect.Type) (flds fields, structOptions string) { ++ // Get special field "_" tag options ++ if f, ok := t.FieldByName("_"); ok { ++ tag := f.Tag.Get("cbor") ++ if tag != "-" { ++ structOptions = tag ++ } ++ } ++ ++ // nTypes contains next level anonymous fields' types and indexes ++ // (there can be multiple fields of the same type at the same level) ++ flds, nTypes := appendFields(t, nil, nil, nil) ++ ++ if len(nTypes) > 0 { ++ ++ var cTypes map[reflect.Type][][]int // current level anonymous fields' types and indexes ++ vTypes := map[reflect.Type]bool{t: true} // visited field types at less nested levels ++ ++ for len(nTypes) > 0 { ++ cTypes, nTypes = nTypes, nil ++ ++ for t, idx := range cTypes { ++ // If there are multiple anonymous fields of the same struct type at the same level, all are ignored. ++ if len(idx) > 1 { ++ continue ++ } ++ ++ // Anonymous field of the same type at deeper nested level is ignored. ++ if vTypes[t] { ++ continue ++ } ++ vTypes[t] = true ++ ++ flds, nTypes = appendFields(t, idx[0], flds, nTypes) ++ } ++ } ++ } ++ ++ sort.Sort(&nameLevelAndTagFieldSorter{flds}) ++ ++ // Keep visible fields. ++ j := 0 // index of next unique field ++ for i := 0; i < len(flds); { ++ name := flds[i].name ++ if i == len(flds)-1 || // last field ++ name != flds[i+1].name || // field i has unique field name ++ len(flds[i].idx) < len(flds[i+1].idx) || // field i is at a less nested level than field i+1 ++ (flds[i].tagged && !flds[i+1].tagged) { // field i is tagged while field i+1 is not ++ flds[j] = flds[i] ++ j++ ++ } ++ ++ // Skip fields with the same field name. ++ for i++; i < len(flds) && name == flds[i].name; i++ { //nolint:revive ++ } ++ } ++ if j != len(flds) { ++ flds = flds[:j] ++ } ++ ++ // Sort fields by field index ++ sort.Sort(&indexFieldSorter{flds}) ++ ++ return flds, structOptions ++} ++ ++// appendFields appends type t's exportable fields to flds and anonymous struct fields to nTypes . ++func appendFields( ++ t reflect.Type, ++ idx []int, ++ flds fields, ++ nTypes map[reflect.Type][][]int, ++) ( ++ _flds fields, ++ _nTypes map[reflect.Type][][]int, ++) { ++ for i := 0; i < t.NumField(); i++ { ++ f := t.Field(i) ++ ++ ft := f.Type ++ for ft.Kind() == reflect.Ptr { ++ ft = ft.Elem() ++ } ++ ++ if !isFieldExportable(f, ft.Kind()) { ++ continue ++ } ++ ++ tag := f.Tag.Get("cbor") ++ if tag == "" { ++ tag = f.Tag.Get("json") ++ } ++ if tag == "-" { ++ continue ++ } ++ ++ tagged := tag != "" ++ ++ // Parse field tag options ++ var tagFieldName string ++ var omitempty, keyasint bool ++ for j := 0; tag != ""; j++ { ++ var token string ++ idx := strings.IndexByte(tag, ',') ++ if idx == -1 { ++ token, tag = tag, "" ++ } else { ++ token, tag = tag[:idx], tag[idx+1:] ++ } ++ if j == 0 { ++ tagFieldName = token ++ } else { ++ switch token { ++ case "omitempty": ++ omitempty = true ++ case "keyasint": ++ keyasint = true ++ } ++ } ++ } ++ ++ fieldName := tagFieldName ++ if tagFieldName == "" { ++ fieldName = f.Name ++ } ++ ++ fIdx := make([]int, len(idx)+1) ++ copy(fIdx, idx) ++ fIdx[len(fIdx)-1] = i ++ ++ if !f.Anonymous || ft.Kind() != reflect.Struct || tagFieldName != "" { ++ flds = append(flds, &field{ ++ name: fieldName, ++ idx: fIdx, ++ typ: f.Type, ++ omitEmpty: omitempty, ++ keyAsInt: keyasint, ++ tagged: tagged}) ++ } else { ++ if nTypes == nil { ++ nTypes = make(map[reflect.Type][][]int) ++ } ++ nTypes[ft] = append(nTypes[ft], fIdx) ++ } ++ } ++ ++ return flds, nTypes ++} ++ ++// isFieldExportable returns true if f is an exportable (regular or anonymous) field or ++// a nonexportable anonymous field of struct type. ++// Nonexportable anonymous field of struct type can contain exportable fields. ++func isFieldExportable(f reflect.StructField, fk reflect.Kind) bool { //nolint:gocritic // ignore hugeParam ++ exportable := f.PkgPath == "" ++ return exportable || (f.Anonymous && fk == reflect.Struct) ++} ++ ++type embeddedFieldNullPtrFunc func(reflect.Value) (reflect.Value, error) ++ ++// getFieldValue returns field value of struct v by index. When encountering null pointer ++// to anonymous (embedded) struct field, f is called with the last traversed field value. ++func getFieldValue(v reflect.Value, idx []int, f embeddedFieldNullPtrFunc) (fv reflect.Value, err error) { ++ fv = v ++ for i, n := range idx { ++ fv = fv.Field(n) ++ ++ if i < len(idx)-1 { ++ if fv.Kind() == reflect.Ptr && fv.Type().Elem().Kind() == reflect.Struct { ++ if fv.IsNil() { ++ // Null pointer to embedded struct field ++ fv, err = f(fv) ++ if err != nil || !fv.IsValid() { ++ return fv, err ++ } ++ } ++ fv = fv.Elem() ++ } ++ } ++ } ++ return fv, nil ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/tag.go b/vendor/github.com/fxamacker/cbor/v2/tag.go +new file mode 100644 +index 00000000..5c4d2b7a +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/tag.go +@@ -0,0 +1,299 @@ ++package cbor ++ ++import ( ++ "errors" ++ "fmt" ++ "reflect" ++ "sync" ++) ++ ++// Tag represents CBOR tag data, including tag number and unmarshaled tag content. Marshaling and ++// unmarshaling of tag content is subject to any encode and decode options that would apply to ++// enclosed data item if it were to appear outside of a tag. ++type Tag struct { ++ Number uint64 ++ Content interface{} ++} ++ ++// RawTag represents CBOR tag data, including tag number and raw tag content. ++// RawTag implements Unmarshaler and Marshaler interfaces. ++type RawTag struct { ++ Number uint64 ++ Content RawMessage ++} ++ ++// UnmarshalCBOR sets *t with tag number and raw tag content copied from data. ++func (t *RawTag) UnmarshalCBOR(data []byte) error { ++ if t == nil { ++ return errors.New("cbor.RawTag: UnmarshalCBOR on nil pointer") ++ } ++ ++ // Decoding CBOR null and undefined to cbor.RawTag is no-op. ++ if len(data) == 1 && (data[0] == 0xf6 || data[0] == 0xf7) { ++ return nil ++ } ++ ++ d := decoder{data: data, dm: defaultDecMode} ++ ++ // Unmarshal tag number. ++ typ, _, num := d.getHead() ++ if typ != cborTypeTag { ++ return &UnmarshalTypeError{CBORType: typ.String(), GoType: typeRawTag.String()} ++ } ++ t.Number = num ++ ++ // Unmarshal tag content. ++ c := d.data[d.off:] ++ t.Content = make([]byte, len(c)) ++ copy(t.Content, c) ++ return nil ++} ++ ++// MarshalCBOR returns CBOR encoding of t. ++func (t RawTag) MarshalCBOR() ([]byte, error) { ++ if t.Number == 0 && len(t.Content) == 0 { ++ // Marshal uninitialized cbor.RawTag ++ b := make([]byte, len(cborNil)) ++ copy(b, cborNil) ++ return b, nil ++ } ++ ++ e := getEncodeBuffer() ++ ++ encodeHead(e, byte(cborTypeTag), t.Number) ++ ++ content := t.Content ++ if len(content) == 0 { ++ content = cborNil ++ } ++ ++ buf := make([]byte, len(e.Bytes())+len(content)) ++ n := copy(buf, e.Bytes()) ++ copy(buf[n:], content) ++ ++ putEncodeBuffer(e) ++ return buf, nil ++} ++ ++// DecTagMode specifies how decoder handles tag number. ++type DecTagMode int ++ ++const ( ++ // DecTagIgnored makes decoder ignore tag number (skips if present). ++ DecTagIgnored DecTagMode = iota ++ ++ // DecTagOptional makes decoder verify tag number if it's present. ++ DecTagOptional ++ ++ // DecTagRequired makes decoder verify tag number and tag number must be present. ++ DecTagRequired ++ ++ maxDecTagMode ++) ++ ++func (dtm DecTagMode) valid() bool { ++ return dtm >= 0 && dtm < maxDecTagMode ++} ++ ++// EncTagMode specifies how encoder handles tag number. ++type EncTagMode int ++ ++const ( ++ // EncTagNone makes encoder not encode tag number. ++ EncTagNone EncTagMode = iota ++ ++ // EncTagRequired makes encoder encode tag number. ++ EncTagRequired ++ ++ maxEncTagMode ++) ++ ++func (etm EncTagMode) valid() bool { ++ return etm >= 0 && etm < maxEncTagMode ++} ++ ++// TagOptions specifies how encoder and decoder handle tag number. ++type TagOptions struct { ++ DecTag DecTagMode ++ EncTag EncTagMode ++} ++ ++// TagSet is an interface to add and remove tag info. It is used by EncMode and DecMode ++// to provide CBOR tag support. ++type TagSet interface { ++ // Add adds given tag number(s), content type, and tag options to TagSet. ++ Add(opts TagOptions, contentType reflect.Type, num uint64, nestedNum ...uint64) error ++ ++ // Remove removes given tag content type from TagSet. ++ Remove(contentType reflect.Type) ++ ++ tagProvider ++} ++ ++type tagProvider interface { ++ getTagItemFromType(t reflect.Type) *tagItem ++ getTypeFromTagNum(num []uint64) reflect.Type ++} ++ ++type tagItem struct { ++ num []uint64 ++ cborTagNum []byte ++ contentType reflect.Type ++ opts TagOptions ++} ++ ++func (t *tagItem) equalTagNum(num []uint64) bool { ++ // Fast path to compare 1 tag number ++ if len(t.num) == 1 && len(num) == 1 && t.num[0] == num[0] { ++ return true ++ } ++ ++ if len(t.num) != len(num) { ++ return false ++ } ++ ++ for i := 0; i < len(t.num); i++ { ++ if t.num[i] != num[i] { ++ return false ++ } ++ } ++ ++ return true ++} ++ ++type ( ++ tagSet map[reflect.Type]*tagItem ++ ++ syncTagSet struct { ++ sync.RWMutex ++ t tagSet ++ } ++) ++ ++func (t tagSet) getTagItemFromType(typ reflect.Type) *tagItem { ++ return t[typ] ++} ++ ++func (t tagSet) getTypeFromTagNum(num []uint64) reflect.Type { ++ for typ, tag := range t { ++ if tag.equalTagNum(num) { ++ return typ ++ } ++ } ++ return nil ++} ++ ++// NewTagSet returns TagSet (safe for concurrency). ++func NewTagSet() TagSet { ++ return &syncTagSet{t: make(map[reflect.Type]*tagItem)} ++} ++ ++// Add adds given tag number(s), content type, and tag options to TagSet. ++func (t *syncTagSet) Add(opts TagOptions, contentType reflect.Type, num uint64, nestedNum ...uint64) error { ++ if contentType == nil { ++ return errors.New("cbor: cannot add nil content type to TagSet") ++ } ++ for contentType.Kind() == reflect.Ptr { ++ contentType = contentType.Elem() ++ } ++ tag, err := newTagItem(opts, contentType, num, nestedNum...) ++ if err != nil { ++ return err ++ } ++ t.Lock() ++ defer t.Unlock() ++ for typ, ti := range t.t { ++ if typ == contentType { ++ return errors.New("cbor: content type " + contentType.String() + " already exists in TagSet") ++ } ++ if ti.equalTagNum(tag.num) { ++ return fmt.Errorf("cbor: tag number %v already exists in TagSet", tag.num) ++ } ++ } ++ t.t[contentType] = tag ++ return nil ++} ++ ++// Remove removes given tag content type from TagSet. ++func (t *syncTagSet) Remove(contentType reflect.Type) { ++ for contentType.Kind() == reflect.Ptr { ++ contentType = contentType.Elem() ++ } ++ t.Lock() ++ delete(t.t, contentType) ++ t.Unlock() ++} ++ ++func (t *syncTagSet) getTagItemFromType(typ reflect.Type) *tagItem { ++ t.RLock() ++ ti := t.t[typ] ++ t.RUnlock() ++ return ti ++} ++ ++func (t *syncTagSet) getTypeFromTagNum(num []uint64) reflect.Type { ++ t.RLock() ++ rt := t.t.getTypeFromTagNum(num) ++ t.RUnlock() ++ return rt ++} ++ ++func newTagItem(opts TagOptions, contentType reflect.Type, num uint64, nestedNum ...uint64) (*tagItem, error) { ++ if opts.DecTag == DecTagIgnored && opts.EncTag == EncTagNone { ++ return nil, errors.New("cbor: cannot add tag with DecTagIgnored and EncTagNone options to TagSet") ++ } ++ if contentType.PkgPath() == "" || contentType.Kind() == reflect.Interface { ++ return nil, errors.New("cbor: can only add named types to TagSet, got " + contentType.String()) ++ } ++ if contentType == typeTime { ++ return nil, errors.New("cbor: cannot add time.Time to TagSet, use EncOptions.TimeTag and DecOptions.TimeTag instead") ++ } ++ if contentType == typeBigInt { ++ return nil, errors.New("cbor: cannot add big.Int to TagSet, it's built-in and supported automatically") ++ } ++ if contentType == typeTag { ++ return nil, errors.New("cbor: cannot add cbor.Tag to TagSet") ++ } ++ if contentType == typeRawTag { ++ return nil, errors.New("cbor: cannot add cbor.RawTag to TagSet") ++ } ++ if num == 0 || num == 1 { ++ return nil, errors.New("cbor: cannot add tag number 0 or 1 to TagSet, use EncOptions.TimeTag and DecOptions.TimeTag instead") ++ } ++ if num == 2 || num == 3 { ++ return nil, errors.New("cbor: cannot add tag number 2 or 3 to TagSet, it's built-in and supported automatically") ++ } ++ if num == tagNumSelfDescribedCBOR { ++ return nil, errors.New("cbor: cannot add tag number 55799 to TagSet, it's built-in and ignored automatically") ++ } ++ ++ te := tagItem{num: []uint64{num}, opts: opts, contentType: contentType} ++ te.num = append(te.num, nestedNum...) ++ ++ // Cache encoded tag numbers ++ e := getEncodeBuffer() ++ for _, n := range te.num { ++ encodeHead(e, byte(cborTypeTag), n) ++ } ++ te.cborTagNum = make([]byte, e.Len()) ++ copy(te.cborTagNum, e.Bytes()) ++ putEncodeBuffer(e) ++ ++ return &te, nil ++} ++ ++var ( ++ typeTag = reflect.TypeOf(Tag{}) ++ typeRawTag = reflect.TypeOf(RawTag{}) ++) ++ ++// WrongTagError describes mismatch between CBOR tag and registered tag. ++type WrongTagError struct { ++ RegisteredType reflect.Type ++ RegisteredTagNum []uint64 ++ TagNum []uint64 ++} ++ ++func (e *WrongTagError) Error() string { ++ return fmt.Sprintf("cbor: wrong tag number for %s, got %v, expected %v", e.RegisteredType.String(), e.TagNum, e.RegisteredTagNum) ++} +diff --git a/vendor/github.com/fxamacker/cbor/v2/valid.go b/vendor/github.com/fxamacker/cbor/v2/valid.go +new file mode 100644 +index 00000000..b40793b9 +--- /dev/null ++++ b/vendor/github.com/fxamacker/cbor/v2/valid.go +@@ -0,0 +1,394 @@ ++// Copyright (c) Faye Amacker. All rights reserved. ++// Licensed under the MIT License. See LICENSE in the project root for license information. ++ ++package cbor ++ ++import ( ++ "encoding/binary" ++ "errors" ++ "io" ++ "math" ++ "strconv" ++ ++ "github.com/x448/float16" ++) ++ ++// SyntaxError is a description of a CBOR syntax error. ++type SyntaxError struct { ++ msg string ++} ++ ++func (e *SyntaxError) Error() string { return e.msg } ++ ++// SemanticError is a description of a CBOR semantic error. ++type SemanticError struct { ++ msg string ++} ++ ++func (e *SemanticError) Error() string { return e.msg } ++ ++// MaxNestedLevelError indicates exceeded max nested level of any combination of CBOR arrays/maps/tags. ++type MaxNestedLevelError struct { ++ maxNestedLevels int ++} ++ ++func (e *MaxNestedLevelError) Error() string { ++ return "cbor: exceeded max nested level " + strconv.Itoa(e.maxNestedLevels) ++} ++ ++// MaxArrayElementsError indicates exceeded max number of elements for CBOR arrays. ++type MaxArrayElementsError struct { ++ maxArrayElements int ++} ++ ++func (e *MaxArrayElementsError) Error() string { ++ return "cbor: exceeded max number of elements " + strconv.Itoa(e.maxArrayElements) + " for CBOR array" ++} ++ ++// MaxMapPairsError indicates exceeded max number of key-value pairs for CBOR maps. ++type MaxMapPairsError struct { ++ maxMapPairs int ++} ++ ++func (e *MaxMapPairsError) Error() string { ++ return "cbor: exceeded max number of key-value pairs " + strconv.Itoa(e.maxMapPairs) + " for CBOR map" ++} ++ ++// IndefiniteLengthError indicates found disallowed indefinite length items. ++type IndefiniteLengthError struct { ++ t cborType ++} ++ ++func (e *IndefiniteLengthError) Error() string { ++ return "cbor: indefinite-length " + e.t.String() + " isn't allowed" ++} ++ ++// TagsMdError indicates found disallowed CBOR tags. ++type TagsMdError struct { ++} ++ ++func (e *TagsMdError) Error() string { ++ return "cbor: CBOR tag isn't allowed" ++} ++ ++// ExtraneousDataError indicates found extraneous data following well-formed CBOR data item. ++type ExtraneousDataError struct { ++ numOfBytes int // number of bytes of extraneous data ++ index int // location of extraneous data ++} ++ ++func (e *ExtraneousDataError) Error() string { ++ return "cbor: " + strconv.Itoa(e.numOfBytes) + " bytes of extraneous data starting at index " + strconv.Itoa(e.index) ++} ++ ++// wellformed checks whether the CBOR data item is well-formed. ++// allowExtraData indicates if extraneous data is allowed after the CBOR data item. ++// - use allowExtraData = true when using Decoder.Decode() ++// - use allowExtraData = false when using Unmarshal() ++func (d *decoder) wellformed(allowExtraData bool, checkBuiltinTags bool) error { ++ if len(d.data) == d.off { ++ return io.EOF ++ } ++ _, err := d.wellformedInternal(0, checkBuiltinTags) ++ if err == nil { ++ if !allowExtraData && d.off != len(d.data) { ++ err = &ExtraneousDataError{len(d.data) - d.off, d.off} ++ } ++ } ++ return err ++} ++ ++// wellformedInternal checks data's well-formedness and returns max depth and error. ++func (d *decoder) wellformedInternal(depth int, checkBuiltinTags bool) (int, error) { //nolint:gocyclo ++ t, _, val, indefiniteLength, err := d.wellformedHeadWithIndefiniteLengthFlag() ++ if err != nil { ++ return 0, err ++ } ++ ++ switch t { ++ case cborTypeByteString, cborTypeTextString: ++ if indefiniteLength { ++ if d.dm.indefLength == IndefLengthForbidden { ++ return 0, &IndefiniteLengthError{t} ++ } ++ return d.wellformedIndefiniteString(t, depth, checkBuiltinTags) ++ } ++ valInt := int(val) ++ if valInt < 0 { ++ // Detect integer overflow ++ return 0, errors.New("cbor: " + t.String() + " length " + strconv.FormatUint(val, 10) + " is too large, causing integer overflow") ++ } ++ if len(d.data)-d.off < valInt { // valInt+off may overflow integer ++ return 0, io.ErrUnexpectedEOF ++ } ++ d.off += valInt ++ ++ case cborTypeArray, cborTypeMap: ++ depth++ ++ if depth > d.dm.maxNestedLevels { ++ return 0, &MaxNestedLevelError{d.dm.maxNestedLevels} ++ } ++ ++ if indefiniteLength { ++ if d.dm.indefLength == IndefLengthForbidden { ++ return 0, &IndefiniteLengthError{t} ++ } ++ return d.wellformedIndefiniteArrayOrMap(t, depth, checkBuiltinTags) ++ } ++ ++ valInt := int(val) ++ if valInt < 0 { ++ // Detect integer overflow ++ return 0, errors.New("cbor: " + t.String() + " length " + strconv.FormatUint(val, 10) + " is too large, it would cause integer overflow") ++ } ++ ++ if t == cborTypeArray { ++ if valInt > d.dm.maxArrayElements { ++ return 0, &MaxArrayElementsError{d.dm.maxArrayElements} ++ } ++ } else { ++ if valInt > d.dm.maxMapPairs { ++ return 0, &MaxMapPairsError{d.dm.maxMapPairs} ++ } ++ } ++ ++ count := 1 ++ if t == cborTypeMap { ++ count = 2 ++ } ++ maxDepth := depth ++ for j := 0; j < count; j++ { ++ for i := 0; i < valInt; i++ { ++ var dpt int ++ if dpt, err = d.wellformedInternal(depth, checkBuiltinTags); err != nil { ++ return 0, err ++ } ++ if dpt > maxDepth { ++ maxDepth = dpt // Save max depth ++ } ++ } ++ } ++ depth = maxDepth ++ ++ case cborTypeTag: ++ if d.dm.tagsMd == TagsForbidden { ++ return 0, &TagsMdError{} ++ } ++ ++ tagNum := val ++ ++ // Scan nested tag numbers to avoid recursion. ++ for { ++ if len(d.data) == d.off { // Tag number must be followed by tag content. ++ return 0, io.ErrUnexpectedEOF ++ } ++ if checkBuiltinTags { ++ err = validBuiltinTag(tagNum, d.data[d.off]) ++ if err != nil { ++ return 0, err ++ } ++ } ++ if d.dm.bignumTag == BignumTagForbidden && (tagNum == 2 || tagNum == 3) { ++ return 0, &UnacceptableDataItemError{ ++ CBORType: cborTypeTag.String(), ++ Message: "bignum", ++ } ++ } ++ if getType(d.data[d.off]) != cborTypeTag { ++ break ++ } ++ if _, _, tagNum, err = d.wellformedHead(); err != nil { ++ return 0, err ++ } ++ depth++ ++ if depth > d.dm.maxNestedLevels { ++ return 0, &MaxNestedLevelError{d.dm.maxNestedLevels} ++ } ++ } ++ // Check tag content. ++ return d.wellformedInternal(depth, checkBuiltinTags) ++ } ++ ++ return depth, nil ++} ++ ++// wellformedIndefiniteString checks indefinite length byte/text string's well-formedness and returns max depth and error. ++func (d *decoder) wellformedIndefiniteString(t cborType, depth int, checkBuiltinTags bool) (int, error) { ++ var err error ++ for { ++ if len(d.data) == d.off { ++ return 0, io.ErrUnexpectedEOF ++ } ++ if isBreakFlag(d.data[d.off]) { ++ d.off++ ++ break ++ } ++ // Peek ahead to get next type and indefinite length status. ++ nt, ai := parseInitialByte(d.data[d.off]) ++ if t != nt { ++ return 0, &SyntaxError{"cbor: wrong element type " + nt.String() + " for indefinite-length " + t.String()} ++ } ++ if additionalInformation(ai).isIndefiniteLength() { ++ return 0, &SyntaxError{"cbor: indefinite-length " + t.String() + " chunk is not definite-length"} ++ } ++ if depth, err = d.wellformedInternal(depth, checkBuiltinTags); err != nil { ++ return 0, err ++ } ++ } ++ return depth, nil ++} ++ ++// wellformedIndefiniteArrayOrMap checks indefinite length array/map's well-formedness and returns max depth and error. ++func (d *decoder) wellformedIndefiniteArrayOrMap(t cborType, depth int, checkBuiltinTags bool) (int, error) { ++ var err error ++ maxDepth := depth ++ i := 0 ++ for { ++ if len(d.data) == d.off { ++ return 0, io.ErrUnexpectedEOF ++ } ++ if isBreakFlag(d.data[d.off]) { ++ d.off++ ++ break ++ } ++ var dpt int ++ if dpt, err = d.wellformedInternal(depth, checkBuiltinTags); err != nil { ++ return 0, err ++ } ++ if dpt > maxDepth { ++ maxDepth = dpt ++ } ++ i++ ++ if t == cborTypeArray { ++ if i > d.dm.maxArrayElements { ++ return 0, &MaxArrayElementsError{d.dm.maxArrayElements} ++ } ++ } else { ++ if i%2 == 0 && i/2 > d.dm.maxMapPairs { ++ return 0, &MaxMapPairsError{d.dm.maxMapPairs} ++ } ++ } ++ } ++ if t == cborTypeMap && i%2 == 1 { ++ return 0, &SyntaxError{"cbor: unexpected \"break\" code"} ++ } ++ return maxDepth, nil ++} ++ ++func (d *decoder) wellformedHeadWithIndefiniteLengthFlag() ( ++ t cborType, ++ ai byte, ++ val uint64, ++ indefiniteLength bool, ++ err error, ++) { ++ t, ai, val, err = d.wellformedHead() ++ if err != nil { ++ return ++ } ++ indefiniteLength = additionalInformation(ai).isIndefiniteLength() ++ return ++} ++ ++func (d *decoder) wellformedHead() (t cborType, ai byte, val uint64, err error) { ++ dataLen := len(d.data) - d.off ++ if dataLen == 0 { ++ return 0, 0, 0, io.ErrUnexpectedEOF ++ } ++ ++ t, ai = parseInitialByte(d.data[d.off]) ++ val = uint64(ai) ++ d.off++ ++ dataLen-- ++ ++ if ai <= maxAdditionalInformationWithoutArgument { ++ return t, ai, val, nil ++ } ++ ++ if ai == additionalInformationWith1ByteArgument { ++ const argumentSize = 1 ++ if dataLen < argumentSize { ++ return 0, 0, 0, io.ErrUnexpectedEOF ++ } ++ val = uint64(d.data[d.off]) ++ d.off++ ++ if t == cborTypePrimitives && val < 32 { ++ return 0, 0, 0, &SyntaxError{"cbor: invalid simple value " + strconv.Itoa(int(val)) + " for type " + t.String()} ++ } ++ return t, ai, val, nil ++ } ++ ++ if ai == additionalInformationWith2ByteArgument { ++ const argumentSize = 2 ++ if dataLen < argumentSize { ++ return 0, 0, 0, io.ErrUnexpectedEOF ++ } ++ val = uint64(binary.BigEndian.Uint16(d.data[d.off : d.off+argumentSize])) ++ d.off += argumentSize ++ if t == cborTypePrimitives { ++ if err := d.acceptableFloat(float64(float16.Frombits(uint16(val)).Float32())); err != nil { ++ return 0, 0, 0, err ++ } ++ } ++ return t, ai, val, nil ++ } ++ ++ if ai == additionalInformationWith4ByteArgument { ++ const argumentSize = 4 ++ if dataLen < argumentSize { ++ return 0, 0, 0, io.ErrUnexpectedEOF ++ } ++ val = uint64(binary.BigEndian.Uint32(d.data[d.off : d.off+argumentSize])) ++ d.off += argumentSize ++ if t == cborTypePrimitives { ++ if err := d.acceptableFloat(float64(math.Float32frombits(uint32(val)))); err != nil { ++ return 0, 0, 0, err ++ } ++ } ++ return t, ai, val, nil ++ } ++ ++ if ai == additionalInformationWith8ByteArgument { ++ const argumentSize = 8 ++ if dataLen < argumentSize { ++ return 0, 0, 0, io.ErrUnexpectedEOF ++ } ++ val = binary.BigEndian.Uint64(d.data[d.off : d.off+argumentSize]) ++ d.off += argumentSize ++ if t == cborTypePrimitives { ++ if err := d.acceptableFloat(math.Float64frombits(val)); err != nil { ++ return 0, 0, 0, err ++ } ++ } ++ return t, ai, val, nil ++ } ++ ++ if additionalInformation(ai).isIndefiniteLength() { ++ switch t { ++ case cborTypePositiveInt, cborTypeNegativeInt, cborTypeTag: ++ return 0, 0, 0, &SyntaxError{"cbor: invalid additional information " + strconv.Itoa(int(ai)) + " for type " + t.String()} ++ case cborTypePrimitives: // 0xff (break code) should not be outside wellformedIndefinite(). ++ return 0, 0, 0, &SyntaxError{"cbor: unexpected \"break\" code"} ++ } ++ return t, ai, val, nil ++ } ++ ++ // ai == 28, 29, 30 ++ return 0, 0, 0, &SyntaxError{"cbor: invalid additional information " + strconv.Itoa(int(ai)) + " for type " + t.String()} ++} ++ ++func (d *decoder) acceptableFloat(f float64) error { ++ switch { ++ case d.dm.nanDec == NaNDecodeForbidden && math.IsNaN(f): ++ return &UnacceptableDataItemError{ ++ CBORType: cborTypePrimitives.String(), ++ Message: "floating-point NaN", ++ } ++ case d.dm.infDec == InfDecodeForbidden && math.IsInf(f, 0): ++ return &UnacceptableDataItemError{ ++ CBORType: cborTypePrimitives.String(), ++ Message: "floating-point infinity", ++ } ++ } ++ return nil ++} +diff --git a/vendor/github.com/go-logr/logr/README.md b/vendor/github.com/go-logr/logr/README.md +index 8969526a..7c7f0c69 100644 +--- a/vendor/github.com/go-logr/logr/README.md ++++ b/vendor/github.com/go-logr/logr/README.md +@@ -1,6 +1,7 @@ + # A minimal logging API for Go + + [![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/logr.svg)](https://pkg.go.dev/github.com/go-logr/logr) ++[![Go Report Card](https://goreportcard.com/badge/github.com/go-logr/logr)](https://goreportcard.com/report/github.com/go-logr/logr) + [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/go-logr/logr/badge)](https://securityscorecards.dev/viewer/?platform=github.com&org=go-logr&repo=logr) + + logr offers an(other) opinion on how Go programs and libraries can do logging +diff --git a/vendor/github.com/go-logr/logr/funcr/funcr.go b/vendor/github.com/go-logr/logr/funcr/funcr.go +index fb2f866f..30568e76 100644 +--- a/vendor/github.com/go-logr/logr/funcr/funcr.go ++++ b/vendor/github.com/go-logr/logr/funcr/funcr.go +@@ -236,15 +236,14 @@ func newFormatter(opts Options, outfmt outputFormat) Formatter { + // implementation. It should be constructed with NewFormatter. Some of + // its methods directly implement logr.LogSink. + type Formatter struct { +- outputFormat outputFormat +- prefix string +- values []any +- valuesStr string +- parentValuesStr string +- depth int +- opts *Options +- group string // for slog groups +- groupDepth int ++ outputFormat outputFormat ++ prefix string ++ values []any ++ valuesStr string ++ depth int ++ opts *Options ++ groupName string // for slog groups ++ groups []groupDef + } + + // outputFormat indicates which outputFormat to use. +@@ -257,6 +256,13 @@ const ( + outputJSON + ) + ++// groupDef represents a saved group. The values may be empty, but we don't ++// know if we need to render the group until the final record is rendered. ++type groupDef struct { ++ name string ++ values string ++} ++ + // PseudoStruct is a list of key-value pairs that gets logged as a struct. + type PseudoStruct []any + +@@ -264,76 +270,102 @@ type PseudoStruct []any + func (f Formatter) render(builtins, args []any) string { + // Empirically bytes.Buffer is faster than strings.Builder for this. + buf := bytes.NewBuffer(make([]byte, 0, 1024)) ++ + if f.outputFormat == outputJSON { +- buf.WriteByte('{') // for the whole line ++ buf.WriteByte('{') // for the whole record + } + ++ // Render builtins + vals := builtins + if hook := f.opts.RenderBuiltinsHook; hook != nil { + vals = hook(f.sanitize(vals)) + } +- f.flatten(buf, vals, false, false) // keys are ours, no need to escape ++ f.flatten(buf, vals, false) // keys are ours, no need to escape + continuing := len(builtins) > 0 + +- if f.parentValuesStr != "" { +- if continuing { +- buf.WriteByte(f.comma()) ++ // Turn the inner-most group into a string ++ argsStr := func() string { ++ buf := bytes.NewBuffer(make([]byte, 0, 1024)) ++ ++ vals = args ++ if hook := f.opts.RenderArgsHook; hook != nil { ++ vals = hook(f.sanitize(vals)) + } +- buf.WriteString(f.parentValuesStr) +- continuing = true +- } ++ f.flatten(buf, vals, true) // escape user-provided keys + +- groupDepth := f.groupDepth +- if f.group != "" { +- if f.valuesStr != "" || len(args) != 0 { +- if continuing { +- buf.WriteByte(f.comma()) +- } +- buf.WriteString(f.quoted(f.group, true)) // escape user-provided keys +- buf.WriteByte(f.colon()) +- buf.WriteByte('{') // for the group +- continuing = false +- } else { +- // The group was empty +- groupDepth-- ++ return buf.String() ++ }() ++ ++ // Render the stack of groups from the inside out. ++ bodyStr := f.renderGroup(f.groupName, f.valuesStr, argsStr) ++ for i := len(f.groups) - 1; i >= 0; i-- { ++ grp := &f.groups[i] ++ if grp.values == "" && bodyStr == "" { ++ // no contents, so we must elide the whole group ++ continue + } ++ bodyStr = f.renderGroup(grp.name, grp.values, bodyStr) + } + +- if f.valuesStr != "" { ++ if bodyStr != "" { + if continuing { + buf.WriteByte(f.comma()) + } +- buf.WriteString(f.valuesStr) +- continuing = true ++ buf.WriteString(bodyStr) + } + +- vals = args +- if hook := f.opts.RenderArgsHook; hook != nil { +- vals = hook(f.sanitize(vals)) ++ if f.outputFormat == outputJSON { ++ buf.WriteByte('}') // for the whole record + } +- f.flatten(buf, vals, continuing, true) // escape user-provided keys + +- for i := 0; i < groupDepth; i++ { +- buf.WriteByte('}') // for the groups ++ return buf.String() ++} ++ ++// renderGroup returns a string representation of the named group with rendered ++// values and args. If the name is empty, this will return the values and args, ++// joined. If the name is not empty, this will return a single key-value pair, ++// where the value is a grouping of the values and args. If the values and ++// args are both empty, this will return an empty string, even if the name was ++// specified. ++func (f Formatter) renderGroup(name string, values string, args string) string { ++ buf := bytes.NewBuffer(make([]byte, 0, 1024)) ++ ++ needClosingBrace := false ++ if name != "" && (values != "" || args != "") { ++ buf.WriteString(f.quoted(name, true)) // escape user-provided keys ++ buf.WriteByte(f.colon()) ++ buf.WriteByte('{') ++ needClosingBrace = true + } + +- if f.outputFormat == outputJSON { +- buf.WriteByte('}') // for the whole line ++ continuing := false ++ if values != "" { ++ buf.WriteString(values) ++ continuing = true ++ } ++ ++ if args != "" { ++ if continuing { ++ buf.WriteByte(f.comma()) ++ } ++ buf.WriteString(args) ++ } ++ ++ if needClosingBrace { ++ buf.WriteByte('}') + } + + return buf.String() + } + +-// flatten renders a list of key-value pairs into a buffer. If continuing is +-// true, it assumes that the buffer has previous values and will emit a +-// separator (which depends on the output format) before the first pair it +-// writes. If escapeKeys is true, the keys are assumed to have +-// non-JSON-compatible characters in them and must be evaluated for escapes. ++// flatten renders a list of key-value pairs into a buffer. If escapeKeys is ++// true, the keys are assumed to have non-JSON-compatible characters in them ++// and must be evaluated for escapes. + // + // This function returns a potentially modified version of kvList, which + // ensures that there is a value for every key (adding a value if needed) and + // that each key is a string (substituting a key if needed). +-func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, continuing bool, escapeKeys bool) []any { ++func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, escapeKeys bool) []any { + // This logic overlaps with sanitize() but saves one type-cast per key, + // which can be measurable. + if len(kvList)%2 != 0 { +@@ -354,7 +386,7 @@ func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, continuing bool, esc + } + v := kvList[i+1] + +- if i > 0 || continuing { ++ if i > 0 { + if f.outputFormat == outputJSON { + buf.WriteByte(f.comma()) + } else { +@@ -766,46 +798,17 @@ func (f Formatter) sanitize(kvList []any) []any { + // startGroup opens a new group scope (basically a sub-struct), which locks all + // the current saved values and starts them anew. This is needed to satisfy + // slog. +-func (f *Formatter) startGroup(group string) { ++func (f *Formatter) startGroup(name string) { + // Unnamed groups are just inlined. +- if group == "" { ++ if name == "" { + return + } + +- // Any saved values can no longer be changed. +- buf := bytes.NewBuffer(make([]byte, 0, 1024)) +- continuing := false +- +- if f.parentValuesStr != "" { +- buf.WriteString(f.parentValuesStr) +- continuing = true +- } +- +- if f.group != "" && f.valuesStr != "" { +- if continuing { +- buf.WriteByte(f.comma()) +- } +- buf.WriteString(f.quoted(f.group, true)) // escape user-provided keys +- buf.WriteByte(f.colon()) +- buf.WriteByte('{') // for the group +- continuing = false +- } +- +- if f.valuesStr != "" { +- if continuing { +- buf.WriteByte(f.comma()) +- } +- buf.WriteString(f.valuesStr) +- } +- +- // NOTE: We don't close the scope here - that's done later, when a log line +- // is actually rendered (because we have N scopes to close). +- +- f.parentValuesStr = buf.String() ++ n := len(f.groups) ++ f.groups = append(f.groups[:n:n], groupDef{f.groupName, f.valuesStr}) + + // Start collecting new values. +- f.group = group +- f.groupDepth++ ++ f.groupName = name + f.valuesStr = "" + f.values = nil + } +@@ -900,7 +903,7 @@ func (f *Formatter) AddValues(kvList []any) { + + // Pre-render values, so we don't have to do it on each Info/Error call. + buf := bytes.NewBuffer(make([]byte, 0, 1024)) +- f.flatten(buf, vals, false, true) // escape user-provided keys ++ f.flatten(buf, vals, true) // escape user-provided keys + f.valuesStr = buf.String() + } + +diff --git a/vendor/github.com/go-openapi/jsonpointer/.golangci.yml b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml +new file mode 100644 +index 00000000..22f8d21c +--- /dev/null ++++ b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml +@@ -0,0 +1,61 @@ ++linters-settings: ++ govet: ++ check-shadowing: true ++ golint: ++ min-confidence: 0 ++ gocyclo: ++ min-complexity: 45 ++ maligned: ++ suggest-new: true ++ dupl: ++ threshold: 200 ++ goconst: ++ min-len: 2 ++ min-occurrences: 3 ++ ++linters: ++ enable-all: true ++ disable: ++ - maligned ++ - unparam ++ - lll ++ - gochecknoinits ++ - gochecknoglobals ++ - funlen ++ - godox ++ - gocognit ++ - whitespace ++ - wsl ++ - wrapcheck ++ - testpackage ++ - nlreturn ++ - gomnd ++ - exhaustivestruct ++ - goerr113 ++ - errorlint ++ - nestif ++ - godot ++ - gofumpt ++ - paralleltest ++ - tparallel ++ - thelper ++ - ifshort ++ - exhaustruct ++ - varnamelen ++ - gci ++ - depguard ++ - errchkjson ++ - inamedparam ++ - nonamedreturns ++ - musttag ++ - ireturn ++ - forcetypeassert ++ - cyclop ++ # deprecated linters ++ - deadcode ++ - interfacer ++ - scopelint ++ - varcheck ++ - structcheck ++ - golint ++ - nosnakecase +diff --git a/vendor/github.com/go-openapi/jsonpointer/README.md b/vendor/github.com/go-openapi/jsonpointer/README.md +index 813788af..0108f1d5 100644 +--- a/vendor/github.com/go-openapi/jsonpointer/README.md ++++ b/vendor/github.com/go-openapi/jsonpointer/README.md +@@ -1,6 +1,10 @@ +-# gojsonpointer [![Build Status](https://travis-ci.org/go-openapi/jsonpointer.svg?branch=master)](https://travis-ci.org/go-openapi/jsonpointer) [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) ++# gojsonpointer [![Build Status](https://github.com/go-openapi/jsonpointer/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/jsonpointer/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) ++ ++[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) ++[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) ++[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/jsonpointer.svg)](https://pkg.go.dev/github.com/go-openapi/jsonpointer) ++[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/jsonpointer)](https://goreportcard.com/report/github.com/go-openapi/jsonpointer) + +-[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonpointer?status.svg)](http://godoc.org/github.com/go-openapi/jsonpointer) + An implementation of JSON Pointer - Go language + + ## Status +diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go +index 7df9853d..d970c7cf 100644 +--- a/vendor/github.com/go-openapi/jsonpointer/pointer.go ++++ b/vendor/github.com/go-openapi/jsonpointer/pointer.go +@@ -26,6 +26,7 @@ + package jsonpointer + + import ( ++ "encoding/json" + "errors" + "fmt" + "reflect" +@@ -40,6 +41,7 @@ const ( + pointerSeparator = `/` + + invalidStart = `JSON pointer must be empty or start with a "` + pointerSeparator ++ notFound = `Can't find the pointer in the document` + ) + + var jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem() +@@ -48,13 +50,13 @@ var jsonSetableType = reflect.TypeOf(new(JSONSetable)).Elem() + // JSONPointable is an interface for structs to implement when they need to customize the + // json pointer process + type JSONPointable interface { +- JSONLookup(string) (interface{}, error) ++ JSONLookup(string) (any, error) + } + + // JSONSetable is an interface for structs to implement when they need to customize the + // json pointer process + type JSONSetable interface { +- JSONSet(string, interface{}) error ++ JSONSet(string, any) error + } + + // New creates a new json pointer for the given string +@@ -81,9 +83,7 @@ func (p *Pointer) parse(jsonPointerString string) error { + err = errors.New(invalidStart) + } else { + referenceTokens := strings.Split(jsonPointerString, pointerSeparator) +- for _, referenceToken := range referenceTokens[1:] { +- p.referenceTokens = append(p.referenceTokens, referenceToken) +- } ++ p.referenceTokens = append(p.referenceTokens, referenceTokens[1:]...) + } + } + +@@ -91,38 +91,58 @@ func (p *Pointer) parse(jsonPointerString string) error { + } + + // Get uses the pointer to retrieve a value from a JSON document +-func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error) { ++func (p *Pointer) Get(document any) (any, reflect.Kind, error) { + return p.get(document, swag.DefaultJSONNameProvider) + } + + // Set uses the pointer to set a value from a JSON document +-func (p *Pointer) Set(document interface{}, value interface{}) (interface{}, error) { ++func (p *Pointer) Set(document any, value any) (any, error) { + return document, p.set(document, value, swag.DefaultJSONNameProvider) + } + + // GetForToken gets a value for a json pointer token 1 level deep +-func GetForToken(document interface{}, decodedToken string) (interface{}, reflect.Kind, error) { ++func GetForToken(document any, decodedToken string) (any, reflect.Kind, error) { + return getSingleImpl(document, decodedToken, swag.DefaultJSONNameProvider) + } + + // SetForToken gets a value for a json pointer token 1 level deep +-func SetForToken(document interface{}, decodedToken string, value interface{}) (interface{}, error) { ++func SetForToken(document any, decodedToken string, value any) (any, error) { + return document, setSingleImpl(document, value, decodedToken, swag.DefaultJSONNameProvider) + } + +-func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { ++func isNil(input any) bool { ++ if input == nil { ++ return true ++ } ++ ++ kind := reflect.TypeOf(input).Kind() ++ switch kind { //nolint:exhaustive ++ case reflect.Ptr, reflect.Map, reflect.Slice, reflect.Chan: ++ return reflect.ValueOf(input).IsNil() ++ default: ++ return false ++ } ++} ++ ++func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvider) (any, reflect.Kind, error) { + rValue := reflect.Indirect(reflect.ValueOf(node)) + kind := rValue.Kind() ++ if isNil(node) { ++ return nil, kind, fmt.Errorf("nil value has not field %q", decodedToken) ++ } + +- if rValue.Type().Implements(jsonPointableType) { +- r, err := node.(JSONPointable).JSONLookup(decodedToken) ++ switch typed := node.(type) { ++ case JSONPointable: ++ r, err := typed.JSONLookup(decodedToken) + if err != nil { + return nil, kind, err + } + return r, kind, nil ++ case *any: // case of a pointer to interface, that is not resolved by reflect.Indirect ++ return getSingleImpl(*typed, decodedToken, nameProvider) + } + +- switch kind { ++ switch kind { //nolint:exhaustive + case reflect.Struct: + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { +@@ -159,7 +179,7 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam + + } + +-func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *swag.NameProvider) error { ++func setSingleImpl(node, data any, decodedToken string, nameProvider *swag.NameProvider) error { + rValue := reflect.Indirect(reflect.ValueOf(node)) + + if ns, ok := node.(JSONSetable); ok { // pointer impl +@@ -170,7 +190,7 @@ func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *sw + return node.(JSONSetable).JSONSet(decodedToken, data) + } + +- switch rValue.Kind() { ++ switch rValue.Kind() { //nolint:exhaustive + case reflect.Struct: + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { +@@ -210,7 +230,7 @@ func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *sw + + } + +-func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { ++func (p *Pointer) get(node any, nameProvider *swag.NameProvider) (any, reflect.Kind, error) { + + if nameProvider == nil { + nameProvider = swag.DefaultJSONNameProvider +@@ -231,8 +251,7 @@ func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interf + if err != nil { + return nil, knd, err + } +- node, kind = r, knd +- ++ node = r + } + + rValue := reflect.ValueOf(node) +@@ -241,11 +260,11 @@ func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interf + return node, kind, nil + } + +-func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) error { ++func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error { + knd := reflect.ValueOf(node).Kind() + + if knd != reflect.Ptr && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array { +- return fmt.Errorf("only structs, pointers, maps and slices are supported for setting values") ++ return errors.New("only structs, pointers, maps and slices are supported for setting values") + } + + if nameProvider == nil { +@@ -284,7 +303,7 @@ func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) e + continue + } + +- switch kind { ++ switch kind { //nolint:exhaustive + case reflect.Struct: + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { +@@ -363,6 +382,128 @@ func (p *Pointer) String() string { + return pointerString + } + ++func (p *Pointer) Offset(document string) (int64, error) { ++ dec := json.NewDecoder(strings.NewReader(document)) ++ var offset int64 ++ for _, ttk := range p.DecodedTokens() { ++ tk, err := dec.Token() ++ if err != nil { ++ return 0, err ++ } ++ switch tk := tk.(type) { ++ case json.Delim: ++ switch tk { ++ case '{': ++ offset, err = offsetSingleObject(dec, ttk) ++ if err != nil { ++ return 0, err ++ } ++ case '[': ++ offset, err = offsetSingleArray(dec, ttk) ++ if err != nil { ++ return 0, err ++ } ++ default: ++ return 0, fmt.Errorf("invalid token %#v", tk) ++ } ++ default: ++ return 0, fmt.Errorf("invalid token %#v", tk) ++ } ++ } ++ return offset, nil ++} ++ ++func offsetSingleObject(dec *json.Decoder, decodedToken string) (int64, error) { ++ for dec.More() { ++ offset := dec.InputOffset() ++ tk, err := dec.Token() ++ if err != nil { ++ return 0, err ++ } ++ switch tk := tk.(type) { ++ case json.Delim: ++ switch tk { ++ case '{': ++ if err = drainSingle(dec); err != nil { ++ return 0, err ++ } ++ case '[': ++ if err = drainSingle(dec); err != nil { ++ return 0, err ++ } ++ } ++ case string: ++ if tk == decodedToken { ++ return offset, nil ++ } ++ default: ++ return 0, fmt.Errorf("invalid token %#v", tk) ++ } ++ } ++ return 0, fmt.Errorf("token reference %q not found", decodedToken) ++} ++ ++func offsetSingleArray(dec *json.Decoder, decodedToken string) (int64, error) { ++ idx, err := strconv.Atoi(decodedToken) ++ if err != nil { ++ return 0, fmt.Errorf("token reference %q is not a number: %v", decodedToken, err) ++ } ++ var i int ++ for i = 0; i < idx && dec.More(); i++ { ++ tk, err := dec.Token() ++ if err != nil { ++ return 0, err ++ } ++ ++ if delim, isDelim := tk.(json.Delim); isDelim { ++ switch delim { ++ case '{': ++ if err = drainSingle(dec); err != nil { ++ return 0, err ++ } ++ case '[': ++ if err = drainSingle(dec); err != nil { ++ return 0, err ++ } ++ } ++ } ++ } ++ ++ if !dec.More() { ++ return 0, fmt.Errorf("token reference %q not found", decodedToken) ++ } ++ return dec.InputOffset(), nil ++} ++ ++// drainSingle drains a single level of object or array. ++// The decoder has to guarantee the beginning delim (i.e. '{' or '[') has been consumed. ++func drainSingle(dec *json.Decoder) error { ++ for dec.More() { ++ tk, err := dec.Token() ++ if err != nil { ++ return err ++ } ++ if delim, isDelim := tk.(json.Delim); isDelim { ++ switch delim { ++ case '{': ++ if err = drainSingle(dec); err != nil { ++ return err ++ } ++ case '[': ++ if err = drainSingle(dec); err != nil { ++ return err ++ } ++ } ++ } ++ } ++ ++ // Consumes the ending delim ++ if _, err := dec.Token(); err != nil { ++ return err ++ } ++ return nil ++} ++ + // Specific JSON pointer encoding here + // ~0 => ~ + // ~1 => / +@@ -377,14 +518,14 @@ const ( + + // Unescape unescapes a json pointer reference token string to the original representation + func Unescape(token string) string { +- step1 := strings.Replace(token, encRefTok1, decRefTok1, -1) +- step2 := strings.Replace(step1, encRefTok0, decRefTok0, -1) ++ step1 := strings.ReplaceAll(token, encRefTok1, decRefTok1) ++ step2 := strings.ReplaceAll(step1, encRefTok0, decRefTok0) + return step2 + } + + // Escape escapes a pointer reference token string + func Escape(token string) string { +- step1 := strings.Replace(token, decRefTok0, encRefTok0, -1) +- step2 := strings.Replace(step1, decRefTok1, encRefTok1, -1) ++ step1 := strings.ReplaceAll(token, decRefTok0, encRefTok0) ++ step2 := strings.ReplaceAll(step1, decRefTok1, encRefTok1) + return step2 + } +diff --git a/vendor/github.com/go-openapi/swag/.gitignore b/vendor/github.com/go-openapi/swag/.gitignore +index d69b53ac..c4b1b64f 100644 +--- a/vendor/github.com/go-openapi/swag/.gitignore ++++ b/vendor/github.com/go-openapi/swag/.gitignore +@@ -2,3 +2,4 @@ secrets.yml + vendor + Godeps + .idea ++*.out +diff --git a/vendor/github.com/go-openapi/swag/.golangci.yml b/vendor/github.com/go-openapi/swag/.golangci.yml +index bf503e40..80e2be00 100644 +--- a/vendor/github.com/go-openapi/swag/.golangci.yml ++++ b/vendor/github.com/go-openapi/swag/.golangci.yml +@@ -4,14 +4,14 @@ linters-settings: + golint: + min-confidence: 0 + gocyclo: +- min-complexity: 25 ++ min-complexity: 45 + maligned: + suggest-new: true + dupl: +- threshold: 100 ++ threshold: 200 + goconst: + min-len: 3 +- min-occurrences: 2 ++ min-occurrences: 3 + + linters: + enable-all: true +@@ -20,35 +20,41 @@ linters: + - lll + - gochecknoinits + - gochecknoglobals +- - nlreturn +- - testpackage ++ - funlen ++ - godox ++ - gocognit ++ - whitespace ++ - wsl + - wrapcheck ++ - testpackage ++ - nlreturn + - gomnd +- - exhaustive + - exhaustivestruct + - goerr113 +- - wsl +- - whitespace +- - gofumpt +- - godot ++ - errorlint + - nestif +- - godox +- - funlen +- - gci +- - gocognit ++ - godot ++ - gofumpt + - paralleltest ++ - tparallel + - thelper + - ifshort +- - gomoddirectives +- - cyclop +- - forcetypeassert +- - ireturn +- - tagliatelle +- - varnamelen +- - goimports +- - tenv +- - golint + - exhaustruct +- - nilnil ++ - varnamelen ++ - gci ++ - depguard ++ - errchkjson ++ - inamedparam + - nonamedreturns ++ - musttag ++ - ireturn ++ - forcetypeassert ++ - cyclop ++ # deprecated linters ++ - deadcode ++ - interfacer ++ - scopelint ++ - varcheck ++ - structcheck ++ - golint + - nosnakecase +diff --git a/vendor/github.com/go-openapi/swag/BENCHMARK.md b/vendor/github.com/go-openapi/swag/BENCHMARK.md +new file mode 100644 +index 00000000..e7f28ed6 +--- /dev/null ++++ b/vendor/github.com/go-openapi/swag/BENCHMARK.md +@@ -0,0 +1,52 @@ ++# Benchmarks ++ ++## Name mangling utilities ++ ++```bash ++go test -bench XXX -run XXX -benchtime 30s ++``` ++ ++### Benchmarks at b3e7a5386f996177e4808f11acb2aa93a0f660df ++ ++``` ++goos: linux ++goarch: amd64 ++pkg: github.com/go-openapi/swag ++cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz ++BenchmarkToXXXName/ToGoName-4 862623 44101 ns/op 10450 B/op 732 allocs/op ++BenchmarkToXXXName/ToVarName-4 853656 40728 ns/op 10468 B/op 734 allocs/op ++BenchmarkToXXXName/ToFileName-4 1268312 27813 ns/op 9785 B/op 617 allocs/op ++BenchmarkToXXXName/ToCommandName-4 1276322 27903 ns/op 9785 B/op 617 allocs/op ++BenchmarkToXXXName/ToHumanNameLower-4 895334 40354 ns/op 10472 B/op 731 allocs/op ++BenchmarkToXXXName/ToHumanNameTitle-4 882441 40678 ns/op 10566 B/op 749 allocs/op ++``` ++ ++### Benchmarks after PR #79 ++ ++~ x10 performance improvement and ~ /100 memory allocations. ++ ++``` ++goos: linux ++goarch: amd64 ++pkg: github.com/go-openapi/swag ++cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz ++BenchmarkToXXXName/ToGoName-4 9595830 3991 ns/op 42 B/op 5 allocs/op ++BenchmarkToXXXName/ToVarName-4 9194276 3984 ns/op 62 B/op 7 allocs/op ++BenchmarkToXXXName/ToFileName-4 17002711 2123 ns/op 147 B/op 7 allocs/op ++BenchmarkToXXXName/ToCommandName-4 16772926 2111 ns/op 147 B/op 7 allocs/op ++BenchmarkToXXXName/ToHumanNameLower-4 9788331 3749 ns/op 92 B/op 6 allocs/op ++BenchmarkToXXXName/ToHumanNameTitle-4 9188260 3941 ns/op 104 B/op 6 allocs/op ++``` ++ ++``` ++goos: linux ++goarch: amd64 ++pkg: github.com/go-openapi/swag ++cpu: AMD Ryzen 7 5800X 8-Core Processor ++BenchmarkToXXXName/ToGoName-16 18527378 1972 ns/op 42 B/op 5 allocs/op ++BenchmarkToXXXName/ToVarName-16 15552692 2093 ns/op 62 B/op 7 allocs/op ++BenchmarkToXXXName/ToFileName-16 32161176 1117 ns/op 147 B/op 7 allocs/op ++BenchmarkToXXXName/ToCommandName-16 32256634 1137 ns/op 147 B/op 7 allocs/op ++BenchmarkToXXXName/ToHumanNameLower-16 18599661 1946 ns/op 92 B/op 6 allocs/op ++BenchmarkToXXXName/ToHumanNameTitle-16 17581353 2054 ns/op 105 B/op 6 allocs/op ++``` +diff --git a/vendor/github.com/go-openapi/swag/README.md b/vendor/github.com/go-openapi/swag/README.md +index 217f6fa5..a7292229 100644 +--- a/vendor/github.com/go-openapi/swag/README.md ++++ b/vendor/github.com/go-openapi/swag/README.md +@@ -1,7 +1,8 @@ +-# Swag [![Build Status](https://travis-ci.org/go-openapi/swag.svg?branch=master)](https://travis-ci.org/go-openapi/swag) [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) ++# Swag [![Build Status](https://github.com/go-openapi/swag/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/swag/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) + ++[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) + [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE) +-[![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag) ++[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/swag.svg)](https://pkg.go.dev/github.com/go-openapi/swag) + [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/swag)](https://goreportcard.com/report/github.com/go-openapi/swag) + + Contains a bunch of helper functions for go-openapi and go-swagger projects. +@@ -18,4 +19,5 @@ You may also use it standalone for your projects. + + This repo has only few dependencies outside of the standard library: + +-* YAML utilities depend on gopkg.in/yaml.v2 ++* YAML utilities depend on `gopkg.in/yaml.v3` ++* `github.com/mailru/easyjson v0.7.7` +diff --git a/vendor/github.com/go-openapi/swag/initialism_index.go b/vendor/github.com/go-openapi/swag/initialism_index.go +new file mode 100644 +index 00000000..20a359bb +--- /dev/null ++++ b/vendor/github.com/go-openapi/swag/initialism_index.go +@@ -0,0 +1,202 @@ ++// Copyright 2015 go-swagger maintainers ++// ++// Licensed under the Apache License, Version 2.0 (the "License"); ++// you may not use this file except in compliance with the License. ++// You may obtain a copy of the License at ++// ++// http://www.apache.org/licenses/LICENSE-2.0 ++// ++// Unless required by applicable law or agreed to in writing, software ++// distributed under the License is distributed on an "AS IS" BASIS, ++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++// See the License for the specific language governing permissions and ++// limitations under the License. ++ ++package swag ++ ++import ( ++ "sort" ++ "strings" ++ "sync" ++) ++ ++var ( ++ // commonInitialisms are common acronyms that are kept as whole uppercased words. ++ commonInitialisms *indexOfInitialisms ++ ++ // initialisms is a slice of sorted initialisms ++ initialisms []string ++ ++ // a copy of initialisms pre-baked as []rune ++ initialismsRunes [][]rune ++ initialismsUpperCased [][]rune ++ ++ isInitialism func(string) bool ++ ++ maxAllocMatches int ++) ++ ++func init() { ++ // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 ++ configuredInitialisms := map[string]bool{ ++ "ACL": true, ++ "API": true, ++ "ASCII": true, ++ "CPU": true, ++ "CSS": true, ++ "DNS": true, ++ "EOF": true, ++ "GUID": true, ++ "HTML": true, ++ "HTTPS": true, ++ "HTTP": true, ++ "ID": true, ++ "IP": true, ++ "IPv4": true, ++ "IPv6": true, ++ "JSON": true, ++ "LHS": true, ++ "OAI": true, ++ "QPS": true, ++ "RAM": true, ++ "RHS": true, ++ "RPC": true, ++ "SLA": true, ++ "SMTP": true, ++ "SQL": true, ++ "SSH": true, ++ "TCP": true, ++ "TLS": true, ++ "TTL": true, ++ "UDP": true, ++ "UI": true, ++ "UID": true, ++ "UUID": true, ++ "URI": true, ++ "URL": true, ++ "UTF8": true, ++ "VM": true, ++ "XML": true, ++ "XMPP": true, ++ "XSRF": true, ++ "XSS": true, ++ } ++ ++ // a thread-safe index of initialisms ++ commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) ++ initialisms = commonInitialisms.sorted() ++ initialismsRunes = asRunes(initialisms) ++ initialismsUpperCased = asUpperCased(initialisms) ++ maxAllocMatches = maxAllocHeuristic(initialismsRunes) ++ ++ // a test function ++ isInitialism = commonInitialisms.isInitialism ++} ++ ++func asRunes(in []string) [][]rune { ++ out := make([][]rune, len(in)) ++ for i, initialism := range in { ++ out[i] = []rune(initialism) ++ } ++ ++ return out ++} ++ ++func asUpperCased(in []string) [][]rune { ++ out := make([][]rune, len(in)) ++ ++ for i, initialism := range in { ++ out[i] = []rune(upper(trim(initialism))) ++ } ++ ++ return out ++} ++ ++func maxAllocHeuristic(in [][]rune) int { ++ heuristic := make(map[rune]int) ++ for _, initialism := range in { ++ heuristic[initialism[0]]++ ++ } ++ ++ var maxAlloc int ++ for _, val := range heuristic { ++ if val > maxAlloc { ++ maxAlloc = val ++ } ++ } ++ ++ return maxAlloc ++} ++ ++// AddInitialisms add additional initialisms ++func AddInitialisms(words ...string) { ++ for _, word := range words { ++ // commonInitialisms[upper(word)] = true ++ commonInitialisms.add(upper(word)) ++ } ++ // sort again ++ initialisms = commonInitialisms.sorted() ++ initialismsRunes = asRunes(initialisms) ++ initialismsUpperCased = asUpperCased(initialisms) ++} ++ ++// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. ++// Since go1.9, this may be implemented with sync.Map. ++type indexOfInitialisms struct { ++ sortMutex *sync.Mutex ++ index *sync.Map ++} ++ ++func newIndexOfInitialisms() *indexOfInitialisms { ++ return &indexOfInitialisms{ ++ sortMutex: new(sync.Mutex), ++ index: new(sync.Map), ++ } ++} ++ ++func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { ++ m.sortMutex.Lock() ++ defer m.sortMutex.Unlock() ++ for k, v := range initial { ++ m.index.Store(k, v) ++ } ++ return m ++} ++ ++func (m *indexOfInitialisms) isInitialism(key string) bool { ++ _, ok := m.index.Load(key) ++ return ok ++} ++ ++func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { ++ m.index.Store(key, true) ++ return m ++} ++ ++func (m *indexOfInitialisms) sorted() (result []string) { ++ m.sortMutex.Lock() ++ defer m.sortMutex.Unlock() ++ m.index.Range(func(key, _ interface{}) bool { ++ k := key.(string) ++ result = append(result, k) ++ return true ++ }) ++ sort.Sort(sort.Reverse(byInitialism(result))) ++ return ++} ++ ++type byInitialism []string ++ ++func (s byInitialism) Len() int { ++ return len(s) ++} ++func (s byInitialism) Swap(i, j int) { ++ s[i], s[j] = s[j], s[i] ++} ++func (s byInitialism) Less(i, j int) bool { ++ if len(s[i]) != len(s[j]) { ++ return len(s[i]) < len(s[j]) ++ } ++ ++ return strings.Compare(s[i], s[j]) > 0 ++} +diff --git a/vendor/github.com/go-openapi/swag/loading.go b/vendor/github.com/go-openapi/swag/loading.go +index 00038c37..783442fd 100644 +--- a/vendor/github.com/go-openapi/swag/loading.go ++++ b/vendor/github.com/go-openapi/swag/loading.go +@@ -21,6 +21,7 @@ import ( + "net/http" + "net/url" + "os" ++ "path" + "path/filepath" + "runtime" + "strings" +@@ -40,43 +41,97 @@ var LoadHTTPBasicAuthPassword = "" + var LoadHTTPCustomHeaders = map[string]string{} + + // LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in +-func LoadFromFileOrHTTP(path string) ([]byte, error) { +- return LoadStrategy(path, os.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(path) ++func LoadFromFileOrHTTP(pth string) ([]byte, error) { ++ return LoadStrategy(pth, os.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(pth) + } + + // LoadFromFileOrHTTPWithTimeout loads the bytes from a file or a remote http server based on the path passed in + // timeout arg allows for per request overriding of the request timeout +-func LoadFromFileOrHTTPWithTimeout(path string, timeout time.Duration) ([]byte, error) { +- return LoadStrategy(path, os.ReadFile, loadHTTPBytes(timeout))(path) ++func LoadFromFileOrHTTPWithTimeout(pth string, timeout time.Duration) ([]byte, error) { ++ return LoadStrategy(pth, os.ReadFile, loadHTTPBytes(timeout))(pth) + } + +-// LoadStrategy returns a loader function for a given path or uri +-func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(string) ([]byte, error) { +- if strings.HasPrefix(path, "http") { ++// LoadStrategy returns a loader function for a given path or URI. ++// ++// The load strategy returns the remote load for any path starting with `http`. ++// So this works for any URI with a scheme `http` or `https`. ++// ++// The fallback strategy is to call the local loader. ++// ++// The local loader takes a local file system path (absolute or relative) as argument, ++// or alternatively a `file://...` URI, **without host** (see also below for windows). ++// ++// There are a few liberalities, initially intended to be tolerant regarding the URI syntax, ++// especially on windows. ++// ++// Before the local loader is called, the given path is transformed: ++// - percent-encoded characters are unescaped ++// - simple paths (e.g. `./folder/file`) are passed as-is ++// - on windows, occurrences of `/` are replaced by `\`, so providing a relative path such a `folder/file` works too. ++// ++// For paths provided as URIs with the "file" scheme, please note that: ++// - `file://` is simply stripped. ++// This means that the host part of the URI is not parsed at all. ++// For example, `file:///folder/file" becomes "/folder/file`, ++// but `file://localhost/folder/file` becomes `localhost/folder/file` on unix systems. ++// Similarly, `file://./folder/file` yields `./folder/file`. ++// - on windows, `file://...` can take a host so as to specify an UNC share location. ++// ++// Reminder about windows-specifics: ++// - `file://host/folder/file` becomes an UNC path like `\\host\folder\file` (no port specification is supported) ++// - `file:///c:/folder/file` becomes `C:\folder\file` ++// - `file://c:/folder/file` is tolerated (without leading `/`) and becomes `c:\folder\file` ++func LoadStrategy(pth string, local, remote func(string) ([]byte, error)) func(string) ([]byte, error) { ++ if strings.HasPrefix(pth, "http") { + return remote + } +- return func(pth string) ([]byte, error) { +- upth, err := pathUnescape(pth) ++ ++ return func(p string) ([]byte, error) { ++ upth, err := url.PathUnescape(p) + if err != nil { + return nil, err + } + +- if strings.HasPrefix(pth, `file://`) { +- if runtime.GOOS == "windows" { +- // support for canonical file URIs on windows. +- // Zero tolerance here for dodgy URIs. +- u, _ := url.Parse(upth) +- if u.Host != "" { +- // assume UNC name (volume share) +- // file://host/share/folder\... ==> \\host\share\path\folder +- // NOTE: UNC port not yet supported +- upth = strings.Join([]string{`\`, u.Host, u.Path}, `\`) +- } else { +- // file:///c:/folder/... ==> just remove the leading slash +- upth = strings.TrimPrefix(upth, `file:///`) +- } +- } else { +- upth = strings.TrimPrefix(upth, `file://`) ++ if !strings.HasPrefix(p, `file://`) { ++ // regular file path provided: just normalize slashes ++ return local(filepath.FromSlash(upth)) ++ } ++ ++ if runtime.GOOS != "windows" { ++ // crude processing: this leaves full URIs with a host with a (mostly) unexpected result ++ upth = strings.TrimPrefix(upth, `file://`) ++ ++ return local(filepath.FromSlash(upth)) ++ } ++ ++ // windows-only pre-processing of file://... URIs ++ ++ // support for canonical file URIs on windows. ++ u, err := url.Parse(filepath.ToSlash(upth)) ++ if err != nil { ++ return nil, err ++ } ++ ++ if u.Host != "" { ++ // assume UNC name (volume share) ++ // NOTE: UNC port not yet supported ++ ++ // when the "host" segment is a drive letter: ++ // file://C:/folder/... => C:\folder ++ upth = path.Clean(strings.Join([]string{u.Host, u.Path}, `/`)) ++ if !strings.HasSuffix(u.Host, ":") && u.Host[0] != '.' { ++ // tolerance: if we have a leading dot, this can't be a host ++ // file://host/share/folder\... ==> \\host\share\path\folder ++ upth = "//" + upth ++ } ++ } else { ++ // no host, let's figure out if this is a drive letter ++ upth = strings.TrimPrefix(upth, `file://`) ++ first, _, _ := strings.Cut(strings.TrimPrefix(u.Path, "/"), "/") ++ if strings.HasSuffix(first, ":") { ++ // drive letter in the first segment: ++ // file:///c:/folder/... ==> strip the leading slash ++ upth = strings.TrimPrefix(upth, `/`) + } + } + +diff --git a/vendor/github.com/go-openapi/swag/name_lexem.go b/vendor/github.com/go-openapi/swag/name_lexem.go +index aa7f6a9b..8bb64ac3 100644 +--- a/vendor/github.com/go-openapi/swag/name_lexem.go ++++ b/vendor/github.com/go-openapi/swag/name_lexem.go +@@ -14,74 +14,80 @@ + + package swag + +-import "unicode" ++import ( ++ "unicode" ++ "unicode/utf8" ++) + + type ( +- nameLexem interface { +- GetUnsafeGoName() string +- GetOriginal() string +- IsInitialism() bool +- } ++ lexemKind uint8 + +- initialismNameLexem struct { ++ nameLexem struct { + original string + matchedInitialism string ++ kind lexemKind + } ++) + +- casualNameLexem struct { +- original string +- } ++const ( ++ lexemKindCasualName lexemKind = iota ++ lexemKindInitialismName + ) + +-func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem { +- return &initialismNameLexem{ ++func newInitialismNameLexem(original, matchedInitialism string) nameLexem { ++ return nameLexem{ ++ kind: lexemKindInitialismName, + original: original, + matchedInitialism: matchedInitialism, + } + } + +-func newCasualNameLexem(original string) *casualNameLexem { +- return &casualNameLexem{ ++func newCasualNameLexem(original string) nameLexem { ++ return nameLexem{ ++ kind: lexemKindCasualName, + original: original, + } + } + +-func (l *initialismNameLexem) GetUnsafeGoName() string { +- return l.matchedInitialism +-} ++func (l nameLexem) GetUnsafeGoName() string { ++ if l.kind == lexemKindInitialismName { ++ return l.matchedInitialism ++ } ++ ++ var ( ++ first rune ++ rest string ++ ) + +-func (l *casualNameLexem) GetUnsafeGoName() string { +- var first rune +- var rest string + for i, orig := range l.original { + if i == 0 { + first = orig + continue + } ++ + if i > 0 { + rest = l.original[i:] + break + } + } ++ + if len(l.original) > 1 { +- return string(unicode.ToUpper(first)) + lower(rest) ++ b := poolOfBuffers.BorrowBuffer(utf8.UTFMax + len(rest)) ++ defer func() { ++ poolOfBuffers.RedeemBuffer(b) ++ }() ++ b.WriteRune(unicode.ToUpper(first)) ++ b.WriteString(lower(rest)) ++ return b.String() + } + + return l.original + } + +-func (l *initialismNameLexem) GetOriginal() string { ++func (l nameLexem) GetOriginal() string { + return l.original + } + +-func (l *casualNameLexem) GetOriginal() string { +- return l.original +-} +- +-func (l *initialismNameLexem) IsInitialism() bool { +- return true +-} +- +-func (l *casualNameLexem) IsInitialism() bool { +- return false ++func (l nameLexem) IsInitialism() bool { ++ return l.kind == lexemKindInitialismName + } +diff --git a/vendor/github.com/go-openapi/swag/post_go18.go b/vendor/github.com/go-openapi/swag/post_go18.go +deleted file mode 100644 +index f5228b82..00000000 +--- a/vendor/github.com/go-openapi/swag/post_go18.go ++++ /dev/null +@@ -1,24 +0,0 @@ +-// Copyright 2015 go-swagger maintainers +-// +-// Licensed under the Apache License, Version 2.0 (the "License"); +-// you may not use this file except in compliance with the License. +-// You may obtain a copy of the License at +-// +-// http://www.apache.org/licenses/LICENSE-2.0 +-// +-// Unless required by applicable law or agreed to in writing, software +-// distributed under the License is distributed on an "AS IS" BASIS, +-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-// See the License for the specific language governing permissions and +-// limitations under the License. +- +-//go:build go1.8 +-// +build go1.8 +- +-package swag +- +-import "net/url" +- +-func pathUnescape(path string) (string, error) { +- return url.PathUnescape(path) +-} +diff --git a/vendor/github.com/go-openapi/swag/post_go19.go b/vendor/github.com/go-openapi/swag/post_go19.go +deleted file mode 100644 +index 7c7da9c0..00000000 +--- a/vendor/github.com/go-openapi/swag/post_go19.go ++++ /dev/null +@@ -1,68 +0,0 @@ +-// Copyright 2015 go-swagger maintainers +-// +-// Licensed under the Apache License, Version 2.0 (the "License"); +-// you may not use this file except in compliance with the License. +-// You may obtain a copy of the License at +-// +-// http://www.apache.org/licenses/LICENSE-2.0 +-// +-// Unless required by applicable law or agreed to in writing, software +-// distributed under the License is distributed on an "AS IS" BASIS, +-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-// See the License for the specific language governing permissions and +-// limitations under the License. +- +-//go:build go1.9 +-// +build go1.9 +- +-package swag +- +-import ( +- "sort" +- "sync" +-) +- +-// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. +-// Since go1.9, this may be implemented with sync.Map. +-type indexOfInitialisms struct { +- sortMutex *sync.Mutex +- index *sync.Map +-} +- +-func newIndexOfInitialisms() *indexOfInitialisms { +- return &indexOfInitialisms{ +- sortMutex: new(sync.Mutex), +- index: new(sync.Map), +- } +-} +- +-func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { +- m.sortMutex.Lock() +- defer m.sortMutex.Unlock() +- for k, v := range initial { +- m.index.Store(k, v) +- } +- return m +-} +- +-func (m *indexOfInitialisms) isInitialism(key string) bool { +- _, ok := m.index.Load(key) +- return ok +-} +- +-func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { +- m.index.Store(key, true) +- return m +-} +- +-func (m *indexOfInitialisms) sorted() (result []string) { +- m.sortMutex.Lock() +- defer m.sortMutex.Unlock() +- m.index.Range(func(key, value interface{}) bool { +- k := key.(string) +- result = append(result, k) +- return true +- }) +- sort.Sort(sort.Reverse(byInitialism(result))) +- return +-} +diff --git a/vendor/github.com/go-openapi/swag/pre_go18.go b/vendor/github.com/go-openapi/swag/pre_go18.go +deleted file mode 100644 +index 2757d9b9..00000000 +--- a/vendor/github.com/go-openapi/swag/pre_go18.go ++++ /dev/null +@@ -1,24 +0,0 @@ +-// Copyright 2015 go-swagger maintainers +-// +-// Licensed under the Apache License, Version 2.0 (the "License"); +-// you may not use this file except in compliance with the License. +-// You may obtain a copy of the License at +-// +-// http://www.apache.org/licenses/LICENSE-2.0 +-// +-// Unless required by applicable law or agreed to in writing, software +-// distributed under the License is distributed on an "AS IS" BASIS, +-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-// See the License for the specific language governing permissions and +-// limitations under the License. +- +-//go:build !go1.8 +-// +build !go1.8 +- +-package swag +- +-import "net/url" +- +-func pathUnescape(path string) (string, error) { +- return url.QueryUnescape(path) +-} +diff --git a/vendor/github.com/go-openapi/swag/pre_go19.go b/vendor/github.com/go-openapi/swag/pre_go19.go +deleted file mode 100644 +index 0565db37..00000000 +--- a/vendor/github.com/go-openapi/swag/pre_go19.go ++++ /dev/null +@@ -1,70 +0,0 @@ +-// Copyright 2015 go-swagger maintainers +-// +-// Licensed under the Apache License, Version 2.0 (the "License"); +-// you may not use this file except in compliance with the License. +-// You may obtain a copy of the License at +-// +-// http://www.apache.org/licenses/LICENSE-2.0 +-// +-// Unless required by applicable law or agreed to in writing, software +-// distributed under the License is distributed on an "AS IS" BASIS, +-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-// See the License for the specific language governing permissions and +-// limitations under the License. +- +-//go:build !go1.9 +-// +build !go1.9 +- +-package swag +- +-import ( +- "sort" +- "sync" +-) +- +-// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. +-// Before go1.9, this may be implemented with a mutex on the map. +-type indexOfInitialisms struct { +- getMutex *sync.Mutex +- index map[string]bool +-} +- +-func newIndexOfInitialisms() *indexOfInitialisms { +- return &indexOfInitialisms{ +- getMutex: new(sync.Mutex), +- index: make(map[string]bool, 50), +- } +-} +- +-func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { +- m.getMutex.Lock() +- defer m.getMutex.Unlock() +- for k, v := range initial { +- m.index[k] = v +- } +- return m +-} +- +-func (m *indexOfInitialisms) isInitialism(key string) bool { +- m.getMutex.Lock() +- defer m.getMutex.Unlock() +- _, ok := m.index[key] +- return ok +-} +- +-func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { +- m.getMutex.Lock() +- defer m.getMutex.Unlock() +- m.index[key] = true +- return m +-} +- +-func (m *indexOfInitialisms) sorted() (result []string) { +- m.getMutex.Lock() +- defer m.getMutex.Unlock() +- for k := range m.index { +- result = append(result, k) +- } +- sort.Sort(sort.Reverse(byInitialism(result))) +- return +-} +diff --git a/vendor/github.com/go-openapi/swag/split.go b/vendor/github.com/go-openapi/swag/split.go +index a1825fb7..274727a8 100644 +--- a/vendor/github.com/go-openapi/swag/split.go ++++ b/vendor/github.com/go-openapi/swag/split.go +@@ -15,124 +15,269 @@ + package swag + + import ( ++ "bytes" ++ "sync" + "unicode" ++ "unicode/utf8" + ) + +-var nameReplaceTable = map[rune]string{ +- '@': "At ", +- '&': "And ", +- '|': "Pipe ", +- '$': "Dollar ", +- '!': "Bang ", +- '-': "", +- '_': "", +-} +- + type ( + splitter struct { +- postSplitInitialismCheck bool + initialisms []string ++ initialismsRunes [][]rune ++ initialismsUpperCased [][]rune // initialisms cached in their trimmed, upper-cased version ++ postSplitInitialismCheck bool ++ } ++ ++ splitterOption func(*splitter) ++ ++ initialismMatch struct { ++ body []rune ++ start, end int ++ complete bool ++ } ++ initialismMatches []initialismMatch ++) ++ ++type ( ++ // memory pools of temporary objects. ++ // ++ // These are used to recycle temporarily allocated objects ++ // and relieve the GC from undue pressure. ++ ++ matchesPool struct { ++ *sync.Pool + } + +- splitterOption func(*splitter) *splitter ++ buffersPool struct { ++ *sync.Pool ++ } ++ ++ lexemsPool struct { ++ *sync.Pool ++ } ++ ++ splittersPool struct { ++ *sync.Pool ++ } + ) + +-// split calls the splitter; splitter provides more control and post options ++var ( ++ // poolOfMatches holds temporary slices for recycling during the initialism match process ++ poolOfMatches = matchesPool{ ++ Pool: &sync.Pool{ ++ New: func() any { ++ s := make(initialismMatches, 0, maxAllocMatches) ++ ++ return &s ++ }, ++ }, ++ } ++ ++ poolOfBuffers = buffersPool{ ++ Pool: &sync.Pool{ ++ New: func() any { ++ return new(bytes.Buffer) ++ }, ++ }, ++ } ++ ++ poolOfLexems = lexemsPool{ ++ Pool: &sync.Pool{ ++ New: func() any { ++ s := make([]nameLexem, 0, maxAllocMatches) ++ ++ return &s ++ }, ++ }, ++ } ++ ++ poolOfSplitters = splittersPool{ ++ Pool: &sync.Pool{ ++ New: func() any { ++ s := newSplitter() ++ ++ return &s ++ }, ++ }, ++ } ++) ++ ++// nameReplaceTable finds a word representation for special characters. ++func nameReplaceTable(r rune) (string, bool) { ++ switch r { ++ case '@': ++ return "At ", true ++ case '&': ++ return "And ", true ++ case '|': ++ return "Pipe ", true ++ case '$': ++ return "Dollar ", true ++ case '!': ++ return "Bang ", true ++ case '-': ++ return "", true ++ case '_': ++ return "", true ++ default: ++ return "", false ++ } ++} ++ ++// split calls the splitter. ++// ++// Use newSplitter for more control and options + func split(str string) []string { +- lexems := newSplitter().split(str) +- result := make([]string, 0, len(lexems)) ++ s := poolOfSplitters.BorrowSplitter() ++ lexems := s.split(str) ++ result := make([]string, 0, len(*lexems)) + +- for _, lexem := range lexems { ++ for _, lexem := range *lexems { + result = append(result, lexem.GetOriginal()) + } ++ poolOfLexems.RedeemLexems(lexems) ++ poolOfSplitters.RedeemSplitter(s) + + return result + + } + +-func (s *splitter) split(str string) []nameLexem { +- return s.toNameLexems(str) +-} +- +-func newSplitter(options ...splitterOption) *splitter { +- splitter := &splitter{ ++func newSplitter(options ...splitterOption) splitter { ++ s := splitter{ + postSplitInitialismCheck: false, + initialisms: initialisms, ++ initialismsRunes: initialismsRunes, ++ initialismsUpperCased: initialismsUpperCased, + } + + for _, option := range options { +- splitter = option(splitter) ++ option(&s) + } + +- return splitter ++ return s + } + + // withPostSplitInitialismCheck allows to catch initialisms after main split process +-func withPostSplitInitialismCheck(s *splitter) *splitter { ++func withPostSplitInitialismCheck(s *splitter) { + s.postSplitInitialismCheck = true ++} ++ ++func (p matchesPool) BorrowMatches() *initialismMatches { ++ s := p.Get().(*initialismMatches) ++ *s = (*s)[:0] // reset slice, keep allocated capacity ++ + return s + } + +-type ( +- initialismMatch struct { +- start, end int +- body []rune +- complete bool ++func (p buffersPool) BorrowBuffer(size int) *bytes.Buffer { ++ s := p.Get().(*bytes.Buffer) ++ s.Reset() ++ ++ if s.Cap() < size { ++ s.Grow(size) + } +- initialismMatches []*initialismMatch +-) + +-func (s *splitter) toNameLexems(name string) []nameLexem { ++ return s ++} ++ ++func (p lexemsPool) BorrowLexems() *[]nameLexem { ++ s := p.Get().(*[]nameLexem) ++ *s = (*s)[:0] // reset slice, keep allocated capacity ++ ++ return s ++} ++ ++func (p splittersPool) BorrowSplitter(options ...splitterOption) *splitter { ++ s := p.Get().(*splitter) ++ s.postSplitInitialismCheck = false // reset options ++ for _, apply := range options { ++ apply(s) ++ } ++ ++ return s ++} ++ ++func (p matchesPool) RedeemMatches(s *initialismMatches) { ++ p.Put(s) ++} ++ ++func (p buffersPool) RedeemBuffer(s *bytes.Buffer) { ++ p.Put(s) ++} ++ ++func (p lexemsPool) RedeemLexems(s *[]nameLexem) { ++ p.Put(s) ++} ++ ++func (p splittersPool) RedeemSplitter(s *splitter) { ++ p.Put(s) ++} ++ ++func (m initialismMatch) isZero() bool { ++ return m.start == 0 && m.end == 0 ++} ++ ++func (s splitter) split(name string) *[]nameLexem { + nameRunes := []rune(name) + matches := s.gatherInitialismMatches(nameRunes) ++ if matches == nil { ++ return poolOfLexems.BorrowLexems() ++ } ++ + return s.mapMatchesToNameLexems(nameRunes, matches) + } + +-func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { +- matches := make(initialismMatches, 0) ++func (s splitter) gatherInitialismMatches(nameRunes []rune) *initialismMatches { ++ var matches *initialismMatches + + for currentRunePosition, currentRune := range nameRunes { +- newMatches := make(initialismMatches, 0, len(matches)) ++ // recycle these allocations as we loop over runes ++ // with such recycling, only 2 slices should be allocated per call ++ // instead of o(n). ++ newMatches := poolOfMatches.BorrowMatches() + + // check current initialism matches +- for _, match := range matches { +- if keepCompleteMatch := match.complete; keepCompleteMatch { +- newMatches = append(newMatches, match) +- continue +- } ++ if matches != nil { // skip first iteration ++ for _, match := range *matches { ++ if keepCompleteMatch := match.complete; keepCompleteMatch { ++ *newMatches = append(*newMatches, match) ++ continue ++ } + +- // drop failed match +- currentMatchRune := match.body[currentRunePosition-match.start] +- if !s.initialismRuneEqual(currentMatchRune, currentRune) { +- continue +- } ++ // drop failed match ++ currentMatchRune := match.body[currentRunePosition-match.start] ++ if currentMatchRune != currentRune { ++ continue ++ } + +- // try to complete ongoing match +- if currentRunePosition-match.start == len(match.body)-1 { +- // we are close; the next step is to check the symbol ahead +- // if it is a small letter, then it is not the end of match +- // but beginning of the next word +- +- if currentRunePosition < len(nameRunes)-1 { +- nextRune := nameRunes[currentRunePosition+1] +- if newWord := unicode.IsLower(nextRune); newWord { +- // oh ok, it was the start of a new word +- continue ++ // try to complete ongoing match ++ if currentRunePosition-match.start == len(match.body)-1 { ++ // we are close; the next step is to check the symbol ahead ++ // if it is a small letter, then it is not the end of match ++ // but beginning of the next word ++ ++ if currentRunePosition < len(nameRunes)-1 { ++ nextRune := nameRunes[currentRunePosition+1] ++ if newWord := unicode.IsLower(nextRune); newWord { ++ // oh ok, it was the start of a new word ++ continue ++ } + } ++ ++ match.complete = true ++ match.end = currentRunePosition + } + +- match.complete = true +- match.end = currentRunePosition ++ *newMatches = append(*newMatches, match) + } +- +- newMatches = append(newMatches, match) + } + + // check for new initialism matches +- for _, initialism := range s.initialisms { +- initialismRunes := []rune(initialism) +- if s.initialismRuneEqual(initialismRunes[0], currentRune) { +- newMatches = append(newMatches, &initialismMatch{ ++ for i := range s.initialisms { ++ initialismRunes := s.initialismsRunes[i] ++ if initialismRunes[0] == currentRune { ++ *newMatches = append(*newMatches, initialismMatch{ + start: currentRunePosition, + body: initialismRunes, + complete: false, +@@ -140,24 +285,28 @@ func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { + } + } + ++ if matches != nil { ++ poolOfMatches.RedeemMatches(matches) ++ } + matches = newMatches + } + ++ // up to the caller to redeem this last slice + return matches + } + +-func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMatches) []nameLexem { +- nameLexems := make([]nameLexem, 0) ++func (s splitter) mapMatchesToNameLexems(nameRunes []rune, matches *initialismMatches) *[]nameLexem { ++ nameLexems := poolOfLexems.BorrowLexems() + +- var lastAcceptedMatch *initialismMatch +- for _, match := range matches { ++ var lastAcceptedMatch initialismMatch ++ for _, match := range *matches { + if !match.complete { + continue + } + +- if firstMatch := lastAcceptedMatch == nil; firstMatch { +- nameLexems = append(nameLexems, s.breakCasualString(nameRunes[:match.start])...) +- nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) ++ if firstMatch := lastAcceptedMatch.isZero(); firstMatch { ++ s.appendBrokenDownCasualString(nameLexems, nameRunes[:match.start]) ++ *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) + + lastAcceptedMatch = match + +@@ -169,63 +318,66 @@ func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMa + } + + middle := nameRunes[lastAcceptedMatch.end+1 : match.start] +- nameLexems = append(nameLexems, s.breakCasualString(middle)...) +- nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) ++ s.appendBrokenDownCasualString(nameLexems, middle) ++ *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) + + lastAcceptedMatch = match + } + + // we have not found any accepted matches +- if lastAcceptedMatch == nil { +- return s.breakCasualString(nameRunes) +- } +- +- if lastAcceptedMatch.end+1 != len(nameRunes) { ++ if lastAcceptedMatch.isZero() { ++ *nameLexems = (*nameLexems)[:0] ++ s.appendBrokenDownCasualString(nameLexems, nameRunes) ++ } else if lastAcceptedMatch.end+1 != len(nameRunes) { + rest := nameRunes[lastAcceptedMatch.end+1:] +- nameLexems = append(nameLexems, s.breakCasualString(rest)...) ++ s.appendBrokenDownCasualString(nameLexems, rest) + } + +- return nameLexems +-} ++ poolOfMatches.RedeemMatches(matches) + +-func (s *splitter) initialismRuneEqual(a, b rune) bool { +- return a == b ++ return nameLexems + } + +-func (s *splitter) breakInitialism(original string) nameLexem { ++func (s splitter) breakInitialism(original string) nameLexem { + return newInitialismNameLexem(original, original) + } + +-func (s *splitter) breakCasualString(str []rune) []nameLexem { +- segments := make([]nameLexem, 0) +- currentSegment := "" ++func (s splitter) appendBrokenDownCasualString(segments *[]nameLexem, str []rune) { ++ currentSegment := poolOfBuffers.BorrowBuffer(len(str)) // unlike strings.Builder, bytes.Buffer initial storage can reused ++ defer func() { ++ poolOfBuffers.RedeemBuffer(currentSegment) ++ }() + + addCasualNameLexem := func(original string) { +- segments = append(segments, newCasualNameLexem(original)) ++ *segments = append(*segments, newCasualNameLexem(original)) + } + + addInitialismNameLexem := func(original, match string) { +- segments = append(segments, newInitialismNameLexem(original, match)) ++ *segments = append(*segments, newInitialismNameLexem(original, match)) + } + +- addNameLexem := func(original string) { +- if s.postSplitInitialismCheck { +- for _, initialism := range s.initialisms { +- if upper(initialism) == upper(original) { +- addInitialismNameLexem(original, initialism) ++ var addNameLexem func(string) ++ if s.postSplitInitialismCheck { ++ addNameLexem = func(original string) { ++ for i := range s.initialisms { ++ if isEqualFoldIgnoreSpace(s.initialismsUpperCased[i], original) { ++ addInitialismNameLexem(original, s.initialisms[i]) ++ + return + } + } +- } + +- addCasualNameLexem(original) ++ addCasualNameLexem(original) ++ } ++ } else { ++ addNameLexem = addCasualNameLexem + } + +- for _, rn := range string(str) { +- if replace, found := nameReplaceTable[rn]; found { +- if currentSegment != "" { +- addNameLexem(currentSegment) +- currentSegment = "" ++ for _, rn := range str { ++ if replace, found := nameReplaceTable(rn); found { ++ if currentSegment.Len() > 0 { ++ addNameLexem(currentSegment.String()) ++ currentSegment.Reset() + } + + if replace != "" { +@@ -236,27 +388,121 @@ func (s *splitter) breakCasualString(str []rune) []nameLexem { + } + + if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) { +- if currentSegment != "" { +- addNameLexem(currentSegment) +- currentSegment = "" ++ if currentSegment.Len() > 0 { ++ addNameLexem(currentSegment.String()) ++ currentSegment.Reset() + } + + continue + } + + if unicode.IsUpper(rn) { +- if currentSegment != "" { +- addNameLexem(currentSegment) ++ if currentSegment.Len() > 0 { ++ addNameLexem(currentSegment.String()) + } +- currentSegment = "" ++ currentSegment.Reset() + } + +- currentSegment += string(rn) ++ currentSegment.WriteRune(rn) ++ } ++ ++ if currentSegment.Len() > 0 { ++ addNameLexem(currentSegment.String()) + } ++} ++ ++// isEqualFoldIgnoreSpace is the same as strings.EqualFold, but ++// it ignores leading and trailing blank spaces in the compared ++// string. ++// ++// base is assumed to be composed of upper-cased runes, and be already ++// trimmed. ++// ++// This code is heavily inspired from strings.EqualFold. ++func isEqualFoldIgnoreSpace(base []rune, str string) bool { ++ var i, baseIndex int ++ // equivalent to b := []byte(str), but without data copy ++ b := hackStringBytes(str) ++ ++ for i < len(b) { ++ if c := b[i]; c < utf8.RuneSelf { ++ // fast path for ASCII ++ if c != ' ' && c != '\t' { ++ break ++ } ++ i++ ++ ++ continue ++ } ++ ++ // unicode case ++ r, size := utf8.DecodeRune(b[i:]) ++ if !unicode.IsSpace(r) { ++ break ++ } ++ i += size ++ } ++ ++ if i >= len(b) { ++ return len(base) == 0 ++ } ++ ++ for _, baseRune := range base { ++ if i >= len(b) { ++ break ++ } ++ ++ if c := b[i]; c < utf8.RuneSelf { ++ // single byte rune case (ASCII) ++ if baseRune >= utf8.RuneSelf { ++ return false ++ } ++ ++ baseChar := byte(baseRune) ++ if c != baseChar && ++ !('a' <= c && c <= 'z' && c-'a'+'A' == baseChar) { ++ return false ++ } ++ ++ baseIndex++ ++ i++ ++ ++ continue ++ } ++ ++ // unicode case ++ r, size := utf8.DecodeRune(b[i:]) ++ if unicode.ToUpper(r) != baseRune { ++ return false ++ } ++ baseIndex++ ++ i += size ++ } ++ ++ if baseIndex != len(base) { ++ return false ++ } ++ ++ // all passed: now we should only have blanks ++ for i < len(b) { ++ if c := b[i]; c < utf8.RuneSelf { ++ // fast path for ASCII ++ if c != ' ' && c != '\t' { ++ return false ++ } ++ i++ ++ ++ continue ++ } ++ ++ // unicode case ++ r, size := utf8.DecodeRune(b[i:]) ++ if !unicode.IsSpace(r) { ++ return false ++ } + +- if currentSegment != "" { +- addNameLexem(currentSegment) ++ i += size + } + +- return segments ++ return true + } +diff --git a/vendor/github.com/go-openapi/swag/string_bytes.go b/vendor/github.com/go-openapi/swag/string_bytes.go +new file mode 100644 +index 00000000..90745d5c +--- /dev/null ++++ b/vendor/github.com/go-openapi/swag/string_bytes.go +@@ -0,0 +1,8 @@ ++package swag ++ ++import "unsafe" ++ ++// hackStringBytes returns the (unsafe) underlying bytes slice of a string. ++func hackStringBytes(str string) []byte { ++ return unsafe.Slice(unsafe.StringData(str), len(str)) ++} +diff --git a/vendor/github.com/go-openapi/swag/util.go b/vendor/github.com/go-openapi/swag/util.go +index f78ab684..5051401c 100644 +--- a/vendor/github.com/go-openapi/swag/util.go ++++ b/vendor/github.com/go-openapi/swag/util.go +@@ -18,76 +18,25 @@ import ( + "reflect" + "strings" + "unicode" ++ "unicode/utf8" + ) + +-// commonInitialisms are common acronyms that are kept as whole uppercased words. +-var commonInitialisms *indexOfInitialisms +- +-// initialisms is a slice of sorted initialisms +-var initialisms []string +- +-var isInitialism func(string) bool +- + // GoNamePrefixFunc sets an optional rule to prefix go names + // which do not start with a letter. + // ++// The prefix function is assumed to return a string that starts with an upper case letter. ++// + // e.g. to help convert "123" into "{prefix}123" + // + // The default is to prefix with "X" + var GoNamePrefixFunc func(string) string + +-func init() { +- // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 +- var configuredInitialisms = map[string]bool{ +- "ACL": true, +- "API": true, +- "ASCII": true, +- "CPU": true, +- "CSS": true, +- "DNS": true, +- "EOF": true, +- "GUID": true, +- "HTML": true, +- "HTTPS": true, +- "HTTP": true, +- "ID": true, +- "IP": true, +- "IPv4": true, +- "IPv6": true, +- "JSON": true, +- "LHS": true, +- "OAI": true, +- "QPS": true, +- "RAM": true, +- "RHS": true, +- "RPC": true, +- "SLA": true, +- "SMTP": true, +- "SQL": true, +- "SSH": true, +- "TCP": true, +- "TLS": true, +- "TTL": true, +- "UDP": true, +- "UI": true, +- "UID": true, +- "UUID": true, +- "URI": true, +- "URL": true, +- "UTF8": true, +- "VM": true, +- "XML": true, +- "XMPP": true, +- "XSRF": true, +- "XSS": true, ++func prefixFunc(name, in string) string { ++ if GoNamePrefixFunc == nil { ++ return "X" + in + } + +- // a thread-safe index of initialisms +- commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) +- initialisms = commonInitialisms.sorted() +- +- // a test function +- isInitialism = commonInitialisms.isInitialism ++ return GoNamePrefixFunc(name) + in + } + + const ( +@@ -156,25 +105,9 @@ func SplitByFormat(data, format string) []string { + return result + } + +-type byInitialism []string +- +-func (s byInitialism) Len() int { +- return len(s) +-} +-func (s byInitialism) Swap(i, j int) { +- s[i], s[j] = s[j], s[i] +-} +-func (s byInitialism) Less(i, j int) bool { +- if len(s[i]) != len(s[j]) { +- return len(s[i]) < len(s[j]) +- } +- +- return strings.Compare(s[i], s[j]) > 0 +-} +- + // Removes leading whitespaces + func trim(str string) string { +- return strings.Trim(str, " ") ++ return strings.TrimSpace(str) + } + + // Shortcut to strings.ToUpper() +@@ -188,15 +121,20 @@ func lower(str string) string { + } + + // Camelize an uppercased word +-func Camelize(word string) (camelized string) { ++func Camelize(word string) string { ++ camelized := poolOfBuffers.BorrowBuffer(len(word)) ++ defer func() { ++ poolOfBuffers.RedeemBuffer(camelized) ++ }() ++ + for pos, ru := range []rune(word) { + if pos > 0 { +- camelized += string(unicode.ToLower(ru)) ++ camelized.WriteRune(unicode.ToLower(ru)) + } else { +- camelized += string(unicode.ToUpper(ru)) ++ camelized.WriteRune(unicode.ToUpper(ru)) + } + } +- return ++ return camelized.String() + } + + // ToFileName lowercases and underscores a go type name +@@ -224,33 +162,40 @@ func ToCommandName(name string) string { + + // ToHumanNameLower represents a code name as a human series of words + func ToHumanNameLower(name string) string { +- in := newSplitter(withPostSplitInitialismCheck).split(name) +- out := make([]string, 0, len(in)) ++ s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) ++ in := s.split(name) ++ poolOfSplitters.RedeemSplitter(s) ++ out := make([]string, 0, len(*in)) + +- for _, w := range in { ++ for _, w := range *in { + if !w.IsInitialism() { + out = append(out, lower(w.GetOriginal())) + } else { +- out = append(out, w.GetOriginal()) ++ out = append(out, trim(w.GetOriginal())) + } + } ++ poolOfLexems.RedeemLexems(in) + + return strings.Join(out, " ") + } + + // ToHumanNameTitle represents a code name as a human series of words with the first letters titleized + func ToHumanNameTitle(name string) string { +- in := newSplitter(withPostSplitInitialismCheck).split(name) ++ s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) ++ in := s.split(name) ++ poolOfSplitters.RedeemSplitter(s) + +- out := make([]string, 0, len(in)) +- for _, w := range in { +- original := w.GetOriginal() ++ out := make([]string, 0, len(*in)) ++ for _, w := range *in { ++ original := trim(w.GetOriginal()) + if !w.IsInitialism() { + out = append(out, Camelize(original)) + } else { + out = append(out, original) + } + } ++ poolOfLexems.RedeemLexems(in) ++ + return strings.Join(out, " ") + } + +@@ -264,7 +209,7 @@ func ToJSONName(name string) string { + out = append(out, lower(w)) + continue + } +- out = append(out, Camelize(w)) ++ out = append(out, Camelize(trim(w))) + } + return strings.Join(out, "") + } +@@ -283,35 +228,70 @@ func ToVarName(name string) string { + + // ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes + func ToGoName(name string) string { +- lexems := newSplitter(withPostSplitInitialismCheck).split(name) ++ s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) ++ lexems := s.split(name) ++ poolOfSplitters.RedeemSplitter(s) ++ defer func() { ++ poolOfLexems.RedeemLexems(lexems) ++ }() ++ lexemes := *lexems ++ ++ if len(lexemes) == 0 { ++ return "" ++ } ++ ++ result := poolOfBuffers.BorrowBuffer(len(name)) ++ defer func() { ++ poolOfBuffers.RedeemBuffer(result) ++ }() + +- result := "" +- for _, lexem := range lexems { ++ // check if not starting with a letter, upper case ++ firstPart := lexemes[0].GetUnsafeGoName() ++ if lexemes[0].IsInitialism() { ++ firstPart = upper(firstPart) ++ } ++ ++ if c := firstPart[0]; c < utf8.RuneSelf { ++ // ASCII ++ switch { ++ case 'A' <= c && c <= 'Z': ++ result.WriteString(firstPart) ++ case 'a' <= c && c <= 'z': ++ result.WriteByte(c - 'a' + 'A') ++ result.WriteString(firstPart[1:]) ++ default: ++ result.WriteString(prefixFunc(name, firstPart)) ++ // NOTE: no longer check if prefixFunc returns a string that starts with uppercase: ++ // assume this is always the case ++ } ++ } else { ++ // unicode ++ firstRune, _ := utf8.DecodeRuneInString(firstPart) ++ switch { ++ case !unicode.IsLetter(firstRune): ++ result.WriteString(prefixFunc(name, firstPart)) ++ case !unicode.IsUpper(firstRune): ++ result.WriteString(prefixFunc(name, firstPart)) ++ /* ++ result.WriteRune(unicode.ToUpper(firstRune)) ++ result.WriteString(firstPart[offset:]) ++ */ ++ default: ++ result.WriteString(firstPart) ++ } ++ } ++ ++ for _, lexem := range lexemes[1:] { + goName := lexem.GetUnsafeGoName() + + // to support old behavior + if lexem.IsInitialism() { + goName = upper(goName) + } +- result += goName ++ result.WriteString(goName) + } + +- if len(result) > 0 { +- // Only prefix with X when the first character isn't an ascii letter +- first := []rune(result)[0] +- if !unicode.IsLetter(first) || (first > unicode.MaxASCII && !unicode.IsUpper(first)) { +- if GoNamePrefixFunc == nil { +- return "X" + result +- } +- result = GoNamePrefixFunc(name) + result +- } +- first = []rune(result)[0] +- if unicode.IsLetter(first) && !unicode.IsUpper(first) { +- result = string(append([]rune{unicode.ToUpper(first)}, []rune(result)[1:]...)) +- } +- } +- +- return result ++ return result.String() + } + + // ContainsStrings searches a slice of strings for a case-sensitive match +@@ -341,13 +321,22 @@ type zeroable interface { + // IsZero returns true when the value passed into the function is a zero value. + // This allows for safer checking of interface values. + func IsZero(data interface{}) bool { ++ v := reflect.ValueOf(data) ++ // check for nil data ++ switch v.Kind() { //nolint:exhaustive ++ case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: ++ if v.IsNil() { ++ return true ++ } ++ } ++ + // check for things that have an IsZero method instead + if vv, ok := data.(zeroable); ok { + return vv.IsZero() + } ++ + // continue with slightly more complex reflection +- v := reflect.ValueOf(data) +- switch v.Kind() { ++ switch v.Kind() { //nolint:exhaustive + case reflect.String: + return v.Len() == 0 + case reflect.Bool: +@@ -358,24 +347,13 @@ func IsZero(data interface{}) bool { + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 +- case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: +- return v.IsNil() + case reflect.Struct, reflect.Array: + return reflect.DeepEqual(data, reflect.Zero(v.Type()).Interface()) + case reflect.Invalid: + return true ++ default: ++ return false + } +- return false +-} +- +-// AddInitialisms add additional initialisms +-func AddInitialisms(words ...string) { +- for _, word := range words { +- // commonInitialisms[upper(word)] = true +- commonInitialisms.add(upper(word)) +- } +- // sort again +- initialisms = commonInitialisms.sorted() + } + + // CommandLineOptionsGroup represents a group of user-defined command line options +diff --git a/vendor/github.com/go-openapi/swag/yaml.go b/vendor/github.com/go-openapi/swag/yaml.go +index f09ee609..f59e0259 100644 +--- a/vendor/github.com/go-openapi/swag/yaml.go ++++ b/vendor/github.com/go-openapi/swag/yaml.go +@@ -16,8 +16,11 @@ package swag + + import ( + "encoding/json" ++ "errors" + "fmt" + "path/filepath" ++ "reflect" ++ "sort" + "strconv" + + "github.com/mailru/easyjson/jlexer" +@@ -48,7 +51,7 @@ func BytesToYAMLDoc(data []byte) (interface{}, error) { + return nil, err + } + if document.Kind != yaml.DocumentNode || len(document.Content) != 1 || document.Content[0].Kind != yaml.MappingNode { +- return nil, fmt.Errorf("only YAML documents that are objects are supported") ++ return nil, errors.New("only YAML documents that are objects are supported") + } + return &document, nil + } +@@ -147,7 +150,7 @@ func yamlScalar(node *yaml.Node) (interface{}, error) { + case yamlTimestamp: + return node.Value, nil + case yamlNull: +- return nil, nil ++ return nil, nil //nolint:nilnil + default: + return nil, fmt.Errorf("YAML tag %q is not supported", node.LongTag()) + } +@@ -245,7 +248,27 @@ func (s JSONMapSlice) MarshalYAML() (interface{}, error) { + return yaml.Marshal(&n) + } + ++func isNil(input interface{}) bool { ++ if input == nil { ++ return true ++ } ++ kind := reflect.TypeOf(input).Kind() ++ switch kind { //nolint:exhaustive ++ case reflect.Ptr, reflect.Map, reflect.Slice, reflect.Chan: ++ return reflect.ValueOf(input).IsNil() ++ default: ++ return false ++ } ++} ++ + func json2yaml(item interface{}) (*yaml.Node, error) { ++ if isNil(item) { ++ return &yaml.Node{ ++ Kind: yaml.ScalarNode, ++ Value: "null", ++ }, nil ++ } ++ + switch val := item.(type) { + case JSONMapSlice: + var n yaml.Node +@@ -265,7 +288,14 @@ func json2yaml(item interface{}) (*yaml.Node, error) { + case map[string]interface{}: + var n yaml.Node + n.Kind = yaml.MappingNode +- for k, v := range val { ++ keys := make([]string, 0, len(val)) ++ for k := range val { ++ keys = append(keys, k) ++ } ++ sort.Strings(keys) ++ ++ for _, k := range keys { ++ v := val[k] + childNode, err := json2yaml(v) + if err != nil { + return nil, err +@@ -318,8 +348,9 @@ func json2yaml(item interface{}) (*yaml.Node, error) { + Tag: yamlBoolScalar, + Value: strconv.FormatBool(val), + }, nil ++ default: ++ return nil, fmt.Errorf("unhandled type: %T", val) + } +- return nil, nil + } + + // JSONMapItem represents the value of a key in a JSON object held by JSONMapSlice +diff --git a/vendor/github.com/google/pprof/profile/encode.go b/vendor/github.com/google/pprof/profile/encode.go +index 860bb304..8ce9d3cf 100644 +--- a/vendor/github.com/google/pprof/profile/encode.go ++++ b/vendor/github.com/google/pprof/profile/encode.go +@@ -122,6 +122,7 @@ func (p *Profile) preEncode() { + } + + p.defaultSampleTypeX = addString(strings, p.DefaultSampleType) ++ p.docURLX = addString(strings, p.DocURL) + + p.stringTable = make([]string, len(strings)) + for s, i := range strings { +@@ -156,6 +157,7 @@ func (p *Profile) encode(b *buffer) { + encodeInt64Opt(b, 12, p.Period) + encodeInt64s(b, 13, p.commentX) + encodeInt64(b, 14, p.defaultSampleTypeX) ++ encodeInt64Opt(b, 15, p.docURLX) + } + + var profileDecoder = []decoder{ +@@ -237,6 +239,8 @@ var profileDecoder = []decoder{ + func(b *buffer, m message) error { return decodeInt64s(b, &m.(*Profile).commentX) }, + // int64 defaultSampleType = 14 + func(b *buffer, m message) error { return decodeInt64(b, &m.(*Profile).defaultSampleTypeX) }, ++ // string doc_link = 15; ++ func(b *buffer, m message) error { return decodeInt64(b, &m.(*Profile).docURLX) }, + } + + // postDecode takes the unexported fields populated by decode (with +@@ -384,6 +388,7 @@ func (p *Profile) postDecode() error { + + p.commentX = nil + p.DefaultSampleType, err = getString(p.stringTable, &p.defaultSampleTypeX, err) ++ p.DocURL, err = getString(p.stringTable, &p.docURLX, err) + p.stringTable = nil + return err + } +diff --git a/vendor/github.com/google/pprof/profile/merge.go b/vendor/github.com/google/pprof/profile/merge.go +index eee0132e..ba4d7464 100644 +--- a/vendor/github.com/google/pprof/profile/merge.go ++++ b/vendor/github.com/google/pprof/profile/merge.go +@@ -476,6 +476,7 @@ func combineHeaders(srcs []*Profile) (*Profile, error) { + var timeNanos, durationNanos, period int64 + var comments []string + seenComments := map[string]bool{} ++ var docURL string + var defaultSampleType string + for _, s := range srcs { + if timeNanos == 0 || s.TimeNanos < timeNanos { +@@ -494,6 +495,9 @@ func combineHeaders(srcs []*Profile) (*Profile, error) { + if defaultSampleType == "" { + defaultSampleType = s.DefaultSampleType + } ++ if docURL == "" { ++ docURL = s.DocURL ++ } + } + + p := &Profile{ +@@ -509,6 +513,7 @@ func combineHeaders(srcs []*Profile) (*Profile, error) { + + Comments: comments, + DefaultSampleType: defaultSampleType, ++ DocURL: docURL, + } + copy(p.SampleType, srcs[0].SampleType) + return p, nil +diff --git a/vendor/github.com/google/pprof/profile/profile.go b/vendor/github.com/google/pprof/profile/profile.go +index 62df80a5..f47a2439 100644 +--- a/vendor/github.com/google/pprof/profile/profile.go ++++ b/vendor/github.com/google/pprof/profile/profile.go +@@ -39,6 +39,7 @@ type Profile struct { + Location []*Location + Function []*Function + Comments []string ++ DocURL string + + DropFrames string + KeepFrames string +@@ -53,6 +54,7 @@ type Profile struct { + encodeMu sync.Mutex + + commentX []int64 ++ docURLX int64 + dropFramesX int64 + keepFramesX int64 + stringTable []string +@@ -555,6 +557,9 @@ func (p *Profile) String() string { + for _, c := range p.Comments { + ss = append(ss, "Comment: "+c) + } ++ if url := p.DocURL; url != "" { ++ ss = append(ss, fmt.Sprintf("Doc: %s", url)) ++ } + if pt := p.PeriodType; pt != nil { + ss = append(ss, fmt.Sprintf("PeriodType: %s %s", pt.Type, pt.Unit)) + } +@@ -844,10 +849,10 @@ func (p *Profile) HasFileLines() bool { + + // Unsymbolizable returns true if a mapping points to a binary for which + // locations can't be symbolized in principle, at least now. Examples are +-// "[vdso]", [vsyscall]" and some others, see the code. ++// "[vdso]", "[vsyscall]" and some others, see the code. + func (m *Mapping) Unsymbolizable() bool { + name := filepath.Base(m.File) +- return strings.HasPrefix(name, "[") || strings.HasPrefix(name, "linux-vdso") || strings.HasPrefix(m.File, "/dev/dri/") ++ return strings.HasPrefix(name, "[") || strings.HasPrefix(name, "linux-vdso") || strings.HasPrefix(m.File, "/dev/dri/") || m.File == "//anon" + } + + // Copy makes a fully independent copy of a profile. +diff --git a/vendor/github.com/moby/spdystream/connection.go b/vendor/github.com/moby/spdystream/connection.go +index d906bb05..1394d0ad 100644 +--- a/vendor/github.com/moby/spdystream/connection.go ++++ b/vendor/github.com/moby/spdystream/connection.go +@@ -208,9 +208,10 @@ type Connection struct { + nextStreamId spdy.StreamId + receivedStreamId spdy.StreamId + +- pingIdLock sync.Mutex +- pingId uint32 +- pingChans map[uint32]chan error ++ // pingLock protects pingChans and pingId ++ pingLock sync.Mutex ++ pingId uint32 ++ pingChans map[uint32]chan error + + shutdownLock sync.Mutex + shutdownChan chan error +@@ -274,16 +275,20 @@ func NewConnection(conn net.Conn, server bool) (*Connection, error) { + // returns the response time + func (s *Connection) Ping() (time.Duration, error) { + pid := s.pingId +- s.pingIdLock.Lock() ++ s.pingLock.Lock() + if s.pingId > 0x7ffffffe { + s.pingId = s.pingId - 0x7ffffffe + } else { + s.pingId = s.pingId + 2 + } +- s.pingIdLock.Unlock() + pingChan := make(chan error) + s.pingChans[pid] = pingChan +- defer delete(s.pingChans, pid) ++ s.pingLock.Unlock() ++ defer func() { ++ s.pingLock.Lock() ++ delete(s.pingChans, pid) ++ s.pingLock.Unlock() ++ }() + + frame := &spdy.PingFrame{Id: pid} + startTime := time.Now() +@@ -612,10 +617,14 @@ func (s *Connection) handleDataFrame(frame *spdy.DataFrame) error { + } + + func (s *Connection) handlePingFrame(frame *spdy.PingFrame) error { +- if s.pingId&0x01 != frame.Id&0x01 { ++ s.pingLock.Lock() ++ pingId := s.pingId ++ pingChan, pingOk := s.pingChans[frame.Id] ++ s.pingLock.Unlock() ++ ++ if pingId&0x01 != frame.Id&0x01 { + return s.framer.WriteFrame(frame) + } +- pingChan, pingOk := s.pingChans[frame.Id] + if pingOk { + close(pingChan) + } +@@ -703,7 +712,9 @@ func (s *Connection) shutdown(closeTimeout time.Duration) { + + var timeout <-chan time.Time + if closeTimeout > time.Duration(0) { +- timeout = time.After(closeTimeout) ++ timer := time.NewTimer(closeTimeout) ++ defer timer.Stop() ++ timeout = timer.C + } + streamsClosed := make(chan bool) + +@@ -730,17 +741,23 @@ func (s *Connection) shutdown(closeTimeout time.Duration) { + } + + if err != nil { +- duration := 10 * time.Minute +- time.AfterFunc(duration, func() { +- select { +- case err, ok := <-s.shutdownChan: +- if ok { +- debugMessage("Unhandled close error after %s: %s", duration, err) +- } +- default: +- } +- }) +- s.shutdownChan <- err ++ // default to 1 second ++ duration := time.Second ++ // if a closeTimeout was given, use that, clipped to 1s-10m ++ if closeTimeout > time.Second { ++ duration = closeTimeout ++ } ++ if duration > 10*time.Minute { ++ duration = 10 * time.Minute ++ } ++ timer := time.NewTimer(duration) ++ defer timer.Stop() ++ select { ++ case s.shutdownChan <- err: ++ // error was handled ++ case <-timer.C: ++ debugMessage("Unhandled close error after %s: %s", duration, err) ++ } + } + close(s.shutdownChan) + } +@@ -799,7 +816,9 @@ func (s *Connection) CloseWait() error { + func (s *Connection) Wait(waitTimeout time.Duration) error { + var timeout <-chan time.Time + if waitTimeout > time.Duration(0) { +- timeout = time.After(waitTimeout) ++ timer := time.NewTimer(waitTimeout) ++ defer timer.Stop() ++ timeout = timer.C + } + + select { +diff --git a/vendor/github.com/moby/spdystream/stream.go b/vendor/github.com/moby/spdystream/stream.go +index 404e3c02..171c1e9e 100644 +--- a/vendor/github.com/moby/spdystream/stream.go ++++ b/vendor/github.com/moby/spdystream/stream.go +@@ -305,6 +305,8 @@ func (s *Stream) Identifier() uint32 { + // IsFinished returns whether the stream has finished + // sending data + func (s *Stream) IsFinished() bool { ++ s.finishLock.Lock() ++ defer s.finishLock.Unlock() + return s.finished + } + +diff --git a/vendor/github.com/mxk/go-flowrate/LICENSE b/vendor/github.com/mxk/go-flowrate/LICENSE +new file mode 100644 +index 00000000..e9f9f628 +--- /dev/null ++++ b/vendor/github.com/mxk/go-flowrate/LICENSE +@@ -0,0 +1,29 @@ ++Copyright (c) 2014 The Go-FlowRate Authors. All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without ++modification, are permitted provided that the following conditions are ++met: ++ ++ * Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ ++ * Redistributions in binary form must reproduce the above copyright ++ notice, this list of conditions and the following disclaimer in the ++ documentation and/or other materials provided with the ++ distribution. ++ ++ * Neither the name of the go-flowrate project nor the names of its ++ contributors may be used to endorse or promote products derived ++ from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +diff --git a/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go b/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go +new file mode 100644 +index 00000000..1b727721 +--- /dev/null ++++ b/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go +@@ -0,0 +1,267 @@ ++// ++// Written by Maxim Khitrov (November 2012) ++// ++ ++// Package flowrate provides the tools for monitoring and limiting the flow rate ++// of an arbitrary data stream. ++package flowrate ++ ++import ( ++ "math" ++ "sync" ++ "time" ++) ++ ++// Monitor monitors and limits the transfer rate of a data stream. ++type Monitor struct { ++ mu sync.Mutex // Mutex guarding access to all internal fields ++ active bool // Flag indicating an active transfer ++ start time.Duration // Transfer start time (clock() value) ++ bytes int64 // Total number of bytes transferred ++ samples int64 // Total number of samples taken ++ ++ rSample float64 // Most recent transfer rate sample (bytes per second) ++ rEMA float64 // Exponential moving average of rSample ++ rPeak float64 // Peak transfer rate (max of all rSamples) ++ rWindow float64 // rEMA window (seconds) ++ ++ sBytes int64 // Number of bytes transferred since sLast ++ sLast time.Duration // Most recent sample time (stop time when inactive) ++ sRate time.Duration // Sampling rate ++ ++ tBytes int64 // Number of bytes expected in the current transfer ++ tLast time.Duration // Time of the most recent transfer of at least 1 byte ++} ++ ++// New creates a new flow control monitor. Instantaneous transfer rate is ++// measured and updated for each sampleRate interval. windowSize determines the ++// weight of each sample in the exponential moving average (EMA) calculation. ++// The exact formulas are: ++// ++// sampleTime = currentTime - prevSampleTime ++// sampleRate = byteCount / sampleTime ++// weight = 1 - exp(-sampleTime/windowSize) ++// newRate = weight*sampleRate + (1-weight)*oldRate ++// ++// The default values for sampleRate and windowSize (if <= 0) are 100ms and 1s, ++// respectively. ++func New(sampleRate, windowSize time.Duration) *Monitor { ++ if sampleRate = clockRound(sampleRate); sampleRate <= 0 { ++ sampleRate = 5 * clockRate ++ } ++ if windowSize <= 0 { ++ windowSize = 1 * time.Second ++ } ++ now := clock() ++ return &Monitor{ ++ active: true, ++ start: now, ++ rWindow: windowSize.Seconds(), ++ sLast: now, ++ sRate: sampleRate, ++ tLast: now, ++ } ++} ++ ++// Update records the transfer of n bytes and returns n. It should be called ++// after each Read/Write operation, even if n is 0. ++func (m *Monitor) Update(n int) int { ++ m.mu.Lock() ++ m.update(n) ++ m.mu.Unlock() ++ return n ++} ++ ++// IO is a convenience method intended to wrap io.Reader and io.Writer method ++// execution. It calls m.Update(n) and then returns (n, err) unmodified. ++func (m *Monitor) IO(n int, err error) (int, error) { ++ return m.Update(n), err ++} ++ ++// Done marks the transfer as finished and prevents any further updates or ++// limiting. Instantaneous and current transfer rates drop to 0. Update, IO, and ++// Limit methods become NOOPs. It returns the total number of bytes transferred. ++func (m *Monitor) Done() int64 { ++ m.mu.Lock() ++ if now := m.update(0); m.sBytes > 0 { ++ m.reset(now) ++ } ++ m.active = false ++ m.tLast = 0 ++ n := m.bytes ++ m.mu.Unlock() ++ return n ++} ++ ++// timeRemLimit is the maximum Status.TimeRem value. ++const timeRemLimit = 999*time.Hour + 59*time.Minute + 59*time.Second ++ ++// Status represents the current Monitor status. All transfer rates are in bytes ++// per second rounded to the nearest byte. ++type Status struct { ++ Active bool // Flag indicating an active transfer ++ Start time.Time // Transfer start time ++ Duration time.Duration // Time period covered by the statistics ++ Idle time.Duration // Time since the last transfer of at least 1 byte ++ Bytes int64 // Total number of bytes transferred ++ Samples int64 // Total number of samples taken ++ InstRate int64 // Instantaneous transfer rate ++ CurRate int64 // Current transfer rate (EMA of InstRate) ++ AvgRate int64 // Average transfer rate (Bytes / Duration) ++ PeakRate int64 // Maximum instantaneous transfer rate ++ BytesRem int64 // Number of bytes remaining in the transfer ++ TimeRem time.Duration // Estimated time to completion ++ Progress Percent // Overall transfer progress ++} ++ ++// Status returns current transfer status information. The returned value ++// becomes static after a call to Done. ++func (m *Monitor) Status() Status { ++ m.mu.Lock() ++ now := m.update(0) ++ s := Status{ ++ Active: m.active, ++ Start: clockToTime(m.start), ++ Duration: m.sLast - m.start, ++ Idle: now - m.tLast, ++ Bytes: m.bytes, ++ Samples: m.samples, ++ PeakRate: round(m.rPeak), ++ BytesRem: m.tBytes - m.bytes, ++ Progress: percentOf(float64(m.bytes), float64(m.tBytes)), ++ } ++ if s.BytesRem < 0 { ++ s.BytesRem = 0 ++ } ++ if s.Duration > 0 { ++ rAvg := float64(s.Bytes) / s.Duration.Seconds() ++ s.AvgRate = round(rAvg) ++ if s.Active { ++ s.InstRate = round(m.rSample) ++ s.CurRate = round(m.rEMA) ++ if s.BytesRem > 0 { ++ if tRate := 0.8*m.rEMA + 0.2*rAvg; tRate > 0 { ++ ns := float64(s.BytesRem) / tRate * 1e9 ++ if ns > float64(timeRemLimit) { ++ ns = float64(timeRemLimit) ++ } ++ s.TimeRem = clockRound(time.Duration(ns)) ++ } ++ } ++ } ++ } ++ m.mu.Unlock() ++ return s ++} ++ ++// Limit restricts the instantaneous (per-sample) data flow to rate bytes per ++// second. It returns the maximum number of bytes (0 <= n <= want) that may be ++// transferred immediately without exceeding the limit. If block == true, the ++// call blocks until n > 0. want is returned unmodified if want < 1, rate < 1, ++// or the transfer is inactive (after a call to Done). ++// ++// At least one byte is always allowed to be transferred in any given sampling ++// period. Thus, if the sampling rate is 100ms, the lowest achievable flow rate ++// is 10 bytes per second. ++// ++// For usage examples, see the implementation of Reader and Writer in io.go. ++func (m *Monitor) Limit(want int, rate int64, block bool) (n int) { ++ if want < 1 || rate < 1 { ++ return want ++ } ++ m.mu.Lock() ++ ++ // Determine the maximum number of bytes that can be sent in one sample ++ limit := round(float64(rate) * m.sRate.Seconds()) ++ if limit <= 0 { ++ limit = 1 ++ } ++ ++ // If block == true, wait until m.sBytes < limit ++ if now := m.update(0); block { ++ for m.sBytes >= limit && m.active { ++ now = m.waitNextSample(now) ++ } ++ } ++ ++ // Make limit <= want (unlimited if the transfer is no longer active) ++ if limit -= m.sBytes; limit > int64(want) || !m.active { ++ limit = int64(want) ++ } ++ m.mu.Unlock() ++ ++ if limit < 0 { ++ limit = 0 ++ } ++ return int(limit) ++} ++ ++// SetTransferSize specifies the total size of the data transfer, which allows ++// the Monitor to calculate the overall progress and time to completion. ++func (m *Monitor) SetTransferSize(bytes int64) { ++ if bytes < 0 { ++ bytes = 0 ++ } ++ m.mu.Lock() ++ m.tBytes = bytes ++ m.mu.Unlock() ++} ++ ++// update accumulates the transferred byte count for the current sample until ++// clock() - m.sLast >= m.sRate. The monitor status is updated once the current ++// sample is done. ++func (m *Monitor) update(n int) (now time.Duration) { ++ if !m.active { ++ return ++ } ++ if now = clock(); n > 0 { ++ m.tLast = now ++ } ++ m.sBytes += int64(n) ++ if sTime := now - m.sLast; sTime >= m.sRate { ++ t := sTime.Seconds() ++ if m.rSample = float64(m.sBytes) / t; m.rSample > m.rPeak { ++ m.rPeak = m.rSample ++ } ++ ++ // Exponential moving average using a method similar to *nix load ++ // average calculation. Longer sampling periods carry greater weight. ++ if m.samples > 0 { ++ w := math.Exp(-t / m.rWindow) ++ m.rEMA = m.rSample + w*(m.rEMA-m.rSample) ++ } else { ++ m.rEMA = m.rSample ++ } ++ m.reset(now) ++ } ++ return ++} ++ ++// reset clears the current sample state in preparation for the next sample. ++func (m *Monitor) reset(sampleTime time.Duration) { ++ m.bytes += m.sBytes ++ m.samples++ ++ m.sBytes = 0 ++ m.sLast = sampleTime ++} ++ ++// waitNextSample sleeps for the remainder of the current sample. The lock is ++// released and reacquired during the actual sleep period, so it's possible for ++// the transfer to be inactive when this method returns. ++func (m *Monitor) waitNextSample(now time.Duration) time.Duration { ++ const minWait = 5 * time.Millisecond ++ current := m.sLast ++ ++ // sleep until the last sample time changes (ideally, just one iteration) ++ for m.sLast == current && m.active { ++ d := current + m.sRate - now ++ m.mu.Unlock() ++ if d < minWait { ++ d = minWait ++ } ++ time.Sleep(d) ++ m.mu.Lock() ++ now = m.update(0) ++ } ++ return now ++} +diff --git a/vendor/github.com/mxk/go-flowrate/flowrate/io.go b/vendor/github.com/mxk/go-flowrate/flowrate/io.go +new file mode 100644 +index 00000000..fbe09097 +--- /dev/null ++++ b/vendor/github.com/mxk/go-flowrate/flowrate/io.go +@@ -0,0 +1,133 @@ ++// ++// Written by Maxim Khitrov (November 2012) ++// ++ ++package flowrate ++ ++import ( ++ "errors" ++ "io" ++) ++ ++// ErrLimit is returned by the Writer when a non-blocking write is short due to ++// the transfer rate limit. ++var ErrLimit = errors.New("flowrate: flow rate limit exceeded") ++ ++// Limiter is implemented by the Reader and Writer to provide a consistent ++// interface for monitoring and controlling data transfer. ++type Limiter interface { ++ Done() int64 ++ Status() Status ++ SetTransferSize(bytes int64) ++ SetLimit(new int64) (old int64) ++ SetBlocking(new bool) (old bool) ++} ++ ++// Reader implements io.ReadCloser with a restriction on the rate of data ++// transfer. ++type Reader struct { ++ io.Reader // Data source ++ *Monitor // Flow control monitor ++ ++ limit int64 // Rate limit in bytes per second (unlimited when <= 0) ++ block bool // What to do when no new bytes can be read due to the limit ++} ++ ++// NewReader restricts all Read operations on r to limit bytes per second. ++func NewReader(r io.Reader, limit int64) *Reader { ++ return &Reader{r, New(0, 0), limit, true} ++} ++ ++// Read reads up to len(p) bytes into p without exceeding the current transfer ++// rate limit. It returns (0, nil) immediately if r is non-blocking and no new ++// bytes can be read at this time. ++func (r *Reader) Read(p []byte) (n int, err error) { ++ p = p[:r.Limit(len(p), r.limit, r.block)] ++ if len(p) > 0 { ++ n, err = r.IO(r.Reader.Read(p)) ++ } ++ return ++} ++ ++// SetLimit changes the transfer rate limit to new bytes per second and returns ++// the previous setting. ++func (r *Reader) SetLimit(new int64) (old int64) { ++ old, r.limit = r.limit, new ++ return ++} ++ ++// SetBlocking changes the blocking behavior and returns the previous setting. A ++// Read call on a non-blocking reader returns immediately if no additional bytes ++// may be read at this time due to the rate limit. ++func (r *Reader) SetBlocking(new bool) (old bool) { ++ old, r.block = r.block, new ++ return ++} ++ ++// Close closes the underlying reader if it implements the io.Closer interface. ++func (r *Reader) Close() error { ++ defer r.Done() ++ if c, ok := r.Reader.(io.Closer); ok { ++ return c.Close() ++ } ++ return nil ++} ++ ++// Writer implements io.WriteCloser with a restriction on the rate of data ++// transfer. ++type Writer struct { ++ io.Writer // Data destination ++ *Monitor // Flow control monitor ++ ++ limit int64 // Rate limit in bytes per second (unlimited when <= 0) ++ block bool // What to do when no new bytes can be written due to the limit ++} ++ ++// NewWriter restricts all Write operations on w to limit bytes per second. The ++// transfer rate and the default blocking behavior (true) can be changed ++// directly on the returned *Writer. ++func NewWriter(w io.Writer, limit int64) *Writer { ++ return &Writer{w, New(0, 0), limit, true} ++} ++ ++// Write writes len(p) bytes from p to the underlying data stream without ++// exceeding the current transfer rate limit. It returns (n, ErrLimit) if w is ++// non-blocking and no additional bytes can be written at this time. ++func (w *Writer) Write(p []byte) (n int, err error) { ++ var c int ++ for len(p) > 0 && err == nil { ++ s := p[:w.Limit(len(p), w.limit, w.block)] ++ if len(s) > 0 { ++ c, err = w.IO(w.Writer.Write(s)) ++ } else { ++ return n, ErrLimit ++ } ++ p = p[c:] ++ n += c ++ } ++ return ++} ++ ++// SetLimit changes the transfer rate limit to new bytes per second and returns ++// the previous setting. ++func (w *Writer) SetLimit(new int64) (old int64) { ++ old, w.limit = w.limit, new ++ return ++} ++ ++// SetBlocking changes the blocking behavior and returns the previous setting. A ++// Write call on a non-blocking writer returns as soon as no additional bytes ++// may be written at this time due to the rate limit. ++func (w *Writer) SetBlocking(new bool) (old bool) { ++ old, w.block = w.block, new ++ return ++} ++ ++// Close closes the underlying writer if it implements the io.Closer interface. ++func (w *Writer) Close() error { ++ defer w.Done() ++ if c, ok := w.Writer.(io.Closer); ok { ++ return c.Close() ++ } ++ return nil ++} +diff --git a/vendor/github.com/mxk/go-flowrate/flowrate/util.go b/vendor/github.com/mxk/go-flowrate/flowrate/util.go +new file mode 100644 +index 00000000..4caac583 +--- /dev/null ++++ b/vendor/github.com/mxk/go-flowrate/flowrate/util.go +@@ -0,0 +1,67 @@ ++// ++// Written by Maxim Khitrov (November 2012) ++// ++ ++package flowrate ++ ++import ( ++ "math" ++ "strconv" ++ "time" ++) ++ ++// clockRate is the resolution and precision of clock(). ++const clockRate = 20 * time.Millisecond ++ ++// czero is the process start time rounded down to the nearest clockRate ++// increment. ++var czero = time.Duration(time.Now().UnixNano()) / clockRate * clockRate ++ ++// clock returns a low resolution timestamp relative to the process start time. ++func clock() time.Duration { ++ return time.Duration(time.Now().UnixNano())/clockRate*clockRate - czero ++} ++ ++// clockToTime converts a clock() timestamp to an absolute time.Time value. ++func clockToTime(c time.Duration) time.Time { ++ return time.Unix(0, int64(czero+c)) ++} ++ ++// clockRound returns d rounded to the nearest clockRate increment. ++func clockRound(d time.Duration) time.Duration { ++ return (d + clockRate>>1) / clockRate * clockRate ++} ++ ++// round returns x rounded to the nearest int64 (non-negative values only). ++func round(x float64) int64 { ++ if _, frac := math.Modf(x); frac >= 0.5 { ++ return int64(math.Ceil(x)) ++ } ++ return int64(math.Floor(x)) ++} ++ ++// Percent represents a percentage in increments of 1/1000th of a percent. ++type Percent uint32 ++ ++// percentOf calculates what percent of the total is x. ++func percentOf(x, total float64) Percent { ++ if x < 0 || total <= 0 { ++ return 0 ++ } else if p := round(x / total * 1e5); p <= math.MaxUint32 { ++ return Percent(p) ++ } ++ return Percent(math.MaxUint32) ++} ++ ++func (p Percent) Float() float64 { ++ return float64(p) * 1e-3 ++} ++ ++func (p Percent) String() string { ++ var buf [12]byte ++ b := strconv.AppendUint(buf[:0], uint64(p)/1000, 10) ++ n := len(b) ++ b = strconv.AppendUint(b, 1000+uint64(p)%1000, 10) ++ b[n] = '.' ++ return string(append(b, '%')) ++} +diff --git a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md +index 0a894979..3011efb5 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md ++++ b/vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md +@@ -1,3 +1,75 @@ ++## 2.21.0 ++ ++ ++ ### Features ++ - add support for GINKGO_TIME_FORMAT [a69eb39] ++ - add GINKGO_NO_COLOR to disable colors via environment variables [bcab9c8] ++ ++ ### Fixes ++ - increase threshold in timeline matcher [e548367] ++ - Fix the document by replacing `SpecsThatWillBeRun` with `SpecsThatWillRun` ++ [c2c4d3c] ++ ++ ### Maintenance ++ - bump various dependencies [7e65a00] ++ ++## 2.20.2 ++ ++Require Go 1.22+ ++ ++### Maintenance ++- bump go to v1.22 [a671816] ++ ++## 2.20.1 ++ ++### Fixes ++- make BeSpecEvent duration matcher more forgiving [d6f9640] ++ ++## 2.20.0 ++ ++### Features ++- Add buildvcs flag [be5ab95] ++ ++### Maintenance ++- Add update-deps to makefile [d303d14] ++- bump all dependencies [7a50221] ++ ++## 2.19.1 ++ ++### Fixes ++- update supported platforms for race conditions [63c8c30] ++- [build] Allow custom name for binaries. [ff41e27] ++ ++### Maintenance ++- bump gomega [76f4e0c] ++- Bump rexml from 3.2.6 to 3.2.8 in /docs (#1417) [b69c00d] ++- Bump golang.org/x/sys from 0.20.0 to 0.21.0 (#1425) [f097741] ++ ++## 2.19.0 ++ ++### Features ++ ++[Label Sets](https://onsi.github.io/ginkgo/#label-sets) allow for more expressive and flexible label filtering. ++ ++## 2.18.0 ++ ++### Features ++- Add --slience-skips and --force-newlines [f010b65] ++- fail when no tests were run and --fail-on-empty was set [d80eebe] ++ ++### Fixes ++- Fix table entry context edge case [42013d6] ++ ++### Maintenance ++- Bump golang.org/x/tools from 0.20.0 to 0.21.0 (#1406) [fcf1fd7] ++- Bump github.com/onsi/gomega from 1.33.0 to 1.33.1 (#1399) [8bb14fd] ++- Bump golang.org/x/net from 0.24.0 to 0.25.0 (#1407) [04bfad7] ++ ++## 2.17.3 ++ ++### Fixes ++`ginkgo watch` now ignores hidden files [bde6e00] ++ + ## 2.17.2 + + ### Fixes +diff --git a/vendor/github.com/onsi/ginkgo/v2/CONTRIBUTING.md b/vendor/github.com/onsi/ginkgo/v2/CONTRIBUTING.md +index 1da92fe7..80de566a 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/CONTRIBUTING.md ++++ b/vendor/github.com/onsi/ginkgo/v2/CONTRIBUTING.md +@@ -6,8 +6,10 @@ Your contributions to Ginkgo are essential for its long-term maintenance and imp + - Ensure adequate test coverage: + - When adding to the Ginkgo library, add unit and/or integration tests (under the `integration` folder). + - When adding to the Ginkgo CLI, note that there are very few unit tests. Please add an integration test. +-- Make sure all the tests succeed via `ginkgo -r -p` +-- Vet your changes via `go vet ./...` +-- Update the documentation. Ginkgo uses `godoc` comments and documentation in `docs/index.md`. You can run `bundle exec jekyll serve` in the `docs` directory to preview your changes. ++- Run `make` or: ++ - Install ginkgo locally via `go install ./...` ++ - Make sure all the tests succeed via `ginkgo -r -p` ++ - Vet your changes via `go vet ./...` ++- Update the documentation. Ginkgo uses `godoc` comments and documentation in `docs/index.md`. You can run `bundle && bundle exec jekyll serve` in the `docs` directory to preview your changes. + +-Thanks for supporting Ginkgo! +\ No newline at end of file ++Thanks for supporting Ginkgo! +diff --git a/vendor/github.com/onsi/ginkgo/v2/Makefile b/vendor/github.com/onsi/ginkgo/v2/Makefile +new file mode 100644 +index 00000000..06dff97c +--- /dev/null ++++ b/vendor/github.com/onsi/ginkgo/v2/Makefile +@@ -0,0 +1,16 @@ ++# default task since it's first ++.PHONY: all ++all: vet test ++ ++.PHONY: test ++test: ++ go run github.com/onsi/ginkgo/v2/ginkgo -r -p -randomize-all -keep-going ++ ++.PHONY: vet ++vet: ++ go vet ./... ++ ++.PHONY: update-deps ++update-deps: ++ go get -u ./... ++ go mod tidy +\ No newline at end of file +diff --git a/vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go b/vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go +index 743555dd..4d574911 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go ++++ b/vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go +@@ -82,6 +82,10 @@ func New(colorMode ColorMode) Formatter { + return fmt.Sprintf("\x1b[38;5;%dm", colorCode) + } + ++ if _, noColor := os.LookupEnv("GINKGO_NO_COLOR"); noColor { ++ colorMode = ColorModeNone ++ } ++ + f := Formatter{ + ColorMode: colorMode, + colors: map[string]string{ +diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go +index 5db5d1a7..fd172608 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go ++++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go +@@ -2,6 +2,8 @@ package build + + import ( + "fmt" ++ "os" ++ "path" + + "github.com/onsi/ginkgo/v2/ginkgo/command" + "github.com/onsi/ginkgo/v2/ginkgo/internal" +@@ -53,7 +55,18 @@ func buildSpecs(args []string, cliConfig types.CLIConfig, goFlagsConfig types.Go + if suite.State.Is(internal.TestSuiteStateFailedToCompile) { + fmt.Println(suite.CompilationError.Error()) + } else { +- fmt.Printf("Compiled %s.test\n", suite.PackageName) ++ if len(goFlagsConfig.O) == 0 { ++ goFlagsConfig.O = path.Join(suite.Path, suite.PackageName+".test") ++ } else { ++ stat, err := os.Stat(goFlagsConfig.O) ++ if err != nil { ++ panic(err) ++ } ++ if stat.IsDir() { ++ goFlagsConfig.O += "/" + suite.PackageName + ".test" ++ } ++ } ++ fmt.Printf("Compiled %s\n", goFlagsConfig.O) + } + } + +diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go +index 86da7340..48827cc5 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go ++++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go +@@ -25,6 +25,18 @@ func CompileSuite(suite TestSuite, goFlagsConfig types.GoFlagsConfig) TestSuite + return suite + } + ++ if len(goFlagsConfig.O) > 0 { ++ userDefinedPath, err := filepath.Abs(goFlagsConfig.O) ++ if err != nil { ++ suite.State = TestSuiteStateFailedToCompile ++ suite.CompilationError = fmt.Errorf("Failed to compute compilation target path %s:\n%s", goFlagsConfig.O, err.Error()) ++ return suite ++ } ++ path = userDefinedPath ++ } ++ ++ goFlagsConfig.O = path ++ + ginkgoInvocationPath, _ := os.Getwd() + ginkgoInvocationPath, _ = filepath.Abs(ginkgoInvocationPath) + packagePath := suite.AbsPath() +@@ -34,7 +46,7 @@ func CompileSuite(suite TestSuite, goFlagsConfig types.GoFlagsConfig) TestSuite + suite.CompilationError = fmt.Errorf("Failed to get relative path from package to the current working directory:\n%s", err.Error()) + return suite + } +- args, err := types.GenerateGoTestCompileArgs(goFlagsConfig, path, "./", pathToInvocationPath) ++ args, err := types.GenerateGoTestCompileArgs(goFlagsConfig, "./", pathToInvocationPath) + if err != nil { + suite.State = TestSuiteStateFailedToCompile + suite.CompilationError = fmt.Errorf("Failed to generate go test compile flags:\n%s", err.Error()) +diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go +index 17d052bd..0e6ae1f2 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go ++++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go +@@ -4,6 +4,7 @@ import ( + "fmt" + "os" + "regexp" ++ "strings" + "time" + ) + +@@ -79,6 +80,10 @@ func (p *PackageHash) computeHashes() (codeHash string, codeModifiedTime time.Ti + continue + } + ++ if isHiddenFile(info) { ++ continue ++ } ++ + if goTestRegExp.MatchString(info.Name()) { + testHash += p.hashForFileInfo(info) + if info.ModTime().After(testModifiedTime) { +@@ -103,6 +108,10 @@ func (p *PackageHash) computeHashes() (codeHash string, codeModifiedTime time.Ti + return + } + ++func isHiddenFile(info os.FileInfo) bool { ++ return strings.HasPrefix(info.Name(), ".") || strings.HasPrefix(info.Name(), "_") ++} ++ + func (p *PackageHash) hashForFileInfo(info os.FileInfo) string { + return fmt.Sprintf("%s_%d_%d", info.Name(), info.Size(), info.ModTime().UnixNano()) + } +diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/suite.go b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go +index a994ee3d..a3c9e6bf 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/internal/suite.go ++++ b/vendor/github.com/onsi/ginkgo/v2/internal/suite.go +@@ -489,10 +489,15 @@ func (suite *Suite) runSpecs(description string, suiteLabels Labels, suitePath s + newGroup(suite).run(specs.AtIndices(groupedSpecIndices[groupedSpecIdx])) + } + +- if specs.HasAnySpecsMarkedPending() && suite.config.FailOnPending { ++ if suite.config.FailOnPending && specs.HasAnySpecsMarkedPending() { + suite.report.SpecialSuiteFailureReasons = append(suite.report.SpecialSuiteFailureReasons, "Detected pending specs and --fail-on-pending is set") + suite.report.SuiteSucceeded = false + } ++ ++ if suite.config.FailOnEmpty && specs.CountWithoutSkip() == 0 { ++ suite.report.SpecialSuiteFailureReasons = append(suite.report.SpecialSuiteFailureReasons, "Detected no specs ran and --fail-on-empty is set") ++ suite.report.SuiteSucceeded = false ++ } + } + + if ranBeforeSuite { +diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go b/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go +index 98097337..48073048 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go ++++ b/vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go +@@ -202,6 +202,11 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) { + v := r.conf.Verbosity() + inParallel := report.RunningInParallel + ++ //should we completely omit this spec? ++ if report.State.Is(types.SpecStateSkipped) && r.conf.SilenceSkips { ++ return ++ } ++ + header := r.specDenoter + if report.LeafNodeType.Is(types.NodeTypesForSuiteLevelNodes) { + header = fmt.Sprintf("[%s]", report.LeafNodeType) +@@ -278,9 +283,12 @@ func (r *DefaultReporter) DidRun(report types.SpecReport) { + } + } + +- // If we have no content to show, jsut emit the header and return ++ // If we have no content to show, just emit the header and return + if !reportHasContent { + r.emit(r.f(highlightColor + header + "{{/}}")) ++ if r.conf.ForceNewlines { ++ r.emit("\n") ++ } + return + } + +diff --git a/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go b/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go +index 2a3215b5..562e0f62 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go ++++ b/vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go +@@ -177,6 +177,7 @@ func GenerateJUnitReportWithConfig(report types.Report, dst string, config Junit + {"FocusFiles", strings.Join(report.SuiteConfig.FocusFiles, ";")}, + {"SkipFiles", strings.Join(report.SuiteConfig.SkipFiles, ";")}, + {"FailOnPending", fmt.Sprintf("%t", report.SuiteConfig.FailOnPending)}, ++ {"FailOnEmpty", fmt.Sprintf("%t", report.SuiteConfig.FailOnEmpty)}, + {"FailFast", fmt.Sprintf("%t", report.SuiteConfig.FailFast)}, + {"FlakeAttempts", fmt.Sprintf("%d", report.SuiteConfig.FlakeAttempts)}, + {"DryRun", fmt.Sprintf("%t", report.SuiteConfig.DryRun)}, +diff --git a/vendor/github.com/onsi/ginkgo/v2/table_dsl.go b/vendor/github.com/onsi/ginkgo/v2/table_dsl.go +index a3aef821..c7de7a8b 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/table_dsl.go ++++ b/vendor/github.com/onsi/ginkgo/v2/table_dsl.go +@@ -269,11 +269,15 @@ func generateTable(description string, isSubtree bool, args ...interface{}) { + internalNodeArgs = append(internalNodeArgs, entry.decorations...) + + hasContext := false +- if internalBodyType.NumIn() > 0. { ++ if internalBodyType.NumIn() > 0 { + if internalBodyType.In(0).Implements(specContextType) { + hasContext = true +- } else if internalBodyType.In(0).Implements(contextType) && (len(entry.parameters) == 0 || !reflect.TypeOf(entry.parameters[0]).Implements(contextType)) { ++ } else if internalBodyType.In(0).Implements(contextType) { + hasContext = true ++ if len(entry.parameters) > 0 && reflect.TypeOf(entry.parameters[0]) != nil && reflect.TypeOf(entry.parameters[0]).Implements(contextType) { ++ // we allow you to pass in a non-nil context ++ hasContext = false ++ } + } + } + +diff --git a/vendor/github.com/onsi/ginkgo/v2/types/config.go b/vendor/github.com/onsi/ginkgo/v2/types/config.go +index cef273ee..8c0dfab8 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/types/config.go ++++ b/vendor/github.com/onsi/ginkgo/v2/types/config.go +@@ -25,6 +25,7 @@ type SuiteConfig struct { + SkipFiles []string + LabelFilter string + FailOnPending bool ++ FailOnEmpty bool + FailFast bool + FlakeAttempts int + MustPassRepeatedly int +@@ -90,6 +91,8 @@ type ReporterConfig struct { + FullTrace bool + ShowNodeEvents bool + GithubOutput bool ++ SilenceSkips bool ++ ForceNewlines bool + + JSONReport string + JUnitReport string +@@ -199,6 +202,7 @@ type GoFlagsConfig struct { + A bool + ASMFlags string + BuildMode string ++ BuildVCS bool + Compiler string + GCCGoFlags string + GCFlags string +@@ -216,6 +220,7 @@ type GoFlagsConfig struct { + ToolExec string + Work bool + X bool ++ O string + } + + func NewDefaultGoFlagsConfig() GoFlagsConfig { +@@ -275,6 +280,8 @@ var SuiteConfigFlags = GinkgoFlags{ + Usage: "If set, ginkgo will stop running a test suite after a failure occurs."}, + {KeyPath: "S.FlakeAttempts", Name: "flake-attempts", SectionKey: "failure", UsageDefaultValue: "0 - failed tests are not retried", DeprecatedName: "flakeAttempts", DeprecatedDocLink: "changed-command-line-flags", + Usage: "Make up to this many attempts to run each spec. If any of the attempts succeed, the suite will not be failed."}, ++ {KeyPath: "S.FailOnEmpty", Name: "fail-on-empty", SectionKey: "failure", ++ Usage: "If set, ginkgo will mark the test suite as failed if no specs are run."}, + + {KeyPath: "S.DryRun", Name: "dry-run", SectionKey: "debug", DeprecatedName: "dryRun", DeprecatedDocLink: "changed-command-line-flags", + Usage: "If set, ginkgo will walk the test hierarchy without actually running anything. Best paired with -v."}, +@@ -321,7 +328,7 @@ var ParallelConfigFlags = GinkgoFlags{ + // ReporterConfigFlags provides flags for the Ginkgo test process, and CLI + var ReporterConfigFlags = GinkgoFlags{ + {KeyPath: "R.NoColor", Name: "no-color", SectionKey: "output", DeprecatedName: "noColor", DeprecatedDocLink: "changed-command-line-flags", +- Usage: "If set, suppress color output in default reporter."}, ++ Usage: "If set, suppress color output in default reporter. You can also set the environment variable GINKGO_NO_COLOR=TRUE"}, + {KeyPath: "R.Verbose", Name: "v", SectionKey: "output", + Usage: "If set, emits more output including GinkgoWriter contents."}, + {KeyPath: "R.VeryVerbose", Name: "vv", SectionKey: "output", +@@ -334,6 +341,10 @@ var ReporterConfigFlags = GinkgoFlags{ + Usage: "If set, default reporter prints node > Enter and < Exit events when specs fail"}, + {KeyPath: "R.GithubOutput", Name: "github-output", SectionKey: "output", + Usage: "If set, default reporter prints easier to manage output in Github Actions."}, ++ {KeyPath: "R.SilenceSkips", Name: "silence-skips", SectionKey: "output", ++ Usage: "If set, default reporter will not print out skipped tests."}, ++ {KeyPath: "R.ForceNewlines", Name: "force-newlines", SectionKey: "output", ++ Usage: "If set, default reporter will ensure a newline appears after each test."}, + + {KeyPath: "R.JSONReport", Name: "json-report", UsageArgument: "filename.json", SectionKey: "output", + Usage: "If set, Ginkgo will generate a JSON-formatted test report at the specified location."}, +@@ -502,7 +513,7 @@ var GinkgoCLIWatchFlags = GinkgoFlags{ + // GoBuildFlags provides flags for the Ginkgo CLI build, run, and watch commands that capture go's build-time flags. These are passed to go test -c by the ginkgo CLI + var GoBuildFlags = GinkgoFlags{ + {KeyPath: "Go.Race", Name: "race", SectionKey: "code-and-coverage-analysis", +- Usage: "enable data race detection. Supported only on linux/amd64, freebsd/amd64, darwin/amd64, windows/amd64, linux/ppc64le and linux/arm64 (only for 48-bit VMA)."}, ++ Usage: "enable data race detection. Supported on linux/amd64, linux/ppc64le, linux/arm64, linux/s390x, freebsd/amd64, netbsd/amd64, darwin/amd64, darwin/arm64, and windows/amd64."}, + {KeyPath: "Go.Vet", Name: "vet", UsageArgument: "list", SectionKey: "code-and-coverage-analysis", + Usage: `Configure the invocation of "go vet" during "go test" to use the comma-separated list of vet checks. If list is empty, "go test" runs "go vet" with a curated list of checks believed to be always worth addressing. If list is "off", "go test" does not run "go vet" at all. Available checks can be found by running 'go doc cmd/vet'`}, + {KeyPath: "Go.Cover", Name: "cover", SectionKey: "code-and-coverage-analysis", +@@ -518,6 +529,8 @@ var GoBuildFlags = GinkgoFlags{ + Usage: "arguments to pass on each go tool asm invocation."}, + {KeyPath: "Go.BuildMode", Name: "buildmode", UsageArgument: "mode", SectionKey: "go-build", + Usage: "build mode to use. See 'go help buildmode' for more."}, ++ {KeyPath: "Go.BuildVCS", Name: "buildvcs", SectionKey: "go-build", ++ Usage: "adds version control information."}, + {KeyPath: "Go.Compiler", Name: "compiler", UsageArgument: "name", SectionKey: "go-build", + Usage: "name of compiler to use, as in runtime.Compiler (gccgo or gc)."}, + {KeyPath: "Go.GCCGoFlags", Name: "gccgoflags", UsageArgument: "'[pattern=]arg list'", SectionKey: "go-build", +@@ -552,6 +565,8 @@ var GoBuildFlags = GinkgoFlags{ + Usage: "print the name of the temporary work directory and do not delete it when exiting."}, + {KeyPath: "Go.X", Name: "x", SectionKey: "go-build", + Usage: "print the commands."}, ++ {KeyPath: "Go.O", Name: "o", SectionKey: "go-build", ++ Usage: "output binary path (including name)."}, + } + + // GoRunFlags provides flags for the Ginkgo CLI run, and watch commands that capture go's run-time flags. These are passed to the compiled test binary by the ginkgo CLI +@@ -605,7 +620,7 @@ func VetAndInitializeCLIAndGoConfig(cliConfig CLIConfig, goFlagsConfig GoFlagsCo + } + + // GenerateGoTestCompileArgs is used by the Ginkgo CLI to generate command line arguments to pass to the go test -c command when compiling the test +-func GenerateGoTestCompileArgs(goFlagsConfig GoFlagsConfig, destination string, packageToBuild string, pathToInvocationPath string) ([]string, error) { ++func GenerateGoTestCompileArgs(goFlagsConfig GoFlagsConfig, packageToBuild string, pathToInvocationPath string) ([]string, error) { + // if the user has set the CoverProfile run-time flag make sure to set the build-time cover flag to make sure + // the built test binary can generate a coverprofile + if goFlagsConfig.CoverProfile != "" { +@@ -628,7 +643,7 @@ func GenerateGoTestCompileArgs(goFlagsConfig GoFlagsConfig, destination string, + goFlagsConfig.CoverPkg = strings.Join(adjustedCoverPkgs, ",") + } + +- args := []string{"test", "-c", "-o", destination, packageToBuild} ++ args := []string{"test", "-c", packageToBuild} + goArgs, err := GenerateFlagArgs( + GoBuildFlags, + map[string]interface{}{ +diff --git a/vendor/github.com/onsi/ginkgo/v2/types/label_filter.go b/vendor/github.com/onsi/ginkgo/v2/types/label_filter.go +index b0d3b651..7fdc8aa2 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/types/label_filter.go ++++ b/vendor/github.com/onsi/ginkgo/v2/types/label_filter.go +@@ -45,6 +45,83 @@ func orAction(a, b LabelFilter) LabelFilter { + return func(labels []string) bool { return a(labels) || b(labels) } + } + ++func labelSetFor(key string, labels []string) map[string]bool { ++ key = strings.ToLower(strings.TrimSpace(key)) ++ out := map[string]bool{} ++ for _, label := range labels { ++ components := strings.SplitN(label, ":", 2) ++ if len(components) < 2 { ++ continue ++ } ++ if key == strings.ToLower(strings.TrimSpace(components[0])) { ++ out[strings.ToLower(strings.TrimSpace(components[1]))] = true ++ } ++ } ++ ++ return out ++} ++ ++func isEmptyLabelSetAction(key string) LabelFilter { ++ return func(labels []string) bool { ++ return len(labelSetFor(key, labels)) == 0 ++ } ++} ++ ++func containsAnyLabelSetAction(key string, expectedValues []string) LabelFilter { ++ return func(labels []string) bool { ++ set := labelSetFor(key, labels) ++ for _, value := range expectedValues { ++ if set[value] { ++ return true ++ } ++ } ++ return false ++ } ++} ++ ++func containsAllLabelSetAction(key string, expectedValues []string) LabelFilter { ++ return func(labels []string) bool { ++ set := labelSetFor(key, labels) ++ for _, value := range expectedValues { ++ if !set[value] { ++ return false ++ } ++ } ++ return true ++ } ++} ++ ++func consistsOfLabelSetAction(key string, expectedValues []string) LabelFilter { ++ return func(labels []string) bool { ++ set := labelSetFor(key, labels) ++ if len(set) != len(expectedValues) { ++ return false ++ } ++ for _, value := range expectedValues { ++ if !set[value] { ++ return false ++ } ++ } ++ return true ++ } ++} ++ ++func isSubsetOfLabelSetAction(key string, expectedValues []string) LabelFilter { ++ expectedSet := map[string]bool{} ++ for _, value := range expectedValues { ++ expectedSet[value] = true ++ } ++ return func(labels []string) bool { ++ set := labelSetFor(key, labels) ++ for value := range set { ++ if !expectedSet[value] { ++ return false ++ } ++ } ++ return true ++ } ++} ++ + type lfToken uint + + const ( +@@ -58,6 +135,9 @@ const ( + lfTokenOr + lfTokenRegexp + lfTokenLabel ++ lfTokenSetKey ++ lfTokenSetOperation ++ lfTokenSetArgument + lfTokenEOF + ) + +@@ -71,6 +151,8 @@ func (l lfToken) Precedence() int { + return 2 + case lfTokenNot: + return 3 ++ case lfTokenSetOperation: ++ return 4 + } + return -1 + } +@@ -93,6 +175,12 @@ func (l lfToken) String() string { + return "/regexp/" + case lfTokenLabel: + return "label" ++ case lfTokenSetKey: ++ return "set_key" ++ case lfTokenSetOperation: ++ return "set_operation" ++ case lfTokenSetArgument: ++ return "set_argument" + case lfTokenEOF: + return "EOF" + } +@@ -148,6 +236,35 @@ func (tn *treeNode) constructLabelFilter(input string) (LabelFilter, error) { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.location, fmt.Sprintf("RegExp compilation error: %s", err)) + } + return matchLabelRegexAction(re), nil ++ case lfTokenSetOperation: ++ tokenSetOperation := strings.ToLower(tn.value) ++ if tokenSetOperation == "isempty" { ++ return isEmptyLabelSetAction(tn.leftNode.value), nil ++ } ++ if tn.rightNode == nil { ++ return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.location, fmt.Sprintf("Set operation '%s' is missing an argument.", tn.value)) ++ } ++ ++ rawValues := strings.Split(tn.rightNode.value, ",") ++ values := make([]string, len(rawValues)) ++ for i := range rawValues { ++ values[i] = strings.ToLower(strings.TrimSpace(rawValues[i])) ++ if strings.ContainsAny(values[i], "&|!,()/") { ++ return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.rightNode.location, fmt.Sprintf("Invalid label value '%s' in set operation argument.", values[i])) ++ } else if values[i] == "" { ++ return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, tn.rightNode.location, "Empty label value in set operation argument.") ++ } ++ } ++ switch tokenSetOperation { ++ case "containsany": ++ return containsAnyLabelSetAction(tn.leftNode.value, values), nil ++ case "containsall": ++ return containsAllLabelSetAction(tn.leftNode.value, values), nil ++ case "consistsof": ++ return consistsOfLabelSetAction(tn.leftNode.value, values), nil ++ case "issubsetof": ++ return isSubsetOfLabelSetAction(tn.leftNode.value, values), nil ++ } + } + + if tn.rightNode == nil { +@@ -203,7 +320,17 @@ func (tn *treeNode) toString(indent int) string { + return out + } + ++var validSetOperations = map[string]string{ ++ "containsany": "containsAny", ++ "containsall": "containsAll", ++ "consistsof": "consistsOf", ++ "issubsetof": "isSubsetOf", ++ "isempty": "isEmpty", ++} ++ + func tokenize(input string) func() (*treeNode, error) { ++ lastToken := lfTokenInvalid ++ lastValue := "" + runes, i := []rune(input), 0 + + peekIs := func(r rune) bool { +@@ -233,6 +360,53 @@ func tokenize(input string) func() (*treeNode, error) { + } + + node := &treeNode{location: i} ++ defer func() { ++ lastToken = node.token ++ lastValue = node.value ++ }() ++ ++ if lastToken == lfTokenSetKey { ++ //we should get a valid set operation next ++ value, n := consumeUntil(" )") ++ if validSetOperations[strings.ToLower(value)] == "" { ++ return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i, fmt.Sprintf("Invalid set operation '%s'.", value)) ++ } ++ i += n ++ node.token, node.value = lfTokenSetOperation, value ++ return node, nil ++ } ++ if lastToken == lfTokenSetOperation { ++ //we should get an argument next, if we aren't isempty ++ var arg = "" ++ origI := i ++ if runes[i] == '{' { ++ i += 1 ++ value, n := consumeUntil("}") ++ if i+n >= len(runes) { ++ return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i-1, "Missing closing '}' in set operation argument?") ++ } ++ i += n + 1 ++ arg = value ++ } else { ++ value, n := consumeUntil("&|!,()/") ++ i += n ++ arg = strings.TrimSpace(value) ++ } ++ if strings.ToLower(lastValue) == "isempty" && arg != "" { ++ return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, origI, fmt.Sprintf("isEmpty does not take arguments, was passed '%s'.", arg)) ++ } ++ if arg == "" && strings.ToLower(lastValue) != "isempty" { ++ if i < len(runes) && runes[i] == '/' { ++ return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, origI, "Set operations do not support regular expressions.") ++ } else { ++ return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, origI, fmt.Sprintf("Set operation '%s' requires an argument.", lastValue)) ++ } ++ } ++ // note that we sent an empty SetArgument token if we are isempty ++ node.token, node.value = lfTokenSetArgument, arg ++ return node, nil ++ } ++ + switch runes[i] { + case '&': + if !peekIs('&') { +@@ -264,8 +438,38 @@ func tokenize(input string) func() (*treeNode, error) { + i += n + 1 + node.token, node.value = lfTokenRegexp, value + default: +- value, n := consumeUntil("&|!,()/") ++ value, n := consumeUntil("&|!,()/:") + i += n ++ value = strings.TrimSpace(value) ++ ++ //are we the beginning of a set operation? ++ if i < len(runes) && runes[i] == ':' { ++ if peekIs(' ') { ++ if value == "" { ++ return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i, "Missing set key.") ++ } ++ i += 1 ++ //we are the beginning of a set operation ++ node.token, node.value = lfTokenSetKey, value ++ return node, nil ++ } ++ additionalValue, n := consumeUntil("&|!,()/") ++ additionalValue = strings.TrimSpace(additionalValue) ++ if additionalValue == ":" { ++ return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i, "Missing set operation.") ++ } ++ i += n ++ value += additionalValue ++ } ++ ++ valueToCheckForSetOperation := strings.ToLower(value) ++ for setOperation := range validSetOperations { ++ idx := strings.Index(valueToCheckForSetOperation, " "+setOperation) ++ if idx > 0 { ++ return &treeNode{}, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, i-n+idx+1, fmt.Sprintf("Looks like you are using the set operator '%s' but did not provide a set key. Did you forget the ':'?", validSetOperations[setOperation])) ++ } ++ } ++ + node.token, node.value = lfTokenLabel, strings.TrimSpace(value) + } + return node, nil +@@ -307,7 +511,7 @@ LOOP: + switch node.token { + case lfTokenEOF: + break LOOP +- case lfTokenLabel, lfTokenRegexp: ++ case lfTokenLabel, lfTokenRegexp, lfTokenSetKey: + if current.rightNode != nil { + return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, "Found two adjacent labels. You need an operator between them.") + } +@@ -326,6 +530,18 @@ LOOP: + node.setLeftNode(nodeToStealFrom.rightNode) + nodeToStealFrom.setRightNode(node) + current = node ++ case lfTokenSetOperation: ++ if current.rightNode == nil { ++ return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, fmt.Sprintf("Set operation '%s' missing left hand operand.", node.value)) ++ } ++ node.setLeftNode(current.rightNode) ++ current.setRightNode(node) ++ current = node ++ case lfTokenSetArgument: ++ if current.rightNode != nil { ++ return nil, GinkgoErrors.SyntaxErrorParsingLabelFilter(input, node.location, fmt.Sprintf("Unexpected set argument '%s'.", node.token)) ++ } ++ current.setRightNode(node) + case lfTokenCloseGroup: + firstUnmatchedOpenNode := current.firstUnmatchedOpenNode() + if firstUnmatchedOpenNode == nil { +@@ -354,5 +570,14 @@ func ValidateAndCleanupLabel(label string, cl CodeLocation) (string, error) { + if strings.ContainsAny(out, "&|!,()/") { + return "", GinkgoErrors.InvalidLabel(label, cl) + } ++ if out[0] == ':' { ++ return "", GinkgoErrors.InvalidLabel(label, cl) ++ } ++ if strings.Contains(out, ":") { ++ components := strings.SplitN(out, ":", 2) ++ if len(components) < 2 || components[1] == "" { ++ return "", GinkgoErrors.InvalidLabel(label, cl) ++ } ++ } + return out, nil + } +diff --git a/vendor/github.com/onsi/ginkgo/v2/types/types.go b/vendor/github.com/onsi/ginkgo/v2/types/types.go +index aae69b04..ddcbec1b 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/types/types.go ++++ b/vendor/github.com/onsi/ginkgo/v2/types/types.go +@@ -3,13 +3,21 @@ package types + import ( + "encoding/json" + "fmt" ++ "os" + "sort" + "strings" + "time" + ) + + const GINKGO_FOCUS_EXIT_CODE = 197 +-const GINKGO_TIME_FORMAT = "01/02/06 15:04:05.999" ++ ++var GINKGO_TIME_FORMAT = "01/02/06 15:04:05.999" ++ ++func init() { ++ if os.Getenv("GINKGO_TIME_FORMAT") != "" { ++ GINKGO_TIME_FORMAT = os.Getenv("GINKGO_TIME_FORMAT") ++ } ++} + + // Report captures information about a Ginkgo test run + type Report struct { +diff --git a/vendor/github.com/onsi/ginkgo/v2/types/version.go b/vendor/github.com/onsi/ginkgo/v2/types/version.go +index 5dd0140c..caf3c9f5 100644 +--- a/vendor/github.com/onsi/ginkgo/v2/types/version.go ++++ b/vendor/github.com/onsi/ginkgo/v2/types/version.go +@@ -1,3 +1,3 @@ + package types + +-const VERSION = "2.17.2" ++const VERSION = "2.21.0" +diff --git a/vendor/github.com/onsi/gomega/CHANGELOG.md b/vendor/github.com/onsi/gomega/CHANGELOG.md +index 89230f19..9f6090b8 100644 +--- a/vendor/github.com/onsi/gomega/CHANGELOG.md ++++ b/vendor/github.com/onsi/gomega/CHANGELOG.md +@@ -1,3 +1,61 @@ ++## 1.35.1 ++ ++### Fixes ++- Export EnforceDefaultTimeoutsWhenUsingContexts and DisableDefaultTimeoutsWhenUsingContext [ca36da1] ++ ++## 1.35.0 ++ ++### Features ++ ++- You can now call `EnforceDefaultTimeoutsWhenUsingContexts()` to have `Eventually` honor the default timeout when passed a context. (prior to this you had to expclility add a timeout) [e4c4265] ++- You can call `StopTrying(message).Successfully()` to abort a `Consistently` early without failure [eeca931] ++ ++### Fixes ++ ++- Stop memoizing the result of `HaveField` to avoid unexpected errors when used with async assertions. [3bdbc4e] ++ ++### Maintenance ++ ++- Bump all dependencies [a05a416] ++ ++## 1.34.2 ++ ++Require Go 1.22+ ++ ++### Maintenance ++- bump ginkgo as well [c59c6dc] ++- bump to go 1.22 - remove x/exp dependency [8158b99] ++ ++## 1.34.1 ++ ++### Maintenance ++- Use slices from exp/slices to keep golang 1.20 compat [5e71dcd] ++ ++## 1.34.0 ++ ++### Features ++- Add RoundTripper method to ghttp.Server [c549e0d] ++ ++### Fixes ++- fix incorrect handling of nil slices in HaveExactElements (fixes #771) [878940c] ++- issue_765 - fixed bug in Hopcroft-Karp algorithm [ebadb67] ++ ++### Maintenance ++- bump ginkgo [8af2ece] ++- Fix typo in docs [123a071] ++- Bump github.com/onsi/ginkgo/v2 from 2.17.2 to 2.17.3 (#756) [0e69083] ++- Bump google.golang.org/protobuf from 1.33.0 to 1.34.1 (#755) [2675796] ++- Bump golang.org/x/net from 0.24.0 to 0.25.0 (#754) [4160c0f] ++- Bump github-pages from 230 to 231 in /docs (#748) [892c303] ++ ++## 1.33.1 ++ ++### Fixes ++- fix confusing eventually docs [3a66379] ++ ++### Maintenance ++- Bump github.com/onsi/ginkgo/v2 from 2.17.1 to 2.17.2 [e9bc35a] ++ + ## 1.33.0 + + ### Features +diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go +index 1980a63c..1038d7dd 100644 +--- a/vendor/github.com/onsi/gomega/gomega_dsl.go ++++ b/vendor/github.com/onsi/gomega/gomega_dsl.go +@@ -22,7 +22,7 @@ import ( + "github.com/onsi/gomega/types" + ) + +-const GOMEGA_VERSION = "1.33.0" ++const GOMEGA_VERSION = "1.35.1" + + const nilGomegaPanic = `You are trying to make an assertion, but haven't registered Gomega's fail handler. + If you're using Ginkgo then you probably forgot to put your assertion in an It(). +@@ -319,7 +319,19 @@ you an also use Eventually().WithContext(ctx) to pass in the context. Passed-in + Eventually(client.FetchCount).WithContext(ctx).WithArguments("/users").Should(BeNumerically(">=", 17)) + }, SpecTimeout(time.Second)) + +-Either way the context passd to Eventually is also passed to the underlying function. Now, when Ginkgo cancels the context both the FetchCount client and Gomega will be informed and can exit. ++Either way the context pasesd to Eventually is also passed to the underlying function. Now, when Ginkgo cancels the context both the FetchCount client and Gomega will be informed and can exit. ++ ++By default, when a context is passed to Eventually *without* an explicit timeout, Gomega will rely solely on the context's cancellation to determine when to stop polling. If you want to specify a timeout in addition to the context you can do so using the .WithTimeout() method. For example: ++ ++ Eventually(client.FetchCount).WithContext(ctx).WithTimeout(10*time.Second).Should(BeNumerically(">=", 17)) ++ ++now either the context cacnellation or the timeout will cause Eventually to stop polling. ++ ++If, instead, you would like to opt out of this behavior and have Gomega's default timeouts govern Eventuallys that take a context you can call: ++ ++ EnforceDefaultTimeoutsWhenUsingContexts() ++ ++in the DSL (or on a Gomega instance). Now all calls to Eventually that take a context will fail if eitehr the context is cancelled or the default timeout elapses. + + **Category 3: Making assertions _in_ the function passed into Eventually** + +@@ -372,11 +384,11 @@ You can ensure that you get a number of consecutive successful tries before succ + + Finally, in addition to passing timeouts and a context to Eventually you can be more explicit with Eventually's chaining configuration methods: + +- Eventually(..., "1s", "2s", ctx).Should(...) ++ Eventually(..., "10s", "2s", ctx).Should(...) + + is equivalent to + +- Eventually(...).WithTimeout(time.Second).WithPolling(2*time.Second).WithContext(ctx).Should(...) ++ Eventually(...).WithTimeout(10*time.Second).WithPolling(2*time.Second).WithContext(ctx).Should(...) + */ + func Eventually(actualOrCtx interface{}, args ...interface{}) AsyncAssertion { + ensureDefaultGomegaIsConfigured() +@@ -491,6 +503,16 @@ func SetDefaultConsistentlyPollingInterval(t time.Duration) { + Default.SetDefaultConsistentlyPollingInterval(t) + } + ++// EnforceDefaultTimeoutsWhenUsingContexts forces `Eventually` to apply a default timeout even when a context is provided. ++func EnforceDefaultTimeoutsWhenUsingContexts() { ++ Default.EnforceDefaultTimeoutsWhenUsingContexts() ++} ++ ++// DisableDefaultTimeoutsWhenUsingContext disables the default timeout when a context is provided to `Eventually`. ++func DisableDefaultTimeoutsWhenUsingContext() { ++ Default.DisableDefaultTimeoutsWhenUsingContext() ++} ++ + // AsyncAssertion is returned by Eventually and Consistently and polls the actual value passed into Eventually against + // the matcher passed to the Should and ShouldNot methods. + // +diff --git a/vendor/github.com/onsi/gomega/internal/async_assertion.go b/vendor/github.com/onsi/gomega/internal/async_assertion.go +index cde9e2ec..8b4cd1f5 100644 +--- a/vendor/github.com/onsi/gomega/internal/async_assertion.go ++++ b/vendor/github.com/onsi/gomega/internal/async_assertion.go +@@ -335,7 +335,7 @@ func (assertion *AsyncAssertion) afterTimeout() <-chan time.Time { + if assertion.asyncType == AsyncAssertionTypeConsistently { + return time.After(assertion.g.DurationBundle.ConsistentlyDuration) + } else { +- if assertion.ctx == nil { ++ if assertion.ctx == nil || assertion.g.DurationBundle.EnforceDefaultTimeoutsWhenUsingContexts { + return time.After(assertion.g.DurationBundle.EventuallyTimeout) + } else { + return nil +@@ -496,7 +496,15 @@ func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, desiredMatch + for _, err := range []error{actualErr, matcherErr} { + if pollingSignalErr, ok := AsPollingSignalError(err); ok { + if pollingSignalErr.IsStopTrying() { +- fail("Told to stop trying") ++ if pollingSignalErr.IsSuccessful() { ++ if assertion.asyncType == AsyncAssertionTypeEventually { ++ fail("Told to stop trying (and ignoring call to Successfully(), as it is only relevant with Consistently)") ++ } else { ++ return true // early escape hatch for Consistently ++ } ++ } else { ++ fail("Told to stop trying") ++ } + return false + } + if pollingSignalErr.IsTryAgainAfter() { +diff --git a/vendor/github.com/onsi/gomega/internal/duration_bundle.go b/vendor/github.com/onsi/gomega/internal/duration_bundle.go +index 6e0d90d3..2e026c33 100644 +--- a/vendor/github.com/onsi/gomega/internal/duration_bundle.go ++++ b/vendor/github.com/onsi/gomega/internal/duration_bundle.go +@@ -8,10 +8,11 @@ import ( + ) + + type DurationBundle struct { +- EventuallyTimeout time.Duration +- EventuallyPollingInterval time.Duration +- ConsistentlyDuration time.Duration +- ConsistentlyPollingInterval time.Duration ++ EventuallyTimeout time.Duration ++ EventuallyPollingInterval time.Duration ++ ConsistentlyDuration time.Duration ++ ConsistentlyPollingInterval time.Duration ++ EnforceDefaultTimeoutsWhenUsingContexts bool + } + + const ( +@@ -20,15 +21,19 @@ const ( + + ConsistentlyDurationEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_DURATION" + ConsistentlyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_POLLING_INTERVAL" ++ ++ EnforceDefaultTimeoutsWhenUsingContextsEnvVarName = "GOMEGA_ENFORCE_DEFAULT_TIMEOUTS_WHEN_USING_CONTEXTS" + ) + + func FetchDefaultDurationBundle() DurationBundle { ++ _, EnforceDefaultTimeoutsWhenUsingContexts := os.LookupEnv(EnforceDefaultTimeoutsWhenUsingContextsEnvVarName) + return DurationBundle{ + EventuallyTimeout: durationFromEnv(EventuallyTimeoutEnvVarName, time.Second), + EventuallyPollingInterval: durationFromEnv(EventuallyPollingIntervalEnvVarName, 10*time.Millisecond), + +- ConsistentlyDuration: durationFromEnv(ConsistentlyDurationEnvVarName, 100*time.Millisecond), +- ConsistentlyPollingInterval: durationFromEnv(ConsistentlyPollingIntervalEnvVarName, 10*time.Millisecond), ++ ConsistentlyDuration: durationFromEnv(ConsistentlyDurationEnvVarName, 100*time.Millisecond), ++ ConsistentlyPollingInterval: durationFromEnv(ConsistentlyPollingIntervalEnvVarName, 10*time.Millisecond), ++ EnforceDefaultTimeoutsWhenUsingContexts: EnforceDefaultTimeoutsWhenUsingContexts, + } + } + +diff --git a/vendor/github.com/onsi/gomega/internal/gomega.go b/vendor/github.com/onsi/gomega/internal/gomega.go +index de1f4f33..c6e2fcc0 100644 +--- a/vendor/github.com/onsi/gomega/internal/gomega.go ++++ b/vendor/github.com/onsi/gomega/internal/gomega.go +@@ -127,3 +127,11 @@ func (g *Gomega) SetDefaultConsistentlyDuration(t time.Duration) { + func (g *Gomega) SetDefaultConsistentlyPollingInterval(t time.Duration) { + g.DurationBundle.ConsistentlyPollingInterval = t + } ++ ++func (g *Gomega) EnforceDefaultTimeoutsWhenUsingContexts() { ++ g.DurationBundle.EnforceDefaultTimeoutsWhenUsingContexts = true ++} ++ ++func (g *Gomega) DisableDefaultTimeoutsWhenUsingContext() { ++ g.DurationBundle.EnforceDefaultTimeoutsWhenUsingContexts = false ++} +diff --git a/vendor/github.com/onsi/gomega/internal/polling_signal_error.go b/vendor/github.com/onsi/gomega/internal/polling_signal_error.go +index 83b04b1a..3a4f7ddd 100644 +--- a/vendor/github.com/onsi/gomega/internal/polling_signal_error.go ++++ b/vendor/github.com/onsi/gomega/internal/polling_signal_error.go +@@ -17,6 +17,7 @@ type PollingSignalError interface { + error + Wrap(err error) PollingSignalError + Attach(description string, obj any) PollingSignalError ++ Successfully() PollingSignalError + Now() + } + +@@ -45,6 +46,7 @@ type PollingSignalErrorImpl struct { + wrappedErr error + pollingSignalErrorType PollingSignalErrorType + duration time.Duration ++ successful bool + Attachments []PollingSignalErrorAttachment + } + +@@ -73,6 +75,11 @@ func (s *PollingSignalErrorImpl) Unwrap() error { + return s.wrappedErr + } + ++func (s *PollingSignalErrorImpl) Successfully() PollingSignalError { ++ s.successful = true ++ return s ++} ++ + func (s *PollingSignalErrorImpl) Now() { + panic(s) + } +@@ -81,6 +88,10 @@ func (s *PollingSignalErrorImpl) IsStopTrying() bool { + return s.pollingSignalErrorType == PollingSignalErrorTypeStopTrying + } + ++func (s *PollingSignalErrorImpl) IsSuccessful() bool { ++ return s.successful ++} ++ + func (s *PollingSignalErrorImpl) IsTryAgainAfter() bool { + return s.pollingSignalErrorType == PollingSignalErrorTypeTryAgainAfter + } +diff --git a/vendor/github.com/onsi/gomega/matchers/have_exact_elements.go b/vendor/github.com/onsi/gomega/matchers/have_exact_elements.go +index dca5b944..5a236d7d 100644 +--- a/vendor/github.com/onsi/gomega/matchers/have_exact_elements.go ++++ b/vendor/github.com/onsi/gomega/matchers/have_exact_elements.go +@@ -30,15 +30,18 @@ func (matcher *HaveExactElementsMatcher) Match(actual interface{}) (success bool + + lenMatchers := len(matchers) + lenValues := len(values) ++ success = true + + for i := 0; i < lenMatchers || i < lenValues; i++ { + if i >= lenMatchers { + matcher.extraIndex = i ++ success = false + continue + } + + if i >= lenValues { + matcher.missingIndex = i ++ success = false + return + } + +@@ -49,15 +52,17 @@ func (matcher *HaveExactElementsMatcher) Match(actual interface{}) (success bool + index: i, + failure: err.Error(), + }) ++ success = false + } else if !match { + matcher.mismatchFailures = append(matcher.mismatchFailures, mismatchFailure{ + index: i, + failure: elemMatcher.FailureMessage(values[i]), + }) ++ success = false + } + } + +- return matcher.missingIndex+matcher.extraIndex+len(matcher.mismatchFailures) == 0, nil ++ return success, nil + } + + func (matcher *HaveExactElementsMatcher) FailureMessage(actual interface{}) (message string) { +diff --git a/vendor/github.com/onsi/gomega/matchers/have_field.go b/vendor/github.com/onsi/gomega/matchers/have_field.go +index 6989f78c..8dd3f871 100644 +--- a/vendor/github.com/onsi/gomega/matchers/have_field.go ++++ b/vendor/github.com/onsi/gomega/matchers/have_field.go +@@ -17,7 +17,7 @@ func (e missingFieldError) Error() string { + return string(e) + } + +-func extractField(actual interface{}, field string, matchername string) (interface{}, error) { ++func extractField(actual interface{}, field string, matchername string) (any, error) { + fields := strings.SplitN(field, ".", 2) + actualValue := reflect.ValueOf(actual) + +@@ -64,36 +64,46 @@ func extractField(actual interface{}, field string, matchername string) (interfa + type HaveFieldMatcher struct { + Field string + Expected interface{} ++} + +- extractedField interface{} +- expectedMatcher omegaMatcher ++func (matcher *HaveFieldMatcher) expectedMatcher() omegaMatcher { ++ var isMatcher bool ++ expectedMatcher, isMatcher := matcher.Expected.(omegaMatcher) ++ if !isMatcher { ++ expectedMatcher = &EqualMatcher{Expected: matcher.Expected} ++ } ++ return expectedMatcher + } + + func (matcher *HaveFieldMatcher) Match(actual interface{}) (success bool, err error) { +- matcher.extractedField, err = extractField(actual, matcher.Field, "HaveField") ++ extractedField, err := extractField(actual, matcher.Field, "HaveField") + if err != nil { + return false, err + } + +- var isMatcher bool +- matcher.expectedMatcher, isMatcher = matcher.Expected.(omegaMatcher) +- if !isMatcher { +- matcher.expectedMatcher = &EqualMatcher{Expected: matcher.Expected} +- } +- +- return matcher.expectedMatcher.Match(matcher.extractedField) ++ return matcher.expectedMatcher().Match(extractedField) + } + + func (matcher *HaveFieldMatcher) FailureMessage(actual interface{}) (message string) { ++ extractedField, err := extractField(actual, matcher.Field, "HaveField") ++ if err != nil { ++ // this really shouldn't happen ++ return fmt.Sprintf("Failed to extract field '%s': %s", matcher.Field, err) ++ } + message = fmt.Sprintf("Value for field '%s' failed to satisfy matcher.\n", matcher.Field) +- message += matcher.expectedMatcher.FailureMessage(matcher.extractedField) ++ message += matcher.expectedMatcher().FailureMessage(extractedField) + + return message + } + + func (matcher *HaveFieldMatcher) NegatedFailureMessage(actual interface{}) (message string) { ++ extractedField, err := extractField(actual, matcher.Field, "HaveField") ++ if err != nil { ++ // this really shouldn't happen ++ return fmt.Sprintf("Failed to extract field '%s': %s", matcher.Field, err) ++ } + message = fmt.Sprintf("Value for field '%s' satisfied matcher, but should not have.\n", matcher.Field) +- message += matcher.expectedMatcher.NegatedFailureMessage(matcher.extractedField) ++ message += matcher.expectedMatcher().NegatedFailureMessage(extractedField) + + return message + } +diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go +index 1c54edd8..44aa61d4 100644 +--- a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go ++++ b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go +@@ -1,6 +1,8 @@ + package bipartitegraph + + import ( ++ "slices" ++ + . "github.com/onsi/gomega/matchers/support/goraph/edge" + . "github.com/onsi/gomega/matchers/support/goraph/node" + "github.com/onsi/gomega/matchers/support/goraph/util" +@@ -157,6 +159,11 @@ func (bg *BipartiteGraph) createSLAPGuideLayers(matching EdgeSet) (guideLayers [ + if len(currentLayer) == 0 { + return []NodeOrderedSet{} + } ++ if done { // if last layer - into last layer must be only 'free' nodes ++ currentLayer = slices.DeleteFunc(currentLayer, func(in Node) bool { ++ return !matching.Free(in) ++ }) ++ } + guideLayers = append(guideLayers, currentLayer) + } + +diff --git a/vendor/github.com/onsi/gomega/types/types.go b/vendor/github.com/onsi/gomega/types/types.go +index 7c7adb94..30f2beed 100644 +--- a/vendor/github.com/onsi/gomega/types/types.go ++++ b/vendor/github.com/onsi/gomega/types/types.go +@@ -29,6 +29,8 @@ type Gomega interface { + SetDefaultEventuallyPollingInterval(time.Duration) + SetDefaultConsistentlyDuration(time.Duration) + SetDefaultConsistentlyPollingInterval(time.Duration) ++ EnforceDefaultTimeoutsWhenUsingContexts() ++ DisableDefaultTimeoutsWhenUsingContext() + } + + // All Gomega matchers must implement the GomegaMatcher interface +diff --git a/vendor/github.com/x448/float16/.travis.yml b/vendor/github.com/x448/float16/.travis.yml +new file mode 100644 +index 00000000..8902bdaa +--- /dev/null ++++ b/vendor/github.com/x448/float16/.travis.yml +@@ -0,0 +1,13 @@ ++language: go ++ ++go: ++ - 1.11.x ++ ++env: ++ - GO111MODULE=on ++ ++script: ++ - go test -short -coverprofile=coverage.txt -covermode=count ./... ++ ++after_success: ++ - bash <(curl -s https://codecov.io/bash) +diff --git a/vendor/github.com/x448/float16/LICENSE b/vendor/github.com/x448/float16/LICENSE +new file mode 100644 +index 00000000..bf6e3578 +--- /dev/null ++++ b/vendor/github.com/x448/float16/LICENSE +@@ -0,0 +1,22 @@ ++MIT License ++ ++Copyright (c) 2019 Montgomery Edwards⁴⁴⁸ and Faye Amacker ++ ++Permission is hereby granted, free of charge, to any person obtaining a copy ++of this software and associated documentation files (the "Software"), to deal ++in the Software without restriction, including without limitation the rights ++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++copies of the Software, and to permit persons to whom the Software is ++furnished to do so, subject to the following conditions: ++ ++The above copyright notice and this permission notice shall be included in all ++copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++SOFTWARE. ++ +diff --git a/vendor/github.com/x448/float16/README.md b/vendor/github.com/x448/float16/README.md +new file mode 100644 +index 00000000..b524b813 +--- /dev/null ++++ b/vendor/github.com/x448/float16/README.md +@@ -0,0 +1,133 @@ ++# Float16 (Binary16) in Go/Golang ++[![Build Status](https://travis-ci.org/x448/float16.svg?branch=master)](https://travis-ci.org/x448/float16) ++[![codecov](https://codecov.io/gh/x448/float16/branch/master/graph/badge.svg?v=4)](https://codecov.io/gh/x448/float16) ++[![Go Report Card](https://goreportcard.com/badge/github.com/x448/float16)](https://goreportcard.com/report/github.com/x448/float16) ++[![Release](https://img.shields.io/github/release/x448/float16.svg?style=flat-square)](https://github.com/x448/float16/releases) ++[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/x448/float16/master/LICENSE) ++ ++`float16` package provides [IEEE 754 half-precision floating-point format (binary16)](https://en.wikipedia.org/wiki/Half-precision_floating-point_format) with IEEE 754 default rounding for conversions. IEEE 754-2008 refers to this 16-bit floating-point format as binary16. ++ ++IEEE 754 default rounding ("Round-to-Nearest RoundTiesToEven") is considered the most accurate and statistically unbiased estimate of the true result. ++ ++All possible 4+ billion floating-point conversions with this library are verified to be correct. ++ ++Lowercase "float16" refers to IEEE 754 binary16. And capitalized "Float16" refers to exported Go data type provided by this library. ++ ++## Features ++Current features include: ++ ++* float16 to float32 conversions use lossless conversion. ++* float32 to float16 conversions use IEEE 754-2008 "Round-to-Nearest RoundTiesToEven". ++* conversions using pure Go take about 2.65 ns/op on a desktop amd64. ++* unit tests provide 100% code coverage and check all possible 4+ billion conversions. ++* other functions include: IsInf(), IsNaN(), IsNormal(), PrecisionFromfloat32(), String(), etc. ++* all functions in this library use zero allocs except String(). ++ ++## Status ++This library is used by [fxamacker/cbor](https://github.com/fxamacker/cbor) and is ready for production use on supported platforms. The version number < 1.0 indicates more functions and options are planned but not yet published. ++ ++Current status: ++ ++* core API is done and breaking API changes are unlikely. ++* 100% of unit tests pass: ++ * short mode (`go test -short`) tests around 65765 conversions in 0.005s. ++ * normal mode (`go test`) tests all possible 4+ billion conversions in about 95s. ++* 100% code coverage with both short mode and normal mode. ++* tested on amd64 but it should work on all little-endian platforms supported by Go. ++ ++Roadmap: ++ ++* add functions for fast batch conversions leveraging SIMD when supported by hardware. ++* speed up unit test when verifying all possible 4+ billion conversions. ++* test on additional platforms. ++ ++## Float16 to Float32 Conversion ++Conversions from float16 to float32 are lossless conversions. All 65536 possible float16 to float32 conversions (in pure Go) are confirmed to be correct. ++ ++Unit tests take a fraction of a second to check all 65536 expected values for float16 to float32 conversions. ++ ++## Float32 to Float16 Conversion ++Conversions from float32 to float16 use IEEE 754 default rounding ("Round-to-Nearest RoundTiesToEven"). All 4294967296 possible float32 to float16 conversions (in pure Go) are confirmed to be correct. ++ ++Unit tests in normal mode take about 1-2 minutes to check all 4+ billion float32 input values and results for Fromfloat32(), FromNaN32ps(), and PrecisionFromfloat32(). ++ ++Unit tests in short mode use a small subset (around 229 float32 inputs) and finish in under 0.01 second while still reaching 100% code coverage. ++ ++## Usage ++Install with `go get github.com/x448/float16`. ++``` ++// Convert float32 to float16 ++pi := float32(math.Pi) ++pi16 := float16.Fromfloat32(pi) ++ ++// Convert float16 to float32 ++pi32 := pi16.Float32() ++ ++// PrecisionFromfloat32() is faster than the overhead of calling a function. ++// This example only converts if there's no data loss and input is not a subnormal. ++if float16.PrecisionFromfloat32(pi) == float16.PrecisionExact { ++ pi16 := float16.Fromfloat32(pi) ++} ++``` ++ ++## Float16 Type and API ++Float16 (capitalized) is a Go type with uint16 as the underlying state. There are 6 exported functions and 9 exported methods. ++``` ++package float16 // import "github.com/x448/float16" ++ ++// Exported types and consts ++type Float16 uint16 ++const ErrInvalidNaNValue = float16Error("float16: invalid NaN value, expected IEEE 754 NaN") ++ ++// Exported functions ++Fromfloat32(f32 float32) Float16 // Float16 number converted from f32 using IEEE 754 default rounding ++ with identical results to AMD and Intel F16C hardware. NaN inputs ++ are converted with quiet bit always set on, to be like F16C. ++ ++FromNaN32ps(nan float32) (Float16, error) // Float16 NaN without modifying quiet bit. ++ // The "ps" suffix means "preserve signaling". ++ // Returns sNaN and ErrInvalidNaNValue if nan isn't a NaN. ++ ++Frombits(b16 uint16) Float16 // Float16 number corresponding to b16 (IEEE 754 binary16 rep.) ++NaN() Float16 // Float16 of IEEE 754 binary16 not-a-number ++Inf(sign int) Float16 // Float16 of IEEE 754 binary16 infinity according to sign ++ ++PrecisionFromfloat32(f32 float32) Precision // quickly indicates exact, ..., overflow, underflow ++ // (inline and < 1 ns/op) ++// Exported methods ++(f Float16) Float32() float32 // float32 number converted from f16 using lossless conversion ++(f Float16) Bits() uint16 // the IEEE 754 binary16 representation of f ++(f Float16) IsNaN() bool // true if f is not-a-number (NaN) ++(f Float16) IsQuietNaN() bool // true if f is a quiet not-a-number (NaN) ++(f Float16) IsInf(sign int) bool // true if f is infinite based on sign (-1=NegInf, 0=any, 1=PosInf) ++(f Float16) IsFinite() bool // true if f is not infinite or NaN ++(f Float16) IsNormal() bool // true if f is not zero, infinite, subnormal, or NaN. ++(f Float16) Signbit() bool // true if f is negative or negative zero ++(f Float16) String() string // string representation of f to satisfy fmt.Stringer interface ++``` ++See [API](https://godoc.org/github.com/x448/float16) at godoc.org for more info. ++ ++## Benchmarks ++Conversions (in pure Go) are around 2.65 ns/op for float16 -> float32 and float32 -> float16 on amd64. Speeds can vary depending on input value. ++ ++``` ++All functions have zero allocations except float16.String(). ++ ++FromFloat32pi-2 2.59ns ± 0% // speed using Fromfloat32() to convert a float32 of math.Pi to Float16 ++ToFloat32pi-2 2.69ns ± 0% // speed using Float32() to convert a float16 of math.Pi to float32 ++Frombits-2 0.29ns ± 5% // speed using Frombits() to cast a uint16 to Float16 ++ ++PrecisionFromFloat32-2 0.29ns ± 1% // speed using PrecisionFromfloat32() to check for overflows, etc. ++``` ++ ++## System Requirements ++* Tested on Go 1.11, 1.12, and 1.13 but it should also work with older versions. ++* Tested on amd64 but it should also work on all little-endian platforms supported by Go. ++ ++## Special Thanks ++Special thanks to Kathryn Long (starkat99) for creating [half-rs](https://github.com/starkat99/half-rs), a very nice rust implementation of float16. ++ ++## License ++Copyright (c) 2019 Montgomery Edwards⁴⁴⁸ and Faye Amacker ++ ++Licensed under [MIT License](LICENSE) +diff --git a/vendor/github.com/x448/float16/float16.go b/vendor/github.com/x448/float16/float16.go +new file mode 100644 +index 00000000..1a0e6dad +--- /dev/null ++++ b/vendor/github.com/x448/float16/float16.go +@@ -0,0 +1,302 @@ ++// Copyright 2019 Montgomery Edwards⁴⁴⁸ and Faye Amacker ++// ++// Special thanks to Kathryn Long for her Rust implementation ++// of float16 at github.com/starkat99/half-rs (MIT license) ++ ++package float16 ++ ++import ( ++ "math" ++ "strconv" ++) ++ ++// Float16 represents IEEE 754 half-precision floating-point numbers (binary16). ++type Float16 uint16 ++ ++// Precision indicates whether the conversion to Float16 is ++// exact, subnormal without dropped bits, inexact, underflow, or overflow. ++type Precision int ++ ++const ( ++ ++ // PrecisionExact is for non-subnormals that don't drop bits during conversion. ++ // All of these can round-trip. Should always convert to float16. ++ PrecisionExact Precision = iota ++ ++ // PrecisionUnknown is for subnormals that don't drop bits during conversion but ++ // not all of these can round-trip so precision is unknown without more effort. ++ // Only 2046 of these can round-trip and the rest cannot round-trip. ++ PrecisionUnknown ++ ++ // PrecisionInexact is for dropped significand bits and cannot round-trip. ++ // Some of these are subnormals. Cannot round-trip float32->float16->float32. ++ PrecisionInexact ++ ++ // PrecisionUnderflow is for Underflows. Cannot round-trip float32->float16->float32. ++ PrecisionUnderflow ++ ++ // PrecisionOverflow is for Overflows. Cannot round-trip float32->float16->float32. ++ PrecisionOverflow ++) ++ ++// PrecisionFromfloat32 returns Precision without performing ++// the conversion. Conversions from both Infinity and NaN ++// values will always report PrecisionExact even if NaN payload ++// or NaN-Quiet-Bit is lost. This function is kept simple to ++// allow inlining and run < 0.5 ns/op, to serve as a fast filter. ++func PrecisionFromfloat32(f32 float32) Precision { ++ u32 := math.Float32bits(f32) ++ ++ if u32 == 0 || u32 == 0x80000000 { ++ // +- zero will always be exact conversion ++ return PrecisionExact ++ } ++ ++ const COEFMASK uint32 = 0x7fffff // 23 least significant bits ++ const EXPSHIFT uint32 = 23 ++ const EXPBIAS uint32 = 127 ++ const EXPMASK uint32 = uint32(0xff) << EXPSHIFT ++ const DROPMASK uint32 = COEFMASK >> 10 ++ ++ exp := int32(((u32 & EXPMASK) >> EXPSHIFT) - EXPBIAS) ++ coef := u32 & COEFMASK ++ ++ if exp == 128 { ++ // +- infinity or NaN ++ // apps may want to do extra checks for NaN separately ++ return PrecisionExact ++ } ++ ++ // https://en.wikipedia.org/wiki/Half-precision_floating-point_format says, ++ // "Decimals between 2^−24 (minimum positive subnormal) and 2^−14 (maximum subnormal): fixed interval 2^−24" ++ if exp < -24 { ++ return PrecisionUnderflow ++ } ++ if exp > 15 { ++ return PrecisionOverflow ++ } ++ if (coef & DROPMASK) != uint32(0) { ++ // these include subnormals and non-subnormals that dropped bits ++ return PrecisionInexact ++ } ++ ++ if exp < -14 { ++ // Subnormals. Caller may want to test these further. ++ // There are 2046 subnormals that can successfully round-trip f32->f16->f32 ++ // and 20 of those 2046 have 32-bit input coef == 0. ++ // RFC 7049 and 7049bis Draft 12 don't precisely define "preserves value" ++ // so some protocols and libraries will choose to handle subnormals differently ++ // when deciding to encode them to CBOR float32 vs float16. ++ return PrecisionUnknown ++ } ++ ++ return PrecisionExact ++} ++ ++// Frombits returns the float16 number corresponding to the IEEE 754 binary16 ++// representation u16, with the sign bit of u16 and the result in the same bit ++// position. Frombits(Bits(x)) == x. ++func Frombits(u16 uint16) Float16 { ++ return Float16(u16) ++} ++ ++// Fromfloat32 returns a Float16 value converted from f32. Conversion uses ++// IEEE default rounding (nearest int, with ties to even). ++func Fromfloat32(f32 float32) Float16 { ++ return Float16(f32bitsToF16bits(math.Float32bits(f32))) ++} ++ ++// ErrInvalidNaNValue indicates a NaN was not received. ++const ErrInvalidNaNValue = float16Error("float16: invalid NaN value, expected IEEE 754 NaN") ++ ++type float16Error string ++ ++func (e float16Error) Error() string { return string(e) } ++ ++// FromNaN32ps converts nan to IEEE binary16 NaN while preserving both ++// signaling and payload. Unlike Fromfloat32(), which can only return ++// qNaN because it sets quiet bit = 1, this can return both sNaN and qNaN. ++// If the result is infinity (sNaN with empty payload), then the ++// lowest bit of payload is set to make the result a NaN. ++// Returns ErrInvalidNaNValue and 0x7c01 (sNaN) if nan isn't IEEE 754 NaN. ++// This function was kept simple to be able to inline. ++func FromNaN32ps(nan float32) (Float16, error) { ++ const SNAN = Float16(uint16(0x7c01)) // signalling NaN ++ ++ u32 := math.Float32bits(nan) ++ sign := u32 & 0x80000000 ++ exp := u32 & 0x7f800000 ++ coef := u32 & 0x007fffff ++ ++ if (exp != 0x7f800000) || (coef == 0) { ++ return SNAN, ErrInvalidNaNValue ++ } ++ ++ u16 := uint16((sign >> 16) | uint32(0x7c00) | (coef >> 13)) ++ ++ if (u16 & 0x03ff) == 0 { ++ // result became infinity, make it NaN by setting lowest bit in payload ++ u16 = u16 | 0x0001 ++ } ++ ++ return Float16(u16), nil ++} ++ ++// NaN returns a Float16 of IEEE 754 binary16 not-a-number (NaN). ++// Returned NaN value 0x7e01 has all exponent bits = 1 with the ++// first and last bits = 1 in the significand. This is consistent ++// with Go's 64-bit math.NaN(). Canonical CBOR in RFC 7049 uses 0x7e00. ++func NaN() Float16 { ++ return Float16(0x7e01) ++} ++ ++// Inf returns a Float16 with an infinity value with the specified sign. ++// A sign >= returns positive infinity. ++// A sign < 0 returns negative infinity. ++func Inf(sign int) Float16 { ++ if sign >= 0 { ++ return Float16(0x7c00) ++ } ++ return Float16(0x8000 | 0x7c00) ++} ++ ++// Float32 returns a float32 converted from f (Float16). ++// This is a lossless conversion. ++func (f Float16) Float32() float32 { ++ u32 := f16bitsToF32bits(uint16(f)) ++ return math.Float32frombits(u32) ++} ++ ++// Bits returns the IEEE 754 binary16 representation of f, with the sign bit ++// of f and the result in the same bit position. Bits(Frombits(x)) == x. ++func (f Float16) Bits() uint16 { ++ return uint16(f) ++} ++ ++// IsNaN reports whether f is an IEEE 754 binary16 “not-a-number” value. ++func (f Float16) IsNaN() bool { ++ return (f&0x7c00 == 0x7c00) && (f&0x03ff != 0) ++} ++ ++// IsQuietNaN reports whether f is a quiet (non-signaling) IEEE 754 binary16 ++// “not-a-number” value. ++func (f Float16) IsQuietNaN() bool { ++ return (f&0x7c00 == 0x7c00) && (f&0x03ff != 0) && (f&0x0200 != 0) ++} ++ ++// IsInf reports whether f is an infinity (inf). ++// A sign > 0 reports whether f is positive inf. ++// A sign < 0 reports whether f is negative inf. ++// A sign == 0 reports whether f is either inf. ++func (f Float16) IsInf(sign int) bool { ++ return ((f == 0x7c00) && sign >= 0) || ++ (f == 0xfc00 && sign <= 0) ++} ++ ++// IsFinite returns true if f is neither infinite nor NaN. ++func (f Float16) IsFinite() bool { ++ return (uint16(f) & uint16(0x7c00)) != uint16(0x7c00) ++} ++ ++// IsNormal returns true if f is neither zero, infinite, subnormal, or NaN. ++func (f Float16) IsNormal() bool { ++ exp := uint16(f) & uint16(0x7c00) ++ return (exp != uint16(0x7c00)) && (exp != 0) ++} ++ ++// Signbit reports whether f is negative or negative zero. ++func (f Float16) Signbit() bool { ++ return (uint16(f) & uint16(0x8000)) != 0 ++} ++ ++// String satisfies the fmt.Stringer interface. ++func (f Float16) String() string { ++ return strconv.FormatFloat(float64(f.Float32()), 'f', -1, 32) ++} ++ ++// f16bitsToF32bits returns uint32 (float32 bits) converted from specified uint16. ++func f16bitsToF32bits(in uint16) uint32 { ++ // All 65536 conversions with this were confirmed to be correct ++ // by Montgomery Edwards⁴⁴⁸ (github.com/x448). ++ ++ sign := uint32(in&0x8000) << 16 // sign for 32-bit ++ exp := uint32(in&0x7c00) >> 10 // exponenent for 16-bit ++ coef := uint32(in&0x03ff) << 13 // significand for 32-bit ++ ++ if exp == 0x1f { ++ if coef == 0 { ++ // infinity ++ return sign | 0x7f800000 | coef ++ } ++ // NaN ++ return sign | 0x7fc00000 | coef ++ } ++ ++ if exp == 0 { ++ if coef == 0 { ++ // zero ++ return sign ++ } ++ ++ // normalize subnormal numbers ++ exp++ ++ for coef&0x7f800000 == 0 { ++ coef <<= 1 ++ exp-- ++ } ++ coef &= 0x007fffff ++ } ++ ++ return sign | ((exp + (0x7f - 0xf)) << 23) | coef ++} ++ ++// f32bitsToF16bits returns uint16 (Float16 bits) converted from the specified float32. ++// Conversion rounds to nearest integer with ties to even. ++func f32bitsToF16bits(u32 uint32) uint16 { ++ // Translated from Rust to Go by Montgomery Edwards⁴⁴⁸ (github.com/x448). ++ // All 4294967296 conversions with this were confirmed to be correct by x448. ++ // Original Rust implementation is by Kathryn Long (github.com/starkat99) with MIT license. ++ ++ sign := u32 & 0x80000000 ++ exp := u32 & 0x7f800000 ++ coef := u32 & 0x007fffff ++ ++ if exp == 0x7f800000 { ++ // NaN or Infinity ++ nanBit := uint32(0) ++ if coef != 0 { ++ nanBit = uint32(0x0200) ++ } ++ return uint16((sign >> 16) | uint32(0x7c00) | nanBit | (coef >> 13)) ++ } ++ ++ halfSign := sign >> 16 ++ ++ unbiasedExp := int32(exp>>23) - 127 ++ halfExp := unbiasedExp + 15 ++ ++ if halfExp >= 0x1f { ++ return uint16(halfSign | uint32(0x7c00)) ++ } ++ ++ if halfExp <= 0 { ++ if 14-halfExp > 24 { ++ return uint16(halfSign) ++ } ++ coef := coef | uint32(0x00800000) ++ halfCoef := coef >> uint32(14-halfExp) ++ roundBit := uint32(1) << uint32(13-halfExp) ++ if (coef&roundBit) != 0 && (coef&(3*roundBit-1)) != 0 { ++ halfCoef++ ++ } ++ return uint16(halfSign | halfCoef) ++ } ++ ++ uHalfExp := uint32(halfExp) << 10 ++ halfCoef := coef >> 13 ++ roundBit := uint32(0x00001000) ++ if (coef&roundBit) != 0 && (coef&(3*roundBit-1)) != 0 { ++ return uint16((halfSign | uHalfExp | halfCoef) + 1) ++ } ++ return uint16(halfSign | uHalfExp | halfCoef) ++} +diff --git a/vendor/golang.org/x/crypto/LICENSE b/vendor/golang.org/x/crypto/LICENSE +index 6a66aea5..2a7cf70d 100644 +--- a/vendor/golang.org/x/crypto/LICENSE ++++ b/vendor/golang.org/x/crypto/LICENSE +@@ -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 + 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 + in the documentation and/or other materials provided with the + 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 + this software without specific prior written permission. + +diff --git a/vendor/golang.org/x/crypto/blowfish/cipher.go b/vendor/golang.org/x/crypto/blowfish/cipher.go +index 213bf204..08989568 100644 +--- a/vendor/golang.org/x/crypto/blowfish/cipher.go ++++ b/vendor/golang.org/x/crypto/blowfish/cipher.go +@@ -11,7 +11,7 @@ + // Deprecated: any new system should use AES (from crypto/aes, if necessary in + // an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from + // 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. + // See https://www.schneier.com/blowfish.html. +diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go +index db42e667..c709b728 100644 +--- a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go ++++ b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // 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 + +diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.go +similarity index 89% +rename from vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go +rename to vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.go +index 3a4287f9..bd183d9b 100644 +--- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go ++++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.go +@@ -2,7 +2,7 @@ + // 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 && (ppc64 || ppc64le) + + package chacha20 + +diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.s +similarity index 76% +rename from vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s +rename to vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.s +index c672ccf6..a660b411 100644 +--- a/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s ++++ b/vendor/golang.org/x/crypto/chacha20/chacha_ppc64x.s +@@ -19,7 +19,7 @@ + // The differences in this and the original implementation are + // due to the calling conventions and initialization of constants. + +-//go:build gc && !purego ++//go:build gc && !purego && (ppc64 || ppc64le) + + #include "textflag.h" + +@@ -36,32 +36,68 @@ + // for VPERMXOR + #define MASK R18 + +-DATA consts<>+0x00(SB)/8, $0x3320646e61707865 +-DATA consts<>+0x08(SB)/8, $0x6b20657479622d32 +-DATA consts<>+0x10(SB)/8, $0x0000000000000001 +-DATA consts<>+0x18(SB)/8, $0x0000000000000000 +-DATA consts<>+0x20(SB)/8, $0x0000000000000004 +-DATA consts<>+0x28(SB)/8, $0x0000000000000000 +-DATA consts<>+0x30(SB)/8, $0x0a0b08090e0f0c0d +-DATA consts<>+0x38(SB)/8, $0x0203000106070405 +-DATA consts<>+0x40(SB)/8, $0x090a0b080d0e0f0c +-DATA consts<>+0x48(SB)/8, $0x0102030005060704 +-DATA consts<>+0x50(SB)/8, $0x6170786561707865 +-DATA consts<>+0x58(SB)/8, $0x6170786561707865 +-DATA consts<>+0x60(SB)/8, $0x3320646e3320646e +-DATA consts<>+0x68(SB)/8, $0x3320646e3320646e +-DATA consts<>+0x70(SB)/8, $0x79622d3279622d32 +-DATA consts<>+0x78(SB)/8, $0x79622d3279622d32 +-DATA consts<>+0x80(SB)/8, $0x6b2065746b206574 +-DATA consts<>+0x88(SB)/8, $0x6b2065746b206574 +-DATA consts<>+0x90(SB)/8, $0x0000000100000000 +-DATA consts<>+0x98(SB)/8, $0x0000000300000002 +-DATA consts<>+0xa0(SB)/8, $0x5566774411223300 +-DATA consts<>+0xa8(SB)/8, $0xddeeffcc99aabb88 +-DATA consts<>+0xb0(SB)/8, $0x6677445522330011 +-DATA consts<>+0xb8(SB)/8, $0xeeffccddaabb8899 ++DATA consts<>+0x00(SB)/4, $0x61707865 ++DATA consts<>+0x04(SB)/4, $0x3320646e ++DATA consts<>+0x08(SB)/4, $0x79622d32 ++DATA consts<>+0x0c(SB)/4, $0x6b206574 ++DATA consts<>+0x10(SB)/4, $0x00000001 ++DATA consts<>+0x14(SB)/4, $0x00000000 ++DATA consts<>+0x18(SB)/4, $0x00000000 ++DATA consts<>+0x1c(SB)/4, $0x00000000 ++DATA consts<>+0x20(SB)/4, $0x00000004 ++DATA consts<>+0x24(SB)/4, $0x00000000 ++DATA consts<>+0x28(SB)/4, $0x00000000 ++DATA consts<>+0x2c(SB)/4, $0x00000000 ++DATA consts<>+0x30(SB)/4, $0x0e0f0c0d ++DATA consts<>+0x34(SB)/4, $0x0a0b0809 ++DATA consts<>+0x38(SB)/4, $0x06070405 ++DATA consts<>+0x3c(SB)/4, $0x02030001 ++DATA consts<>+0x40(SB)/4, $0x0d0e0f0c ++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) + TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40 + MOVD out+0(FP), OUT +@@ -94,6 +130,8 @@ TEXT ·chaCha20_ctr32_vsx(SB),NOSPLIT,$64-40 + // Clear V27 + VXOR V27, V27, V27 + ++ BE_XXBRW_INIT() ++ + // V28 + LXVW4X (CONSTBASE)(R11), VS60 + +@@ -299,6 +337,11 @@ loop_vsx: + VADDUWM V8, V18, V8 + VADDUWM V12, V19, V12 + ++ BE_XXBRW(V0) ++ BE_XXBRW(V4) ++ BE_XXBRW(V8) ++ BE_XXBRW(V12) ++ + CMPU LEN, $64 + BLT tail_vsx + +@@ -327,6 +370,11 @@ loop_vsx: + VADDUWM V9, V18, V8 + VADDUWM V13, V19, V12 + ++ BE_XXBRW(V0) ++ BE_XXBRW(V4) ++ BE_XXBRW(V8) ++ BE_XXBRW(V12) ++ + CMPU LEN, $64 + BLT tail_vsx + +@@ -334,8 +382,8 @@ loop_vsx: + LXVW4X (INP)(R8), VS60 + LXVW4X (INP)(R9), VS61 + LXVW4X (INP)(R10), VS62 +- VXOR V27, V0, V27 + ++ VXOR V27, V0, V27 + VXOR V28, V4, V28 + VXOR V29, V8, V29 + VXOR V30, V12, V30 +@@ -354,6 +402,11 @@ loop_vsx: + VADDUWM V10, V18, V8 + VADDUWM V14, V19, V12 + ++ BE_XXBRW(V0) ++ BE_XXBRW(V4) ++ BE_XXBRW(V8) ++ BE_XXBRW(V12) ++ + CMPU LEN, $64 + BLT tail_vsx + +@@ -381,6 +434,11 @@ loop_vsx: + VADDUWM V11, V18, V8 + VADDUWM V15, V19, V12 + ++ BE_XXBRW(V0) ++ BE_XXBRW(V4) ++ BE_XXBRW(V8) ++ BE_XXBRW(V12) ++ + CMPU LEN, $64 + BLT tail_vsx + +@@ -408,9 +466,9 @@ loop_vsx: + + done_vsx: + // Increment counter by number of 64 byte blocks +- MOVD (CNT), R14 ++ MOVWZ (CNT), R14 + ADD BLOCKS, R14 +- MOVD R14, (CNT) ++ MOVWZ R14, (CNT) + RET + + tail_vsx: +diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go +index cda8e3ed..90ef6a24 100644 +--- a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go ++++ b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go +@@ -4,7 +4,7 @@ + + // Package asn1 contains supporting types for parsing and building ASN.1 + // 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 + // (indicating a type) and class (such as context-specific or constructed). +diff --git a/vendor/golang.org/x/crypto/cryptobyte/string.go b/vendor/golang.org/x/crypto/cryptobyte/string.go +index 10692a8a..4b0f8097 100644 +--- a/vendor/golang.org/x/crypto/cryptobyte/string.go ++++ b/vendor/golang.org/x/crypto/cryptobyte/string.go +@@ -15,7 +15,7 @@ + // + // See the documentation and examples for the Builder and String types to get + // started. +-package cryptobyte // import "golang.org/x/crypto/cryptobyte" ++package cryptobyte + + // String represents a string of bytes. It provides methods for parsing + // fixed-length and length-prefixed values from it. +diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519.go b/vendor/golang.org/x/crypto/curve25519/curve25519.go +index 00f963ea..21ca3b2e 100644 +--- a/vendor/golang.org/x/crypto/curve25519/curve25519.go ++++ b/vendor/golang.org/x/crypto/curve25519/curve25519.go +@@ -6,9 +6,11 @@ + // performs scalar multiplication on the elliptic curve known as Curve25519. + // 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. +-package curve25519 // import "golang.org/x/crypto/curve25519" ++package curve25519 ++ ++import "crypto/ecdh" + + // 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 + // will return an error. + 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 +@@ -25,7 +33,12 @@ func ScalarMult(dst, scalar, point *[32]byte) { + // It is recommended to use the X25519 function with Basepoint instead, as + // copying into fixed size arrays can lead to unexpected bugs. + 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 ( +@@ -57,3 +70,21 @@ func X25519(scalar, point []byte) ([]byte, error) { + var dst [32]byte + 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 ++} +diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go b/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go +deleted file mode 100644 +index ba647e8d..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go ++++ /dev/null +@@ -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") +- } +-} +diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go b/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go +deleted file mode 100644 +index 627df497..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go ++++ /dev/null +@@ -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()) +-} +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/README b/vendor/golang.org/x/crypto/curve25519/internal/field/README +deleted file mode 100644 +index e25bca7d..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/README ++++ /dev/null +@@ -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. +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go +deleted file mode 100644 +index ca841ad9..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go ++++ /dev/null +@@ -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<= 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 +-} +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go +deleted file mode 100644 +index 70c54169..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go ++++ /dev/null +@@ -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) +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s +deleted file mode 100644 +index 60817acc..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s ++++ /dev/null +@@ -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 +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go +deleted file mode 100644 +index 9da280d1..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go ++++ /dev/null +@@ -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) } +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go +deleted file mode 100644 +index 075fe9b9..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go ++++ /dev/null +@@ -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 +-} +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s +deleted file mode 100644 +index 3126a434..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s ++++ /dev/null +@@ -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 +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go +deleted file mode 100644 +index fc029ac1..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go ++++ /dev/null +@@ -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() +-} +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go +deleted file mode 100644 +index 2671217d..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go ++++ /dev/null +@@ -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 +-} +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint +deleted file mode 100644 +index e3685f95..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint ++++ /dev/null +@@ -1 +0,0 @@ +-b0c49ae9f59d233526f8934262c5bbbe14d4358d +diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh +deleted file mode 100644 +index 1ba22a8b..00000000 +--- a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh ++++ /dev/null +@@ -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 +diff --git a/vendor/golang.org/x/crypto/hkdf/hkdf.go b/vendor/golang.org/x/crypto/hkdf/hkdf.go +index f4ded5fe..3bee6629 100644 +--- a/vendor/golang.org/x/crypto/hkdf/hkdf.go ++++ b/vendor/golang.org/x/crypto/hkdf/hkdf.go +@@ -8,7 +8,7 @@ + // HKDF is a cryptographic key derivation function (KDF) with the goal of + // expanding limited input keying material into one or more cryptographically + // strong secret keys. +-package hkdf // import "golang.org/x/crypto/hkdf" ++package hkdf + + import ( + "crypto/hmac" +diff --git a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go +index 333da285..bd896bdc 100644 +--- a/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go ++++ b/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // 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 + +diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s +index e0d3c647..13375738 100644 +--- a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s ++++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s +@@ -1,108 +1,93 @@ +-// Copyright 2012 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. ++// Code generated by command: go run sum_amd64_asm.go -out ../sum_amd64.s -pkg poly1305. DO NOT EDIT. + + //go:build gc && !purego + +-#include "textflag.h" +- +-#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) ++// func update(state *macState, msg []byte) + TEXT ·update(SB), $0-32 + MOVQ state+0(FP), DI + MOVQ msg_base+8(FP), SI + MOVQ msg_len+16(FP), R15 +- +- MOVQ 0(DI), R8 // h0 +- MOVQ 8(DI), R9 // h1 +- MOVQ 16(DI), R10 // h2 +- MOVQ 24(DI), R11 // r0 +- MOVQ 32(DI), R12 // r1 +- +- CMPQ R15, $16 ++ MOVQ (DI), R8 ++ MOVQ 8(DI), R9 ++ MOVQ 16(DI), R10 ++ MOVQ 24(DI), R11 ++ MOVQ 32(DI), R12 ++ CMPQ R15, $0x10 + JB bytes_between_0_and_15 + + loop: +- POLY1305_ADD(SI, R8, R9, R10) ++ ADDQ (SI), R8 ++ ADCQ 8(SI), R9 ++ ADCQ $0x01, R10 ++ LEAQ 16(SI), SI + + multiply: +- POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14) +- SUBQ $16, R15 +- CMPQ R15, $16 +- JAE loop ++ MOVQ R11, AX ++ MULQ R8 ++ 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 + + bytes_between_0_and_15: + TESTQ R15, R15 + JZ done +- MOVQ $1, BX ++ MOVQ $0x00000001, BX + XORQ CX, CX + XORQ R13, R13 + ADDQ R15, SI + + flush_buffer: +- SHLQ $8, BX, CX +- SHLQ $8, BX ++ SHLQ $0x08, BX, CX ++ SHLQ $0x08, BX + MOVB -1(SI), R13 + XORQ R13, BX + DECQ SI + DECQ R15 + JNZ flush_buffer +- + ADDQ BX, R8 + ADCQ CX, R9 +- ADCQ $0, R10 +- MOVQ $16, R15 ++ ADCQ $0x00, R10 ++ MOVQ $0x00000010, R15 + JMP multiply + + done: +- MOVQ R8, 0(DI) ++ MOVQ R8, (DI) + MOVQ R9, 8(DI) + MOVQ R10, 16(DI) + RET +diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.go +similarity index 95% +rename from vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go +rename to vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.go +index 4aec4874..1a1679aa 100644 +--- a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go ++++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.go +@@ -2,7 +2,7 @@ + // 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 && (ppc64 || ppc64le) + + package poly1305 + +diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s +similarity index 89% +rename from vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s +rename to vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s +index b3c1699b..6899a1da 100644 +--- a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s ++++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64x.s +@@ -2,15 +2,25 @@ + // 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 && (ppc64 || ppc64le) + + #include "textflag.h" + + // 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) \ +- MOVD (msg), t0; \ +- MOVD 8(msg), t1; \ ++ LE_MOVD (msg)( R0), t0; \ ++ LE_MOVD (msg)(R24), t1; \ + MOVD $1, t2; \ + ADDC t0, h0, h0; \ + ADDE t1, h1, h1; \ +@@ -50,10 +60,6 @@ + ADDE t3, h1, h1; \ + 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) + TEXT ·update(SB), $0-32 + MOVD state+0(FP), R3 +@@ -66,6 +72,8 @@ TEXT ·update(SB), $0-32 + MOVD 24(R3), R11 // r0 + MOVD 32(R3), R12 // r1 + ++ MOVD $8, R24 ++ + CMP R5, $16 + BLT bytes_between_0_and_15 + +@@ -94,7 +102,7 @@ flush_buffer: + + // Greater than 8 -- load the rightmost remaining bytes in msg + // and put into R17 (h1) +- MOVD (R4)(R21), R17 ++ LE_MOVD (R4)(R21), R17 + MOVD $16, R22 + + // Find the offset to those bytes +@@ -118,7 +126,7 @@ just1: + BLT less8 + + // Exactly 8 +- MOVD (R4), R16 ++ LE_MOVD (R4), R16 + + CMP R17, $0 + +@@ -133,7 +141,7 @@ less8: + MOVD $0, R22 // shift count + CMP R5, $4 + BLT less4 +- MOVWZ (R4), R16 ++ LE_MOVWZ (R4), R16 + ADD $4, R4 + ADD $-4, R5 + MOVD $32, R22 +@@ -141,7 +149,7 @@ less8: + less4: + CMP R5, $2 + BLT less2 +- MOVHZ (R4), R21 ++ LE_MOVHZ (R4), R21 + SLD R22, R21, R21 + OR R16, R21, R16 + ADD $16, R22 +diff --git a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go +index f3c3242a..1fe600ad 100644 +--- a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go ++++ b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go +@@ -32,7 +32,7 @@ chunk size. + + 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 ( + "golang.org/x/crypto/internal/alias" +diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go b/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go +index 3fd05b27..3685b344 100644 +--- a/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go ++++ b/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go +@@ -3,7 +3,7 @@ + // license that can be found in the LICENSE file. + + // 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" + +diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s +index fcce0234..3883e0ec 100644 +--- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s ++++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s +@@ -1,880 +1,880 @@ +-// Copyright 2012 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. ++// Code generated by command: go run salsa20_amd64_asm.go -out ../salsa20_amd64.s -pkg salsa. DO NOT EDIT. + + //go:build amd64 && !purego && gc + +-// This code was translated into a form compatible with 6a from the public +-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html ++// func salsa2020XORKeyStream(out *byte, in *byte, n uint64, nonce *byte, key *byte) ++// Requires: SSE2 ++TEXT ·salsa2020XORKeyStream(SB), $456-40 ++ // This needs up to 64 bytes at 360(R12); hence the non-obvious frame size. ++ MOVQ out+0(FP), DI ++ MOVQ in+8(FP), SI ++ MOVQ n+16(FP), DX ++ MOVQ nonce+24(FP), CX ++ MOVQ key+32(FP), R8 ++ MOVQ SP, R12 ++ ADDQ $0x1f, R12 ++ ANDQ $-32, R12 ++ MOVQ DX, R9 ++ MOVQ CX, DX ++ MOVQ R8, R10 ++ CMPQ R9, $0x00 ++ JBE DONE ++ MOVL 20(R10), CX ++ MOVL (R10), R8 ++ MOVL (DX), AX ++ MOVL 16(R10), R11 ++ MOVL CX, (R12) ++ MOVL R8, 4(R12) ++ MOVL AX, 8(R12) ++ MOVL R11, 12(R12) ++ MOVL 8(DX), CX ++ MOVL 24(R10), R8 ++ MOVL 4(R10), AX ++ MOVL 4(DX), R11 ++ MOVL CX, 16(R12) ++ MOVL R8, 20(R12) ++ MOVL AX, 24(R12) ++ MOVL R11, 28(R12) ++ MOVL 12(DX), CX ++ MOVL 12(R10), DX ++ MOVL 28(R10), R8 ++ MOVL 8(R10), AX ++ MOVL DX, 32(R12) ++ MOVL CX, 36(R12) ++ MOVL R8, 40(R12) ++ MOVL AX, 44(R12) ++ MOVQ $0x61707865, DX ++ MOVQ $0x3320646e, CX ++ MOVQ $0x79622d32, R8 ++ MOVQ $0x6b206574, AX ++ MOVL DX, 48(R12) ++ MOVL CX, 52(R12) ++ MOVL R8, 56(R12) ++ MOVL AX, 60(R12) ++ CMPQ R9, $0x00000100 ++ JB BYTESBETWEEN1AND255 ++ MOVOA 48(R12), X0 ++ PSHUFL $0x55, X0, X1 ++ PSHUFL $0xaa, X0, X2 ++ PSHUFL $0xff, X0, X3 ++ PSHUFL $0x00, X0, X0 ++ MOVOA X1, 64(R12) ++ MOVOA X2, 80(R12) ++ MOVOA X3, 96(R12) ++ MOVOA X0, 112(R12) ++ MOVOA (R12), X0 ++ PSHUFL $0xaa, X0, X1 ++ PSHUFL $0xff, X0, X2 ++ PSHUFL $0x00, X0, X3 ++ PSHUFL $0x55, X0, X0 ++ MOVOA X1, 128(R12) ++ MOVOA X2, 144(R12) ++ MOVOA X3, 160(R12) ++ MOVOA X0, 176(R12) ++ MOVOA 16(R12), X0 ++ PSHUFL $0xff, X0, X1 ++ PSHUFL $0x55, X0, X2 ++ PSHUFL $0xaa, X0, X0 ++ MOVOA X1, 192(R12) ++ MOVOA X2, 208(R12) ++ MOVOA X0, 224(R12) ++ MOVOA 32(R12), X0 ++ PSHUFL $0x00, X0, X1 ++ PSHUFL $0xaa, X0, X2 ++ PSHUFL $0xff, X0, X0 ++ MOVOA X1, 240(R12) ++ MOVOA X2, 256(R12) ++ MOVOA X0, 272(R12) + +-// 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. +-TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment +- MOVQ out+0(FP),DI +- MOVQ in+8(FP),SI +- MOVQ n+16(FP),DX +- MOVQ nonce+24(FP),CX +- MOVQ key+32(FP),R8 ++BYTESATLEAST256: ++ MOVL 16(R12), DX ++ MOVL 36(R12), CX ++ MOVL DX, 288(R12) ++ MOVL CX, 304(R12) ++ SHLQ $0x20, CX ++ ADDQ CX, DX ++ ADDQ $0x01, DX ++ MOVQ DX, CX ++ SHRQ $0x20, CX ++ MOVL DX, 292(R12) ++ MOVL CX, 308(R12) ++ ADDQ $0x01, DX ++ MOVQ DX, CX ++ SHRQ $0x20, CX ++ MOVL DX, 296(R12) ++ MOVL CX, 312(R12) ++ ADDQ $0x01, DX ++ MOVQ DX, CX ++ SHRQ $0x20, CX ++ MOVL DX, 300(R12) ++ MOVL CX, 316(R12) ++ ADDQ $0x01, DX ++ MOVQ DX, CX ++ SHRQ $0x20, CX ++ MOVL DX, 16(R12) ++ MOVL CX, 36(R12) ++ MOVQ R9, 352(R12) ++ MOVQ $0x00000014, DX ++ MOVOA 64(R12), X0 ++ MOVOA 80(R12), X1 ++ MOVOA 96(R12), X2 ++ MOVOA 256(R12), X3 ++ MOVOA 272(R12), X4 ++ MOVOA 128(R12), X5 ++ MOVOA 144(R12), X6 ++ MOVOA 176(R12), X7 ++ MOVOA 192(R12), X8 ++ MOVOA 208(R12), X9 ++ MOVOA 224(R12), X10 ++ MOVOA 304(R12), X11 ++ MOVOA 112(R12), X12 ++ MOVOA 160(R12), X13 ++ MOVOA 240(R12), X14 ++ MOVOA 288(R12), X15 + +- MOVQ SP,R12 +- ADDQ $31, R12 +- ANDQ $~31, R12 ++MAINLOOP1: ++ MOVOA X1, 320(R12) ++ MOVOA X2, 336(R12) ++ MOVOA X13, X1 ++ PADDL X12, X1 ++ MOVOA X1, X2 ++ PSLLL $0x07, X1 ++ PXOR X1, X14 ++ PSRLL $0x19, X2 ++ PXOR X2, X14 ++ MOVOA X7, X1 ++ PADDL X0, X1 ++ MOVOA X1, X2 ++ PSLLL $0x07, X1 ++ PXOR X1, X11 ++ PSRLL $0x19, X2 ++ PXOR X2, X11 ++ MOVOA X12, X1 ++ PADDL X14, X1 ++ MOVOA X1, X2 ++ PSLLL $0x09, X1 ++ PXOR X1, X15 ++ PSRLL $0x17, X2 ++ PXOR X2, X15 ++ MOVOA X0, X1 ++ PADDL X11, X1 ++ MOVOA X1, X2 ++ PSLLL $0x09, X1 ++ PXOR X1, X9 ++ PSRLL $0x17, X2 ++ PXOR X2, X9 ++ MOVOA X14, X1 ++ PADDL X15, X1 ++ MOVOA X1, X2 ++ PSLLL $0x0d, X1 ++ PXOR X1, X13 ++ PSRLL $0x13, X2 ++ PXOR X2, X13 ++ MOVOA X11, X1 ++ PADDL X9, X1 ++ MOVOA X1, X2 ++ PSLLL $0x0d, X1 ++ PXOR X1, X7 ++ PSRLL $0x13, X2 ++ PXOR X2, X7 ++ MOVOA X15, X1 ++ PADDL X13, X1 ++ MOVOA X1, X2 ++ PSLLL $0x12, X1 ++ PXOR X1, X12 ++ PSRLL $0x0e, X2 ++ PXOR X2, X12 ++ MOVOA 320(R12), X1 ++ MOVOA X12, 320(R12) ++ MOVOA X9, X2 ++ PADDL X7, X2 ++ MOVOA X2, X12 ++ PSLLL $0x12, X2 ++ PXOR X2, X0 ++ PSRLL $0x0e, X12 ++ PXOR X12, X0 ++ MOVOA X5, X2 ++ PADDL X1, X2 ++ MOVOA X2, X12 ++ PSLLL $0x07, X2 ++ PXOR X2, X3 ++ PSRLL $0x19, X12 ++ PXOR X12, X3 ++ MOVOA 336(R12), X2 ++ MOVOA X0, 336(R12) ++ MOVOA X6, X0 ++ PADDL X2, X0 ++ MOVOA X0, X12 ++ PSLLL $0x07, X0 ++ PXOR X0, X4 ++ PSRLL $0x19, X12 ++ PXOR X12, X4 ++ MOVOA X1, X0 ++ PADDL X3, X0 ++ MOVOA X0, X12 ++ PSLLL $0x09, X0 ++ PXOR X0, X10 ++ PSRLL $0x17, X12 ++ PXOR X12, X10 ++ MOVOA X2, X0 ++ PADDL X4, X0 ++ MOVOA X0, X12 ++ PSLLL $0x09, X0 ++ PXOR X0, X8 ++ PSRLL $0x17, X12 ++ PXOR X12, X8 ++ MOVOA X3, X0 ++ PADDL X10, X0 ++ MOVOA X0, X12 ++ PSLLL $0x0d, X0 ++ PXOR X0, X5 ++ PSRLL $0x13, X12 ++ PXOR X12, X5 ++ MOVOA X4, X0 ++ PADDL X8, X0 ++ MOVOA X0, X12 ++ PSLLL $0x0d, X0 ++ PXOR X0, X6 ++ PSRLL $0x13, X12 ++ PXOR X12, X6 ++ MOVOA X10, X0 ++ PADDL X5, X0 ++ MOVOA X0, X12 ++ PSLLL $0x12, X0 ++ PXOR X0, X1 ++ PSRLL $0x0e, X12 ++ PXOR X12, X1 ++ MOVOA 320(R12), X0 ++ MOVOA X1, 320(R12) ++ MOVOA X4, X1 ++ PADDL X0, X1 ++ MOVOA X1, X12 ++ PSLLL $0x07, X1 ++ PXOR X1, X7 ++ PSRLL $0x19, X12 ++ PXOR X12, X7 ++ MOVOA X8, X1 ++ PADDL X6, X1 ++ MOVOA X1, X12 ++ PSLLL $0x12, X1 ++ PXOR X1, X2 ++ PSRLL $0x0e, X12 ++ PXOR X12, X2 ++ MOVOA 336(R12), X12 ++ MOVOA X2, 336(R12) ++ MOVOA X14, X1 ++ PADDL X12, X1 ++ MOVOA X1, X2 ++ PSLLL $0x07, X1 ++ PXOR X1, X5 ++ PSRLL $0x19, X2 ++ PXOR X2, X5 ++ MOVOA X0, X1 ++ PADDL X7, X1 ++ MOVOA X1, X2 ++ PSLLL $0x09, X1 ++ PXOR X1, X10 ++ PSRLL $0x17, X2 ++ PXOR X2, X10 ++ MOVOA X12, X1 ++ PADDL X5, X1 ++ MOVOA X1, X2 ++ PSLLL $0x09, X1 ++ PXOR X1, X8 ++ PSRLL $0x17, X2 ++ PXOR X2, X8 ++ MOVOA X7, X1 ++ PADDL X10, X1 ++ MOVOA X1, X2 ++ PSLLL $0x0d, X1 ++ PXOR X1, X4 ++ PSRLL $0x13, X2 ++ PXOR X2, X4 ++ MOVOA X5, X1 ++ PADDL X8, X1 ++ MOVOA X1, X2 ++ PSLLL $0x0d, X1 ++ PXOR X1, X14 ++ PSRLL $0x13, X2 ++ PXOR X2, X14 ++ MOVOA X10, X1 ++ PADDL X4, X1 ++ MOVOA X1, X2 ++ PSLLL $0x12, X1 ++ PXOR X1, X0 ++ PSRLL $0x0e, X2 ++ PXOR X2, X0 ++ MOVOA 320(R12), X1 ++ MOVOA X0, 320(R12) ++ MOVOA X8, X0 ++ PADDL X14, X0 ++ MOVOA X0, X2 ++ PSLLL $0x12, X0 ++ PXOR X0, X12 ++ PSRLL $0x0e, X2 ++ PXOR X2, X12 ++ MOVOA X11, X0 ++ PADDL X1, X0 ++ MOVOA X0, X2 ++ PSLLL $0x07, X0 ++ PXOR X0, X6 ++ PSRLL $0x19, X2 ++ PXOR X2, X6 ++ MOVOA 336(R12), X2 ++ MOVOA X12, 336(R12) ++ MOVOA X3, X0 ++ PADDL X2, X0 ++ MOVOA X0, X12 ++ PSLLL $0x07, X0 ++ PXOR X0, X13 ++ PSRLL $0x19, X12 ++ PXOR X12, X13 ++ MOVOA X1, X0 ++ PADDL X6, X0 ++ MOVOA X0, X12 ++ PSLLL $0x09, X0 ++ PXOR X0, X15 ++ PSRLL $0x17, X12 ++ PXOR X12, X15 ++ MOVOA X2, X0 ++ PADDL X13, X0 ++ MOVOA X0, X12 ++ PSLLL $0x09, X0 ++ PXOR X0, X9 ++ PSRLL $0x17, X12 ++ PXOR X12, X9 ++ MOVOA X6, X0 ++ PADDL X15, X0 ++ MOVOA X0, X12 ++ PSLLL $0x0d, X0 ++ PXOR X0, X11 ++ PSRLL $0x13, X12 ++ PXOR X12, X11 ++ MOVOA X13, X0 ++ PADDL X9, X0 ++ MOVOA X0, X12 ++ PSLLL $0x0d, X0 ++ PXOR X0, X3 ++ PSRLL $0x13, X12 ++ PXOR X12, X3 ++ MOVOA X15, X0 ++ PADDL X11, X0 ++ MOVOA X0, X12 ++ PSLLL $0x12, X0 ++ PXOR X0, X1 ++ PSRLL $0x0e, X12 ++ PXOR X12, X1 ++ MOVOA X9, X0 ++ PADDL X3, X0 ++ MOVOA X0, X12 ++ PSLLL $0x12, X0 ++ PXOR X0, X2 ++ PSRLL $0x0e, X12 ++ PXOR X12, X2 ++ MOVOA 320(R12), X12 ++ MOVOA 336(R12), X0 ++ SUBQ $0x02, DX ++ JA MAINLOOP1 ++ PADDL 112(R12), X12 ++ PADDL 176(R12), X7 ++ PADDL 224(R12), X10 ++ PADDL 272(R12), X4 ++ MOVD X12, DX ++ MOVD X7, CX ++ MOVD X10, R8 ++ MOVD X4, R9 ++ PSHUFL $0x39, X12, X12 ++ PSHUFL $0x39, X7, X7 ++ PSHUFL $0x39, X10, X10 ++ PSHUFL $0x39, X4, X4 ++ XORL (SI), DX ++ XORL 4(SI), CX ++ XORL 8(SI), R8 ++ XORL 12(SI), R9 ++ MOVL DX, (DI) ++ MOVL CX, 4(DI) ++ MOVL R8, 8(DI) ++ MOVL R9, 12(DI) ++ MOVD X12, DX ++ MOVD X7, CX ++ MOVD X10, R8 ++ MOVD X4, R9 ++ PSHUFL $0x39, X12, X12 ++ PSHUFL $0x39, X7, X7 ++ PSHUFL $0x39, X10, X10 ++ PSHUFL $0x39, X4, X4 ++ XORL 64(SI), DX ++ XORL 68(SI), CX ++ XORL 72(SI), R8 ++ XORL 76(SI), R9 ++ MOVL DX, 64(DI) ++ MOVL CX, 68(DI) ++ MOVL R8, 72(DI) ++ MOVL R9, 76(DI) ++ MOVD X12, DX ++ MOVD X7, CX ++ MOVD X10, R8 ++ MOVD X4, R9 ++ PSHUFL $0x39, X12, X12 ++ PSHUFL $0x39, X7, X7 ++ PSHUFL $0x39, X10, X10 ++ PSHUFL $0x39, X4, X4 ++ XORL 128(SI), DX ++ XORL 132(SI), CX ++ XORL 136(SI), R8 ++ XORL 140(SI), R9 ++ MOVL DX, 128(DI) ++ MOVL CX, 132(DI) ++ MOVL R8, 136(DI) ++ MOVL R9, 140(DI) ++ MOVD X12, DX ++ MOVD X7, CX ++ MOVD X10, R8 ++ MOVD X4, R9 ++ XORL 192(SI), DX ++ XORL 196(SI), CX ++ XORL 200(SI), R8 ++ XORL 204(SI), R9 ++ MOVL DX, 192(DI) ++ MOVL CX, 196(DI) ++ MOVL R8, 200(DI) ++ MOVL R9, 204(DI) ++ PADDL 240(R12), X14 ++ PADDL 64(R12), X0 ++ PADDL 128(R12), X5 ++ PADDL 192(R12), X8 ++ MOVD X14, DX ++ MOVD X0, CX ++ MOVD X5, R8 ++ MOVD X8, R9 ++ PSHUFL $0x39, X14, X14 ++ PSHUFL $0x39, X0, X0 ++ PSHUFL $0x39, X5, X5 ++ PSHUFL $0x39, X8, X8 ++ XORL 16(SI), DX ++ XORL 20(SI), CX ++ XORL 24(SI), R8 ++ XORL 28(SI), R9 ++ MOVL DX, 16(DI) ++ MOVL CX, 20(DI) ++ MOVL R8, 24(DI) ++ MOVL R9, 28(DI) ++ MOVD X14, DX ++ MOVD X0, CX ++ MOVD X5, R8 ++ MOVD X8, R9 ++ PSHUFL $0x39, X14, X14 ++ PSHUFL $0x39, X0, X0 ++ PSHUFL $0x39, X5, X5 ++ PSHUFL $0x39, X8, X8 ++ XORL 80(SI), DX ++ XORL 84(SI), CX ++ XORL 88(SI), R8 ++ XORL 92(SI), R9 ++ MOVL DX, 80(DI) ++ MOVL CX, 84(DI) ++ MOVL R8, 88(DI) ++ MOVL R9, 92(DI) ++ MOVD X14, DX ++ MOVD X0, CX ++ MOVD X5, R8 ++ MOVD X8, R9 ++ PSHUFL $0x39, X14, X14 ++ PSHUFL $0x39, X0, X0 ++ PSHUFL $0x39, X5, X5 ++ PSHUFL $0x39, X8, X8 ++ XORL 144(SI), DX ++ XORL 148(SI), CX ++ XORL 152(SI), R8 ++ XORL 156(SI), R9 ++ MOVL DX, 144(DI) ++ MOVL CX, 148(DI) ++ MOVL R8, 152(DI) ++ MOVL R9, 156(DI) ++ MOVD X14, DX ++ MOVD X0, CX ++ MOVD X5, R8 ++ MOVD X8, R9 ++ XORL 208(SI), DX ++ XORL 212(SI), CX ++ XORL 216(SI), R8 ++ XORL 220(SI), R9 ++ MOVL DX, 208(DI) ++ MOVL CX, 212(DI) ++ MOVL R8, 216(DI) ++ MOVL R9, 220(DI) ++ PADDL 288(R12), X15 ++ PADDL 304(R12), X11 ++ PADDL 80(R12), X1 ++ PADDL 144(R12), X6 ++ MOVD X15, DX ++ MOVD X11, CX ++ MOVD X1, R8 ++ MOVD X6, R9 ++ PSHUFL $0x39, X15, X15 ++ PSHUFL $0x39, X11, X11 ++ PSHUFL $0x39, X1, X1 ++ PSHUFL $0x39, X6, X6 ++ XORL 32(SI), DX ++ XORL 36(SI), CX ++ XORL 40(SI), R8 ++ XORL 44(SI), R9 ++ MOVL DX, 32(DI) ++ MOVL CX, 36(DI) ++ MOVL R8, 40(DI) ++ MOVL R9, 44(DI) ++ MOVD X15, DX ++ MOVD X11, CX ++ MOVD X1, R8 ++ MOVD X6, R9 ++ PSHUFL $0x39, X15, X15 ++ PSHUFL $0x39, X11, X11 ++ PSHUFL $0x39, X1, X1 ++ PSHUFL $0x39, X6, X6 ++ XORL 96(SI), DX ++ XORL 100(SI), CX ++ XORL 104(SI), R8 ++ XORL 108(SI), R9 ++ MOVL DX, 96(DI) ++ MOVL CX, 100(DI) ++ MOVL R8, 104(DI) ++ MOVL R9, 108(DI) ++ MOVD X15, DX ++ MOVD X11, CX ++ MOVD X1, R8 ++ MOVD X6, R9 ++ PSHUFL $0x39, X15, X15 ++ PSHUFL $0x39, X11, X11 ++ PSHUFL $0x39, X1, X1 ++ PSHUFL $0x39, X6, X6 ++ XORL 160(SI), DX ++ XORL 164(SI), CX ++ XORL 168(SI), R8 ++ XORL 172(SI), R9 ++ MOVL DX, 160(DI) ++ MOVL CX, 164(DI) ++ MOVL R8, 168(DI) ++ MOVL R9, 172(DI) ++ MOVD X15, DX ++ MOVD X11, CX ++ MOVD X1, R8 ++ MOVD X6, R9 ++ XORL 224(SI), DX ++ XORL 228(SI), CX ++ XORL 232(SI), R8 ++ XORL 236(SI), R9 ++ MOVL DX, 224(DI) ++ MOVL CX, 228(DI) ++ MOVL R8, 232(DI) ++ MOVL R9, 236(DI) ++ PADDL 160(R12), X13 ++ PADDL 208(R12), X9 ++ PADDL 256(R12), X3 ++ PADDL 96(R12), X2 ++ MOVD X13, DX ++ MOVD X9, CX ++ MOVD X3, R8 ++ MOVD X2, R9 ++ PSHUFL $0x39, X13, X13 ++ PSHUFL $0x39, X9, X9 ++ PSHUFL $0x39, X3, X3 ++ PSHUFL $0x39, X2, X2 ++ XORL 48(SI), DX ++ XORL 52(SI), CX ++ XORL 56(SI), R8 ++ XORL 60(SI), R9 ++ MOVL DX, 48(DI) ++ MOVL CX, 52(DI) ++ MOVL R8, 56(DI) ++ MOVL R9, 60(DI) ++ MOVD X13, DX ++ MOVD X9, CX ++ MOVD X3, R8 ++ MOVD X2, R9 ++ PSHUFL $0x39, X13, X13 ++ PSHUFL $0x39, X9, X9 ++ PSHUFL $0x39, X3, X3 ++ PSHUFL $0x39, X2, X2 ++ XORL 112(SI), DX ++ XORL 116(SI), CX ++ XORL 120(SI), R8 ++ XORL 124(SI), R9 ++ MOVL DX, 112(DI) ++ MOVL CX, 116(DI) ++ MOVL R8, 120(DI) ++ MOVL R9, 124(DI) ++ MOVD X13, DX ++ MOVD X9, CX ++ MOVD X3, R8 ++ MOVD X2, R9 ++ PSHUFL $0x39, X13, X13 ++ PSHUFL $0x39, X9, X9 ++ PSHUFL $0x39, X3, X3 ++ PSHUFL $0x39, X2, X2 ++ XORL 176(SI), DX ++ XORL 180(SI), CX ++ XORL 184(SI), R8 ++ XORL 188(SI), R9 ++ MOVL DX, 176(DI) ++ MOVL CX, 180(DI) ++ MOVL R8, 184(DI) ++ MOVL R9, 188(DI) ++ MOVD X13, DX ++ MOVD X9, CX ++ MOVD X3, R8 ++ MOVD X2, R9 ++ XORL 240(SI), DX ++ XORL 244(SI), CX ++ XORL 248(SI), R8 ++ XORL 252(SI), R9 ++ MOVL DX, 240(DI) ++ MOVL CX, 244(DI) ++ MOVL R8, 248(DI) ++ MOVL R9, 252(DI) ++ MOVQ 352(R12), R9 ++ SUBQ $0x00000100, R9 ++ ADDQ $0x00000100, SI ++ ADDQ $0x00000100, DI ++ CMPQ R9, $0x00000100 ++ JAE BYTESATLEAST256 ++ CMPQ R9, $0x00 ++ JBE DONE + +- MOVQ DX,R9 +- MOVQ CX,DX +- MOVQ R8,R10 +- CMPQ R9,$0 +- JBE DONE +- START: +- MOVL 20(R10),CX +- MOVL 0(R10),R8 +- MOVL 0(DX),AX +- MOVL 16(R10),R11 +- MOVL CX,0(R12) +- MOVL R8, 4 (R12) +- MOVL AX, 8 (R12) +- MOVL R11, 12 (R12) +- MOVL 8(DX),CX +- MOVL 24(R10),R8 +- MOVL 4(R10),AX +- MOVL 4(DX),R11 +- MOVL CX,16(R12) +- MOVL R8, 20 (R12) +- MOVL AX, 24 (R12) +- MOVL R11, 28 (R12) +- MOVL 12(DX),CX +- MOVL 12(R10),DX +- MOVL 28(R10),R8 +- MOVL 8(R10),AX +- MOVL DX,32(R12) +- MOVL CX, 36 (R12) +- MOVL R8, 40 (R12) +- MOVL AX, 44 (R12) +- MOVQ $1634760805,DX +- MOVQ $857760878,CX +- MOVQ $2036477234,R8 +- MOVQ $1797285236,AX +- MOVL DX,48(R12) +- MOVL CX, 52 (R12) +- MOVL R8, 56 (R12) +- MOVL AX, 60 (R12) +- CMPQ R9,$256 +- JB BYTESBETWEEN1AND255 +- MOVOA 48(R12),X0 +- PSHUFL $0X55,X0,X1 +- PSHUFL $0XAA,X0,X2 +- PSHUFL $0XFF,X0,X3 +- PSHUFL $0X00,X0,X0 +- MOVOA X1,64(R12) +- MOVOA X2,80(R12) +- MOVOA X3,96(R12) +- MOVOA X0,112(R12) +- MOVOA 0(R12),X0 +- PSHUFL $0XAA,X0,X1 +- PSHUFL $0XFF,X0,X2 +- PSHUFL $0X00,X0,X3 +- PSHUFL $0X55,X0,X0 +- MOVOA X1,128(R12) +- MOVOA X2,144(R12) +- MOVOA X3,160(R12) +- MOVOA X0,176(R12) +- MOVOA 16(R12),X0 +- PSHUFL $0XFF,X0,X1 +- PSHUFL $0X55,X0,X2 +- PSHUFL $0XAA,X0,X0 +- MOVOA X1,192(R12) +- MOVOA X2,208(R12) +- MOVOA X0,224(R12) +- MOVOA 32(R12),X0 +- PSHUFL $0X00,X0,X1 +- PSHUFL $0XAA,X0,X2 +- PSHUFL $0XFF,X0,X0 +- MOVOA X1,240(R12) +- MOVOA X2,256(R12) +- MOVOA X0,272(R12) +- BYTESATLEAST256: +- MOVL 16(R12),DX +- MOVL 36 (R12),CX +- MOVL DX,288(R12) +- MOVL CX,304(R12) +- SHLQ $32,CX +- ADDQ CX,DX +- ADDQ $1,DX +- MOVQ DX,CX +- SHRQ $32,CX +- MOVL DX, 292 (R12) +- MOVL CX, 308 (R12) +- ADDQ $1,DX +- MOVQ DX,CX +- SHRQ $32,CX +- MOVL DX, 296 (R12) +- MOVL CX, 312 (R12) +- ADDQ $1,DX +- MOVQ DX,CX +- SHRQ $32,CX +- MOVL DX, 300 (R12) +- MOVL CX, 316 (R12) +- ADDQ $1,DX +- MOVQ DX,CX +- SHRQ $32,CX +- MOVL DX,16(R12) +- MOVL CX, 36 (R12) +- MOVQ R9,352(R12) +- MOVQ $20,DX +- MOVOA 64(R12),X0 +- MOVOA 80(R12),X1 +- MOVOA 96(R12),X2 +- MOVOA 256(R12),X3 +- MOVOA 272(R12),X4 +- MOVOA 128(R12),X5 +- MOVOA 144(R12),X6 +- MOVOA 176(R12),X7 +- MOVOA 192(R12),X8 +- MOVOA 208(R12),X9 +- MOVOA 224(R12),X10 +- MOVOA 304(R12),X11 +- MOVOA 112(R12),X12 +- MOVOA 160(R12),X13 +- MOVOA 240(R12),X14 +- MOVOA 288(R12),X15 +- MAINLOOP1: +- MOVOA X1,320(R12) +- MOVOA X2,336(R12) +- MOVOA X13,X1 +- PADDL X12,X1 +- MOVOA X1,X2 +- PSLLL $7,X1 +- PXOR X1,X14 +- PSRLL $25,X2 +- PXOR X2,X14 +- MOVOA X7,X1 +- PADDL X0,X1 +- MOVOA X1,X2 +- PSLLL $7,X1 +- PXOR X1,X11 +- PSRLL $25,X2 +- PXOR X2,X11 +- MOVOA X12,X1 +- PADDL X14,X1 +- MOVOA X1,X2 +- PSLLL $9,X1 +- PXOR X1,X15 +- PSRLL $23,X2 +- PXOR X2,X15 +- MOVOA X0,X1 +- PADDL X11,X1 +- MOVOA X1,X2 +- PSLLL $9,X1 +- PXOR X1,X9 +- PSRLL $23,X2 +- PXOR X2,X9 +- MOVOA X14,X1 +- PADDL X15,X1 +- MOVOA X1,X2 +- PSLLL $13,X1 +- PXOR X1,X13 +- PSRLL $19,X2 +- PXOR X2,X13 +- MOVOA X11,X1 +- PADDL X9,X1 +- MOVOA X1,X2 +- PSLLL $13,X1 +- PXOR X1,X7 +- PSRLL $19,X2 +- PXOR X2,X7 +- MOVOA X15,X1 +- PADDL X13,X1 +- MOVOA X1,X2 +- PSLLL $18,X1 +- PXOR X1,X12 +- PSRLL $14,X2 +- PXOR X2,X12 +- MOVOA 320(R12),X1 +- MOVOA X12,320(R12) +- MOVOA X9,X2 +- PADDL X7,X2 +- MOVOA X2,X12 +- PSLLL $18,X2 +- PXOR X2,X0 +- PSRLL $14,X12 +- PXOR X12,X0 +- MOVOA X5,X2 +- PADDL X1,X2 +- MOVOA X2,X12 +- PSLLL $7,X2 +- PXOR X2,X3 +- PSRLL $25,X12 +- PXOR X12,X3 +- MOVOA 336(R12),X2 +- MOVOA X0,336(R12) +- MOVOA X6,X0 +- PADDL X2,X0 +- MOVOA X0,X12 +- PSLLL $7,X0 +- PXOR X0,X4 +- PSRLL $25,X12 +- PXOR X12,X4 +- MOVOA X1,X0 +- PADDL X3,X0 +- MOVOA X0,X12 +- PSLLL $9,X0 +- PXOR X0,X10 +- PSRLL $23,X12 +- PXOR X12,X10 +- MOVOA X2,X0 +- PADDL X4,X0 +- MOVOA X0,X12 +- PSLLL $9,X0 +- PXOR X0,X8 +- PSRLL $23,X12 +- PXOR X12,X8 +- MOVOA X3,X0 +- PADDL X10,X0 +- MOVOA X0,X12 +- PSLLL $13,X0 +- PXOR X0,X5 +- PSRLL $19,X12 +- PXOR X12,X5 +- MOVOA X4,X0 +- PADDL X8,X0 +- MOVOA X0,X12 +- PSLLL $13,X0 +- PXOR X0,X6 +- PSRLL $19,X12 +- PXOR X12,X6 +- MOVOA X10,X0 +- PADDL X5,X0 +- MOVOA X0,X12 +- PSLLL $18,X0 +- PXOR X0,X1 +- PSRLL $14,X12 +- PXOR X12,X1 +- MOVOA 320(R12),X0 +- MOVOA X1,320(R12) +- MOVOA X4,X1 +- PADDL X0,X1 +- MOVOA X1,X12 +- PSLLL $7,X1 +- PXOR X1,X7 +- PSRLL $25,X12 +- PXOR X12,X7 +- MOVOA X8,X1 +- PADDL X6,X1 +- MOVOA X1,X12 +- PSLLL $18,X1 +- PXOR X1,X2 +- PSRLL $14,X12 +- PXOR X12,X2 +- MOVOA 336(R12),X12 +- MOVOA X2,336(R12) +- MOVOA X14,X1 +- PADDL X12,X1 +- MOVOA X1,X2 +- PSLLL $7,X1 +- PXOR X1,X5 +- PSRLL $25,X2 +- PXOR X2,X5 +- MOVOA X0,X1 +- PADDL X7,X1 +- MOVOA X1,X2 +- PSLLL $9,X1 +- PXOR X1,X10 +- PSRLL $23,X2 +- PXOR X2,X10 +- MOVOA X12,X1 +- PADDL X5,X1 +- MOVOA X1,X2 +- PSLLL $9,X1 +- PXOR X1,X8 +- PSRLL $23,X2 +- PXOR X2,X8 +- MOVOA X7,X1 +- PADDL X10,X1 +- MOVOA X1,X2 +- PSLLL $13,X1 +- PXOR X1,X4 +- PSRLL $19,X2 +- PXOR X2,X4 +- MOVOA X5,X1 +- PADDL X8,X1 +- MOVOA X1,X2 +- PSLLL $13,X1 +- PXOR X1,X14 +- PSRLL $19,X2 +- PXOR X2,X14 +- MOVOA X10,X1 +- PADDL X4,X1 +- MOVOA X1,X2 +- PSLLL $18,X1 +- PXOR X1,X0 +- PSRLL $14,X2 +- PXOR X2,X0 +- MOVOA 320(R12),X1 +- MOVOA X0,320(R12) +- MOVOA X8,X0 +- PADDL X14,X0 +- MOVOA X0,X2 +- PSLLL $18,X0 +- PXOR X0,X12 +- PSRLL $14,X2 +- PXOR X2,X12 +- MOVOA X11,X0 +- PADDL X1,X0 +- MOVOA X0,X2 +- PSLLL $7,X0 +- PXOR X0,X6 +- PSRLL $25,X2 +- PXOR X2,X6 +- MOVOA 336(R12),X2 +- MOVOA X12,336(R12) +- MOVOA X3,X0 +- PADDL X2,X0 +- MOVOA X0,X12 +- PSLLL $7,X0 +- PXOR X0,X13 +- PSRLL $25,X12 +- PXOR X12,X13 +- MOVOA X1,X0 +- PADDL X6,X0 +- MOVOA X0,X12 +- PSLLL $9,X0 +- PXOR X0,X15 +- PSRLL $23,X12 +- PXOR X12,X15 +- MOVOA X2,X0 +- PADDL X13,X0 +- MOVOA X0,X12 +- PSLLL $9,X0 +- PXOR X0,X9 +- PSRLL $23,X12 +- PXOR X12,X9 +- MOVOA X6,X0 +- PADDL X15,X0 +- MOVOA X0,X12 +- PSLLL $13,X0 +- PXOR X0,X11 +- PSRLL $19,X12 +- PXOR X12,X11 +- MOVOA X13,X0 +- PADDL X9,X0 +- MOVOA X0,X12 +- PSLLL $13,X0 +- PXOR X0,X3 +- PSRLL $19,X12 +- PXOR X12,X3 +- MOVOA X15,X0 +- PADDL X11,X0 +- MOVOA X0,X12 +- PSLLL $18,X0 +- PXOR X0,X1 +- PSRLL $14,X12 +- PXOR X12,X1 +- MOVOA X9,X0 +- PADDL X3,X0 +- MOVOA X0,X12 +- PSLLL $18,X0 +- PXOR X0,X2 +- PSRLL $14,X12 +- PXOR X12,X2 +- MOVOA 320(R12),X12 +- MOVOA 336(R12),X0 +- SUBQ $2,DX +- JA MAINLOOP1 +- PADDL 112(R12),X12 +- PADDL 176(R12),X7 +- PADDL 224(R12),X10 +- PADDL 272(R12),X4 +- MOVD X12,DX +- MOVD X7,CX +- MOVD X10,R8 +- MOVD X4,R9 +- PSHUFL $0X39,X12,X12 +- PSHUFL $0X39,X7,X7 +- PSHUFL $0X39,X10,X10 +- PSHUFL $0X39,X4,X4 +- XORL 0(SI),DX +- XORL 4(SI),CX +- XORL 8(SI),R8 +- XORL 12(SI),R9 +- MOVL DX,0(DI) +- MOVL CX,4(DI) +- MOVL R8,8(DI) +- MOVL R9,12(DI) +- MOVD X12,DX +- MOVD X7,CX +- MOVD X10,R8 +- MOVD X4,R9 +- PSHUFL $0X39,X12,X12 +- PSHUFL $0X39,X7,X7 +- PSHUFL $0X39,X10,X10 +- PSHUFL $0X39,X4,X4 +- XORL 64(SI),DX +- XORL 68(SI),CX +- XORL 72(SI),R8 +- XORL 76(SI),R9 +- MOVL DX,64(DI) +- MOVL CX,68(DI) +- MOVL R8,72(DI) +- MOVL R9,76(DI) +- MOVD X12,DX +- MOVD X7,CX +- MOVD X10,R8 +- MOVD X4,R9 +- PSHUFL $0X39,X12,X12 +- PSHUFL $0X39,X7,X7 +- PSHUFL $0X39,X10,X10 +- PSHUFL $0X39,X4,X4 +- XORL 128(SI),DX +- XORL 132(SI),CX +- XORL 136(SI),R8 +- XORL 140(SI),R9 +- MOVL DX,128(DI) +- MOVL CX,132(DI) +- MOVL R8,136(DI) +- MOVL R9,140(DI) +- MOVD X12,DX +- MOVD X7,CX +- MOVD X10,R8 +- MOVD X4,R9 +- XORL 192(SI),DX +- XORL 196(SI),CX +- XORL 200(SI),R8 +- XORL 204(SI),R9 +- MOVL DX,192(DI) +- MOVL CX,196(DI) +- MOVL R8,200(DI) +- MOVL R9,204(DI) +- PADDL 240(R12),X14 +- PADDL 64(R12),X0 +- PADDL 128(R12),X5 +- PADDL 192(R12),X8 +- MOVD X14,DX +- MOVD X0,CX +- MOVD X5,R8 +- MOVD X8,R9 +- PSHUFL $0X39,X14,X14 +- PSHUFL $0X39,X0,X0 +- PSHUFL $0X39,X5,X5 +- PSHUFL $0X39,X8,X8 +- XORL 16(SI),DX +- XORL 20(SI),CX +- XORL 24(SI),R8 +- XORL 28(SI),R9 +- MOVL DX,16(DI) +- MOVL CX,20(DI) +- MOVL R8,24(DI) +- MOVL R9,28(DI) +- MOVD X14,DX +- MOVD X0,CX +- MOVD X5,R8 +- MOVD X8,R9 +- PSHUFL $0X39,X14,X14 +- PSHUFL $0X39,X0,X0 +- PSHUFL $0X39,X5,X5 +- PSHUFL $0X39,X8,X8 +- XORL 80(SI),DX +- XORL 84(SI),CX +- XORL 88(SI),R8 +- XORL 92(SI),R9 +- MOVL DX,80(DI) +- MOVL CX,84(DI) +- MOVL R8,88(DI) +- MOVL R9,92(DI) +- MOVD X14,DX +- MOVD X0,CX +- MOVD X5,R8 +- MOVD X8,R9 +- PSHUFL $0X39,X14,X14 +- PSHUFL $0X39,X0,X0 +- PSHUFL $0X39,X5,X5 +- PSHUFL $0X39,X8,X8 +- XORL 144(SI),DX +- XORL 148(SI),CX +- XORL 152(SI),R8 +- XORL 156(SI),R9 +- MOVL DX,144(DI) +- MOVL CX,148(DI) +- MOVL R8,152(DI) +- MOVL R9,156(DI) +- MOVD X14,DX +- MOVD X0,CX +- MOVD X5,R8 +- MOVD X8,R9 +- XORL 208(SI),DX +- XORL 212(SI),CX +- XORL 216(SI),R8 +- XORL 220(SI),R9 +- MOVL DX,208(DI) +- MOVL CX,212(DI) +- MOVL R8,216(DI) +- MOVL R9,220(DI) +- PADDL 288(R12),X15 +- PADDL 304(R12),X11 +- PADDL 80(R12),X1 +- PADDL 144(R12),X6 +- MOVD X15,DX +- MOVD X11,CX +- MOVD X1,R8 +- MOVD X6,R9 +- PSHUFL $0X39,X15,X15 +- PSHUFL $0X39,X11,X11 +- PSHUFL $0X39,X1,X1 +- PSHUFL $0X39,X6,X6 +- XORL 32(SI),DX +- XORL 36(SI),CX +- XORL 40(SI),R8 +- XORL 44(SI),R9 +- MOVL DX,32(DI) +- MOVL CX,36(DI) +- MOVL R8,40(DI) +- MOVL R9,44(DI) +- MOVD X15,DX +- MOVD X11,CX +- MOVD X1,R8 +- MOVD X6,R9 +- PSHUFL $0X39,X15,X15 +- PSHUFL $0X39,X11,X11 +- PSHUFL $0X39,X1,X1 +- PSHUFL $0X39,X6,X6 +- XORL 96(SI),DX +- XORL 100(SI),CX +- XORL 104(SI),R8 +- XORL 108(SI),R9 +- MOVL DX,96(DI) +- MOVL CX,100(DI) +- MOVL R8,104(DI) +- MOVL R9,108(DI) +- MOVD X15,DX +- MOVD X11,CX +- MOVD X1,R8 +- MOVD X6,R9 +- PSHUFL $0X39,X15,X15 +- PSHUFL $0X39,X11,X11 +- PSHUFL $0X39,X1,X1 +- PSHUFL $0X39,X6,X6 +- XORL 160(SI),DX +- XORL 164(SI),CX +- XORL 168(SI),R8 +- XORL 172(SI),R9 +- MOVL DX,160(DI) +- MOVL CX,164(DI) +- MOVL R8,168(DI) +- MOVL R9,172(DI) +- MOVD X15,DX +- MOVD X11,CX +- MOVD X1,R8 +- MOVD X6,R9 +- XORL 224(SI),DX +- XORL 228(SI),CX +- XORL 232(SI),R8 +- XORL 236(SI),R9 +- MOVL DX,224(DI) +- MOVL CX,228(DI) +- MOVL R8,232(DI) +- MOVL R9,236(DI) +- PADDL 160(R12),X13 +- PADDL 208(R12),X9 +- PADDL 256(R12),X3 +- PADDL 96(R12),X2 +- MOVD X13,DX +- MOVD X9,CX +- MOVD X3,R8 +- MOVD X2,R9 +- PSHUFL $0X39,X13,X13 +- PSHUFL $0X39,X9,X9 +- PSHUFL $0X39,X3,X3 +- PSHUFL $0X39,X2,X2 +- XORL 48(SI),DX +- XORL 52(SI),CX +- XORL 56(SI),R8 +- XORL 60(SI),R9 +- MOVL DX,48(DI) +- MOVL CX,52(DI) +- MOVL R8,56(DI) +- MOVL R9,60(DI) +- MOVD X13,DX +- MOVD X9,CX +- MOVD X3,R8 +- MOVD X2,R9 +- PSHUFL $0X39,X13,X13 +- PSHUFL $0X39,X9,X9 +- PSHUFL $0X39,X3,X3 +- PSHUFL $0X39,X2,X2 +- XORL 112(SI),DX +- XORL 116(SI),CX +- XORL 120(SI),R8 +- XORL 124(SI),R9 +- MOVL DX,112(DI) +- MOVL CX,116(DI) +- MOVL R8,120(DI) +- MOVL R9,124(DI) +- MOVD X13,DX +- MOVD X9,CX +- MOVD X3,R8 +- MOVD X2,R9 +- PSHUFL $0X39,X13,X13 +- PSHUFL $0X39,X9,X9 +- PSHUFL $0X39,X3,X3 +- PSHUFL $0X39,X2,X2 +- XORL 176(SI),DX +- XORL 180(SI),CX +- XORL 184(SI),R8 +- XORL 188(SI),R9 +- MOVL DX,176(DI) +- MOVL CX,180(DI) +- MOVL R8,184(DI) +- MOVL R9,188(DI) +- MOVD X13,DX +- MOVD X9,CX +- MOVD X3,R8 +- MOVD X2,R9 +- XORL 240(SI),DX +- XORL 244(SI),CX +- XORL 248(SI),R8 +- XORL 252(SI),R9 +- MOVL DX,240(DI) +- MOVL CX,244(DI) +- MOVL R8,248(DI) +- MOVL R9,252(DI) +- MOVQ 352(R12),R9 +- SUBQ $256,R9 +- ADDQ $256,SI +- ADDQ $256,DI +- CMPQ R9,$256 +- JAE BYTESATLEAST256 +- CMPQ R9,$0 +- JBE DONE +- BYTESBETWEEN1AND255: +- CMPQ R9,$64 +- JAE NOCOPY +- MOVQ DI,DX +- LEAQ 360(R12),DI +- MOVQ R9,CX ++BYTESBETWEEN1AND255: ++ CMPQ R9, $0x40 ++ JAE NOCOPY ++ MOVQ DI, DX ++ LEAQ 360(R12), DI ++ MOVQ R9, CX + REP; MOVSB +- LEAQ 360(R12),DI +- LEAQ 360(R12),SI +- NOCOPY: +- MOVQ R9,352(R12) +- MOVOA 48(R12),X0 +- MOVOA 0(R12),X1 +- MOVOA 16(R12),X2 +- MOVOA 32(R12),X3 +- MOVOA X1,X4 +- MOVQ $20,CX +- MAINLOOP2: +- PADDL X0,X4 +- MOVOA X0,X5 +- MOVOA X4,X6 +- PSLLL $7,X4 +- PSRLL $25,X6 +- PXOR X4,X3 +- PXOR X6,X3 +- PADDL X3,X5 +- MOVOA X3,X4 +- MOVOA X5,X6 +- PSLLL $9,X5 +- PSRLL $23,X6 +- PXOR X5,X2 +- PSHUFL $0X93,X3,X3 +- PXOR X6,X2 +- PADDL X2,X4 +- MOVOA X2,X5 +- MOVOA X4,X6 +- PSLLL $13,X4 +- PSRLL $19,X6 +- PXOR X4,X1 +- PSHUFL $0X4E,X2,X2 +- PXOR X6,X1 +- PADDL X1,X5 +- MOVOA X3,X4 +- MOVOA X5,X6 +- PSLLL $18,X5 +- PSRLL $14,X6 +- PXOR X5,X0 +- PSHUFL $0X39,X1,X1 +- PXOR X6,X0 +- PADDL X0,X4 +- MOVOA X0,X5 +- MOVOA X4,X6 +- PSLLL $7,X4 +- PSRLL $25,X6 +- PXOR X4,X1 +- PXOR X6,X1 +- PADDL X1,X5 +- MOVOA X1,X4 +- MOVOA X5,X6 +- PSLLL $9,X5 +- PSRLL $23,X6 +- PXOR X5,X2 +- PSHUFL $0X93,X1,X1 +- PXOR X6,X2 +- PADDL X2,X4 +- MOVOA X2,X5 +- MOVOA X4,X6 +- PSLLL $13,X4 +- PSRLL $19,X6 +- PXOR X4,X3 +- PSHUFL $0X4E,X2,X2 +- PXOR X6,X3 +- PADDL X3,X5 +- MOVOA X1,X4 +- MOVOA X5,X6 +- PSLLL $18,X5 +- PSRLL $14,X6 +- PXOR X5,X0 +- PSHUFL $0X39,X3,X3 +- PXOR X6,X0 +- PADDL X0,X4 +- MOVOA X0,X5 +- MOVOA X4,X6 +- PSLLL $7,X4 +- PSRLL $25,X6 +- PXOR X4,X3 +- PXOR X6,X3 +- PADDL X3,X5 +- MOVOA X3,X4 +- MOVOA X5,X6 +- PSLLL $9,X5 +- PSRLL $23,X6 +- PXOR X5,X2 +- PSHUFL $0X93,X3,X3 +- PXOR X6,X2 +- PADDL X2,X4 +- MOVOA X2,X5 +- MOVOA X4,X6 +- PSLLL $13,X4 +- PSRLL $19,X6 +- PXOR X4,X1 +- PSHUFL $0X4E,X2,X2 +- PXOR X6,X1 +- PADDL X1,X5 +- MOVOA X3,X4 +- MOVOA X5,X6 +- PSLLL $18,X5 +- PSRLL $14,X6 +- PXOR X5,X0 +- PSHUFL $0X39,X1,X1 +- PXOR X6,X0 +- PADDL X0,X4 +- MOVOA X0,X5 +- MOVOA X4,X6 +- PSLLL $7,X4 +- PSRLL $25,X6 +- PXOR X4,X1 +- PXOR X6,X1 +- PADDL X1,X5 +- MOVOA X1,X4 +- MOVOA X5,X6 +- PSLLL $9,X5 +- PSRLL $23,X6 +- PXOR X5,X2 +- PSHUFL $0X93,X1,X1 +- PXOR X6,X2 +- PADDL X2,X4 +- MOVOA X2,X5 +- MOVOA X4,X6 +- PSLLL $13,X4 +- PSRLL $19,X6 +- PXOR X4,X3 +- PSHUFL $0X4E,X2,X2 +- PXOR X6,X3 +- SUBQ $4,CX +- PADDL X3,X5 +- MOVOA X1,X4 +- MOVOA X5,X6 +- PSLLL $18,X5 +- PXOR X7,X7 +- PSRLL $14,X6 +- PXOR X5,X0 +- PSHUFL $0X39,X3,X3 +- PXOR X6,X0 +- JA MAINLOOP2 +- PADDL 48(R12),X0 +- PADDL 0(R12),X1 +- PADDL 16(R12),X2 +- PADDL 32(R12),X3 +- MOVD X0,CX +- MOVD X1,R8 +- MOVD X2,R9 +- MOVD X3,AX +- PSHUFL $0X39,X0,X0 +- PSHUFL $0X39,X1,X1 +- PSHUFL $0X39,X2,X2 +- PSHUFL $0X39,X3,X3 +- XORL 0(SI),CX +- XORL 48(SI),R8 +- XORL 32(SI),R9 +- XORL 16(SI),AX +- MOVL CX,0(DI) +- MOVL R8,48(DI) +- MOVL R9,32(DI) +- MOVL AX,16(DI) +- MOVD X0,CX +- MOVD X1,R8 +- MOVD X2,R9 +- MOVD X3,AX +- PSHUFL $0X39,X0,X0 +- PSHUFL $0X39,X1,X1 +- PSHUFL $0X39,X2,X2 +- PSHUFL $0X39,X3,X3 +- XORL 20(SI),CX +- XORL 4(SI),R8 +- XORL 52(SI),R9 +- XORL 36(SI),AX +- MOVL CX,20(DI) +- MOVL R8,4(DI) +- MOVL R9,52(DI) +- MOVL AX,36(DI) +- MOVD X0,CX +- MOVD X1,R8 +- MOVD X2,R9 +- MOVD X3,AX +- PSHUFL $0X39,X0,X0 +- PSHUFL $0X39,X1,X1 +- PSHUFL $0X39,X2,X2 +- PSHUFL $0X39,X3,X3 +- XORL 40(SI),CX +- XORL 24(SI),R8 +- XORL 8(SI),R9 +- XORL 56(SI),AX +- MOVL CX,40(DI) +- MOVL R8,24(DI) +- MOVL R9,8(DI) +- MOVL AX,56(DI) +- MOVD X0,CX +- MOVD X1,R8 +- MOVD X2,R9 +- MOVD X3,AX +- XORL 60(SI),CX +- XORL 44(SI),R8 +- XORL 28(SI),R9 +- XORL 12(SI),AX +- MOVL CX,60(DI) +- MOVL R8,44(DI) +- MOVL R9,28(DI) +- MOVL AX,12(DI) +- MOVQ 352(R12),R9 +- MOVL 16(R12),CX +- MOVL 36 (R12),R8 +- ADDQ $1,CX +- SHLQ $32,R8 +- ADDQ R8,CX +- MOVQ CX,R8 +- SHRQ $32,R8 +- MOVL CX,16(R12) +- MOVL R8, 36 (R12) +- CMPQ R9,$64 +- JA BYTESATLEAST65 +- JAE BYTESATLEAST64 +- MOVQ DI,SI +- MOVQ DX,DI +- MOVQ R9,CX ++ LEAQ 360(R12), DI ++ LEAQ 360(R12), SI ++ ++NOCOPY: ++ MOVQ R9, 352(R12) ++ MOVOA 48(R12), X0 ++ MOVOA (R12), X1 ++ MOVOA 16(R12), X2 ++ MOVOA 32(R12), X3 ++ MOVOA X1, X4 ++ MOVQ $0x00000014, CX ++ ++MAINLOOP2: ++ PADDL X0, X4 ++ MOVOA X0, X5 ++ MOVOA X4, X6 ++ PSLLL $0x07, X4 ++ PSRLL $0x19, X6 ++ PXOR X4, X3 ++ PXOR X6, X3 ++ PADDL X3, X5 ++ MOVOA X3, X4 ++ MOVOA X5, X6 ++ PSLLL $0x09, X5 ++ PSRLL $0x17, X6 ++ PXOR X5, X2 ++ PSHUFL $0x93, X3, X3 ++ PXOR X6, X2 ++ PADDL X2, X4 ++ MOVOA X2, X5 ++ MOVOA X4, X6 ++ PSLLL $0x0d, X4 ++ PSRLL $0x13, X6 ++ PXOR X4, X1 ++ PSHUFL $0x4e, X2, X2 ++ PXOR X6, X1 ++ PADDL X1, X5 ++ MOVOA X3, X4 ++ MOVOA X5, X6 ++ PSLLL $0x12, X5 ++ PSRLL $0x0e, X6 ++ PXOR X5, X0 ++ PSHUFL $0x39, X1, X1 ++ PXOR X6, X0 ++ PADDL X0, X4 ++ MOVOA X0, X5 ++ MOVOA X4, X6 ++ PSLLL $0x07, X4 ++ PSRLL $0x19, X6 ++ PXOR X4, X1 ++ PXOR X6, X1 ++ PADDL X1, X5 ++ MOVOA X1, X4 ++ MOVOA X5, X6 ++ PSLLL $0x09, X5 ++ PSRLL $0x17, X6 ++ PXOR X5, X2 ++ PSHUFL $0x93, X1, X1 ++ PXOR X6, X2 ++ PADDL X2, X4 ++ MOVOA X2, X5 ++ MOVOA X4, X6 ++ PSLLL $0x0d, X4 ++ PSRLL $0x13, X6 ++ PXOR X4, X3 ++ PSHUFL $0x4e, X2, X2 ++ PXOR X6, X3 ++ PADDL X3, X5 ++ MOVOA X1, X4 ++ MOVOA X5, X6 ++ PSLLL $0x12, X5 ++ PSRLL $0x0e, X6 ++ PXOR X5, X0 ++ PSHUFL $0x39, X3, X3 ++ PXOR X6, X0 ++ PADDL X0, X4 ++ MOVOA X0, X5 ++ MOVOA X4, X6 ++ PSLLL $0x07, X4 ++ PSRLL $0x19, X6 ++ PXOR X4, X3 ++ PXOR X6, X3 ++ PADDL X3, X5 ++ MOVOA X3, X4 ++ MOVOA X5, X6 ++ PSLLL $0x09, X5 ++ PSRLL $0x17, X6 ++ PXOR X5, X2 ++ PSHUFL $0x93, X3, X3 ++ PXOR X6, X2 ++ PADDL X2, X4 ++ MOVOA X2, X5 ++ MOVOA X4, X6 ++ PSLLL $0x0d, X4 ++ PSRLL $0x13, X6 ++ PXOR X4, X1 ++ PSHUFL $0x4e, X2, X2 ++ PXOR X6, X1 ++ PADDL X1, X5 ++ MOVOA X3, X4 ++ MOVOA X5, X6 ++ PSLLL $0x12, X5 ++ PSRLL $0x0e, X6 ++ PXOR X5, X0 ++ PSHUFL $0x39, X1, X1 ++ PXOR X6, X0 ++ PADDL X0, X4 ++ MOVOA X0, X5 ++ MOVOA X4, X6 ++ PSLLL $0x07, X4 ++ PSRLL $0x19, X6 ++ PXOR X4, X1 ++ PXOR X6, X1 ++ PADDL X1, X5 ++ MOVOA X1, X4 ++ MOVOA X5, X6 ++ PSLLL $0x09, X5 ++ PSRLL $0x17, X6 ++ PXOR X5, X2 ++ PSHUFL $0x93, X1, X1 ++ PXOR X6, X2 ++ PADDL X2, X4 ++ MOVOA X2, X5 ++ MOVOA X4, X6 ++ PSLLL $0x0d, X4 ++ PSRLL $0x13, X6 ++ PXOR X4, X3 ++ PSHUFL $0x4e, X2, X2 ++ PXOR X6, X3 ++ SUBQ $0x04, CX ++ PADDL X3, X5 ++ MOVOA X1, X4 ++ MOVOA X5, X6 ++ PSLLL $0x12, X5 ++ PXOR X7, X7 ++ PSRLL $0x0e, X6 ++ PXOR X5, X0 ++ PSHUFL $0x39, X3, X3 ++ PXOR X6, X0 ++ JA MAINLOOP2 ++ PADDL 48(R12), X0 ++ PADDL (R12), X1 ++ PADDL 16(R12), X2 ++ PADDL 32(R12), X3 ++ MOVD X0, CX ++ MOVD X1, R8 ++ MOVD X2, R9 ++ MOVD X3, AX ++ PSHUFL $0x39, X0, X0 ++ PSHUFL $0x39, X1, X1 ++ PSHUFL $0x39, X2, X2 ++ PSHUFL $0x39, X3, X3 ++ XORL (SI), CX ++ XORL 48(SI), R8 ++ XORL 32(SI), R9 ++ XORL 16(SI), AX ++ MOVL CX, (DI) ++ MOVL R8, 48(DI) ++ MOVL R9, 32(DI) ++ MOVL AX, 16(DI) ++ MOVD X0, CX ++ MOVD X1, R8 ++ MOVD X2, R9 ++ MOVD X3, AX ++ PSHUFL $0x39, X0, X0 ++ PSHUFL $0x39, X1, X1 ++ PSHUFL $0x39, X2, X2 ++ PSHUFL $0x39, X3, X3 ++ XORL 20(SI), CX ++ XORL 4(SI), R8 ++ XORL 52(SI), R9 ++ XORL 36(SI), AX ++ MOVL CX, 20(DI) ++ MOVL R8, 4(DI) ++ MOVL R9, 52(DI) ++ MOVL AX, 36(DI) ++ MOVD X0, CX ++ MOVD X1, R8 ++ MOVD X2, R9 ++ MOVD X3, AX ++ PSHUFL $0x39, X0, X0 ++ PSHUFL $0x39, X1, X1 ++ PSHUFL $0x39, X2, X2 ++ PSHUFL $0x39, X3, X3 ++ XORL 40(SI), CX ++ XORL 24(SI), R8 ++ XORL 8(SI), R9 ++ XORL 56(SI), AX ++ MOVL CX, 40(DI) ++ MOVL R8, 24(DI) ++ MOVL R9, 8(DI) ++ MOVL AX, 56(DI) ++ MOVD X0, CX ++ MOVD X1, R8 ++ MOVD X2, R9 ++ MOVD X3, AX ++ XORL 60(SI), CX ++ XORL 44(SI), R8 ++ XORL 28(SI), R9 ++ XORL 12(SI), AX ++ MOVL CX, 60(DI) ++ MOVL R8, 44(DI) ++ MOVL R9, 28(DI) ++ MOVL AX, 12(DI) ++ MOVQ 352(R12), R9 ++ MOVL 16(R12), CX ++ MOVL 36(R12), R8 ++ ADDQ $0x01, CX ++ SHLQ $0x20, R8 ++ ADDQ R8, CX ++ MOVQ CX, R8 ++ SHRQ $0x20, R8 ++ MOVL CX, 16(R12) ++ MOVL R8, 36(R12) ++ CMPQ R9, $0x40 ++ JA BYTESATLEAST65 ++ JAE BYTESATLEAST64 ++ MOVQ DI, SI ++ MOVQ DX, DI ++ MOVQ R9, CX + REP; MOVSB +- BYTESATLEAST64: +- DONE: ++ ++BYTESATLEAST64: ++DONE: + RET +- BYTESATLEAST65: +- SUBQ $64,R9 +- ADDQ $64,DI +- ADDQ $64,SI +- JMP BYTESBETWEEN1AND255 ++ ++BYTESATLEAST65: ++ SUBQ $0x40, R9 ++ ADDQ $0x40, DI ++ ADDQ $0x40, SI ++ JMP BYTESBETWEEN1AND255 +diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go +index 34bf089d..b86dde15 100644 +--- a/vendor/golang.org/x/crypto/ssh/client_auth.go ++++ b/vendor/golang.org/x/crypto/ssh/client_auth.go +@@ -71,6 +71,10 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { + for auth := AuthMethod(new(noneAuth)); auth != nil; { + ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand, extensions) + 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 + // try. + ok = authFailure +@@ -404,10 +408,10 @@ func validateKey(key PublicKey, algo string, user string, c packetConn) (bool, e + 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() + + for { +@@ -425,7 +429,15 @@ func confirmKeyAck(key PublicKey, algo string, c packetConn) (bool, error) { + if err := Unmarshal(packet, &msg); err != nil { + 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 true, nil +@@ -543,6 +555,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe + } + + gotMsgExtInfo := false ++ gotUserAuthInfoRequest := false + for { + packet, err := c.readPacket() + if err != nil { +@@ -573,6 +586,9 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe + if msg.PartialSuccess { + return authPartialSuccess, msg.Methods, nil + } ++ if !gotUserAuthInfoRequest { ++ return authFailure, msg.Methods, unexpectedMessageError(msgUserAuthInfoRequest, packet[0]) ++ } + return authFailure, msg.Methods, nil + case msgUserAuthSuccess: + 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 { + return authFailure, nil, err + } ++ gotUserAuthInfoRequest = true + + // Manually unpack the prompt/echo pairs. + rest := msg.Prompts +diff --git a/vendor/golang.org/x/crypto/ssh/doc.go b/vendor/golang.org/x/crypto/ssh/doc.go +index edbe6334..f5d352fe 100644 +--- a/vendor/golang.org/x/crypto/ssh/doc.go ++++ b/vendor/golang.org/x/crypto/ssh/doc.go +@@ -20,4 +20,4 @@ References: + This package does not fall under the stability promise of the Go language itself, + so its API may be changed when pressing needs arise. + */ +-package ssh // import "golang.org/x/crypto/ssh" ++package ssh +diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go +index df4ebdad..98e6706d 100644 +--- a/vendor/golang.org/x/crypto/ssh/keys.go ++++ b/vendor/golang.org/x/crypto/ssh/keys.go +@@ -488,7 +488,49 @@ func (r *rsaPublicKey) Verify(data []byte, sig *Signature) error { + h := hash.New() + h.Write(data) + 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 { +@@ -904,6 +946,10 @@ func (k *skECDSAPublicKey) Verify(data []byte, sig *Signature) error { + return errors.New("ssh: signature did not verify") + } + ++func (k *skECDSAPublicKey) CryptoPublicKey() crypto.PublicKey { ++ return &k.PublicKey ++} ++ + type skEd25519PublicKey struct { + // application is a URL-like string, typically "ssh:" for SSH. + // see openssh/PROTOCOL.u2f for details. +@@ -1000,6 +1046,10 @@ func (k *skEd25519PublicKey) Verify(data []byte, sig *Signature) error { + return nil + } + ++func (k *skEd25519PublicKey) CryptoPublicKey() crypto.PublicKey { ++ return k.PublicKey ++} ++ + // NewSignerFromKey takes an *rsa.PrivateKey, *dsa.PrivateKey, + // *ecdsa.PrivateKey or any other crypto.Signer and returns a + // corresponding Signer instance. ECDSA keys must use P-256, P-384 or +diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go +index e2ae4f89..5b5ccd96 100644 +--- a/vendor/golang.org/x/crypto/ssh/server.go ++++ b/vendor/golang.org/x/crypto/ssh/server.go +@@ -149,7 +149,7 @@ func (s *ServerConfig) AddHostKey(key Signer) { + } + + // 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 { + user string + pubKeyData []byte +@@ -157,7 +157,13 @@ type cachedPubKey struct { + 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 + // 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. + func (c *pubKeyCache) add(candidate cachedPubKey) { +- if len(c.keys) < maxCachedPubKeys { +- c.keys = append(c.keys, candidate) ++ if len(c.keys) >= maxCachedPubKeys { ++ c.keys = c.keys[1:] + } ++ c.keys = append(c.keys, candidate) + } + + // ServerConn is an authenticated SSH connection, as seen from the +@@ -462,6 +469,24 @@ func (p *PartialSuccessError) Error() string { + // It is returned in ServerAuthError.Errors from NewServerConn. + 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) { + sessionID := s.transport.getSessionID() + var cache pubKeyCache +@@ -492,8 +517,8 @@ userAuthLoop: + if err := s.transport.writePacket(Marshal(discMsg)); err != nil { + return nil, err + } +- +- return nil, discMsg ++ authErrs = append(authErrs, discMsg) ++ return nil, &ServerAuthError{Errors: authErrs} + } + + var userAuthReq userAuthRequestMsg +@@ -734,6 +759,18 @@ userAuthLoop: + 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 { + break userAuthLoop + } +diff --git a/vendor/golang.org/x/net/LICENSE b/vendor/golang.org/x/net/LICENSE +index 6a66aea5..2a7cf70d 100644 +--- a/vendor/golang.org/x/net/LICENSE ++++ b/vendor/golang.org/x/net/LICENSE +@@ -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 + 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 + in the documentation and/or other materials provided with the + 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 + this software without specific prior written permission. + +diff --git a/vendor/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go +index 2466ae3d..885c4c59 100644 +--- a/vendor/golang.org/x/net/html/doc.go ++++ b/vendor/golang.org/x/net/html/doc.go +@@ -78,16 +78,11 @@ example, to process each anchor node in depth-first order: + if err != nil { + // ... + } +- var f func(*html.Node) +- f = func(n *html.Node) { ++ for n := range doc.Descendants() { + if n.Type == html.ElementNode && n.Data == "a" { + // Do something with n... + } +- for c := n.FirstChild; c != nil; c = c.NextSibling { +- f(c) +- } + } +- f(doc) + + The relevant specifications include: + https://html.spec.whatwg.org/multipage/syntax.html and +@@ -104,7 +99,7 @@ tokenization, and tokenization and tree construction stages of the WHATWG HTML + parsing specification respectively. While the tokenizer parses and normalizes + individual HTML tokens, only the parser constructs the DOM tree from 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 + the WHATWG specification, the parser should be used rather than the tokenizer. +diff --git a/vendor/golang.org/x/net/html/doctype.go b/vendor/golang.org/x/net/html/doctype.go +index c484e5a9..bca3ae9a 100644 +--- a/vendor/golang.org/x/net/html/doctype.go ++++ b/vendor/golang.org/x/net/html/doctype.go +@@ -87,7 +87,7 @@ func parseDoctype(s string) (n *Node, quirks bool) { + } + } + if lastAttr := n.Attr[len(n.Attr)-1]; lastAttr.Key == "system" && +- strings.ToLower(lastAttr.Val) == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" { ++ strings.EqualFold(lastAttr.Val, "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd") { + quirks = true + } + } +diff --git a/vendor/golang.org/x/net/html/foreign.go b/vendor/golang.org/x/net/html/foreign.go +index 9da9e9dc..e8515d8e 100644 +--- a/vendor/golang.org/x/net/html/foreign.go ++++ b/vendor/golang.org/x/net/html/foreign.go +@@ -40,8 +40,7 @@ func htmlIntegrationPoint(n *Node) bool { + if n.Data == "annotation-xml" { + for _, a := range n.Attr { + if a.Key == "encoding" { +- val := strings.ToLower(a.Val) +- if val == "text/html" || val == "application/xhtml+xml" { ++ if strings.EqualFold(a.Val, "text/html") || strings.EqualFold(a.Val, "application/xhtml+xml") { + return true + } + } +diff --git a/vendor/golang.org/x/net/html/iter.go b/vendor/golang.org/x/net/html/iter.go +new file mode 100644 +index 00000000..54be8fd3 +--- /dev/null ++++ b/vendor/golang.org/x/net/html/iter.go +@@ -0,0 +1,56 @@ ++// 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 go1.23 ++ ++package html ++ ++import "iter" ++ ++// Ancestors returns an iterator over the ancestors of n, starting with n.Parent. ++// ++// Mutating a Node or its parents while iterating may have unexpected results. ++func (n *Node) Ancestors() iter.Seq[*Node] { ++ _ = n.Parent // eager nil check ++ ++ return func(yield func(*Node) bool) { ++ for p := n.Parent; p != nil && yield(p); p = p.Parent { ++ } ++ } ++} ++ ++// ChildNodes returns an iterator over the immediate children of n, ++// starting with n.FirstChild. ++// ++// Mutating a Node or its children while iterating may have unexpected results. ++func (n *Node) ChildNodes() iter.Seq[*Node] { ++ _ = n.FirstChild // eager nil check ++ ++ return func(yield func(*Node) bool) { ++ for c := n.FirstChild; c != nil && yield(c); c = c.NextSibling { ++ } ++ } ++ ++} ++ ++// Descendants returns an iterator over all nodes recursively beneath ++// n, excluding n itself. Nodes are visited in depth-first preorder. ++// ++// Mutating a Node or its descendants while iterating may have unexpected results. ++func (n *Node) Descendants() iter.Seq[*Node] { ++ _ = n.FirstChild // eager nil check ++ ++ return func(yield func(*Node) bool) { ++ n.descendants(yield) ++ } ++} ++ ++func (n *Node) descendants(yield func(*Node) bool) bool { ++ for c := range n.ChildNodes() { ++ if !yield(c) || !c.descendants(yield) { ++ return false ++ } ++ } ++ return true ++} +diff --git a/vendor/golang.org/x/net/html/node.go b/vendor/golang.org/x/net/html/node.go +index 1350eef2..77741a19 100644 +--- a/vendor/golang.org/x/net/html/node.go ++++ b/vendor/golang.org/x/net/html/node.go +@@ -38,6 +38,10 @@ var scopeMarker = Node{Type: scopeMarkerNode} + // that it looks like "a maxFrameSize { ++ conf.MaxReadFrameSize = maxFrameSize ++ } ++ ++ if h2.t1 != nil { ++ fillNetHTTPTransportConfig(&conf, h2.t1) ++ } ++ setConfigDefaults(&conf, false) ++ return conf ++} ++ ++func setDefault[T ~int | ~int32 | ~uint32 | ~int64](v *T, minval, maxval, defval T) { ++ if *v < minval || *v > maxval { ++ *v = defval ++ } ++} ++ ++func setConfigDefaults(conf *http2Config, server bool) { ++ setDefault(&conf.MaxConcurrentStreams, 1, math.MaxUint32, defaultMaxStreams) ++ setDefault(&conf.MaxEncoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize) ++ setDefault(&conf.MaxDecoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize) ++ if server { ++ setDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, 1<<20) ++ } else { ++ setDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, transportDefaultConnFlow) ++ } ++ if server { ++ setDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, 1<<20) ++ } else { ++ setDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, transportDefaultStreamFlow) ++ } ++ setDefault(&conf.MaxReadFrameSize, minMaxFrameSize, maxFrameSize, defaultMaxReadFrameSize) ++ setDefault(&conf.PingTimeout, 1, math.MaxInt64, 15*time.Second) ++} ++ ++// adjustHTTP1MaxHeaderSize converts a limit in bytes on the size of an HTTP/1 header ++// to an HTTP/2 MAX_HEADER_LIST_SIZE value. ++func adjustHTTP1MaxHeaderSize(n int64) int64 { ++ // http2's count is in a slightly different unit and includes 32 bytes per pair. ++ // So, take the net/http.Server value and pad it up a bit, assuming 10 headers. ++ const perFieldOverhead = 32 // per http2 spec ++ const typicalHeaders = 10 // conservative ++ return n + typicalHeaders*perFieldOverhead ++} +diff --git a/vendor/golang.org/x/net/http2/config_go124.go b/vendor/golang.org/x/net/http2/config_go124.go +new file mode 100644 +index 00000000..5b516c55 +--- /dev/null ++++ b/vendor/golang.org/x/net/http2/config_go124.go +@@ -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 go1.24 ++ ++package http2 ++ ++import "net/http" ++ ++// fillNetHTTPServerConfig sets fields in conf from srv.HTTP2. ++func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) { ++ fillNetHTTPConfig(conf, srv.HTTP2) ++} ++ ++// fillNetHTTPTransportConfig sets fields in conf from tr.HTTP2. ++func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) { ++ fillNetHTTPConfig(conf, tr.HTTP2) ++} ++ ++func fillNetHTTPConfig(conf *http2Config, h2 *http.HTTP2Config) { ++ if h2 == nil { ++ return ++ } ++ if h2.MaxConcurrentStreams != 0 { ++ conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams) ++ } ++ if h2.MaxEncoderHeaderTableSize != 0 { ++ conf.MaxEncoderHeaderTableSize = uint32(h2.MaxEncoderHeaderTableSize) ++ } ++ if h2.MaxDecoderHeaderTableSize != 0 { ++ conf.MaxDecoderHeaderTableSize = uint32(h2.MaxDecoderHeaderTableSize) ++ } ++ if h2.MaxConcurrentStreams != 0 { ++ conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams) ++ } ++ if h2.MaxReadFrameSize != 0 { ++ conf.MaxReadFrameSize = uint32(h2.MaxReadFrameSize) ++ } ++ if h2.MaxReceiveBufferPerConnection != 0 { ++ conf.MaxUploadBufferPerConnection = int32(h2.MaxReceiveBufferPerConnection) ++ } ++ if h2.MaxReceiveBufferPerStream != 0 { ++ conf.MaxUploadBufferPerStream = int32(h2.MaxReceiveBufferPerStream) ++ } ++ if h2.SendPingTimeout != 0 { ++ conf.SendPingTimeout = h2.SendPingTimeout ++ } ++ if h2.PingTimeout != 0 { ++ conf.PingTimeout = h2.PingTimeout ++ } ++ if h2.WriteByteTimeout != 0 { ++ conf.WriteByteTimeout = h2.WriteByteTimeout ++ } ++ if h2.PermitProhibitedCipherSuites { ++ conf.PermitProhibitedCipherSuites = true ++ } ++ if h2.CountError != nil { ++ conf.CountError = h2.CountError ++ } ++} +diff --git a/vendor/golang.org/x/net/http2/config_pre_go124.go b/vendor/golang.org/x/net/http2/config_pre_go124.go +new file mode 100644 +index 00000000..060fd6c6 +--- /dev/null ++++ b/vendor/golang.org/x/net/http2/config_pre_go124.go +@@ -0,0 +1,16 @@ ++// 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 !go1.24 ++ ++package http2 ++ ++import "net/http" ++ ++// Pre-Go 1.24 fallback. ++// The Server.HTTP2 and Transport.HTTP2 config fields were added in Go 1.24. ++ ++func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {} ++ ++func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {} +diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go +index 43557ab7..81faec7e 100644 +--- a/vendor/golang.org/x/net/http2/frame.go ++++ b/vendor/golang.org/x/net/http2/frame.go +@@ -490,6 +490,9 @@ func terminalReadFrameError(err error) bool { + // returned error is ErrFrameTooLarge. Other errors may be of type + // ConnectionError, StreamError, or anything else from the underlying + // 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) { + fr.errDetail = nil + if fr.lastFrame != nil { +@@ -1487,7 +1490,7 @@ func (mh *MetaHeadersFrame) checkPseudos() error { + pf := mh.PseudoFields() + for i, hf := range pf { + switch hf.Name { +- case ":method", ":path", ":scheme", ":authority": ++ case ":method", ":path", ":scheme", ":authority", ":protocol": + isRequest = true + case ":status": + isResponse = true +@@ -1495,7 +1498,7 @@ func (mh *MetaHeadersFrame) checkPseudos() error { + return pseudoHeaderError(hf.Name) + } + // Check for duplicates. +- // This would be a bad algorithm, but N is 4. ++ // This would be a bad algorithm, but N is 5. + // And this doesn't allocate. + for _, hf2 := range pf[:i] { + if hf.Name == hf2.Name { +@@ -1521,7 +1524,7 @@ func (fr *Framer) maxHeaderStringLen() int { + // readMetaFrame returns 0 or more CONTINUATION frames from fr and + // merge them into the provided hf and returns a MetaHeadersFrame + // with the decoded hpack values. +-func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { ++func (fr *Framer) readMetaFrame(hf *HeadersFrame) (Frame, error) { + if fr.AllowIllegalReads { + return nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders") + } +@@ -1592,7 +1595,7 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { + } + // 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 nil, ConnectionError(ErrCodeProtocol) ++ return mh, ConnectionError(ErrCodeProtocol) + } + + // Also close the connection after any CONTINUATION frame following an +@@ -1604,11 +1607,11 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { + } + // 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 nil, ConnectionError(ErrCodeProtocol) ++ return mh, ConnectionError(ErrCodeProtocol) + } + + if _, err := hdec.Write(frag); err != nil { +- return nil, ConnectionError(ErrCodeCompression) ++ return mh, ConnectionError(ErrCodeCompression) + } + + if hc.HeadersEnded() { +@@ -1625,7 +1628,7 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) { + mh.HeadersFrame.invalidate() + + if err := hdec.Close(); err != nil { +- return nil, ConnectionError(ErrCodeCompression) ++ return mh, ConnectionError(ErrCodeCompression) + } + if invalid != nil { + fr.errDetail = invalid +diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go +index 6f2df281..c7601c90 100644 +--- a/vendor/golang.org/x/net/http2/http2.go ++++ b/vendor/golang.org/x/net/http2/http2.go +@@ -17,24 +17,28 @@ package http2 // import "golang.org/x/net/http2" + + import ( + "bufio" ++ "context" + "crypto/tls" ++ "errors" + "fmt" +- "io" ++ "net" + "net/http" + "os" + "sort" + "strconv" + "strings" + "sync" ++ "time" + + "golang.org/x/net/http/httpguts" + ) + + var ( +- VerboseLogs bool +- logFrameWrites bool +- logFrameReads bool +- inTests bool ++ VerboseLogs bool ++ logFrameWrites bool ++ logFrameReads bool ++ inTests bool ++ disableExtendedConnectProtocol bool + ) + + func init() { +@@ -47,6 +51,9 @@ func init() { + logFrameWrites = true + logFrameReads = true + } ++ if strings.Contains(e, "http2xconnect=0") { ++ disableExtendedConnectProtocol = true ++ } + } + + const ( +@@ -138,6 +145,10 @@ func (s Setting) Valid() error { + if s.Val < 16384 || s.Val > 1<<24-1 { + return ConnectionError(ErrCodeProtocol) + } ++ case SettingEnableConnectProtocol: ++ if s.Val != 1 && s.Val != 0 { ++ return ConnectionError(ErrCodeProtocol) ++ } + } + return nil + } +@@ -147,21 +158,23 @@ func (s Setting) Valid() error { + type SettingID uint16 + + const ( +- SettingHeaderTableSize SettingID = 0x1 +- SettingEnablePush SettingID = 0x2 +- SettingMaxConcurrentStreams SettingID = 0x3 +- SettingInitialWindowSize SettingID = 0x4 +- SettingMaxFrameSize SettingID = 0x5 +- SettingMaxHeaderListSize SettingID = 0x6 ++ SettingHeaderTableSize SettingID = 0x1 ++ SettingEnablePush SettingID = 0x2 ++ SettingMaxConcurrentStreams SettingID = 0x3 ++ SettingInitialWindowSize SettingID = 0x4 ++ SettingMaxFrameSize SettingID = 0x5 ++ SettingMaxHeaderListSize SettingID = 0x6 ++ SettingEnableConnectProtocol SettingID = 0x8 + ) + + var settingName = map[SettingID]string{ +- SettingHeaderTableSize: "HEADER_TABLE_SIZE", +- SettingEnablePush: "ENABLE_PUSH", +- SettingMaxConcurrentStreams: "MAX_CONCURRENT_STREAMS", +- SettingInitialWindowSize: "INITIAL_WINDOW_SIZE", +- SettingMaxFrameSize: "MAX_FRAME_SIZE", +- SettingMaxHeaderListSize: "MAX_HEADER_LIST_SIZE", ++ SettingHeaderTableSize: "HEADER_TABLE_SIZE", ++ SettingEnablePush: "ENABLE_PUSH", ++ SettingMaxConcurrentStreams: "MAX_CONCURRENT_STREAMS", ++ SettingInitialWindowSize: "INITIAL_WINDOW_SIZE", ++ SettingMaxFrameSize: "MAX_FRAME_SIZE", ++ SettingMaxHeaderListSize: "MAX_HEADER_LIST_SIZE", ++ SettingEnableConnectProtocol: "ENABLE_CONNECT_PROTOCOL", + } + + func (s SettingID) String() string { +@@ -210,12 +223,6 @@ type stringWriter interface { + WriteString(s string) (n int, err error) + } + +-// A gate lets two goroutines coordinate their activities. +-type gate chan struct{} +- +-func (g gate) Done() { g <- struct{}{} } +-func (g gate) Wait() { <-g } +- + // A closeWaiter is like a sync.WaitGroup but only goes 1 to 0 (open to closed). + type closeWaiter chan struct{} + +@@ -241,13 +248,19 @@ func (cw closeWaiter) Wait() { + // Its buffered writer is lazily allocated as needed, to minimize + // idle memory usage with many connections. + type bufferedWriter struct { +- _ incomparable +- w io.Writer // immutable +- bw *bufio.Writer // non-nil when data is buffered ++ _ incomparable ++ group synctestGroupInterface // immutable ++ conn net.Conn // immutable ++ bw *bufio.Writer // non-nil when data is buffered ++ byteTimeout time.Duration // immutable, WriteByteTimeout + } + +-func newBufferedWriter(w io.Writer) *bufferedWriter { +- return &bufferedWriter{w: w} ++func newBufferedWriter(group synctestGroupInterface, conn net.Conn, timeout time.Duration) *bufferedWriter { ++ return &bufferedWriter{ ++ group: group, ++ conn: conn, ++ byteTimeout: timeout, ++ } + } + + // bufWriterPoolBufferSize is the size of bufio.Writer's +@@ -274,7 +287,7 @@ func (w *bufferedWriter) Available() int { + func (w *bufferedWriter) Write(p []byte) (n int, err error) { + if w.bw == nil { + bw := bufWriterPool.Get().(*bufio.Writer) +- bw.Reset(w.w) ++ bw.Reset((*bufferedWriterTimeoutWriter)(w)) + w.bw = bw + } + return w.bw.Write(p) +@@ -292,6 +305,38 @@ func (w *bufferedWriter) Flush() error { + return err + } + ++type bufferedWriterTimeoutWriter bufferedWriter ++ ++func (w *bufferedWriterTimeoutWriter) Write(p []byte) (n int, err error) { ++ return writeWithByteTimeout(w.group, w.conn, w.byteTimeout, p) ++} ++ ++// writeWithByteTimeout writes to conn. ++// If more than timeout passes without any bytes being written to the connection, ++// the write fails. ++func writeWithByteTimeout(group synctestGroupInterface, conn net.Conn, timeout time.Duration, p []byte) (n int, err error) { ++ if timeout <= 0 { ++ return conn.Write(p) ++ } ++ for { ++ var now time.Time ++ if group == nil { ++ now = time.Now() ++ } else { ++ now = group.Now() ++ } ++ conn.SetWriteDeadline(now.Add(timeout)) ++ nn, err := conn.Write(p[n:]) ++ n += nn ++ if n == len(p) || nn == 0 || !errors.Is(err, os.ErrDeadlineExceeded) { ++ // Either we finished the write, made no progress, or hit the deadline. ++ // Whichever it is, we're done now. ++ conn.SetWriteDeadline(time.Time{}) ++ return n, err ++ } ++ } ++} ++ + func mustUint31(v int32) uint32 { + if v < 0 || v > 2147483647 { + panic("out of range") +@@ -383,3 +428,14 @@ func validPseudoPath(v string) bool { + // makes that struct also non-comparable, and generally doesn't add + // any size (as long as it's first). + type incomparable [0]func() ++ ++// synctestGroupInterface is the methods of synctestGroup used by Server and Transport. ++// It's defined as an interface here to let us keep synctestGroup entirely test-only ++// and not a part of non-test builds. ++type synctestGroupInterface interface { ++ Join() ++ Now() time.Time ++ NewTimer(d time.Duration) timer ++ AfterFunc(d time.Duration, f func()) timer ++ ContextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) ++} +diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go +index ce2e8b40..b55547ae 100644 +--- a/vendor/golang.org/x/net/http2/server.go ++++ b/vendor/golang.org/x/net/http2/server.go +@@ -29,6 +29,7 @@ import ( + "bufio" + "bytes" + "context" ++ "crypto/rand" + "crypto/tls" + "errors" + "fmt" +@@ -52,10 +53,14 @@ import ( + ) + + const ( +- prefaceTimeout = 10 * time.Second +- firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway +- handlerChunkWriteSize = 4 << 10 +- defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to? ++ prefaceTimeout = 10 * time.Second ++ firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway ++ handlerChunkWriteSize = 4 << 10 ++ defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to? ++ ++ // maxQueuedControlFrames is the maximum number of control frames like ++ // SETTINGS, PING and RST_STREAM that will be queued for writing before ++ // the connection is closed to prevent memory exhaustion attacks. + maxQueuedControlFrames = 10000 + ) + +@@ -127,6 +132,22 @@ type Server struct { + // If zero or negative, there is no timeout. + IdleTimeout time.Duration + ++ // ReadIdleTimeout is the timeout after which a health check using a ping ++ // frame will be carried out if no frame is received on the connection. ++ // If zero, no health check is performed. ++ ReadIdleTimeout time.Duration ++ ++ // PingTimeout is the timeout after which the connection will be closed ++ // if a response to a ping is not received. ++ // If zero, a default of 15 seconds is used. ++ PingTimeout time.Duration ++ ++ // WriteByteTimeout is the timeout after which a connection will be ++ // closed if no data can be written to it. The timeout begins when data is ++ // available to write, and is extended whenever any bytes are written. ++ // If zero or negative, there is no timeout. ++ WriteByteTimeout time.Duration ++ + // MaxUploadBufferPerConnection is the size of the initial flow + // control window for each connections. The HTTP/2 spec does not + // allow this to be smaller than 65535 or larger than 2^32-1. +@@ -154,57 +175,39 @@ type Server struct { + // so that we don't embed a Mutex in this struct, which will make the + // struct non-copyable, which might break some callers. + state *serverInternalState +-} +- +-func (s *Server) initialConnRecvWindowSize() int32 { +- if s.MaxUploadBufferPerConnection >= initialWindowSize { +- return s.MaxUploadBufferPerConnection +- } +- return 1 << 20 +-} + +-func (s *Server) initialStreamRecvWindowSize() int32 { +- if s.MaxUploadBufferPerStream > 0 { +- return s.MaxUploadBufferPerStream +- } +- return 1 << 20 ++ // Synchronization group used for testing. ++ // Outside of tests, this is nil. ++ group synctestGroupInterface + } + +-func (s *Server) maxReadFrameSize() uint32 { +- if v := s.MaxReadFrameSize; v >= minMaxFrameSize && v <= maxFrameSize { +- return v ++func (s *Server) markNewGoroutine() { ++ if s.group != nil { ++ s.group.Join() + } +- return defaultMaxReadFrameSize + } + +-func (s *Server) maxConcurrentStreams() uint32 { +- if v := s.MaxConcurrentStreams; v > 0 { +- return v ++func (s *Server) now() time.Time { ++ if s.group != nil { ++ return s.group.Now() + } +- return defaultMaxStreams ++ return time.Now() + } + +-func (s *Server) maxDecoderHeaderTableSize() uint32 { +- if v := s.MaxDecoderHeaderTableSize; v > 0 { +- return v ++// newTimer creates a new time.Timer, or a synthetic timer in tests. ++func (s *Server) newTimer(d time.Duration) timer { ++ if s.group != nil { ++ return s.group.NewTimer(d) + } +- return initialHeaderTableSize ++ return timeTimer{time.NewTimer(d)} + } + +-func (s *Server) maxEncoderHeaderTableSize() uint32 { +- if v := s.MaxEncoderHeaderTableSize; v > 0 { +- return v ++// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. ++func (s *Server) afterFunc(d time.Duration, f func()) timer { ++ if s.group != nil { ++ return s.group.AfterFunc(d, f) + } +- return initialHeaderTableSize +-} +- +-// maxQueuedControlFrames is the maximum number of control frames like +-// SETTINGS, PING and RST_STREAM that will be queued for writing before +-// the connection is closed to prevent memory exhaustion attacks. +-func (s *Server) maxQueuedControlFrames() int { +- // TODO: if anybody asks, add a Server field, and remember to define the +- // behavior of negative values. +- return maxQueuedControlFrames ++ return timeTimer{time.AfterFunc(d, f)} + } + + type serverInternalState struct { +@@ -303,7 +306,7 @@ func ConfigureServer(s *http.Server, conf *Server) error { + if s.TLSNextProto == nil { + s.TLSNextProto = map[string]func(*http.Server, *tls.Conn, http.Handler){} + } +- protoHandler := func(hs *http.Server, c *tls.Conn, h http.Handler) { ++ protoHandler := func(hs *http.Server, c net.Conn, h http.Handler, sawClientPreface bool) { + if testHookOnConn != nil { + testHookOnConn() + } +@@ -320,12 +323,31 @@ func ConfigureServer(s *http.Server, conf *Server) error { + ctx = bc.BaseContext() + } + conf.ServeConn(c, &ServeConnOpts{ +- Context: ctx, +- Handler: h, +- BaseConfig: hs, ++ Context: ctx, ++ Handler: h, ++ BaseConfig: hs, ++ SawClientPreface: sawClientPreface, + }) + } +- s.TLSNextProto[NextProtoTLS] = protoHandler ++ s.TLSNextProto[NextProtoTLS] = func(hs *http.Server, c *tls.Conn, h http.Handler) { ++ protoHandler(hs, c, h, false) ++ } ++ // The "unencrypted_http2" TLSNextProto key is used to pass off non-TLS HTTP/2 conns. ++ // ++ // A connection passed in this method has already had the HTTP/2 preface read from it. ++ s.TLSNextProto[nextProtoUnencryptedHTTP2] = func(hs *http.Server, c *tls.Conn, h http.Handler) { ++ nc, err := unencryptedNetConnFromTLSConn(c) ++ if err != nil { ++ if lg := hs.ErrorLog; lg != nil { ++ lg.Print(err) ++ } else { ++ log.Print(err) ++ } ++ go c.Close() ++ return ++ } ++ protoHandler(hs, nc, h, true) ++ } + return nil + } + +@@ -400,16 +422,22 @@ func (o *ServeConnOpts) handler() http.Handler { + // + // The opts parameter is optional. If nil, default values are used. + func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { ++ s.serveConn(c, opts, nil) ++} ++ ++func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverConn)) { + baseCtx, cancel := serverConnBaseContext(c, opts) + defer cancel() + ++ http1srv := opts.baseConfig() ++ conf := configFromServer(http1srv, s) + sc := &serverConn{ + srv: s, +- hs: opts.baseConfig(), ++ hs: http1srv, + conn: c, + baseCtx: baseCtx, + remoteAddrStr: c.RemoteAddr().String(), +- bw: newBufferedWriter(c), ++ bw: newBufferedWriter(s.group, c, conf.WriteByteTimeout), + handler: opts.handler(), + streams: make(map[uint32]*stream), + readFrameCh: make(chan readFrameResult), +@@ -419,13 +447,19 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { + bodyReadCh: make(chan bodyReadMsg), // buffering doesn't matter either way + doneServing: make(chan struct{}), + clientMaxStreams: math.MaxUint32, // Section 6.5.2: "Initially, there is no limit to this value" +- advMaxStreams: s.maxConcurrentStreams(), ++ advMaxStreams: conf.MaxConcurrentStreams, + initialStreamSendWindowSize: initialWindowSize, ++ initialStreamRecvWindowSize: conf.MaxUploadBufferPerStream, + maxFrameSize: initialMaxFrameSize, ++ pingTimeout: conf.PingTimeout, ++ countErrorFunc: conf.CountError, + serveG: newGoroutineLock(), + pushEnabled: true, + sawClientPreface: opts.SawClientPreface, + } ++ if newf != nil { ++ newf(sc) ++ } + + s.state.registerConn(sc) + defer s.state.unregisterConn(sc) +@@ -451,15 +485,15 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { + sc.flow.add(initialWindowSize) + sc.inflow.init(initialWindowSize) + sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf) +- sc.hpackEncoder.SetMaxDynamicTableSizeLimit(s.maxEncoderHeaderTableSize()) ++ sc.hpackEncoder.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize) + + fr := NewFramer(sc.bw, c) +- if s.CountError != nil { +- fr.countError = s.CountError ++ if conf.CountError != nil { ++ fr.countError = conf.CountError + } +- fr.ReadMetaHeaders = hpack.NewDecoder(s.maxDecoderHeaderTableSize(), nil) ++ fr.ReadMetaHeaders = hpack.NewDecoder(conf.MaxDecoderHeaderTableSize, nil) + fr.MaxHeaderListSize = sc.maxHeaderListSize() +- fr.SetMaxReadFrameSize(s.maxReadFrameSize()) ++ fr.SetMaxReadFrameSize(conf.MaxReadFrameSize) + sc.framer = fr + + if tc, ok := c.(connectionStater); ok { +@@ -492,7 +526,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { + // So for now, do nothing here again. + } + +- if !s.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) { ++ if !conf.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) { + // "Endpoints MAY choose to generate a connection error + // (Section 5.4.1) of type INADEQUATE_SECURITY if one of + // the prohibited cipher suites are negotiated." +@@ -529,7 +563,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { + opts.UpgradeRequest = nil + } + +- sc.serve() ++ sc.serve(conf) + } + + func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx context.Context, cancel func()) { +@@ -569,6 +603,7 @@ type serverConn struct { + tlsState *tls.ConnectionState // shared by all handlers, like net/http + remoteAddrStr string + writeSched WriteScheduler ++ countErrorFunc func(errType string) + + // Everything following is owned by the serve loop; use serveG.check(): + serveG goroutineLock // used to verify funcs are on serve() +@@ -588,6 +623,7 @@ type serverConn struct { + streams map[uint32]*stream + unstartedHandlers []unstartedHandler + initialStreamSendWindowSize int32 ++ initialStreamRecvWindowSize int32 + maxFrameSize int32 + peerMaxHeaderListSize uint32 // zero means unknown (default) + canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case +@@ -598,9 +634,14 @@ type serverConn struct { + inGoAway bool // we've started to or sent GOAWAY + inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop + needToSendGoAway bool // we need to schedule a GOAWAY frame write ++ pingSent bool ++ sentPingData [8]byte + goAwayCode ErrCode +- shutdownTimer *time.Timer // nil until used +- idleTimer *time.Timer // nil if unused ++ shutdownTimer timer // nil until used ++ idleTimer timer // nil if unused ++ readIdleTimeout time.Duration ++ pingTimeout time.Duration ++ readIdleTimer timer // nil if unused + + // Owned by the writeFrameAsync goroutine: + headerWriteBuf bytes.Buffer +@@ -615,11 +656,7 @@ func (sc *serverConn) maxHeaderListSize() uint32 { + if n <= 0 { + n = http.DefaultMaxHeaderBytes + } +- // http2's count is in a slightly different unit and includes 32 bytes per pair. +- // So, take the net/http.Server value and pad it up a bit, assuming 10 headers. +- const perFieldOverhead = 32 // per http2 spec +- const typicalHeaders = 10 // conservative +- return uint32(n + typicalHeaders*perFieldOverhead) ++ return uint32(adjustHTTP1MaxHeaderSize(int64(n))) + } + + func (sc *serverConn) curOpenStreams() uint32 { +@@ -649,12 +686,12 @@ type stream struct { + flow outflow // limits writing from Handler to client + inflow inflow // what the client is allowed to POST/etc to us + state streamState +- resetQueued bool // RST_STREAM queued for write; set by sc.resetStream +- gotTrailerHeader bool // HEADER frame for trailers was seen +- wroteHeaders bool // whether we wrote headers (not status 100) +- readDeadline *time.Timer // nil if unused +- writeDeadline *time.Timer // nil if unused +- closeErr error // set before cw is closed ++ resetQueued bool // RST_STREAM queued for write; set by sc.resetStream ++ gotTrailerHeader bool // HEADER frame for trailers was seen ++ wroteHeaders bool // whether we wrote headers (not status 100) ++ readDeadline timer // nil if unused ++ writeDeadline timer // nil if unused ++ closeErr error // set before cw is closed + + trailer http.Header // accumulated trailers + reqTrailer http.Header // handler's Request.Trailer +@@ -732,11 +769,7 @@ func isClosedConnError(err error) bool { + return false + } + +- // TODO: remove this string search and be more like the Windows +- // 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") { ++ if errors.Is(err, net.ErrClosed) { + return true + } + +@@ -815,8 +848,9 @@ type readFrameResult struct { + // consumer is done with the frame. + // It's run on its own goroutine. + func (sc *serverConn) readFrames() { +- gate := make(gate) +- gateDone := gate.Done ++ sc.srv.markNewGoroutine() ++ gate := make(chan struct{}) ++ gateDone := func() { gate <- struct{}{} } + for { + f, err := sc.framer.ReadFrame() + select { +@@ -847,6 +881,7 @@ type frameWriteResult struct { + // At most one goroutine can be running writeFrameAsync at a time per + // serverConn. + func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest, wd *writeData) { ++ sc.srv.markNewGoroutine() + var err error + if wd == nil { + err = wr.write.writeFrame(sc) +@@ -885,7 +920,7 @@ func (sc *serverConn) notePanic() { + } + } + +-func (sc *serverConn) serve() { ++func (sc *serverConn) serve(conf http2Config) { + sc.serveG.check() + defer sc.notePanic() + defer sc.conn.Close() +@@ -897,20 +932,24 @@ func (sc *serverConn) serve() { + sc.vlogf("http2: server connection from %v on %p", sc.conn.RemoteAddr(), sc.hs) + } + ++ settings := writeSettings{ ++ {SettingMaxFrameSize, conf.MaxReadFrameSize}, ++ {SettingMaxConcurrentStreams, sc.advMaxStreams}, ++ {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, ++ {SettingHeaderTableSize, conf.MaxDecoderHeaderTableSize}, ++ {SettingInitialWindowSize, uint32(sc.initialStreamRecvWindowSize)}, ++ } ++ if !disableExtendedConnectProtocol { ++ settings = append(settings, Setting{SettingEnableConnectProtocol, 1}) ++ } + sc.writeFrame(FrameWriteRequest{ +- write: writeSettings{ +- {SettingMaxFrameSize, sc.srv.maxReadFrameSize()}, +- {SettingMaxConcurrentStreams, sc.advMaxStreams}, +- {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, +- {SettingHeaderTableSize, sc.srv.maxDecoderHeaderTableSize()}, +- {SettingInitialWindowSize, uint32(sc.srv.initialStreamRecvWindowSize())}, +- }, ++ write: settings, + }) + sc.unackedSettings++ + + // Each connection starts with initialWindowSize inflow tokens. + // If a higher value is configured, we add more tokens. +- if diff := sc.srv.initialConnRecvWindowSize() - initialWindowSize; diff > 0 { ++ if diff := conf.MaxUploadBufferPerConnection - initialWindowSize; diff > 0 { + sc.sendWindowUpdate(nil, int(diff)) + } + +@@ -926,15 +965,22 @@ func (sc *serverConn) serve() { + sc.setConnState(http.StateIdle) + + if sc.srv.IdleTimeout > 0 { +- sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer) ++ sc.idleTimer = sc.srv.afterFunc(sc.srv.IdleTimeout, sc.onIdleTimer) + defer sc.idleTimer.Stop() + } + ++ if conf.SendPingTimeout > 0 { ++ sc.readIdleTimeout = conf.SendPingTimeout ++ sc.readIdleTimer = sc.srv.afterFunc(conf.SendPingTimeout, sc.onReadIdleTimer) ++ defer sc.readIdleTimer.Stop() ++ } ++ + go sc.readFrames() // closed by defer sc.conn.Close above + +- settingsTimer := time.AfterFunc(firstSettingsTimeout, sc.onSettingsTimer) ++ settingsTimer := sc.srv.afterFunc(firstSettingsTimeout, sc.onSettingsTimer) + defer settingsTimer.Stop() + ++ lastFrameTime := sc.srv.now() + loopNum := 0 + for { + loopNum++ +@@ -948,6 +994,7 @@ func (sc *serverConn) serve() { + case res := <-sc.wroteFrameCh: + sc.wroteFrame(res) + case res := <-sc.readFrameCh: ++ lastFrameTime = sc.srv.now() + // Process any written frames before reading new frames from the client since a + // written frame could have triggered a new stream to be started. + if sc.writingFrameAsync { +@@ -979,6 +1026,8 @@ func (sc *serverConn) serve() { + case idleTimerMsg: + sc.vlogf("connection is idle") + sc.goAway(ErrCodeNo) ++ case readIdleTimerMsg: ++ sc.handlePingTimer(lastFrameTime) + case shutdownTimerMsg: + sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr()) + return +@@ -1001,7 +1050,7 @@ func (sc *serverConn) serve() { + // If the peer is causing us to generate a lot of control frames, + // but not reading them from us, assume they are trying to make us + // run out of memory. +- if sc.queuedControlFrames > sc.srv.maxQueuedControlFrames() { ++ if sc.queuedControlFrames > maxQueuedControlFrames { + sc.vlogf("http2: too many control frames in send queue, closing connection") + return + } +@@ -1017,12 +1066,39 @@ func (sc *serverConn) serve() { + } + } + ++func (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) { ++ if sc.pingSent { ++ sc.vlogf("timeout waiting for PING response") ++ sc.conn.Close() ++ return ++ } ++ ++ pingAt := lastFrameReadTime.Add(sc.readIdleTimeout) ++ now := sc.srv.now() ++ if pingAt.After(now) { ++ // We received frames since arming the ping timer. ++ // Reset it for the next possible timeout. ++ sc.readIdleTimer.Reset(pingAt.Sub(now)) ++ return ++ } ++ ++ sc.pingSent = true ++ // Ignore crypto/rand.Read errors: It generally can't fail, and worse case if it does ++ // is we send a PING frame containing 0s. ++ _, _ = rand.Read(sc.sentPingData[:]) ++ sc.writeFrame(FrameWriteRequest{ ++ write: &writePing{data: sc.sentPingData}, ++ }) ++ sc.readIdleTimer.Reset(sc.pingTimeout) ++} ++ + type serverMessage int + + // Message values sent to serveMsgCh. + var ( + settingsTimerMsg = new(serverMessage) + idleTimerMsg = new(serverMessage) ++ readIdleTimerMsg = new(serverMessage) + shutdownTimerMsg = new(serverMessage) + gracefulShutdownMsg = new(serverMessage) + handlerDoneMsg = new(serverMessage) +@@ -1030,6 +1106,7 @@ var ( + + func (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) } + func (sc *serverConn) onIdleTimer() { sc.sendServeMsg(idleTimerMsg) } ++func (sc *serverConn) onReadIdleTimer() { sc.sendServeMsg(readIdleTimerMsg) } + func (sc *serverConn) onShutdownTimer() { sc.sendServeMsg(shutdownTimerMsg) } + + func (sc *serverConn) sendServeMsg(msg interface{}) { +@@ -1061,10 +1138,10 @@ func (sc *serverConn) readPreface() error { + errc <- nil + } + }() +- timer := time.NewTimer(prefaceTimeout) // TODO: configurable on *Server? ++ timer := sc.srv.newTimer(prefaceTimeout) // TODO: configurable on *Server? + defer timer.Stop() + select { +- case <-timer.C: ++ case <-timer.C(): + return errPrefaceTimeout + case err := <-errc: + if err == nil { +@@ -1282,6 +1359,10 @@ func (sc *serverConn) wroteFrame(res frameWriteResult) { + sc.writingFrame = false + sc.writingFrameAsync = false + ++ if res.err != nil { ++ sc.conn.Close() ++ } ++ + wr := res.wr + + if writeEndsStream(wr.write) { +@@ -1429,7 +1510,7 @@ func (sc *serverConn) goAway(code ErrCode) { + + func (sc *serverConn) shutDownIn(d time.Duration) { + sc.serveG.check() +- sc.shutdownTimer = time.AfterFunc(d, sc.onShutdownTimer) ++ sc.shutdownTimer = sc.srv.afterFunc(d, sc.onShutdownTimer) + } + + func (sc *serverConn) resetStream(se StreamError) { +@@ -1482,6 +1563,11 @@ func (sc *serverConn) processFrameFromReader(res readFrameResult) bool { + sc.goAway(ErrCodeFlowControl) + return true + 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.goAway(ErrCode(ev)) + return true // goAway will handle shutdown +@@ -1551,6 +1637,11 @@ func (sc *serverConn) processFrame(f Frame) error { + func (sc *serverConn) processPing(f *PingFrame) error { + sc.serveG.check() + if f.IsAck() { ++ if sc.pingSent && sc.sentPingData == f.Data { ++ // This is a response to a PING we sent. ++ sc.pingSent = false ++ sc.readIdleTimer.Reset(sc.readIdleTimeout) ++ } + // 6.7 PING: " An endpoint MUST NOT respond to PING frames + // containing this flag." + return nil +@@ -1638,7 +1729,7 @@ func (sc *serverConn) closeStream(st *stream, err error) { + delete(sc.streams, st.id) + if len(sc.streams) == 0 { + sc.setConnState(http.StateIdle) +- if sc.srv.IdleTimeout > 0 { ++ if sc.srv.IdleTimeout > 0 && sc.idleTimer != nil { + sc.idleTimer.Reset(sc.srv.IdleTimeout) + } + if h1ServerKeepAlivesDisabled(sc.hs) { +@@ -1660,6 +1751,7 @@ func (sc *serverConn) closeStream(st *stream, err error) { + } + } + st.closeErr = err ++ st.cancelCtx() + st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc + sc.writeSched.CloseStream(st.id) + } +@@ -1713,6 +1805,9 @@ func (sc *serverConn) processSetting(s Setting) error { + sc.maxFrameSize = int32(s.Val) // the maximum valid s.Val is < 2^31 + case SettingMaxHeaderListSize: + sc.peerMaxHeaderListSize = s.Val ++ case SettingEnableConnectProtocol: ++ // Receipt of this parameter by a server does not ++ // have any impact + default: + // Unknown setting: "An endpoint that receives a SETTINGS + // frame with any unknown or unsupported identifier MUST +@@ -2020,7 +2115,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { + // (in Go 1.8), though. That's a more sane option anyway. + if sc.hs.ReadTimeout > 0 { + sc.conn.SetReadDeadline(time.Time{}) +- st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout) ++ st.readDeadline = sc.srv.afterFunc(sc.hs.ReadTimeout, st.onReadTimeout) + } + + return sc.scheduleHandler(id, rw, req, handler) +@@ -2116,9 +2211,9 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream + st.cw.Init() + st.flow.conn = &sc.flow // link to conn-level counter + st.flow.add(sc.initialStreamSendWindowSize) +- st.inflow.init(sc.srv.initialStreamRecvWindowSize()) ++ st.inflow.init(sc.initialStreamRecvWindowSize) + if sc.hs.WriteTimeout > 0 { +- st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) ++ st.writeDeadline = sc.srv.afterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) + } + + sc.streams[id] = st +@@ -2143,11 +2238,17 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res + scheme: f.PseudoValue("scheme"), + authority: f.PseudoValue("authority"), + path: f.PseudoValue("path"), ++ protocol: f.PseudoValue("protocol"), ++ } ++ ++ // extended connect is disabled, so we should not see :protocol ++ if disableExtendedConnectProtocol && rp.protocol != "" { ++ return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol)) + } + + isConnect := rp.method == "CONNECT" + if isConnect { +- if rp.path != "" || rp.scheme != "" || rp.authority == "" { ++ if rp.protocol == "" && (rp.path != "" || rp.scheme != "" || rp.authority == "") { + return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol)) + } + } else if rp.method == "" || rp.path == "" || (rp.scheme != "https" && rp.scheme != "http") { +@@ -2171,6 +2272,9 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res + if rp.authority == "" { + rp.authority = rp.header.Get("Host") + } ++ if rp.protocol != "" { ++ rp.header.Set(":protocol", rp.protocol) ++ } + + rw, req, err := sc.newWriterAndRequestNoBody(st, rp) + if err != nil { +@@ -2197,6 +2301,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res + type requestParam struct { + method string + scheme, authority, path string ++ protocol string + header http.Header + } + +@@ -2238,7 +2343,7 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r + + var url_ *url.URL + var requestURI string +- if rp.method == "CONNECT" { ++ if rp.method == "CONNECT" && rp.protocol == "" { + url_ = &url.URL{Host: rp.authority} + requestURI = rp.authority // mimic HTTP/1 server behavior + } else { +@@ -2342,6 +2447,7 @@ func (sc *serverConn) handlerDone() { + + // Run on its own goroutine. + func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) { ++ sc.srv.markNewGoroutine() + defer sc.sendServeMsg(handlerDoneMsg) + didPanic := true + defer func() { +@@ -2638,7 +2744,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { + var date string + if _, ok := rws.snapHeader["Date"]; !ok { + // TODO(bradfitz): be faster here, like net/http? measure. +- date = time.Now().UTC().Format(http.TimeFormat) ++ date = rws.conn.srv.now().UTC().Format(http.TimeFormat) + } + + for _, v := range rws.snapHeader["Trailer"] { +@@ -2760,7 +2866,7 @@ func (rws *responseWriterState) promoteUndeclaredTrailers() { + + func (w *responseWriter) SetReadDeadline(deadline time.Time) error { + st := w.rws.stream +- if !deadline.IsZero() && deadline.Before(time.Now()) { ++ if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) { + // If we're setting a deadline in the past, reset the stream immediately + // so writes after SetWriteDeadline returns will fail. + st.onReadTimeout() +@@ -2776,9 +2882,9 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error { + if deadline.IsZero() { + st.readDeadline = nil + } else if st.readDeadline == nil { +- st.readDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onReadTimeout) ++ st.readDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onReadTimeout) + } else { +- st.readDeadline.Reset(deadline.Sub(time.Now())) ++ st.readDeadline.Reset(deadline.Sub(sc.srv.now())) + } + }) + return nil +@@ -2786,7 +2892,7 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error { + + func (w *responseWriter) SetWriteDeadline(deadline time.Time) error { + st := w.rws.stream +- if !deadline.IsZero() && deadline.Before(time.Now()) { ++ if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) { + // If we're setting a deadline in the past, reset the stream immediately + // so writes after SetWriteDeadline returns will fail. + st.onWriteTimeout() +@@ -2802,14 +2908,19 @@ func (w *responseWriter) SetWriteDeadline(deadline time.Time) error { + if deadline.IsZero() { + st.writeDeadline = nil + } else if st.writeDeadline == nil { +- st.writeDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onWriteTimeout) ++ st.writeDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onWriteTimeout) + } else { +- st.writeDeadline.Reset(deadline.Sub(time.Now())) ++ st.writeDeadline.Reset(deadline.Sub(sc.srv.now())) + } + }) + return nil + } + ++func (w *responseWriter) EnableFullDuplex() error { ++ // We always support full duplex responses, so this is a no-op. ++ return nil ++} ++ + func (w *responseWriter) Flush() { + w.FlushError() + } +@@ -3256,7 +3367,7 @@ func (sc *serverConn) countError(name string, err error) error { + if sc == nil || sc.srv == nil { + return err + } +- f := sc.srv.CountError ++ f := sc.countErrorFunc + if f == nil { + return err + } +diff --git a/vendor/golang.org/x/net/http2/testsync.go b/vendor/golang.org/x/net/http2/testsync.go +deleted file mode 100644 +index 61075bd1..00000000 +--- a/vendor/golang.org/x/net/http2/testsync.go ++++ /dev/null +@@ -1,331 +0,0 @@ +-// 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 +-} +diff --git a/vendor/golang.org/x/net/http2/timer.go b/vendor/golang.org/x/net/http2/timer.go +new file mode 100644 +index 00000000..0b1c17b8 +--- /dev/null ++++ b/vendor/golang.org/x/net/http2/timer.go +@@ -0,0 +1,20 @@ ++// 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 "time" ++ ++// A timer is a time.Timer, as an interface which can be replaced in tests. ++type timer = interface { ++ C() <-chan time.Time ++ Reset(d time.Duration) bool ++ Stop() bool ++} ++ ++// timeTimer adapts a time.Timer to the timer interface. ++type timeTimer struct { ++ *time.Timer ++} ++ ++func (t timeTimer) C() <-chan time.Time { return t.Timer.C } +diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go +index ce375c8c..b2e2ed33 100644 +--- a/vendor/golang.org/x/net/http2/transport.go ++++ b/vendor/golang.org/x/net/http2/transport.go +@@ -25,7 +25,6 @@ import ( + "net/http" + "net/http/httptrace" + "net/textproto" +- "os" + "sort" + "strconv" + "strings" +@@ -185,42 +184,80 @@ type Transport struct { + connPoolOnce sync.Once + connPoolOrDef ClientConnPool // non-nil version of ConnPool + +- syncHooks *testSyncHooks ++ *transportTestHooks + } + +-func (t *Transport) maxHeaderListSize() uint32 { +- if t.MaxHeaderListSize == 0 { +- return 10 << 20 ++// Hook points used for testing. ++// Outside of tests, t.transportTestHooks is nil and these all have minimal implementations. ++// Inside tests, see the testSyncHooks function docs. ++ ++type transportTestHooks struct { ++ newclientconn func(*ClientConn) ++ group synctestGroupInterface ++} ++ ++func (t *Transport) markNewGoroutine() { ++ if t != nil && t.transportTestHooks != nil { ++ t.transportTestHooks.group.Join() + } +- if t.MaxHeaderListSize == 0xffffffff { +- return 0 ++} ++ ++func (t *Transport) now() time.Time { ++ if t != nil && t.transportTestHooks != nil { ++ return t.transportTestHooks.group.Now() + } +- return t.MaxHeaderListSize ++ return time.Now() + } + +-func (t *Transport) maxFrameReadSize() uint32 { +- if t.MaxReadFrameSize == 0 { +- return 0 // use the default provided by the peer ++func (t *Transport) timeSince(when time.Time) time.Duration { ++ if t != nil && t.transportTestHooks != nil { ++ return t.now().Sub(when) + } +- if t.MaxReadFrameSize < minMaxFrameSize { +- return minMaxFrameSize ++ return time.Since(when) ++} ++ ++// newTimer creates a new time.Timer, or a synthetic timer in tests. ++func (t *Transport) newTimer(d time.Duration) timer { ++ if t.transportTestHooks != nil { ++ return t.transportTestHooks.group.NewTimer(d) + } +- if t.MaxReadFrameSize > maxFrameSize { +- return maxFrameSize ++ return timeTimer{time.NewTimer(d)} ++} ++ ++// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. ++func (t *Transport) afterFunc(d time.Duration, f func()) timer { ++ if t.transportTestHooks != nil { ++ return t.transportTestHooks.group.AfterFunc(d, f) + } +- return t.MaxReadFrameSize ++ return timeTimer{time.AfterFunc(d, f)} + } + +-func (t *Transport) disableCompression() bool { +- return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) ++func (t *Transport) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { ++ if t.transportTestHooks != nil { ++ return t.transportTestHooks.group.ContextWithTimeout(ctx, d) ++ } ++ return context.WithTimeout(ctx, d) + } + +-func (t *Transport) pingTimeout() time.Duration { +- if t.PingTimeout == 0 { +- return 15 * time.Second ++func (t *Transport) maxHeaderListSize() uint32 { ++ n := int64(t.MaxHeaderListSize) ++ if t.t1 != nil && t.t1.MaxResponseHeaderBytes != 0 { ++ n = t.t1.MaxResponseHeaderBytes ++ if n > 0 { ++ n = adjustHTTP1MaxHeaderSize(n) ++ } + } +- return t.PingTimeout ++ if n <= 0 { ++ return 10 << 20 ++ } ++ if n >= 0xffffffff { ++ return 0 ++ } ++ return uint32(n) ++} + ++func (t *Transport) disableCompression() bool { ++ return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) + } + + // ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2. +@@ -258,8 +295,8 @@ func configureTransports(t1 *http.Transport) (*Transport, error) { + if !strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1") { + t1.TLSClientConfig.NextProtos = append(t1.TLSClientConfig.NextProtos, "http/1.1") + } +- upgradeFn := func(authority string, c *tls.Conn) http.RoundTripper { +- addr := authorityAddr("https", authority) ++ upgradeFn := func(scheme, authority string, c net.Conn) http.RoundTripper { ++ addr := authorityAddr(scheme, authority) + if used, err := connPool.addConnIfNeeded(addr, t2, c); err != nil { + go c.Close() + return erringRoundTripper{err} +@@ -270,18 +307,37 @@ func configureTransports(t1 *http.Transport) (*Transport, error) { + // was unknown) + go c.Close() + } ++ if scheme == "http" { ++ return (*unencryptedTransport)(t2) ++ } + return t2 + } +- if m := t1.TLSNextProto; len(m) == 0 { +- t1.TLSNextProto = map[string]func(string, *tls.Conn) http.RoundTripper{ +- "h2": upgradeFn, ++ if t1.TLSNextProto == nil { ++ t1.TLSNextProto = make(map[string]func(string, *tls.Conn) http.RoundTripper) ++ } ++ t1.TLSNextProto[NextProtoTLS] = func(authority string, c *tls.Conn) http.RoundTripper { ++ return upgradeFn("https", authority, c) ++ } ++ // The "unencrypted_http2" TLSNextProto key is used to pass off non-TLS HTTP/2 conns. ++ t1.TLSNextProto[nextProtoUnencryptedHTTP2] = func(authority string, c *tls.Conn) http.RoundTripper { ++ nc, err := unencryptedNetConnFromTLSConn(c) ++ if err != nil { ++ go c.Close() ++ return erringRoundTripper{err} + } +- } else { +- m["h2"] = upgradeFn ++ return upgradeFn("http", authority, nc) + } + return t2, nil + } + ++// unencryptedTransport is a Transport with a RoundTrip method that ++// always permits http:// URLs. ++type unencryptedTransport Transport ++ ++func (t *unencryptedTransport) RoundTrip(req *http.Request) (*http.Response, error) { ++ return (*Transport)(t).RoundTripOpt(req, RoundTripOpt{allowHTTP: true}) ++} ++ + func (t *Transport) connPool() ClientConnPool { + t.connPoolOnce.Do(t.initConnPool) + return t.connPoolOrDef +@@ -301,7 +357,7 @@ type ClientConn struct { + t *Transport + tconn net.Conn // usually *tls.Conn, except specialized impls + tlsState *tls.ConnectionState // nil only for specialized impls +- reused uint32 // whether conn is being reused; atomic ++ atomicReused uint32 // whether conn is being reused; atomic + singleUse bool // whether being used for a single http.Request + getConnCalled bool // used by clientConnPool + +@@ -312,31 +368,55 @@ type ClientConn struct { + idleTimeout time.Duration // or 0 for never + idleTimer timer + +- mu sync.Mutex // guards following +- cond *sync.Cond // hold mu; broadcast on flow/closed changes +- flow outflow // our conn-level flow control quota (cs.outflow is per stream) +- inflow inflow // peer's conn-level flow control +- doNotReuse bool // whether conn is marked to not be reused for any future requests +- closing bool +- closed bool +- seenSettings bool // true if we've seen a settings frame, false otherwise +- wantSettingsAck bool // we sent a SETTINGS frame and haven't heard back +- goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received +- goAwayDebug string // goAway frame's debug data, retained as a string +- streams map[uint32]*clientStream // client-initiated +- streamsReserved int // incr by ReserveNewRequest; decr on RoundTrip +- nextStreamID uint32 +- pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams +- pings map[[8]byte]chan struct{} // in flight ping data to notification channel +- br *bufio.Reader +- lastActive time.Time +- lastIdle time.Time // time last idle ++ mu sync.Mutex // guards following ++ cond *sync.Cond // hold mu; broadcast on flow/closed changes ++ flow outflow // our conn-level flow control quota (cs.outflow is per stream) ++ inflow inflow // peer's conn-level flow control ++ doNotReuse bool // whether conn is marked to not be reused for any future requests ++ closing bool ++ closed bool ++ closedOnIdle bool // true if conn was closed for idleness ++ seenSettings bool // true if we've seen a settings frame, false otherwise ++ seenSettingsChan chan struct{} // closed when seenSettings is true or frame reading fails ++ wantSettingsAck bool // we sent a SETTINGS frame and haven't heard back ++ goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received ++ goAwayDebug string // goAway frame's debug data, retained as a string ++ streams map[uint32]*clientStream // client-initiated ++ streamsReserved int // incr by ReserveNewRequest; decr on RoundTrip ++ nextStreamID uint32 ++ pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams ++ pings map[[8]byte]chan struct{} // in flight ping data to notification channel ++ br *bufio.Reader ++ lastActive time.Time ++ lastIdle time.Time // time last idle + // Settings from peer: (also guarded by wmu) +- maxFrameSize uint32 +- maxConcurrentStreams uint32 +- peerMaxHeaderListSize uint64 +- peerMaxHeaderTableSize uint32 +- initialWindowSize uint32 ++ maxFrameSize uint32 ++ maxConcurrentStreams uint32 ++ peerMaxHeaderListSize uint64 ++ peerMaxHeaderTableSize uint32 ++ initialWindowSize uint32 ++ initialStreamRecvWindowSize int32 ++ readIdleTimeout time.Duration ++ pingTimeout time.Duration ++ extendedConnectAllowed bool ++ ++ // rstStreamPingsBlocked works around an unfortunate gRPC behavior. ++ // gRPC strictly limits the number of PING frames that it will receive. ++ // The default is two pings per two hours, but the limit resets every time ++ // the gRPC endpoint sends a HEADERS or DATA frame. See golang/go#70575. ++ // ++ // rstStreamPingsBlocked is set after receiving a response to a PING frame ++ // bundled with an RST_STREAM (see pendingResets below), and cleared after ++ // receiving a HEADERS or DATA frame. ++ rstStreamPingsBlocked bool ++ ++ // pendingResets is the number of RST_STREAM frames we have sent to the peer, ++ // without confirming that the peer has received them. When we send a RST_STREAM, ++ // we bundle it with a PING frame, unless a PING is already in flight. We count ++ // the reset stream against the connection's concurrency limit until we get ++ // a PING response. This limits the number of requests we'll try to send to a ++ // completely unresponsive connection. ++ pendingResets int + + // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests. + // Write to reqHeaderMu to lock it, read from it to unlock. +@@ -352,60 +432,6 @@ type ClientConn struct { + werr error // first write error that has occurred + hbuf bytes.Buffer // HPACK encoder writes into this + 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 +@@ -448,12 +474,12 @@ type clientStream struct { + sentHeaders bool + + // owned by clientConnReadLoop: +- firstByte bool // got the first response byte +- pastHeaders bool // got first MetaHeadersFrame (actual headers) +- pastTrailers bool // got optional second MetaHeadersFrame (trailers) +- num1xx uint8 // number of 1xx responses seen +- readClosed bool // peer sent an END_STREAM flag +- readAborted bool // read loop reset the stream ++ firstByte bool // got the first response byte ++ pastHeaders bool // got first MetaHeadersFrame (actual headers) ++ pastTrailers bool // got optional second MetaHeadersFrame (trailers) ++ readClosed bool // peer sent an END_STREAM flag ++ readAborted bool // read loop reset the stream ++ totalHeaderSize int64 // total size of 1xx headers seen + + trailer http.Header // accumulated trailers + resTrailer *http.Header // client's Response.Trailer +@@ -487,7 +513,7 @@ func (cs *clientStream) abortStreamLocked(err error) { + // TODO(dneil): Clean up tests where cs.cc.cond is nil. + if cs.cc.cond != nil { + // Wake up writeRequestBody if it is waiting on flow control. +- cs.cc.condBroadcast() ++ cs.cc.cond.Broadcast() + } + } + +@@ -497,7 +523,7 @@ func (cs *clientStream) abortRequestBodyWrite() { + defer cc.mu.Unlock() + if cs.reqBody != nil && cs.reqBodyClosed == nil { + cs.closeReqBodyLocked() +- cc.condBroadcast() ++ cc.cond.Broadcast() + } + } + +@@ -507,13 +533,15 @@ func (cs *clientStream) closeReqBodyLocked() { + } + cs.reqBodyClosed = make(chan struct{}) + reqBodyClosed := cs.reqBodyClosed +- cs.cc.goRun(func() { ++ go func() { ++ cs.cc.t.markNewGoroutine() + cs.reqBody.Close() + close(reqBodyClosed) +- }) ++ }() + } + + type stickyErrWriter struct { ++ group synctestGroupInterface + conn net.Conn + timeout time.Duration + err *error +@@ -523,22 +551,9 @@ func (sew stickyErrWriter) Write(p []byte) (n int, err error) { + if *sew.err != nil { + return 0, *sew.err + } +- for { +- if sew.timeout != 0 { +- sew.conn.SetWriteDeadline(time.Now().Add(sew.timeout)) +- } +- nn, err := sew.conn.Write(p[n:]) +- n += nn +- if n < len(p) && nn > 0 && errors.Is(err, os.ErrDeadlineExceeded) { +- // Keep extending the deadline so long as we're making progress. +- continue +- } +- if sew.timeout != 0 { +- sew.conn.SetWriteDeadline(time.Time{}) +- } +- *sew.err = err +- return n, err +- } ++ n, err = writeWithByteTimeout(sew.group, sew.conn, sew.timeout, p) ++ *sew.err = err ++ return n, err + } + + // noCachedConnError is the concrete type of ErrNoCachedConn, which +@@ -569,6 +584,8 @@ type RoundTripOpt struct { + // no cached connection is available, RoundTripOpt + // will return ErrNoCachedConn. + OnlyCachedConn bool ++ ++ allowHTTP bool // allow http:// URLs + } + + func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { +@@ -601,7 +618,14 @@ func authorityAddr(scheme string, authority string) (addr string) { + + // RoundTripOpt is like RoundTrip, but takes options. + func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) { +- if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) { ++ switch req.URL.Scheme { ++ case "https": ++ // Always okay. ++ case "http": ++ if !t.AllowHTTP && !opt.allowHTTP { ++ return nil, errors.New("http2: unencrypted HTTP/2 not enabled") ++ } ++ default: + return nil, errors.New("http2: unsupported scheme") + } + +@@ -612,7 +636,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res + t.vlogf("http2: Transport failed to get client conn for %s: %v", addr, err) + return nil, err + } +- reused := !atomic.CompareAndSwapUint32(&cc.reused, 0, 1) ++ reused := !atomic.CompareAndSwapUint32(&cc.atomicReused, 0, 1) + traceGotConn(req, cc, reused) + res, err := cc.RoundTrip(req) + if err != nil && retry <= 6 { +@@ -626,21 +650,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res + backoff := float64(uint(1) << (uint(retry) - 1)) + backoff += backoff * (0.1 * mathrand.Float64()) + d := time.Second * time.Duration(backoff) +- var tm timer +- if t.syncHooks != nil { +- tm = t.syncHooks.newTimer(d) +- t.syncHooks.blockUntil(func() bool { +- select { +- case <-tm.C(): +- case <-req.Context().Done(): +- default: +- return false +- } +- return true +- }) +- } else { +- tm = newTimeTimer(d) +- } ++ tm := t.newTimer(d) + select { + case <-tm.C(): + t.vlogf("RoundTrip retrying after failure: %v", roundTripErr) +@@ -651,6 +661,22 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res + } + } + } ++ if err == errClientConnNotEstablished { ++ // This ClientConn was created recently, ++ // this is the first request to use it, ++ // and the connection is closed and not usable. ++ // ++ // In this state, cc.idleTimer will remove the conn from the pool ++ // when it fires. Stop the timer and remove it here so future requests ++ // won't try to use this connection. ++ // ++ // If the timer has already fired and we're racing it, the redundant ++ // call to MarkDead is harmless. ++ if cc.idleTimer != nil { ++ cc.idleTimer.Stop() ++ } ++ t.connPool().MarkDead(cc) ++ } + if err != nil { + t.vlogf("RoundTrip failure: %v", err) + return nil, err +@@ -669,9 +695,10 @@ func (t *Transport) CloseIdleConnections() { + } + + var ( +- errClientConnClosed = errors.New("http2: client conn is closed") +- errClientConnUnusable = errors.New("http2: client conn not usable") +- errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY") ++ errClientConnClosed = errors.New("http2: client conn is closed") ++ errClientConnUnusable = errors.New("http2: client conn not usable") ++ errClientConnNotEstablished = errors.New("http2: client conn could not be established") ++ errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY") + ) + + // shouldRetryRequest is called by RoundTrip when a request fails to get +@@ -725,8 +752,8 @@ func canRetryError(err error) bool { + } + + func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse bool) (*ClientConn, error) { +- if t.syncHooks != nil { +- return t.newClientConn(nil, singleUse, t.syncHooks) ++ if t.transportTestHooks != nil { ++ return t.newClientConn(nil, singleUse) + } + host, _, err := net.SplitHostPort(addr) + if err != nil { +@@ -736,7 +763,7 @@ func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse b + if err != nil { + return nil, err + } +- return t.newClientConn(tconn, singleUse, nil) ++ return t.newClientConn(tconn, singleUse) + } + + func (t *Transport) newTLSConfig(host string) *tls.Config { +@@ -787,48 +814,38 @@ func (t *Transport) expectContinueTimeout() time.Duration { + return t.t1.ExpectContinueTimeout + } + +-func (t *Transport) maxDecoderHeaderTableSize() uint32 { +- if v := t.MaxDecoderHeaderTableSize; v > 0 { +- return v +- } +- return initialHeaderTableSize +-} +- +-func (t *Transport) maxEncoderHeaderTableSize() uint32 { +- if v := t.MaxEncoderHeaderTableSize; v > 0 { +- return v +- } +- return initialHeaderTableSize +-} +- + func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { +- return t.newClientConn(c, t.disableKeepAlives(), nil) ++ return t.newClientConn(c, t.disableKeepAlives()) + } + +-func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHooks) (*ClientConn, error) { ++func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { ++ conf := configFromTransport(t) + cc := &ClientConn{ +- t: t, +- tconn: c, +- readerDone: make(chan struct{}), +- nextStreamID: 1, +- maxFrameSize: 16 << 10, // spec default +- initialWindowSize: 65535, // spec default +- maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings. +- peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. +- streams: make(map[uint32]*clientStream), +- singleUse: singleUse, +- wantSettingsAck: true, +- pings: make(map[[8]byte]chan struct{}), +- reqHeaderMu: make(chan struct{}, 1), +- syncHooks: hooks, +- } +- if hooks != nil { +- hooks.newclientconn(cc) ++ t: t, ++ tconn: c, ++ readerDone: make(chan struct{}), ++ nextStreamID: 1, ++ maxFrameSize: 16 << 10, // spec default ++ initialWindowSize: 65535, // spec default ++ initialStreamRecvWindowSize: conf.MaxUploadBufferPerStream, ++ maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings. ++ peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. ++ streams: make(map[uint32]*clientStream), ++ singleUse: singleUse, ++ seenSettingsChan: make(chan struct{}), ++ wantSettingsAck: true, ++ readIdleTimeout: conf.SendPingTimeout, ++ pingTimeout: conf.PingTimeout, ++ pings: make(map[[8]byte]chan struct{}), ++ reqHeaderMu: make(chan struct{}, 1), ++ lastActive: t.now(), ++ } ++ var group synctestGroupInterface ++ if t.transportTestHooks != nil { ++ t.markNewGoroutine() ++ t.transportTestHooks.newclientconn(cc) + c = cc.tconn +- } +- if d := t.idleConnTimeout(); d != 0 { +- cc.idleTimeout = d +- cc.idleTimer = cc.afterFunc(d, cc.onIdleTimeout) ++ group = t.group + } + if VerboseLogs { + t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr()) +@@ -840,30 +857,25 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo + // TODO: adjust this writer size to account for frame size + + // MTU + crypto/tls record padding. + cc.bw = bufio.NewWriter(stickyErrWriter{ ++ group: group, + conn: c, +- timeout: t.WriteByteTimeout, ++ timeout: conf.WriteByteTimeout, + err: &cc.werr, + }) + cc.br = bufio.NewReader(c) + cc.fr = NewFramer(cc.bw, cc.br) +- if t.maxFrameReadSize() != 0 { +- cc.fr.SetMaxReadFrameSize(t.maxFrameReadSize()) +- } ++ cc.fr.SetMaxReadFrameSize(conf.MaxReadFrameSize) + if t.CountError != nil { + cc.fr.countError = t.CountError + } +- maxHeaderTableSize := t.maxDecoderHeaderTableSize() ++ maxHeaderTableSize := conf.MaxDecoderHeaderTableSize + cc.fr.ReadMetaHeaders = hpack.NewDecoder(maxHeaderTableSize, nil) + cc.fr.MaxHeaderListSize = t.maxHeaderListSize() + + cc.henc = hpack.NewEncoder(&cc.hbuf) +- cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize()) ++ cc.henc.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize) + cc.peerMaxHeaderTableSize = initialHeaderTableSize + +- if t.AllowHTTP { +- cc.nextStreamID = 3 +- } +- + if cs, ok := c.(connectionStater); ok { + state := cs.ConnectionState() + cc.tlsState = &state +@@ -871,11 +883,9 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo + + initialSettings := []Setting{ + {ID: SettingEnablePush, Val: 0}, +- {ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow}, +- } +- if max := t.maxFrameReadSize(); max != 0 { +- initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: max}) ++ {ID: SettingInitialWindowSize, Val: uint32(cc.initialStreamRecvWindowSize)}, + } ++ initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: conf.MaxReadFrameSize}) + if max := t.maxHeaderListSize(); max != 0 { + initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max}) + } +@@ -885,23 +895,29 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo + + cc.bw.Write(clientPreface) + cc.fr.WriteSettings(initialSettings...) +- cc.fr.WriteWindowUpdate(0, transportDefaultConnFlow) +- cc.inflow.init(transportDefaultConnFlow + initialWindowSize) ++ cc.fr.WriteWindowUpdate(0, uint32(conf.MaxUploadBufferPerConnection)) ++ cc.inflow.init(conf.MaxUploadBufferPerConnection + initialWindowSize) + cc.bw.Flush() + if cc.werr != nil { + cc.Close() + return nil, cc.werr + } + +- cc.goRun(cc.readLoop) ++ // Start the idle timer after the connection is fully initialized. ++ if d := t.idleConnTimeout(); d != 0 { ++ cc.idleTimeout = d ++ cc.idleTimer = t.afterFunc(d, cc.onIdleTimeout) ++ } ++ ++ go cc.readLoop() + return cc, nil + } + + func (cc *ClientConn) healthCheck() { +- pingTimeout := cc.t.pingTimeout() ++ pingTimeout := cc.pingTimeout + // 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. +- ctx, cancel := cc.contextWithTimeout(context.Background(), pingTimeout) ++ ctx, cancel := cc.t.contextWithTimeout(context.Background(), pingTimeout) + defer cancel() + cc.vlogf("http2: Transport sending health check") + err := cc.Ping(ctx) +@@ -936,7 +952,20 @@ func (cc *ClientConn) setGoAway(f *GoAwayFrame) { + } + last := f.LastStreamID + 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) + } + } +@@ -1013,7 +1042,7 @@ func (cc *ClientConn) State() ClientConnState { + return ClientConnState{ + Closed: cc.closed, + Closing: cc.closing || cc.singleUse || cc.doNotReuse || cc.goAway != nil, +- StreamsActive: len(cc.streams), ++ StreamsActive: len(cc.streams) + cc.pendingResets, + StreamsReserved: cc.streamsReserved, + StreamsPending: cc.pendingRequests, + LastIdle: cc.lastIdle, +@@ -1045,16 +1074,40 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) { + // writing it. + maxConcurrentOkay = true + } else { +- maxConcurrentOkay = int64(len(cc.streams)+cc.streamsReserved+1) <= int64(cc.maxConcurrentStreams) ++ // We can take a new request if the total of ++ // - active streams; ++ // - reservation slots for new streams; and ++ // - streams for which we have sent a RST_STREAM and a PING, ++ // but received no subsequent frame ++ // is less than the concurrency limit. ++ maxConcurrentOkay = cc.currentRequestCountLocked() < int(cc.maxConcurrentStreams) + } + + st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && maxConcurrentOkay && + !cc.doNotReuse && + int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32 && + !cc.tooIdleLocked() ++ ++ // If this connection has never been used for a request and is closed, ++ // then let it take a request (which will fail). ++ // If the conn was closed for idleness, we're racing the idle timer; ++ // don't try to use the conn. (Issue #70515.) ++ // ++ // This avoids a situation where an error early in a connection's lifetime ++ // goes unreported. ++ if cc.nextStreamID == 1 && cc.streamsReserved == 0 && cc.closed && !cc.closedOnIdle { ++ st.canTakeNewRequest = true ++ } ++ + return + } + ++// currentRequestCountLocked reports the number of concurrency slots currently in use, ++// including active streams, reserved slots, and reset streams waiting for acknowledgement. ++func (cc *ClientConn) currentRequestCountLocked() int { ++ return len(cc.streams) + cc.streamsReserved + cc.pendingResets ++} ++ + func (cc *ClientConn) canTakeNewRequestLocked() bool { + st := cc.idleStateLocked() + return st.canTakeNewRequest +@@ -1067,7 +1120,7 @@ func (cc *ClientConn) tooIdleLocked() bool { + // times are compared based on their wall time. We don't want + // to reuse a connection that's been sitting idle during + // VM/laptop suspend if monotonic time was also frozen. +- return cc.idleTimeout != 0 && !cc.lastIdle.IsZero() && time.Since(cc.lastIdle.Round(0)) > cc.idleTimeout ++ return cc.idleTimeout != 0 && !cc.lastIdle.IsZero() && cc.t.timeSince(cc.lastIdle.Round(0)) > cc.idleTimeout + } + + // onIdleTimeout is called from a time.AfterFunc goroutine. It will +@@ -1105,6 +1158,7 @@ func (cc *ClientConn) closeIfIdle() { + return + } + cc.closed = true ++ cc.closedOnIdle = true + nextID := cc.nextStreamID + // TODO: do clients send GOAWAY too? maybe? Just Close: + cc.mu.Unlock() +@@ -1131,7 +1185,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { + // Wait for all in-flight streams to complete or connection to close + done := make(chan struct{}) + cancelled := false // guarded by cc.mu +- cc.goRun(func() { ++ go func() { ++ cc.t.markNewGoroutine() + cc.mu.Lock() + defer cc.mu.Unlock() + for { +@@ -1143,9 +1198,9 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { + if cancelled { + break + } +- cc.condWait() ++ cc.cond.Wait() + } +- }) ++ }() + shutdownEnterWaitStateHook() + select { + case <-done: +@@ -1155,7 +1210,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { + cc.mu.Lock() + // Free the goroutine above + cancelled = true +- cc.condBroadcast() ++ cc.cond.Broadcast() + cc.mu.Unlock() + return ctx.Err() + } +@@ -1193,7 +1248,7 @@ func (cc *ClientConn) closeForError(err error) { + for _, cs := range cc.streams { + cs.abortStreamLocked(err) + } +- cc.condBroadcast() ++ cc.cond.Broadcast() + cc.mu.Unlock() + cc.closeConn() + } +@@ -1308,23 +1363,30 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) + respHeaderRecv: make(chan struct{}), + donec: make(chan struct{}), + } +- cc.goRun(func() { +- cs.doRequest(req) +- }) ++ ++ // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? ++ if !cc.t.disableCompression() && ++ req.Header.Get("Accept-Encoding") == "" && ++ req.Header.Get("Range") == "" && ++ !cs.isHead { ++ // Request gzip only, not deflate. Deflate is ambiguous and ++ // not as universally supported anyway. ++ // See: https://zlib.net/zlib_faq.html#faq39 ++ // ++ // Note that we don't request this for HEAD requests, ++ // due to a bug in nginx: ++ // http://trac.nginx.org/nginx/ticket/358 ++ // https://golang.org/issue/5522 ++ // ++ // We don't request gzip if the request is for a range, since ++ // auto-decoding a portion of a gzipped document will just fail ++ // anyway. See https://golang.org/issue/8923 ++ cs.requestedGzip = true ++ } ++ ++ go cs.doRequest(req, streamf) + + 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 { + case <-cs.donec: + return nil +@@ -1385,24 +1447,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) + return err + } + +- if streamf != nil { +- streamf(cs) +- } +- + 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 { + case <-cs.respHeaderRecv: + return handleResponseHeaders() +@@ -1432,11 +1477,14 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) + // doRequest runs for the duration of the request lifetime. + // + // It sends the request and performs post-request cleanup (closing Request.Body, etc.). +-func (cs *clientStream) doRequest(req *http.Request) { +- err := cs.writeRequest(req) ++func (cs *clientStream) doRequest(req *http.Request, streamf func(*clientStream)) { ++ cs.cc.t.markNewGoroutine() ++ err := cs.writeRequest(req, streamf) + cs.cleanupWriteRequest(err) + } + ++var errExtendedConnectNotSupported = errors.New("net/http: extended connect not supported by peer") ++ + // writeRequest sends a request. + // + // It returns nil after the request is written, the response read, +@@ -1444,7 +1492,7 @@ func (cs *clientStream) doRequest(req *http.Request) { + // + // It returns non-nil if the request ends otherwise. + // If the returned error is StreamError, the error Code may be used in resetting the stream. +-func (cs *clientStream) writeRequest(req *http.Request) (err error) { ++func (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStream)) (err error) { + cc := cs.cc + ctx := cs.ctx + +@@ -1452,26 +1500,30 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { + return err + } + ++ // wait for setting frames to be received, a server can change this value later, ++ // but we just wait for the first settings frame ++ var isExtendedConnect bool ++ if req.Method == "CONNECT" && req.Header.Get(":protocol") != "" { ++ isExtendedConnect = true ++ } ++ + // Acquire the new-request lock by writing to reqHeaderMu. + // This lock guards the critical section covering allocating a new stream ID + // (requires mu) and creating the stream (requires wmu). + if cc.reqHeaderMu == nil { + 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 ++ if isExtendedConnect { ++ select { ++ case <-cs.reqCancel: ++ return errRequestCanceled ++ case <-ctx.Done(): ++ return ctx.Err() ++ case <-cc.seenSettingsChan: ++ if !cc.extendedConnectAllowed { ++ return errExtendedConnectNotSupported + } +- return true +- }) ++ } + } + select { + case cc.reqHeaderMu <- struct{}{}: +@@ -1497,28 +1549,8 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { + } + cc.mu.Unlock() + +- if newStreamHook != nil { +- newStreamHook(cs) +- } +- +- // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? +- if !cc.t.disableCompression() && +- req.Header.Get("Accept-Encoding") == "" && +- req.Header.Get("Range") == "" && +- !cs.isHead { +- // Request gzip only, not deflate. Deflate is ambiguous and +- // not as universally supported anyway. +- // See: https://zlib.net/zlib_faq.html#faq39 +- // +- // Note that we don't request this for HEAD requests, +- // due to a bug in nginx: +- // http://trac.nginx.org/nginx/ticket/358 +- // https://golang.org/issue/5522 +- // +- // We don't request gzip if the request is for a range, since +- // auto-decoding a portion of a gzipped document will just fail +- // anyway. See https://golang.org/issue/8923 +- cs.requestedGzip = true ++ if streamf != nil { ++ streamf(cs) + } + + continueTimeout := cc.t.expectContinueTimeout() +@@ -1581,7 +1613,7 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { + var respHeaderTimer <-chan time.Time + var respHeaderRecv chan struct{} + if d := cc.responseHeaderTimeout(); d != 0 { +- timer := cc.newTimer(d) ++ timer := cc.t.newTimer(d) + defer timer.Stop() + respHeaderTimer = timer.C() + respHeaderRecv = cs.respHeaderRecv +@@ -1590,21 +1622,6 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { + // or until the request is aborted (via context, error, or otherwise), + // whichever comes first. + 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 { + case <-cs.peerClosed: + return nil +@@ -1689,6 +1706,7 @@ func (cs *clientStream) cleanupWriteRequest(err error) { + cs.reqBodyClosed = make(chan struct{}) + } + bodyClosed := cs.reqBodyClosed ++ closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil + cc.mu.Unlock() + if mustCloseBody { + cs.reqBody.Close() +@@ -1713,16 +1731,44 @@ func (cs *clientStream) cleanupWriteRequest(err error) { + if cs.sentHeaders { + if se, ok := err.(StreamError); ok { + if se.Cause != errFromPeer { +- cc.writeStreamReset(cs.ID, se.Code, err) ++ cc.writeStreamReset(cs.ID, se.Code, false, err) + } + } else { +- cc.writeStreamReset(cs.ID, ErrCodeCancel, err) ++ // We're cancelling an in-flight request. ++ // ++ // This could be due to the server becoming unresponsive. ++ // To avoid sending too many requests on a dead connection, ++ // we let the request continue to consume a concurrency slot ++ // until we can confirm the server is still responding. ++ // We do this by sending a PING frame along with the RST_STREAM ++ // (unless a ping is already in flight). ++ // ++ // For simplicity, we don't bother tracking the PING payload: ++ // We reset cc.pendingResets any time we receive a PING ACK. ++ // ++ // We skip this if the conn is going to be closed on idle, ++ // because it's short lived and will probably be closed before ++ // we get the ping response. ++ ping := false ++ if !closeOnIdle { ++ cc.mu.Lock() ++ // rstStreamPingsBlocked works around a gRPC behavior: ++ // see comment on the field for details. ++ if !cc.rstStreamPingsBlocked { ++ if cc.pendingResets == 0 { ++ ping = true ++ } ++ cc.pendingResets++ ++ } ++ cc.mu.Unlock() ++ } ++ cc.writeStreamReset(cs.ID, ErrCodeCancel, ping, err) + } + } + cs.bufPipe.CloseWithError(err) // no-op if already closed + } else { + if cs.sentHeaders && !cs.sentEndStream { +- cc.writeStreamReset(cs.ID, ErrCodeNo, nil) ++ cc.writeStreamReset(cs.ID, ErrCodeNo, false, nil) + } + cs.bufPipe.CloseWithError(errRequestCanceled) + } +@@ -1744,16 +1790,21 @@ func (cs *clientStream) cleanupWriteRequest(err error) { + // Must hold cc.mu. + func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error { + for { +- cc.lastActive = time.Now() ++ if cc.closed && cc.nextStreamID == 1 && cc.streamsReserved == 0 { ++ // This is the very first request sent to this connection. ++ // Return a fatal error which aborts the retry loop. ++ return errClientConnNotEstablished ++ } ++ cc.lastActive = cc.t.now() + if cc.closed || !cc.canTakeNewRequestLocked() { + return errClientConnUnusable + } + cc.lastIdle = time.Time{} +- if int64(len(cc.streams)) < int64(cc.maxConcurrentStreams) { ++ if cc.currentRequestCountLocked() < int(cc.maxConcurrentStreams) { + return nil + } + cc.pendingRequests++ +- cc.condWait() ++ cc.cond.Wait() + cc.pendingRequests-- + select { + case <-cs.abort: +@@ -2015,13 +2066,13 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) + cs.flow.take(take) + return take, nil + } +- cc.condWait() ++ cc.cond.Wait() + } + } + + func validateHeaders(hdrs http.Header) string { + for k, vv := range hdrs { +- if !httpguts.ValidHeaderFieldName(k) { ++ if !httpguts.ValidHeaderFieldName(k) && k != ":protocol" { + return fmt.Sprintf("name %q", k) + } + for _, v := range vv { +@@ -2037,6 +2088,10 @@ func validateHeaders(hdrs http.Header) string { + + var errNilRequestURL = errors.New("http2: Request.URI is nil") + ++func isNormalConnect(req *http.Request) bool { ++ return req.Method == "CONNECT" && req.Header.Get(":protocol") == "" ++} ++ + // requires cc.wmu be held. + func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) { + cc.hbuf.Reset() +@@ -2057,7 +2112,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail + } + + var path string +- if req.Method != "CONNECT" { ++ if !isNormalConnect(req) { + path = req.URL.RequestURI() + if !validPseudoPath(path) { + orig := path +@@ -2094,7 +2149,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail + m = http.MethodGet + } + f(":method", m) +- if req.Method != "CONNECT" { ++ if !isNormalConnect(req) { + f(":path", path) + f(":scheme", req.URL.Scheme) + } +@@ -2275,7 +2330,7 @@ type resAndError struct { + func (cc *ClientConn) addStreamLocked(cs *clientStream) { + cs.flow.add(int32(cc.initialWindowSize)) + cs.flow.setConnFlow(&cc.flow) +- cs.inflow.init(transportDefaultStreamFlow) ++ cs.inflow.init(cc.initialStreamRecvWindowSize) + cs.ID = cc.nextStreamID + cc.nextStreamID += 2 + cc.streams[cs.ID] = cs +@@ -2291,14 +2346,14 @@ func (cc *ClientConn) forgetStreamID(id uint32) { + if len(cc.streams) != slen-1 { + panic("forgetting unknown stream id") + } +- cc.lastActive = time.Now() ++ cc.lastActive = cc.t.now() + if len(cc.streams) == 0 && cc.idleTimer != nil { + cc.idleTimer.Reset(cc.idleTimeout) +- cc.lastIdle = time.Now() ++ cc.lastIdle = cc.t.now() + } + // Wake up writeRequestBody via clientStream.awaitFlowControl and + // wake up RoundTrip if there is a pending request. +- cc.condBroadcast() ++ cc.cond.Broadcast() + + closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil + if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 { +@@ -2320,6 +2375,7 @@ type clientConnReadLoop struct { + + // readLoop runs in its own goroutine and reads and dispatches frames. + func (cc *ClientConn) readLoop() { ++ cc.t.markNewGoroutine() + rl := &clientConnReadLoop{cc: cc} + defer rl.cleanup() + cc.readerErr = rl.run() +@@ -2353,7 +2409,6 @@ func isEOFOrNetReadError(err error) bool { + + func (rl *clientConnReadLoop) cleanup() { + cc := rl.cc +- cc.t.connPool().MarkDead(cc) + defer cc.closeConn() + defer close(cc.readerDone) + +@@ -2377,6 +2432,27 @@ func (rl *clientConnReadLoop) cleanup() { + } + cc.closed = true + ++ // If the connection has never been used, and has been open for only a short time, ++ // leave it in the connection pool for a little while. ++ // ++ // This avoids a situation where new connections are constantly created, ++ // added to the pool, fail, and are removed from the pool, without any error ++ // being surfaced to the user. ++ unusedWaitTime := 5 * time.Second ++ if cc.idleTimeout > 0 && unusedWaitTime > cc.idleTimeout { ++ unusedWaitTime = cc.idleTimeout ++ } ++ idleTime := cc.t.now().Sub(cc.lastActive) ++ if atomic.LoadUint32(&cc.atomicReused) == 0 && idleTime < unusedWaitTime && !cc.closedOnIdle { ++ cc.idleTimer = cc.t.afterFunc(unusedWaitTime-idleTime, func() { ++ cc.t.connPool().MarkDead(cc) ++ }) ++ } else { ++ cc.mu.Unlock() // avoid any deadlocks in MarkDead ++ cc.t.connPool().MarkDead(cc) ++ cc.mu.Lock() ++ } ++ + for _, cs := range cc.streams { + select { + case <-cs.peerClosed: +@@ -2386,7 +2462,7 @@ func (rl *clientConnReadLoop) cleanup() { + cs.abortStreamLocked(err) + } + } +- cc.condBroadcast() ++ cc.cond.Broadcast() + cc.mu.Unlock() + } + +@@ -2420,10 +2496,10 @@ func (cc *ClientConn) countReadFrameError(err error) { + func (rl *clientConnReadLoop) run() error { + cc := rl.cc + gotSettings := false +- readIdleTimeout := cc.t.ReadIdleTimeout ++ readIdleTimeout := cc.readIdleTimeout + var t timer + if readIdleTimeout != 0 { +- t = cc.afterFunc(readIdleTimeout, cc.healthCheck) ++ t = cc.t.afterFunc(readIdleTimeout, cc.healthCheck) + } + for { + f, err := cc.fr.ReadFrame() +@@ -2434,7 +2510,7 @@ func (rl *clientConnReadLoop) run() error { + cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", cc, err, err) + } + if se, ok := err.(StreamError); ok { +- if cs := rl.streamByID(se.StreamID); cs != nil { ++ if cs := rl.streamByID(se.StreamID, notHeaderOrDataFrame); cs != nil { + if se.Cause == nil { + se.Cause = cc.fr.errDetail + } +@@ -2480,13 +2556,16 @@ func (rl *clientConnReadLoop) run() error { + if VerboseLogs { + cc.vlogf("http2: Transport conn %p received error from processing frame %v: %v", cc, summarizeFrame(f), err) + } ++ if !cc.seenSettings { ++ close(cc.seenSettingsChan) ++ } + return err + } + } + } + + func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { +- cs := rl.streamByID(f.StreamID) ++ cs := rl.streamByID(f.StreamID, headerOrDataFrame) + if cs == nil { + // We'd get here if we canceled a request while the + // server had its response still in flight. So if this +@@ -2604,15 +2683,34 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra + if f.StreamEnded() { + return nil, errors.New("1xx informational response with END_STREAM flag") + } +- cs.num1xx++ +- const max1xxResponses = 5 // arbitrary bound on number of informational responses, same as net/http +- if cs.num1xx > max1xxResponses { +- return nil, errors.New("http2: too many 1xx informational responses") +- } + if fn := cs.get1xxTraceFunc(); fn != nil { ++ // If the 1xx response is being delivered to the user, ++ // then they're responsible for limiting the number ++ // of responses. + if err := fn(statusCode, textproto.MIMEHeader(header)); err != nil { + return nil, err + } ++ } else { ++ // If the user didn't examine the 1xx response, then we ++ // limit the size of all 1xx headers. ++ // ++ // This differs a bit from the HTTP/1 implementation, which ++ // limits the size of all 1xx headers plus the final response. ++ // Use the larger limit of MaxHeaderListSize and ++ // net/http.Transport.MaxResponseHeaderBytes. ++ limit := int64(cs.cc.t.maxHeaderListSize()) ++ if t1 := cs.cc.t.t1; t1 != nil && t1.MaxResponseHeaderBytes > limit { ++ limit = t1.MaxResponseHeaderBytes ++ } ++ for _, h := range f.Fields { ++ cs.totalHeaderSize += int64(h.Size()) ++ } ++ if cs.totalHeaderSize > limit { ++ if VerboseLogs { ++ log.Printf("http2: 1xx informational responses too large") ++ } ++ return nil, errors.New("header list too large") ++ } + } + if statusCode == 100 { + traceGot100Continue(cs.trace) +@@ -2796,7 +2894,7 @@ func (b transportResponseBody) Close() error { + + func (rl *clientConnReadLoop) processData(f *DataFrame) error { + cc := rl.cc +- cs := rl.streamByID(f.StreamID) ++ cs := rl.streamByID(f.StreamID, headerOrDataFrame) + data := f.Data() + if cs == nil { + cc.mu.Lock() +@@ -2931,9 +3029,22 @@ func (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) { + cs.abortStream(err) + } + +-func (rl *clientConnReadLoop) streamByID(id uint32) *clientStream { ++// Constants passed to streamByID for documentation purposes. ++const ( ++ headerOrDataFrame = true ++ notHeaderOrDataFrame = false ++) ++ ++// streamByID returns the stream with the given id, or nil if no stream has that id. ++// If headerOrData is true, it clears rst.StreamPingsBlocked. ++func (rl *clientConnReadLoop) streamByID(id uint32, headerOrData bool) *clientStream { + rl.cc.mu.Lock() + defer rl.cc.mu.Unlock() ++ if headerOrData { ++ // Work around an unfortunate gRPC behavior. ++ // See comment on ClientConn.rstStreamPingsBlocked for details. ++ rl.cc.rstStreamPingsBlocked = false ++ } + cs := rl.cc.streams[id] + if cs != nil && !cs.readAborted { + return cs +@@ -3021,12 +3132,27 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { + for _, cs := range cc.streams { + cs.flow.add(delta) + } +- cc.condBroadcast() ++ cc.cond.Broadcast() + + cc.initialWindowSize = s.Val + case SettingHeaderTableSize: + cc.henc.SetMaxDynamicTableSize(s.Val) + cc.peerMaxHeaderTableSize = s.Val ++ case SettingEnableConnectProtocol: ++ if err := s.Valid(); err != nil { ++ return err ++ } ++ // If the peer wants to send us SETTINGS_ENABLE_CONNECT_PROTOCOL, ++ // we require that it do so in the first SETTINGS frame. ++ // ++ // When we attempt to use extended CONNECT, we wait for the first ++ // SETTINGS frame to see if the server supports it. If we let the ++ // server enable the feature with a later SETTINGS frame, then ++ // users will see inconsistent results depending on whether we've ++ // seen that frame or not. ++ if !cc.seenSettings { ++ cc.extendedConnectAllowed = s.Val == 1 ++ } + default: + cc.vlogf("Unhandled Setting: %v", s) + } +@@ -3044,6 +3170,7 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { + // connection can establish to our default. + cc.maxConcurrentStreams = defaultMaxConcurrentStreams + } ++ close(cc.seenSettingsChan) + cc.seenSettings = true + } + +@@ -3052,7 +3179,7 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { + + func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { + cc := rl.cc +- cs := rl.streamByID(f.StreamID) ++ cs := rl.streamByID(f.StreamID, notHeaderOrDataFrame) + if f.StreamID != 0 && cs == nil { + return nil + } +@@ -3076,12 +3203,12 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { + + return ConnectionError(ErrCodeFlowControl) + } +- cc.condBroadcast() ++ cc.cond.Broadcast() + return nil + } + + func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error { +- cs := rl.streamByID(f.StreamID) ++ cs := rl.streamByID(f.StreamID, notHeaderOrDataFrame) + if cs == nil { + // TODO: return error if server tries to RST_STREAM an idle stream + return nil +@@ -3120,7 +3247,8 @@ func (cc *ClientConn) Ping(ctx context.Context) error { + } + var pingError error + errc := make(chan struct{}) +- cc.goRun(func() { ++ go func() { ++ cc.t.markNewGoroutine() + cc.wmu.Lock() + defer cc.wmu.Unlock() + if pingError = cc.fr.WritePing(false, p); pingError != nil { +@@ -3131,20 +3259,7 @@ func (cc *ClientConn) Ping(ctx context.Context) error { + close(errc) + 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 { + case <-c: + return nil +@@ -3168,6 +3283,12 @@ func (rl *clientConnReadLoop) processPing(f *PingFrame) error { + close(c) + delete(cc.pings, f.Data) + } ++ if cc.pendingResets > 0 { ++ // See clientStream.cleanupWriteRequest. ++ cc.pendingResets = 0 ++ cc.rstStreamPingsBlocked = true ++ cc.cond.Broadcast() ++ } + return nil + } + cc := rl.cc +@@ -3190,13 +3311,20 @@ func (rl *clientConnReadLoop) processPushPromise(f *PushPromiseFrame) error { + return ConnectionError(ErrCodeProtocol) + } + +-func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) { ++// writeStreamReset sends a RST_STREAM frame. ++// When ping is true, it also sends a PING frame with a random payload. ++func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, ping bool, err error) { + // TODO: map err to more interesting error codes, once the + // HTTP community comes up with some. But currently for + // RST_STREAM there's no equivalent to GOAWAY frame's debug + // data, and the error codes are all pretty vague ("cancel"). + cc.wmu.Lock() + cc.fr.WriteRSTStream(streamID, code) ++ if ping { ++ var payload [8]byte ++ rand.Read(payload[:]) ++ cc.fr.WritePing(false, payload) ++ } + cc.bw.Flush() + cc.wmu.Unlock() + } +@@ -3350,7 +3478,7 @@ func traceGotConn(req *http.Request, cc *ClientConn, reused bool) { + cc.mu.Lock() + ci.WasIdle = len(cc.streams) == 0 && reused + if ci.WasIdle && !cc.lastActive.IsZero() { +- ci.IdleTime = time.Since(cc.lastActive) ++ ci.IdleTime = cc.t.timeSince(cc.lastActive) + } + cc.mu.Unlock() + +diff --git a/vendor/golang.org/x/net/http2/unencrypted.go b/vendor/golang.org/x/net/http2/unencrypted.go +new file mode 100644 +index 00000000..b2de2116 +--- /dev/null ++++ b/vendor/golang.org/x/net/http2/unencrypted.go +@@ -0,0 +1,32 @@ ++// 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 ( ++ "crypto/tls" ++ "errors" ++ "net" ++) ++ ++const nextProtoUnencryptedHTTP2 = "unencrypted_http2" ++ ++// unencryptedNetConnFromTLSConn retrieves a net.Conn wrapped in a *tls.Conn. ++// ++// TLSNextProto functions accept a *tls.Conn. ++// ++// When passing an unencrypted HTTP/2 connection to a TLSNextProto function, ++// we pass a *tls.Conn with an underlying net.Conn containing the unencrypted connection. ++// To be extra careful about mistakes (accidentally dropping TLS encryption in a place ++// where we want it), the tls.Conn contains a net.Conn with an UnencryptedNetConn method ++// that returns the actual connection we want to use. ++func unencryptedNetConnFromTLSConn(tc *tls.Conn) (net.Conn, error) { ++ conner, ok := tc.NetConn().(interface { ++ UnencryptedNetConn() net.Conn ++ }) ++ if !ok { ++ return nil, errors.New("http2: TLS conn unexpectedly found in unencrypted handoff") ++ } ++ return conner.UnencryptedNetConn(), nil ++} +diff --git a/vendor/golang.org/x/net/http2/write.go b/vendor/golang.org/x/net/http2/write.go +index 33f61398..6ff6bee7 100644 +--- a/vendor/golang.org/x/net/http2/write.go ++++ b/vendor/golang.org/x/net/http2/write.go +@@ -131,6 +131,16 @@ func (se StreamError) writeFrame(ctx writeContext) error { + + func (se StreamError) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max } + ++type writePing struct { ++ data [8]byte ++} ++ ++func (w writePing) writeFrame(ctx writeContext) error { ++ return ctx.Framer().WritePing(false, w.data) ++} ++ ++func (w writePing) staysWithinBuffer(max int) bool { return frameHeaderLen+len(w.data) <= max } ++ + type writePingAck struct{ pf *PingFrame } + + func (w writePingAck) writeFrame(ctx writeContext) error { +diff --git a/vendor/golang.org/x/net/http2/writesched_priority.go b/vendor/golang.org/x/net/http2/writesched_priority.go +index 0a242c66..f6783339 100644 +--- a/vendor/golang.org/x/net/http2/writesched_priority.go ++++ b/vendor/golang.org/x/net/http2/writesched_priority.go +@@ -443,8 +443,8 @@ func (ws *priorityWriteScheduler) addClosedOrIdleNode(list *[]*priorityNode, max + } + + func (ws *priorityWriteScheduler) removeNode(n *priorityNode) { +- for k := n.kids; k != nil; k = k.next { +- k.setParent(n.parent) ++ for n.kids != nil { ++ n.kids.setParent(n.parent) + } + n.setParent(nil) + delete(ws.nodes, n.id) +diff --git a/vendor/golang.org/x/net/proxy/per_host.go b/vendor/golang.org/x/net/proxy/per_host.go +index 573fe79e..d7d4b8b6 100644 +--- a/vendor/golang.org/x/net/proxy/per_host.go ++++ b/vendor/golang.org/x/net/proxy/per_host.go +@@ -137,9 +137,7 @@ func (p *PerHost) AddNetwork(net *net.IPNet) { + // AddZone specifies a DNS suffix that will use the bypass proxy. A zone of + // "example.com" matches "example.com" and all of its subdomains. + func (p *PerHost) AddZone(zone string) { +- if strings.HasSuffix(zone, ".") { +- zone = zone[:len(zone)-1] +- } ++ zone = strings.TrimSuffix(zone, ".") + if !strings.HasPrefix(zone, ".") { + zone = "." + zone + } +@@ -148,8 +146,6 @@ func (p *PerHost) AddZone(zone string) { + + // AddHost specifies a host name that will use the bypass proxy. + func (p *PerHost) AddHost(host string) { +- if strings.HasSuffix(host, ".") { +- host = host[:len(host)-1] +- } ++ host = strings.TrimSuffix(host, ".") + p.bypassHosts = append(p.bypassHosts, host) + } +diff --git a/vendor/golang.org/x/net/websocket/hybi.go b/vendor/golang.org/x/net/websocket/hybi.go +index 48a069e1..dda74346 100644 +--- a/vendor/golang.org/x/net/websocket/hybi.go ++++ b/vendor/golang.org/x/net/websocket/hybi.go +@@ -16,7 +16,6 @@ import ( + "encoding/binary" + "fmt" + "io" +- "io/ioutil" + "net/http" + "net/url" + "strings" +@@ -279,7 +278,7 @@ func (handler *hybiFrameHandler) HandleFrame(frame frameReader) (frameReader, er + } + } + if header := frame.HeaderReader(); header != nil { +- io.Copy(ioutil.Discard, header) ++ io.Copy(io.Discard, header) + } + switch frame.PayloadType() { + case ContinuationFrame: +@@ -294,7 +293,7 @@ func (handler *hybiFrameHandler) HandleFrame(frame frameReader) (frameReader, er + if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF { + return nil, err + } +- io.Copy(ioutil.Discard, frame) ++ io.Copy(io.Discard, frame) + if frame.PayloadType() == PingFrame { + if _, err := handler.WritePong(b[:n]); err != nil { + return nil, err +diff --git a/vendor/golang.org/x/net/websocket/websocket.go b/vendor/golang.org/x/net/websocket/websocket.go +index 90a2257c..ac76165c 100644 +--- a/vendor/golang.org/x/net/websocket/websocket.go ++++ b/vendor/golang.org/x/net/websocket/websocket.go +@@ -8,7 +8,7 @@ + // This package currently lacks some features found in an alternative + // and more actively maintained WebSocket package: + // +-// https://pkg.go.dev/nhooyr.io/websocket ++// https://pkg.go.dev/github.com/coder/websocket + package websocket // import "golang.org/x/net/websocket" + + import ( +@@ -17,7 +17,6 @@ import ( + "encoding/json" + "errors" + "io" +- "io/ioutil" + "net" + "net/http" + "net/url" +@@ -208,7 +207,7 @@ again: + n, err = ws.frameReader.Read(msg) + if err == io.EOF { + if trailer := ws.frameReader.TrailerReader(); trailer != nil { +- io.Copy(ioutil.Discard, trailer) ++ io.Copy(io.Discard, trailer) + } + ws.frameReader = nil + goto again +@@ -330,7 +329,7 @@ func (cd Codec) Receive(ws *Conn, v interface{}) (err error) { + ws.rio.Lock() + defer ws.rio.Unlock() + if ws.frameReader != nil { +- _, err = io.Copy(ioutil.Discard, ws.frameReader) ++ _, err = io.Copy(io.Discard, ws.frameReader) + if err != nil { + return err + } +@@ -362,7 +361,7 @@ again: + return ErrFrameTooLarge + } + payloadType := frame.PayloadType() +- data, err := ioutil.ReadAll(frame) ++ data, err := io.ReadAll(frame) + if err != nil { + return err + } +diff --git a/vendor/golang.org/x/sync/LICENSE b/vendor/golang.org/x/sync/LICENSE +index 6a66aea5..2a7cf70d 100644 +--- a/vendor/golang.org/x/sync/LICENSE ++++ b/vendor/golang.org/x/sync/LICENSE +@@ -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 + 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 + in the documentation and/or other materials provided with the + 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 + this software without specific prior written permission. + +diff --git a/vendor/golang.org/x/sys/LICENSE b/vendor/golang.org/x/sys/LICENSE +index 6a66aea5..2a7cf70d 100644 +--- a/vendor/golang.org/x/sys/LICENSE ++++ b/vendor/golang.org/x/sys/LICENSE +@@ -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 + 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 + in the documentation and/or other materials provided with the + 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 + this software without specific prior written permission. + +diff --git a/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s b/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s +new file mode 100644 +index 00000000..ec2acfe5 +--- /dev/null ++++ b/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s +@@ -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) +diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go +index 4756ad5f..02609d5b 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu.go ++++ b/vendor/golang.org/x/sys/cpu/cpu.go +@@ -103,7 +103,10 @@ var ARM64 struct { + HasASIMDDP bool // Advanced SIMD double precision instruction set + HasSHA512 bool // SHA512 hardware implementation + HasSVE bool // Scalable Vector Extensions ++ HasSVE2 bool // Scalable Vector Extensions 2 + HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32 ++ HasDIT bool // Data Independent Timing support ++ HasI8MM bool // Advanced SIMD Int8 matrix multiplication instructions + _ CacheLinePad + } + +@@ -198,6 +201,25 @@ var S390X struct { + _ 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() { + archInit() + initOptions() +diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go +index f3eb993b..af2aa99f 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_arm64.go ++++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go +@@ -28,6 +28,7 @@ func initOptions() { + {Name: "sm3", Feature: &ARM64.HasSM3}, + {Name: "sm4", Feature: &ARM64.HasSM4}, + {Name: "sve", Feature: &ARM64.HasSVE}, ++ {Name: "sve2", Feature: &ARM64.HasSVE2}, + {Name: "crc32", Feature: &ARM64.HasCRC32}, + {Name: "atomics", Feature: &ARM64.HasATOMICS}, + {Name: "asimdhp", Feature: &ARM64.HasASIMDHP}, +@@ -37,6 +38,8 @@ func initOptions() { + {Name: "dcpop", Feature: &ARM64.HasDCPOP}, + {Name: "asimddp", Feature: &ARM64.HasASIMDDP}, + {Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM}, ++ {Name: "dit", Feature: &ARM64.HasDIT}, ++ {Name: "i8mm", Feature: &ARM64.HasI8MM}, + } + } + +@@ -144,6 +147,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) { + ARM64.HasLRCPC = true + } + ++ switch extractBits(isar1, 52, 55) { ++ case 1: ++ ARM64.HasI8MM = true ++ } ++ + // ID_AA64PFR0_EL1 + switch extractBits(pfr0, 16, 19) { + case 0: +@@ -164,6 +172,20 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) { + switch extractBits(pfr0, 32, 35) { + case 1: + ARM64.HasSVE = true ++ ++ parseARM64SVERegister(getzfr0()) ++ } ++ ++ switch extractBits(pfr0, 48, 51) { ++ case 1: ++ ARM64.HasDIT = true ++ } ++} ++ ++func parseARM64SVERegister(zfr0 uint64) { ++ switch extractBits(zfr0, 0, 3) { ++ case 1: ++ ARM64.HasSVE2 = true + } + } + +diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.s b/vendor/golang.org/x/sys/cpu/cpu_arm64.s +index fcb9a388..22cc9984 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_arm64.s ++++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.s +@@ -29,3 +29,11 @@ TEXT ·getpfr0(SB),NOSPLIT,$0-8 + WORD $0xd5380400 + MOVD R0, ret+0(FP) + RET ++ ++// func getzfr0() uint64 ++TEXT ·getzfr0(SB),NOSPLIT,$0-8 ++ // get SVE Feature Register 0 into x0 ++ // mrs x0, ID_AA64ZFR0_EL1 = d5380480 ++ WORD $0xd5380480 ++ MOVD R0, ret+0(FP) ++ RET +diff --git a/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go b/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go +new file mode 100644 +index 00000000..b838cb9e +--- /dev/null ++++ b/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go +@@ -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) ++} +diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go +index a8acd3e3..6ac6e1ef 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go ++++ b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go +@@ -9,3 +9,4 @@ package cpu + func getisar0() uint64 + func getisar1() uint64 + func getpfr0() uint64 ++func getzfr0() uint64 +diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go +index 910728fb..32a44514 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go ++++ b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go +@@ -6,10 +6,10 @@ + + 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. + 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. + func xgetbv() (eax, edx uint32) +diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.s b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s +similarity index 94% +rename from vendor/golang.org/x/sys/cpu/cpu_x86.s +rename to vendor/golang.org/x/sys/cpu/cpu_gc_x86.s +index 7d7ba33e..ce208ce6 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_x86.s ++++ b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s +@@ -18,7 +18,7 @@ TEXT ·cpuid(SB), NOSPLIT, $0-24 + RET + + // func xgetbv() (eax, edx uint32) +-TEXT ·xgetbv(SB),NOSPLIT,$0-8 ++TEXT ·xgetbv(SB), NOSPLIT, $0-8 + MOVL $0, CX + XGETBV + MOVL AX, eax+0(FP) +diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go +index 99c60fe9..170d21dd 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go ++++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go +@@ -23,9 +23,3 @@ func xgetbv() (eax, edx uint32) { + gccgoXgetbv(&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 +-} +diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go +index a968b80f..f1caf0f7 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go ++++ b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go +@@ -35,6 +35,10 @@ const ( + hwcap_SHA512 = 1 << 21 + hwcap_SVE = 1 << 22 + hwcap_ASIMDFHM = 1 << 23 ++ hwcap_DIT = 1 << 24 ++ ++ hwcap2_SVE2 = 1 << 1 ++ hwcap2_I8MM = 1 << 13 + ) + + // linuxKernelCanEmulateCPUID reports whether we're running +@@ -104,6 +108,11 @@ func doinit() { + ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512) + ARM64.HasSVE = isSet(hwCap, hwcap_SVE) + ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM) ++ ARM64.HasDIT = isSet(hwCap, hwcap_DIT) ++ ++ // HWCAP2 feature bits ++ ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2) ++ ARM64.HasI8MM = isSet(hwCap2, hwcap2_I8MM) + } + + func isSet(hwc uint, value uint) bool { +diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go +index cd63e733..7d902b68 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go ++++ b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // 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 + +diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go +new file mode 100644 +index 00000000..cb4a0c57 +--- /dev/null ++++ b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go +@@ -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 ++} +diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_x86.go b/vendor/golang.org/x/sys/cpu/cpu_other_x86.go +new file mode 100644 +index 00000000..a0fd7e2f +--- /dev/null ++++ b/vendor/golang.org/x/sys/cpu/cpu_other_x86.go +@@ -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") ++} +diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +index 7f0c79c0..aca3199c 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go ++++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +@@ -8,4 +8,13 @@ package cpu + + 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}, ++ } ++} +diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go +index c29f5e4c..600a6807 100644 +--- a/vendor/golang.org/x/sys/cpu/cpu_x86.go ++++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go +@@ -92,10 +92,8 @@ func archInit() { + osSupportsAVX = isSet(1, eax) && isSet(2, eax) + + if runtime.GOOS == "darwin" { +- // Darwin doesn't save/restore AVX-512 mask registers correctly across signal handlers. +- // Since users can't rely on mask register contents, let's not advertise AVX-512 support. +- // See issue 49233. +- osSupportsAVX512 = false ++ // Darwin requires special AVX512 checks, see cpu_darwin_x86.go ++ osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512() + } else { + // Check if OPMASK and ZMM registers have OS support. + osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax) +diff --git a/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go b/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go +new file mode 100644 +index 00000000..4d0888b0 +--- /dev/null ++++ b/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go +@@ -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 +diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md +index 7d3c060e..6e08a76a 100644 +--- a/vendor/golang.org/x/sys/unix/README.md ++++ b/vendor/golang.org/x/sys/unix/README.md +@@ -156,7 +156,7 @@ from the generated architecture-specific files listed below, and merge these + into a common file for each OS. + + 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. + 3. Remove the common code from all architecture-specific files. + +diff --git a/vendor/golang.org/x/sys/unix/asm_zos_s390x.s b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s +index 2f67ba86..813dfad7 100644 +--- a/vendor/golang.org/x/sys/unix/asm_zos_s390x.s ++++ b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s +@@ -9,9 +9,11 @@ + #define PSALAA 1208(R0) + #define GTAB64(x) 80(x) + #define LCA64(x) 88(x) ++#define SAVSTACK_ASYNC(x) 336(x) // in the LCA + #define CAA(x) 8(x) +-#define EDCHPXV(x) 1016(x) // in the CAA +-#define SAVSTACK_ASYNC(x) 336(x) // in the LCA ++#define CEECAATHDID(x) 976(x) // in the CAA ++#define EDCHPXV(x) 1016(x) // in the CAA ++#define GOCB(x) 1104(x) // in the CAA + + // SS_*, where x=SAVSTACK_ASYNC + #define SS_LE(x) 0(x) +@@ -19,405 +21,362 @@ + #define SS_ERRNO(x) 16(x) + #define SS_ERRNOJR(x) 20(x) + +-#define LE_CALL BYTE $0x0D; BYTE $0x76; // BL R7, R6 ++// Function Descriptor Offsets ++#define __errno 0x156*16 ++#define __err2ad 0x16C*16 + +-TEXT ·clearErrno(SB),NOSPLIT,$0-0 +- BL addrerrno<>(SB) +- MOVD $0, 0(R3) ++// Call Instructions ++#define LE_CALL BYTE $0x0D; BYTE $0x76 // BL R7, R6 ++#define SVC_LOAD BYTE $0x0A; BYTE $0x08 // SVC 08 LOAD ++#define SVC_DELETE BYTE $0x0A; BYTE $0x09 // SVC 09 DELETE ++ ++DATA zosLibVec<>(SB)/8, $0 ++GLOBL zosLibVec<>(SB), NOPTR, $8 ++ ++TEXT ·initZosLibVec(SB), NOSPLIT|NOFRAME, $0-0 ++ MOVW PSALAA, R8 ++ MOVD LCA64(R8), R8 ++ MOVD CAA(R8), R8 ++ MOVD EDCHPXV(R8), R8 ++ MOVD R8, zosLibVec<>(SB) ++ RET ++ ++TEXT ·GetZosLibVec(SB), NOSPLIT|NOFRAME, $0-0 ++ MOVD zosLibVec<>(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·clearErrno(SB), NOSPLIT, $0-0 ++ BL addrerrno<>(SB) ++ MOVD $0, 0(R3) + RET + + // Returns the address of errno in R3. +-TEXT addrerrno<>(SB),NOSPLIT|NOFRAME,$0-0 ++TEXT addrerrno<>(SB), NOSPLIT|NOFRAME, $0-0 + // Get library control area (LCA). +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 ++ MOVW PSALAA, R8 ++ MOVD LCA64(R8), R8 + + // Get __errno FuncDesc. +- MOVD CAA(R8), R9 +- MOVD EDCHPXV(R9), R9 +- ADD $(0x156*16), R9 +- LMG 0(R9), R5, R6 ++ MOVD CAA(R8), R9 ++ MOVD EDCHPXV(R9), R9 ++ ADD $(__errno), R9 ++ LMG 0(R9), R5, R6 + + // Switch to saved LE stack. +- MOVD SAVSTACK_ASYNC(R8), R9 +- MOVD 0(R9), R4 +- MOVD $0, 0(R9) ++ MOVD SAVSTACK_ASYNC(R8), R9 ++ MOVD 0(R9), R4 ++ MOVD $0, 0(R9) + + // Call __errno function. + LE_CALL + NOPH + + // Switch back to Go stack. +- XOR R0, R0 // Restore R0 to $0. +- MOVD R4, 0(R9) // Save stack pointer. ++ XOR R0, R0 // Restore R0 to $0. ++ MOVD R4, 0(R9) // Save stack pointer. + RET + +-TEXT ·syscall_syscall(SB),NOSPLIT,$0-56 +- BL runtime·entersyscall(SB) +- MOVD a1+8(FP), R1 +- MOVD a2+16(FP), R2 +- MOVD a3+24(FP), R3 ++// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64) ++TEXT ·svcCall(SB), NOSPLIT, $0 ++ BL runtime·save_g(SB) // Save g and stack pointer ++ MOVW PSALAA, R8 ++ MOVD LCA64(R8), R8 ++ MOVD SAVSTACK_ASYNC(R8), R9 ++ MOVD R15, 0(R9) + +- // Get library control area (LCA). +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 ++ MOVD argv+8(FP), R1 // Move function arguments into registers ++ MOVD dsa+16(FP), g ++ MOVD fnptr+0(FP), R15 + +- // Get function. +- MOVD CAA(R8), R9 +- MOVD EDCHPXV(R9), R9 +- MOVD trap+0(FP), R5 +- SLD $4, R5 +- ADD R5, R9 +- LMG 0(R9), R5, R6 ++ BYTE $0x0D // Branch to function ++ BYTE $0xEF + +- // Restore LE stack. +- MOVD SAVSTACK_ASYNC(R8), R9 +- MOVD 0(R9), R4 +- MOVD $0, 0(R9) ++ BL runtime·load_g(SB) // Restore g and stack pointer ++ MOVW PSALAA, R8 ++ MOVD LCA64(R8), R8 ++ MOVD SAVSTACK_ASYNC(R8), R9 ++ MOVD 0(R9), R15 + +- // Call function. +- LE_CALL +- NOPH +- XOR R0, R0 // Restore R0 to $0. +- MOVD R4, 0(R9) // Save stack pointer. +- +- MOVD R3, r1+32(FP) +- MOVD R0, r2+40(FP) +- MOVD R0, err+48(FP) +- MOVW R3, R4 +- CMP R4, $-1 +- BNE done +- BL addrerrno<>(SB) +- MOVWZ 0(R3), R3 +- MOVD R3, err+48(FP) +-done: +- BL runtime·exitsyscall(SB) + RET + +-TEXT ·syscall_rawsyscall(SB),NOSPLIT,$0-56 +- MOVD a1+8(FP), R1 +- MOVD a2+16(FP), R2 +- MOVD a3+24(FP), R3 +- +- // Get library control area (LCA). +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 +- +- // Get function. +- MOVD CAA(R8), R9 +- MOVD EDCHPXV(R9), R9 +- MOVD trap+0(FP), R5 +- SLD $4, R5 +- ADD R5, R9 +- LMG 0(R9), R5, R6 ++// func svcLoad(name *byte) unsafe.Pointer ++TEXT ·svcLoad(SB), NOSPLIT, $0 ++ MOVD R15, R2 // Save go stack pointer ++ MOVD name+0(FP), R0 // Move SVC args into registers ++ MOVD $0x80000000, R1 ++ MOVD $0, R15 ++ SVC_LOAD ++ MOVW R15, R3 // Save return code from SVC ++ MOVD R2, R15 // Restore go stack pointer ++ CMP R3, $0 // Check SVC return code ++ BNE error ++ ++ MOVD $-2, R3 // Reset last bit of entry point to zero ++ AND R0, R3 ++ MOVD R3, ret+8(FP) // Return entry point returned by SVC ++ CMP R0, R3 // Check if last bit of entry point was set ++ BNE done ++ ++ MOVD R15, R2 // Save go stack pointer ++ MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08) ++ SVC_DELETE ++ MOVD R2, R15 // Restore go stack pointer + +- // Restore LE stack. +- MOVD SAVSTACK_ASYNC(R8), R9 +- MOVD 0(R9), R4 +- MOVD $0, 0(R9) ++error: ++ MOVD $0, ret+8(FP) // Return 0 on failure + +- // Call function. +- LE_CALL +- NOPH +- XOR R0, R0 // Restore R0 to $0. +- MOVD R4, 0(R9) // Save stack pointer. +- +- MOVD R3, r1+32(FP) +- MOVD R0, r2+40(FP) +- MOVD R0, err+48(FP) +- MOVW R3, R4 +- CMP R4, $-1 +- BNE done +- BL addrerrno<>(SB) +- MOVWZ 0(R3), R3 +- MOVD R3, err+48(FP) + done: ++ XOR R0, R0 // Reset r0 to 0 + RET + +-TEXT ·syscall_syscall6(SB),NOSPLIT,$0-80 +- BL runtime·entersyscall(SB) +- MOVD a1+8(FP), R1 +- MOVD a2+16(FP), R2 +- MOVD a3+24(FP), R3 ++// func svcUnload(name *byte, fnptr unsafe.Pointer) int64 ++TEXT ·svcUnload(SB), NOSPLIT, $0 ++ MOVD R15, R2 // Save go stack pointer ++ MOVD name+0(FP), R0 // Move SVC args into registers ++ MOVD fnptr+8(FP), R15 ++ SVC_DELETE ++ XOR R0, R0 // Reset r0 to 0 ++ MOVD R15, R1 // Save SVC return code ++ MOVD R2, R15 // Restore go stack pointer ++ MOVD R1, ret+16(FP) // Return SVC return code ++ RET + ++// func gettid() uint64 ++TEXT ·gettid(SB), NOSPLIT, $0 + // Get library control area (LCA). +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 ++ MOVW PSALAA, R8 ++ MOVD LCA64(R8), R8 + +- // Get function. +- MOVD CAA(R8), R9 +- MOVD EDCHPXV(R9), R9 +- MOVD trap+0(FP), R5 +- SLD $4, R5 +- ADD R5, R9 +- LMG 0(R9), R5, R6 ++ // Get CEECAATHDID ++ MOVD CAA(R8), R9 ++ MOVD CEECAATHDID(R9), R9 ++ MOVD R9, ret+0(FP) + +- // Restore LE stack. +- MOVD SAVSTACK_ASYNC(R8), R9 +- MOVD 0(R9), R4 +- MOVD $0, 0(R9) +- +- // Fill in parameter list. +- MOVD a4+32(FP), R12 +- MOVD R12, (2176+24)(R4) +- MOVD a5+40(FP), R12 +- MOVD R12, (2176+32)(R4) +- MOVD a6+48(FP), R12 +- MOVD R12, (2176+40)(R4) +- +- // Call function. +- LE_CALL +- NOPH +- XOR R0, R0 // Restore R0 to $0. +- MOVD R4, 0(R9) // Save stack pointer. +- +- MOVD R3, r1+56(FP) +- MOVD R0, r2+64(FP) +- MOVD R0, err+72(FP) +- MOVW R3, R4 +- CMP R4, $-1 +- BNE done +- BL addrerrno<>(SB) +- MOVWZ 0(R3), R3 +- MOVD R3, err+72(FP) +-done: +- BL runtime·exitsyscall(SB) + RET + +-TEXT ·syscall_rawsyscall6(SB),NOSPLIT,$0-80 +- MOVD a1+8(FP), R1 +- MOVD a2+16(FP), R2 +- MOVD a3+24(FP), R3 +- +- // Get library control area (LCA). +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 +- +- // Get function. +- MOVD CAA(R8), R9 +- MOVD EDCHPXV(R9), R9 +- MOVD trap+0(FP), R5 +- SLD $4, R5 +- ADD R5, R9 +- LMG 0(R9), R5, R6 ++// ++// Call LE function, if the return is -1 ++// errno and errno2 is retrieved ++// ++TEXT ·CallLeFuncWithErr(SB), NOSPLIT, $0 ++ MOVW PSALAA, R8 ++ MOVD LCA64(R8), R8 ++ MOVD CAA(R8), R9 ++ MOVD g, GOCB(R9) + + // Restore LE stack. +- MOVD SAVSTACK_ASYNC(R8), R9 +- MOVD 0(R9), R4 +- MOVD $0, 0(R9) +- +- // Fill in parameter list. +- MOVD a4+32(FP), R12 +- MOVD R12, (2176+24)(R4) +- MOVD a5+40(FP), R12 +- MOVD R12, (2176+32)(R4) +- MOVD a6+48(FP), R12 +- MOVD R12, (2176+40)(R4) +- +- // Call function. +- LE_CALL ++ MOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address ++ MOVD 0(R9), R4 // R4-> restore previously saved stack frame pointer ++ ++ MOVD parms_base+8(FP), R7 // R7 -> argument array ++ MOVD parms_len+16(FP), R8 // R8 number of arguments ++ ++ // arg 1 ---> R1 ++ CMP R8, $0 ++ BEQ docall ++ SUB $1, R8 ++ MOVD 0(R7), R1 ++ ++ // arg 2 ---> R2 ++ CMP R8, $0 ++ BEQ docall ++ SUB $1, R8 ++ ADD $8, R7 ++ MOVD 0(R7), R2 ++ ++ // arg 3 --> R3 ++ CMP R8, $0 ++ BEQ docall ++ SUB $1, R8 ++ ADD $8, R7 ++ MOVD 0(R7), R3 ++ ++ CMP R8, $0 ++ BEQ docall ++ MOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument ++ ++repeat: ++ ADD $8, R7 ++ MOVD 0(R7), R0 // advance arg pointer by 8 byte ++ ADD $8, R6 // advance LE argument address by 8 byte ++ MOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame ++ SUB $1, R8 ++ CMP R8, $0 ++ BNE repeat ++ ++docall: ++ MOVD funcdesc+0(FP), R8 // R8-> function descriptor ++ LMG 0(R8), R5, R6 ++ MOVD $0, 0(R9) // R9 address of SAVSTACK_ASYNC ++ LE_CALL // balr R7, R6 (return #1) ++ NOPH ++ MOVD R3, ret+32(FP) ++ CMP R3, $-1 // compare result to -1 ++ BNE done ++ ++ // retrieve errno and errno2 ++ MOVD zosLibVec<>(SB), R8 ++ ADD $(__errno), R8 ++ LMG 0(R8), R5, R6 ++ LE_CALL // balr R7, R6 __errno (return #3) + NOPH +- XOR R0, R0 // Restore R0 to $0. +- MOVD R4, 0(R9) // Save stack pointer. +- +- MOVD R3, r1+56(FP) +- MOVD R0, r2+64(FP) +- MOVD R0, err+72(FP) +- MOVW R3, R4 +- CMP R4, $-1 +- BNE done +- BL ·rrno<>(SB) +- MOVWZ 0(R3), R3 +- MOVD R3, err+72(FP) ++ MOVWZ 0(R3), R3 ++ MOVD R3, err+48(FP) ++ MOVD zosLibVec<>(SB), R8 ++ ADD $(__err2ad), R8 ++ LMG 0(R8), R5, R6 ++ LE_CALL // balr R7, R6 __err2ad (return #2) ++ NOPH ++ MOVW (R3), R2 // retrieve errno2 ++ MOVD R2, errno2+40(FP) // store in return area ++ + done: ++ MOVD R4, 0(R9) // Save stack pointer. + RET + +-TEXT ·syscall_syscall9(SB),NOSPLIT,$0 +- BL runtime·entersyscall(SB) +- MOVD a1+8(FP), R1 +- MOVD a2+16(FP), R2 +- MOVD a3+24(FP), R3 +- +- // Get library control area (LCA). +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 +- +- // Get function. +- MOVD CAA(R8), R9 +- MOVD EDCHPXV(R9), R9 +- MOVD trap+0(FP), R5 +- SLD $4, R5 +- ADD R5, R9 +- LMG 0(R9), R5, R6 ++// ++// Call LE function, if the return is 0 ++// errno and errno2 is retrieved ++// ++TEXT ·CallLeFuncWithPtrReturn(SB), NOSPLIT, $0 ++ MOVW PSALAA, R8 ++ MOVD LCA64(R8), R8 ++ MOVD CAA(R8), R9 ++ MOVD g, GOCB(R9) + + // Restore LE stack. +- MOVD SAVSTACK_ASYNC(R8), R9 +- MOVD 0(R9), R4 +- MOVD $0, 0(R9) +- +- // Fill in parameter list. +- MOVD a4+32(FP), R12 +- MOVD R12, (2176+24)(R4) +- MOVD a5+40(FP), R12 +- MOVD R12, (2176+32)(R4) +- MOVD a6+48(FP), R12 +- MOVD R12, (2176+40)(R4) +- MOVD a7+56(FP), R12 +- MOVD R12, (2176+48)(R4) +- MOVD a8+64(FP), R12 +- MOVD R12, (2176+56)(R4) +- MOVD a9+72(FP), R12 +- MOVD R12, (2176+64)(R4) +- +- // Call function. +- LE_CALL ++ MOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address ++ MOVD 0(R9), R4 // R4-> restore previously saved stack frame pointer ++ ++ MOVD parms_base+8(FP), R7 // R7 -> argument array ++ MOVD parms_len+16(FP), R8 // R8 number of arguments ++ ++ // arg 1 ---> R1 ++ CMP R8, $0 ++ BEQ docall ++ SUB $1, R8 ++ MOVD 0(R7), R1 ++ ++ // arg 2 ---> R2 ++ CMP R8, $0 ++ BEQ docall ++ SUB $1, R8 ++ ADD $8, R7 ++ MOVD 0(R7), R2 ++ ++ // arg 3 --> R3 ++ CMP R8, $0 ++ BEQ docall ++ SUB $1, R8 ++ ADD $8, R7 ++ MOVD 0(R7), R3 ++ ++ CMP R8, $0 ++ BEQ docall ++ MOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument ++ ++repeat: ++ ADD $8, R7 ++ MOVD 0(R7), R0 // advance arg pointer by 8 byte ++ ADD $8, R6 // advance LE argument address by 8 byte ++ MOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame ++ SUB $1, R8 ++ CMP R8, $0 ++ BNE repeat ++ ++docall: ++ MOVD funcdesc+0(FP), R8 // R8-> function descriptor ++ LMG 0(R8), R5, R6 ++ MOVD $0, 0(R9) // R9 address of SAVSTACK_ASYNC ++ LE_CALL // balr R7, R6 (return #1) + NOPH +- XOR R0, R0 // Restore R0 to $0. +- MOVD R4, 0(R9) // Save stack pointer. +- +- MOVD R3, r1+80(FP) +- MOVD R0, r2+88(FP) +- MOVD R0, err+96(FP) +- MOVW R3, R4 +- CMP R4, $-1 +- BNE done +- BL addrerrno<>(SB) +- MOVWZ 0(R3), R3 +- MOVD R3, err+96(FP) +-done: +- BL runtime·exitsyscall(SB) +- RET +- +-TEXT ·syscall_rawsyscall9(SB),NOSPLIT,$0 +- MOVD a1+8(FP), R1 +- MOVD a2+16(FP), R2 +- MOVD a3+24(FP), R3 +- +- // Get library control area (LCA). +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 +- +- // Get function. +- MOVD CAA(R8), R9 +- MOVD EDCHPXV(R9), R9 +- MOVD trap+0(FP), R5 +- SLD $4, R5 +- ADD R5, R9 +- LMG 0(R9), R5, R6 +- +- // Restore LE stack. +- MOVD SAVSTACK_ASYNC(R8), R9 +- MOVD 0(R9), R4 +- MOVD $0, 0(R9) +- +- // Fill in parameter list. +- MOVD a4+32(FP), R12 +- MOVD R12, (2176+24)(R4) +- MOVD a5+40(FP), R12 +- MOVD R12, (2176+32)(R4) +- MOVD a6+48(FP), R12 +- MOVD R12, (2176+40)(R4) +- MOVD a7+56(FP), R12 +- MOVD R12, (2176+48)(R4) +- MOVD a8+64(FP), R12 +- MOVD R12, (2176+56)(R4) +- MOVD a9+72(FP), R12 +- MOVD R12, (2176+64)(R4) +- +- // Call function. +- LE_CALL ++ MOVD R3, ret+32(FP) ++ CMP R3, $0 // compare result to 0 ++ BNE done ++ ++ // retrieve errno and errno2 ++ MOVD zosLibVec<>(SB), R8 ++ ADD $(__errno), R8 ++ LMG 0(R8), R5, R6 ++ LE_CALL // balr R7, R6 __errno (return #3) + NOPH +- XOR R0, R0 // Restore R0 to $0. +- MOVD R4, 0(R9) // Save stack pointer. +- +- MOVD R3, r1+80(FP) +- MOVD R0, r2+88(FP) +- MOVD R0, err+96(FP) +- MOVW R3, R4 +- CMP R4, $-1 +- BNE done +- BL addrerrno<>(SB) +- MOVWZ 0(R3), R3 +- MOVD R3, err+96(FP) +-done: +- RET +- +-// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64) +-TEXT ·svcCall(SB),NOSPLIT,$0 +- BL runtime·save_g(SB) // Save g and stack pointer +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 +- MOVD SAVSTACK_ASYNC(R8), R9 +- MOVD R15, 0(R9) +- +- MOVD argv+8(FP), R1 // Move function arguments into registers +- MOVD dsa+16(FP), g +- MOVD fnptr+0(FP), R15 +- +- BYTE $0x0D // Branch to function +- BYTE $0xEF +- +- BL runtime·load_g(SB) // Restore g and stack pointer +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 +- MOVD SAVSTACK_ASYNC(R8), R9 +- MOVD 0(R9), R15 +- +- RET +- +-// func svcLoad(name *byte) unsafe.Pointer +-TEXT ·svcLoad(SB),NOSPLIT,$0 +- MOVD R15, R2 // Save go stack pointer +- MOVD name+0(FP), R0 // Move SVC args into registers +- MOVD $0x80000000, R1 +- MOVD $0, R15 +- BYTE $0x0A // SVC 08 LOAD +- BYTE $0x08 +- MOVW R15, R3 // Save return code from SVC +- MOVD R2, R15 // Restore go stack pointer +- CMP R3, $0 // Check SVC return code +- BNE error +- +- MOVD $-2, R3 // Reset last bit of entry point to zero +- AND R0, R3 +- MOVD R3, addr+8(FP) // Return entry point returned by SVC +- CMP R0, R3 // Check if last bit of entry point was set +- BNE done +- +- MOVD R15, R2 // Save go stack pointer +- MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08) +- BYTE $0x0A // SVC 09 DELETE +- BYTE $0x09 +- MOVD R2, R15 // Restore go stack pointer ++ MOVWZ 0(R3), R3 ++ MOVD R3, err+48(FP) ++ MOVD zosLibVec<>(SB), R8 ++ ADD $(__err2ad), R8 ++ LMG 0(R8), R5, R6 ++ LE_CALL // balr R7, R6 __err2ad (return #2) ++ NOPH ++ MOVW (R3), R2 // retrieve errno2 ++ MOVD R2, errno2+40(FP) // store in return area ++ XOR R2, R2 ++ MOVWZ R2, (R3) // clear errno2 + +-error: +- MOVD $0, addr+8(FP) // Return 0 on failure + done: +- XOR R0, R0 // Reset r0 to 0 ++ MOVD R4, 0(R9) // Save stack pointer. + RET + +-// func svcUnload(name *byte, fnptr unsafe.Pointer) int64 +-TEXT ·svcUnload(SB),NOSPLIT,$0 +- MOVD R15, R2 // Save go stack pointer +- MOVD name+0(FP), R0 // Move SVC args into registers +- MOVD addr+8(FP), R15 +- BYTE $0x0A // SVC 09 +- BYTE $0x09 +- XOR R0, R0 // Reset r0 to 0 +- MOVD R15, R1 // Save SVC return code +- MOVD R2, R15 // Restore go stack pointer +- MOVD R1, rc+0(FP) // Return SVC return code ++// ++// function to test if a pointer can be safely dereferenced (content read) ++// return 0 for succces ++// ++TEXT ·ptrtest(SB), NOSPLIT, $0-16 ++ MOVD arg+0(FP), R10 // test pointer in R10 ++ ++ // set up R2 to point to CEECAADMC ++ BYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt 2,1208 ++ BYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22 // llgtr 2,2 ++ BYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF // nilh 2,32767 ++ BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg 2,88(2) ++ BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg 2,8(2) ++ BYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68 // la 2,872(2) ++ ++ // set up R5 to point to the "shunt" path which set 1 to R3 (failure) ++ BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33 // xgr 3,3 ++ BYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04 // bras 5,lbl1 ++ BYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01 // lghi 3,1 ++ ++ // if r3 is not zero (failed) then branch to finish ++ BYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33 // lbl1 ltgr 3,3 ++ BYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08 // brc b'0111',lbl2 ++ ++ // stomic store shunt address in R5 into CEECAADMC ++ BYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 5,0(2) ++ ++ // now try reading from the test pointer in R10, if it fails it branches to the "lghi" instruction above ++ BYTE $0xE3; BYTE $0x9A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg 9,0(10) ++ ++ // finish here, restore 0 into CEECAADMC ++ BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99 // lbl2 xgr 9,9 ++ BYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 9,0(2) ++ MOVD R3, ret+8(FP) // result in R3 + RET + +-// func gettid() uint64 +-TEXT ·gettid(SB), NOSPLIT, $0 +- // Get library control area (LCA). +- MOVW PSALAA, R8 +- MOVD LCA64(R8), R8 +- +- // Get CEECAATHDID +- MOVD CAA(R8), R9 +- MOVD 0x3D0(R9), R9 +- MOVD R9, ret+0(FP) +- ++// ++// function to test if a untptr can be loaded from a pointer ++// return 1: the 8-byte content ++// 2: 0 for success, 1 for failure ++// ++// func safeload(ptr uintptr) ( value uintptr, error uintptr) ++TEXT ·safeload(SB), NOSPLIT, $0-24 ++ MOVD ptr+0(FP), R10 // test pointer in R10 ++ MOVD $0x0, R6 ++ BYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt 2,1208 ++ BYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22 // llgtr 2,2 ++ BYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF // nilh 2,32767 ++ BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg 2,88(2) ++ BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg 2,8(2) ++ BYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68 // la 2,872(2) ++ BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33 // xgr 3,3 ++ BYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04 // bras 5,lbl1 ++ BYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01 // lghi 3,1 ++ BYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33 // lbl1 ltgr 3,3 ++ BYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08 // brc b'0111',lbl2 ++ BYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 5,0(2) ++ BYTE $0xE3; BYTE $0x6A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg 6,0(10) ++ BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99 // lbl2 xgr 9,9 ++ BYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 9,0(2) ++ MOVD R6, value+8(FP) // result in R6 ++ MOVD R3, error+16(FP) // error in R3 + RET +diff --git a/vendor/golang.org/x/sys/unix/bpxsvc_zos.go b/vendor/golang.org/x/sys/unix/bpxsvc_zos.go +new file mode 100644 +index 00000000..39d647d8 +--- /dev/null ++++ b/vendor/golang.org/x/sys/unix/bpxsvc_zos.go +@@ -0,0 +1,657 @@ ++// 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 zos ++ ++package unix ++ ++import ( ++ "bytes" ++ "fmt" ++ "unsafe" ++) ++ ++//go:noescape ++func bpxcall(plist []unsafe.Pointer, bpx_offset int64) ++ ++//go:noescape ++func A2e([]byte) ++ ++//go:noescape ++func E2a([]byte) ++ ++const ( ++ BPX4STA = 192 // stat ++ BPX4FST = 104 // fstat ++ BPX4LST = 132 // lstat ++ BPX4OPN = 156 // open ++ BPX4CLO = 72 // close ++ BPX4CHR = 500 // chattr ++ BPX4FCR = 504 // fchattr ++ BPX4LCR = 1180 // lchattr ++ BPX4CTW = 492 // cond_timed_wait ++ BPX4GTH = 1056 // __getthent ++ BPX4PTQ = 412 // pthread_quiesc ++ BPX4PTR = 320 // ptrace ++) ++ ++const ( ++ //options ++ //byte1 ++ BPX_OPNFHIGH = 0x80 ++ //byte2 ++ BPX_OPNFEXEC = 0x80 ++ //byte3 ++ BPX_O_NOLARGEFILE = 0x08 ++ BPX_O_LARGEFILE = 0x04 ++ BPX_O_ASYNCSIG = 0x02 ++ BPX_O_SYNC = 0x01 ++ //byte4 ++ BPX_O_CREXCL = 0xc0 ++ BPX_O_CREAT = 0x80 ++ BPX_O_EXCL = 0x40 ++ BPX_O_NOCTTY = 0x20 ++ BPX_O_TRUNC = 0x10 ++ BPX_O_APPEND = 0x08 ++ BPX_O_NONBLOCK = 0x04 ++ BPX_FNDELAY = 0x04 ++ BPX_O_RDWR = 0x03 ++ BPX_O_RDONLY = 0x02 ++ BPX_O_WRONLY = 0x01 ++ BPX_O_ACCMODE = 0x03 ++ BPX_O_GETFL = 0x0f ++ ++ //mode ++ // byte1 (file type) ++ BPX_FT_DIR = 1 ++ BPX_FT_CHARSPEC = 2 ++ BPX_FT_REGFILE = 3 ++ BPX_FT_FIFO = 4 ++ BPX_FT_SYMLINK = 5 ++ BPX_FT_SOCKET = 6 ++ //byte3 ++ BPX_S_ISUID = 0x08 ++ BPX_S_ISGID = 0x04 ++ BPX_S_ISVTX = 0x02 ++ BPX_S_IRWXU1 = 0x01 ++ BPX_S_IRUSR = 0x01 ++ //byte4 ++ BPX_S_IRWXU2 = 0xc0 ++ BPX_S_IWUSR = 0x80 ++ BPX_S_IXUSR = 0x40 ++ BPX_S_IRWXG = 0x38 ++ BPX_S_IRGRP = 0x20 ++ BPX_S_IWGRP = 0x10 ++ BPX_S_IXGRP = 0x08 ++ BPX_S_IRWXOX = 0x07 ++ BPX_S_IROTH = 0x04 ++ BPX_S_IWOTH = 0x02 ++ BPX_S_IXOTH = 0x01 ++ ++ CW_INTRPT = 1 ++ CW_CONDVAR = 32 ++ CW_TIMEOUT = 64 ++ ++ PGTHA_NEXT = 2 ++ PGTHA_CURRENT = 1 ++ PGTHA_FIRST = 0 ++ PGTHA_LAST = 3 ++ PGTHA_PROCESS = 0x80 ++ PGTHA_CONTTY = 0x40 ++ PGTHA_PATH = 0x20 ++ PGTHA_COMMAND = 0x10 ++ PGTHA_FILEDATA = 0x08 ++ PGTHA_THREAD = 0x04 ++ PGTHA_PTAG = 0x02 ++ PGTHA_COMMANDLONG = 0x01 ++ PGTHA_THREADFAST = 0x80 ++ PGTHA_FILEPATH = 0x40 ++ PGTHA_THDSIGMASK = 0x20 ++ // thread quiece mode ++ QUIESCE_TERM int32 = 1 ++ QUIESCE_FORCE int32 = 2 ++ QUIESCE_QUERY int32 = 3 ++ QUIESCE_FREEZE int32 = 4 ++ QUIESCE_UNFREEZE int32 = 5 ++ FREEZE_THIS_THREAD int32 = 6 ++ FREEZE_EXIT int32 = 8 ++ QUIESCE_SRB int32 = 9 ++) ++ ++type Pgtha struct { ++ Pid uint32 // 0 ++ Tid0 uint32 // 4 ++ Tid1 uint32 ++ Accesspid byte // C ++ Accesstid byte // D ++ Accessasid uint16 // E ++ Loginname [8]byte // 10 ++ Flag1 byte // 18 ++ Flag1b2 byte // 19 ++} ++ ++type Bpxystat_t struct { // DSECT BPXYSTAT ++ St_id [4]uint8 // 0 ++ St_length uint16 // 0x4 ++ St_version uint16 // 0x6 ++ St_mode uint32 // 0x8 ++ St_ino uint32 // 0xc ++ St_dev uint32 // 0x10 ++ St_nlink uint32 // 0x14 ++ St_uid uint32 // 0x18 ++ St_gid uint32 // 0x1c ++ St_size uint64 // 0x20 ++ St_atime uint32 // 0x28 ++ St_mtime uint32 // 0x2c ++ St_ctime uint32 // 0x30 ++ St_rdev uint32 // 0x34 ++ St_auditoraudit uint32 // 0x38 ++ St_useraudit uint32 // 0x3c ++ St_blksize uint32 // 0x40 ++ St_createtime uint32 // 0x44 ++ St_auditid [4]uint32 // 0x48 ++ St_res01 uint32 // 0x58 ++ Ft_ccsid uint16 // 0x5c ++ Ft_flags uint16 // 0x5e ++ St_res01a [2]uint32 // 0x60 ++ St_res02 uint32 // 0x68 ++ St_blocks uint32 // 0x6c ++ St_opaque [3]uint8 // 0x70 ++ St_visible uint8 // 0x73 ++ St_reftime uint32 // 0x74 ++ St_fid uint64 // 0x78 ++ St_filefmt uint8 // 0x80 ++ St_fspflag2 uint8 // 0x81 ++ St_res03 [2]uint8 // 0x82 ++ St_ctimemsec uint32 // 0x84 ++ St_seclabel [8]uint8 // 0x88 ++ St_res04 [4]uint8 // 0x90 ++ // end of version 1 ++ _ uint32 // 0x94 ++ St_atime64 uint64 // 0x98 ++ St_mtime64 uint64 // 0xa0 ++ St_ctime64 uint64 // 0xa8 ++ St_createtime64 uint64 // 0xb0 ++ St_reftime64 uint64 // 0xb8 ++ _ uint64 // 0xc0 ++ St_res05 [16]uint8 // 0xc8 ++ // end of version 2 ++} ++ ++type BpxFilestatus struct { ++ Oflag1 byte ++ Oflag2 byte ++ Oflag3 byte ++ Oflag4 byte ++} ++ ++type BpxMode struct { ++ Ftype byte ++ Mode1 byte ++ Mode2 byte ++ Mode3 byte ++} ++ ++// Thr attribute structure for extended attributes ++type Bpxyatt_t struct { // DSECT BPXYATT ++ Att_id [4]uint8 ++ Att_version uint16 ++ Att_res01 [2]uint8 ++ Att_setflags1 uint8 ++ Att_setflags2 uint8 ++ Att_setflags3 uint8 ++ Att_setflags4 uint8 ++ Att_mode uint32 ++ Att_uid uint32 ++ Att_gid uint32 ++ Att_opaquemask [3]uint8 ++ Att_visblmaskres uint8 ++ Att_opaque [3]uint8 ++ Att_visibleres uint8 ++ Att_size_h uint32 ++ Att_size_l uint32 ++ Att_atime uint32 ++ Att_mtime uint32 ++ Att_auditoraudit uint32 ++ Att_useraudit uint32 ++ Att_ctime uint32 ++ Att_reftime uint32 ++ // end of version 1 ++ Att_filefmt uint8 ++ Att_res02 [3]uint8 ++ Att_filetag uint32 ++ Att_res03 [8]uint8 ++ // end of version 2 ++ Att_atime64 uint64 ++ Att_mtime64 uint64 ++ Att_ctime64 uint64 ++ Att_reftime64 uint64 ++ Att_seclabel [8]uint8 ++ Att_ver3res02 [8]uint8 ++ // end of version 3 ++} ++ ++func BpxOpen(name string, options *BpxFilestatus, mode *BpxMode) (rv int32, rc int32, rn int32) { ++ if len(name) < 1024 { ++ var namebuf [1024]byte ++ sz := int32(copy(namebuf[:], name)) ++ A2e(namebuf[:sz]) ++ var parms [7]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&sz) ++ parms[1] = unsafe.Pointer(&namebuf[0]) ++ parms[2] = unsafe.Pointer(options) ++ parms[3] = unsafe.Pointer(mode) ++ parms[4] = unsafe.Pointer(&rv) ++ parms[5] = unsafe.Pointer(&rc) ++ parms[6] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4OPN) ++ return rv, rc, rn ++ } ++ return -1, -1, -1 ++} ++ ++func BpxClose(fd int32) (rv int32, rc int32, rn int32) { ++ var parms [4]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&fd) ++ parms[1] = unsafe.Pointer(&rv) ++ parms[2] = unsafe.Pointer(&rc) ++ parms[3] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4CLO) ++ return rv, rc, rn ++} ++ ++func BpxFileFStat(fd int32, st *Bpxystat_t) (rv int32, rc int32, rn int32) { ++ st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3} ++ st.St_version = 2 ++ stat_sz := uint32(unsafe.Sizeof(*st)) ++ var parms [6]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&fd) ++ parms[1] = unsafe.Pointer(&stat_sz) ++ parms[2] = unsafe.Pointer(st) ++ parms[3] = unsafe.Pointer(&rv) ++ parms[4] = unsafe.Pointer(&rc) ++ parms[5] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4FST) ++ return rv, rc, rn ++} ++ ++func BpxFileStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) { ++ if len(name) < 1024 { ++ var namebuf [1024]byte ++ sz := int32(copy(namebuf[:], name)) ++ A2e(namebuf[:sz]) ++ st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3} ++ st.St_version = 2 ++ stat_sz := uint32(unsafe.Sizeof(*st)) ++ var parms [7]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&sz) ++ parms[1] = unsafe.Pointer(&namebuf[0]) ++ parms[2] = unsafe.Pointer(&stat_sz) ++ parms[3] = unsafe.Pointer(st) ++ parms[4] = unsafe.Pointer(&rv) ++ parms[5] = unsafe.Pointer(&rc) ++ parms[6] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4STA) ++ return rv, rc, rn ++ } ++ return -1, -1, -1 ++} ++ ++func BpxFileLStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) { ++ if len(name) < 1024 { ++ var namebuf [1024]byte ++ sz := int32(copy(namebuf[:], name)) ++ A2e(namebuf[:sz]) ++ st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3} ++ st.St_version = 2 ++ stat_sz := uint32(unsafe.Sizeof(*st)) ++ var parms [7]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&sz) ++ parms[1] = unsafe.Pointer(&namebuf[0]) ++ parms[2] = unsafe.Pointer(&stat_sz) ++ parms[3] = unsafe.Pointer(st) ++ parms[4] = unsafe.Pointer(&rv) ++ parms[5] = unsafe.Pointer(&rc) ++ parms[6] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4LST) ++ return rv, rc, rn ++ } ++ return -1, -1, -1 ++} ++ ++func BpxChattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) { ++ if len(path) >= 1024 { ++ return -1, -1, -1 ++ } ++ var namebuf [1024]byte ++ sz := int32(copy(namebuf[:], path)) ++ A2e(namebuf[:sz]) ++ attr_sz := uint32(unsafe.Sizeof(*attr)) ++ var parms [7]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&sz) ++ parms[1] = unsafe.Pointer(&namebuf[0]) ++ parms[2] = unsafe.Pointer(&attr_sz) ++ parms[3] = unsafe.Pointer(attr) ++ parms[4] = unsafe.Pointer(&rv) ++ parms[5] = unsafe.Pointer(&rc) ++ parms[6] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4CHR) ++ return rv, rc, rn ++} ++ ++func BpxLchattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) { ++ if len(path) >= 1024 { ++ return -1, -1, -1 ++ } ++ var namebuf [1024]byte ++ sz := int32(copy(namebuf[:], path)) ++ A2e(namebuf[:sz]) ++ attr_sz := uint32(unsafe.Sizeof(*attr)) ++ var parms [7]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&sz) ++ parms[1] = unsafe.Pointer(&namebuf[0]) ++ parms[2] = unsafe.Pointer(&attr_sz) ++ parms[3] = unsafe.Pointer(attr) ++ parms[4] = unsafe.Pointer(&rv) ++ parms[5] = unsafe.Pointer(&rc) ++ parms[6] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4LCR) ++ return rv, rc, rn ++} ++ ++func BpxFchattr(fd int32, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) { ++ attr_sz := uint32(unsafe.Sizeof(*attr)) ++ var parms [6]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&fd) ++ parms[1] = unsafe.Pointer(&attr_sz) ++ parms[2] = unsafe.Pointer(attr) ++ parms[3] = unsafe.Pointer(&rv) ++ parms[4] = unsafe.Pointer(&rc) ++ parms[5] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4FCR) ++ return rv, rc, rn ++} ++ ++func BpxCondTimedWait(sec uint32, nsec uint32, events uint32, secrem *uint32, nsecrem *uint32) (rv int32, rc int32, rn int32) { ++ var parms [8]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&sec) ++ parms[1] = unsafe.Pointer(&nsec) ++ parms[2] = unsafe.Pointer(&events) ++ parms[3] = unsafe.Pointer(secrem) ++ parms[4] = unsafe.Pointer(nsecrem) ++ parms[5] = unsafe.Pointer(&rv) ++ parms[6] = unsafe.Pointer(&rc) ++ parms[7] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4CTW) ++ return rv, rc, rn ++} ++func BpxGetthent(in *Pgtha, outlen *uint32, out unsafe.Pointer) (rv int32, rc int32, rn int32) { ++ var parms [7]unsafe.Pointer ++ inlen := uint32(26) // nothing else will work. Go says Pgtha is 28-byte because of alignment, but Pgtha is "packed" and must be 26-byte ++ parms[0] = unsafe.Pointer(&inlen) ++ parms[1] = unsafe.Pointer(&in) ++ parms[2] = unsafe.Pointer(outlen) ++ parms[3] = unsafe.Pointer(&out) ++ parms[4] = unsafe.Pointer(&rv) ++ parms[5] = unsafe.Pointer(&rc) ++ parms[6] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4GTH) ++ return rv, rc, rn ++} ++func ZosJobname() (jobname string, err error) { ++ var pgtha Pgtha ++ pgtha.Pid = uint32(Getpid()) ++ pgtha.Accesspid = PGTHA_CURRENT ++ pgtha.Flag1 = PGTHA_PROCESS ++ var out [256]byte ++ var outlen uint32 ++ outlen = 256 ++ rv, rc, rn := BpxGetthent(&pgtha, &outlen, unsafe.Pointer(&out[0])) ++ if rv == 0 { ++ gthc := []byte{0x87, 0xa3, 0x88, 0x83} // 'gthc' in ebcdic ++ ix := bytes.Index(out[:], gthc) ++ if ix == -1 { ++ err = fmt.Errorf("BPX4GTH: gthc return data not found") ++ return ++ } ++ jn := out[ix+80 : ix+88] // we didn't declare Pgthc, but jobname is 8-byte at offset 80 ++ E2a(jn) ++ jobname = string(bytes.TrimRight(jn, " ")) ++ ++ } else { ++ err = fmt.Errorf("BPX4GTH: rc=%d errno=%d reason=code=0x%x", rv, rc, rn) ++ } ++ return ++} ++func Bpx4ptq(code int32, data string) (rv int32, rc int32, rn int32) { ++ var userdata [8]byte ++ var parms [5]unsafe.Pointer ++ copy(userdata[:], data+" ") ++ A2e(userdata[:]) ++ parms[0] = unsafe.Pointer(&code) ++ parms[1] = unsafe.Pointer(&userdata[0]) ++ parms[2] = unsafe.Pointer(&rv) ++ parms[3] = unsafe.Pointer(&rc) ++ parms[4] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4PTQ) ++ return rv, rc, rn ++} ++ ++const ( ++ PT_TRACE_ME = 0 // Debug this process ++ PT_READ_I = 1 // Read a full word ++ PT_READ_D = 2 // Read a full word ++ PT_READ_U = 3 // Read control info ++ PT_WRITE_I = 4 //Write a full word ++ PT_WRITE_D = 5 //Write a full word ++ PT_CONTINUE = 7 //Continue the process ++ PT_KILL = 8 //Terminate the process ++ PT_READ_GPR = 11 // Read GPR, CR, PSW ++ PT_READ_FPR = 12 // Read FPR ++ PT_READ_VR = 13 // Read VR ++ PT_WRITE_GPR = 14 // Write GPR, CR, PSW ++ PT_WRITE_FPR = 15 // Write FPR ++ PT_WRITE_VR = 16 // Write VR ++ PT_READ_BLOCK = 17 // Read storage ++ PT_WRITE_BLOCK = 19 // Write storage ++ PT_READ_GPRH = 20 // Read GPRH ++ PT_WRITE_GPRH = 21 // Write GPRH ++ PT_REGHSET = 22 // Read all GPRHs ++ PT_ATTACH = 30 // Attach to a process ++ PT_DETACH = 31 // Detach from a process ++ PT_REGSET = 32 // Read all GPRs ++ PT_REATTACH = 33 // Reattach to a process ++ PT_LDINFO = 34 // Read loader info ++ PT_MULTI = 35 // Multi process mode ++ PT_LD64INFO = 36 // RMODE64 Info Area ++ PT_BLOCKREQ = 40 // Block request ++ PT_THREAD_INFO = 60 // Read thread info ++ PT_THREAD_MODIFY = 61 ++ PT_THREAD_READ_FOCUS = 62 ++ PT_THREAD_WRITE_FOCUS = 63 ++ PT_THREAD_HOLD = 64 ++ PT_THREAD_SIGNAL = 65 ++ PT_EXPLAIN = 66 ++ PT_EVENTS = 67 ++ PT_THREAD_INFO_EXTENDED = 68 ++ PT_REATTACH2 = 71 ++ PT_CAPTURE = 72 ++ PT_UNCAPTURE = 73 ++ PT_GET_THREAD_TCB = 74 ++ PT_GET_ALET = 75 ++ PT_SWAPIN = 76 ++ PT_EXTENDED_EVENT = 98 ++ PT_RECOVER = 99 // Debug a program check ++ PT_GPR0 = 0 // General purpose register 0 ++ PT_GPR1 = 1 // General purpose register 1 ++ PT_GPR2 = 2 // General purpose register 2 ++ PT_GPR3 = 3 // General purpose register 3 ++ PT_GPR4 = 4 // General purpose register 4 ++ PT_GPR5 = 5 // General purpose register 5 ++ PT_GPR6 = 6 // General purpose register 6 ++ PT_GPR7 = 7 // General purpose register 7 ++ PT_GPR8 = 8 // General purpose register 8 ++ PT_GPR9 = 9 // General purpose register 9 ++ PT_GPR10 = 10 // General purpose register 10 ++ PT_GPR11 = 11 // General purpose register 11 ++ PT_GPR12 = 12 // General purpose register 12 ++ PT_GPR13 = 13 // General purpose register 13 ++ PT_GPR14 = 14 // General purpose register 14 ++ PT_GPR15 = 15 // General purpose register 15 ++ PT_FPR0 = 16 // Floating point register 0 ++ PT_FPR1 = 17 // Floating point register 1 ++ PT_FPR2 = 18 // Floating point register 2 ++ PT_FPR3 = 19 // Floating point register 3 ++ PT_FPR4 = 20 // Floating point register 4 ++ PT_FPR5 = 21 // Floating point register 5 ++ PT_FPR6 = 22 // Floating point register 6 ++ PT_FPR7 = 23 // Floating point register 7 ++ PT_FPR8 = 24 // Floating point register 8 ++ PT_FPR9 = 25 // Floating point register 9 ++ PT_FPR10 = 26 // Floating point register 10 ++ PT_FPR11 = 27 // Floating point register 11 ++ PT_FPR12 = 28 // Floating point register 12 ++ PT_FPR13 = 29 // Floating point register 13 ++ PT_FPR14 = 30 // Floating point register 14 ++ PT_FPR15 = 31 // Floating point register 15 ++ PT_FPC = 32 // Floating point control register ++ PT_PSW = 40 // PSW ++ PT_PSW0 = 40 // Left half of the PSW ++ PT_PSW1 = 41 // Right half of the PSW ++ PT_CR0 = 42 // Control register 0 ++ PT_CR1 = 43 // Control register 1 ++ PT_CR2 = 44 // Control register 2 ++ PT_CR3 = 45 // Control register 3 ++ PT_CR4 = 46 // Control register 4 ++ PT_CR5 = 47 // Control register 5 ++ PT_CR6 = 48 // Control register 6 ++ PT_CR7 = 49 // Control register 7 ++ PT_CR8 = 50 // Control register 8 ++ PT_CR9 = 51 // Control register 9 ++ PT_CR10 = 52 // Control register 10 ++ PT_CR11 = 53 // Control register 11 ++ PT_CR12 = 54 // Control register 12 ++ PT_CR13 = 55 // Control register 13 ++ PT_CR14 = 56 // Control register 14 ++ PT_CR15 = 57 // Control register 15 ++ PT_GPRH0 = 58 // GP High register 0 ++ PT_GPRH1 = 59 // GP High register 1 ++ PT_GPRH2 = 60 // GP High register 2 ++ PT_GPRH3 = 61 // GP High register 3 ++ PT_GPRH4 = 62 // GP High register 4 ++ PT_GPRH5 = 63 // GP High register 5 ++ PT_GPRH6 = 64 // GP High register 6 ++ PT_GPRH7 = 65 // GP High register 7 ++ PT_GPRH8 = 66 // GP High register 8 ++ PT_GPRH9 = 67 // GP High register 9 ++ PT_GPRH10 = 68 // GP High register 10 ++ PT_GPRH11 = 69 // GP High register 11 ++ PT_GPRH12 = 70 // GP High register 12 ++ PT_GPRH13 = 71 // GP High register 13 ++ PT_GPRH14 = 72 // GP High register 14 ++ PT_GPRH15 = 73 // GP High register 15 ++ PT_VR0 = 74 // Vector register 0 ++ PT_VR1 = 75 // Vector register 1 ++ PT_VR2 = 76 // Vector register 2 ++ PT_VR3 = 77 // Vector register 3 ++ PT_VR4 = 78 // Vector register 4 ++ PT_VR5 = 79 // Vector register 5 ++ PT_VR6 = 80 // Vector register 6 ++ PT_VR7 = 81 // Vector register 7 ++ PT_VR8 = 82 // Vector register 8 ++ PT_VR9 = 83 // Vector register 9 ++ PT_VR10 = 84 // Vector register 10 ++ PT_VR11 = 85 // Vector register 11 ++ PT_VR12 = 86 // Vector register 12 ++ PT_VR13 = 87 // Vector register 13 ++ PT_VR14 = 88 // Vector register 14 ++ PT_VR15 = 89 // Vector register 15 ++ PT_VR16 = 90 // Vector register 16 ++ PT_VR17 = 91 // Vector register 17 ++ PT_VR18 = 92 // Vector register 18 ++ PT_VR19 = 93 // Vector register 19 ++ PT_VR20 = 94 // Vector register 20 ++ PT_VR21 = 95 // Vector register 21 ++ PT_VR22 = 96 // Vector register 22 ++ PT_VR23 = 97 // Vector register 23 ++ PT_VR24 = 98 // Vector register 24 ++ PT_VR25 = 99 // Vector register 25 ++ PT_VR26 = 100 // Vector register 26 ++ PT_VR27 = 101 // Vector register 27 ++ PT_VR28 = 102 // Vector register 28 ++ PT_VR29 = 103 // Vector register 29 ++ PT_VR30 = 104 // Vector register 30 ++ PT_VR31 = 105 // Vector register 31 ++ PT_PSWG = 106 // PSWG ++ PT_PSWG0 = 106 // Bytes 0-3 ++ PT_PSWG1 = 107 // Bytes 4-7 ++ PT_PSWG2 = 108 // Bytes 8-11 (IA high word) ++ PT_PSWG3 = 109 // Bytes 12-15 (IA low word) ++) ++ ++func Bpx4ptr(request int32, pid int32, addr unsafe.Pointer, data unsafe.Pointer, buffer unsafe.Pointer) (rv int32, rc int32, rn int32) { ++ var parms [8]unsafe.Pointer ++ parms[0] = unsafe.Pointer(&request) ++ parms[1] = unsafe.Pointer(&pid) ++ parms[2] = unsafe.Pointer(&addr) ++ parms[3] = unsafe.Pointer(&data) ++ parms[4] = unsafe.Pointer(&buffer) ++ parms[5] = unsafe.Pointer(&rv) ++ parms[6] = unsafe.Pointer(&rc) ++ parms[7] = unsafe.Pointer(&rn) ++ bpxcall(parms[:], BPX4PTR) ++ return rv, rc, rn ++} ++ ++func copyU8(val uint8, dest []uint8) int { ++ if len(dest) < 1 { ++ return 0 ++ } ++ dest[0] = val ++ return 1 ++} ++ ++func copyU8Arr(src, dest []uint8) int { ++ if len(dest) < len(src) { ++ return 0 ++ } ++ for i, v := range src { ++ dest[i] = v ++ } ++ return len(src) ++} ++ ++func copyU16(val uint16, dest []uint16) int { ++ if len(dest) < 1 { ++ return 0 ++ } ++ dest[0] = val ++ return 1 ++} ++ ++func copyU32(val uint32, dest []uint32) int { ++ if len(dest) < 1 { ++ return 0 ++ } ++ dest[0] = val ++ return 1 ++} ++ ++func copyU32Arr(src, dest []uint32) int { ++ if len(dest) < len(src) { ++ return 0 ++ } ++ for i, v := range src { ++ dest[i] = v ++ } ++ return len(src) ++} ++ ++func copyU64(val uint64, dest []uint64) int { ++ if len(dest) < 1 { ++ return 0 ++ } ++ dest[0] = val ++ return 1 ++} +diff --git a/vendor/golang.org/x/sys/unix/bpxsvc_zos.s b/vendor/golang.org/x/sys/unix/bpxsvc_zos.s +new file mode 100644 +index 00000000..4bd4a179 +--- /dev/null ++++ b/vendor/golang.org/x/sys/unix/bpxsvc_zos.s +@@ -0,0 +1,192 @@ ++// 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. ++ ++#include "go_asm.h" ++#include "textflag.h" ++ ++// function to call USS assembly language services ++// ++// doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bit64env.htm ++// ++// arg1 unsafe.Pointer array that ressembles an OS PLIST ++// ++// arg2 function offset as in ++// doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bpx2cr_List_of_offsets.htm ++// ++// func bpxcall(plist []unsafe.Pointer, bpx_offset int64) ++ ++TEXT ·bpxcall(SB), NOSPLIT|NOFRAME, $0 ++ MOVD plist_base+0(FP), R1 // r1 points to plist ++ MOVD bpx_offset+24(FP), R2 // r2 offset to BPX vector table ++ MOVD R14, R7 // save r14 ++ MOVD R15, R8 // save r15 ++ MOVWZ 16(R0), R9 ++ MOVWZ 544(R9), R9 ++ MOVWZ 24(R9), R9 // call vector in r9 ++ ADD R2, R9 // add offset to vector table ++ MOVWZ (R9), R9 // r9 points to entry point ++ BYTE $0x0D // BL R14,R9 --> basr r14,r9 ++ BYTE $0xE9 // clobbers 0,1,14,15 ++ MOVD R8, R15 // restore 15 ++ JMP R7 // return via saved return address ++ ++// func A2e(arr [] byte) ++// code page conversion from 819 to 1047 ++TEXT ·A2e(SB), NOSPLIT|NOFRAME, $0 ++ MOVD arg_base+0(FP), R2 // pointer to arry of characters ++ MOVD arg_len+8(FP), R3 // count ++ XOR R0, R0 ++ XOR R1, R1 ++ BYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2)) ++ ++ // ASCII -> EBCDIC conversion table: ++ BYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03 ++ BYTE $0x37; BYTE $0x2d; BYTE $0x2e; BYTE $0x2f ++ BYTE $0x16; BYTE $0x05; BYTE $0x15; BYTE $0x0b ++ BYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f ++ BYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13 ++ BYTE $0x3c; BYTE $0x3d; BYTE $0x32; BYTE $0x26 ++ BYTE $0x18; BYTE $0x19; BYTE $0x3f; BYTE $0x27 ++ BYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f ++ BYTE $0x40; BYTE $0x5a; BYTE $0x7f; BYTE $0x7b ++ BYTE $0x5b; BYTE $0x6c; BYTE $0x50; BYTE $0x7d ++ BYTE $0x4d; BYTE $0x5d; BYTE $0x5c; BYTE $0x4e ++ BYTE $0x6b; BYTE $0x60; BYTE $0x4b; BYTE $0x61 ++ BYTE $0xf0; BYTE $0xf1; BYTE $0xf2; BYTE $0xf3 ++ BYTE $0xf4; BYTE $0xf5; BYTE $0xf6; BYTE $0xf7 ++ BYTE $0xf8; BYTE $0xf9; BYTE $0x7a; BYTE $0x5e ++ BYTE $0x4c; BYTE $0x7e; BYTE $0x6e; BYTE $0x6f ++ BYTE $0x7c; BYTE $0xc1; BYTE $0xc2; BYTE $0xc3 ++ BYTE $0xc4; BYTE $0xc5; BYTE $0xc6; BYTE $0xc7 ++ BYTE $0xc8; BYTE $0xc9; BYTE $0xd1; BYTE $0xd2 ++ BYTE $0xd3; BYTE $0xd4; BYTE $0xd5; BYTE $0xd6 ++ BYTE $0xd7; BYTE $0xd8; BYTE $0xd9; BYTE $0xe2 ++ BYTE $0xe3; BYTE $0xe4; BYTE $0xe5; BYTE $0xe6 ++ BYTE $0xe7; BYTE $0xe8; BYTE $0xe9; BYTE $0xad ++ BYTE $0xe0; BYTE $0xbd; BYTE $0x5f; BYTE $0x6d ++ BYTE $0x79; BYTE $0x81; BYTE $0x82; BYTE $0x83 ++ BYTE $0x84; BYTE $0x85; BYTE $0x86; BYTE $0x87 ++ BYTE $0x88; BYTE $0x89; BYTE $0x91; BYTE $0x92 ++ BYTE $0x93; BYTE $0x94; BYTE $0x95; BYTE $0x96 ++ BYTE $0x97; BYTE $0x98; BYTE $0x99; BYTE $0xa2 ++ BYTE $0xa3; BYTE $0xa4; BYTE $0xa5; BYTE $0xa6 ++ BYTE $0xa7; BYTE $0xa8; BYTE $0xa9; BYTE $0xc0 ++ BYTE $0x4f; BYTE $0xd0; BYTE $0xa1; BYTE $0x07 ++ BYTE $0x20; BYTE $0x21; BYTE $0x22; BYTE $0x23 ++ BYTE $0x24; BYTE $0x25; BYTE $0x06; BYTE $0x17 ++ BYTE $0x28; BYTE $0x29; BYTE $0x2a; BYTE $0x2b ++ BYTE $0x2c; BYTE $0x09; BYTE $0x0a; BYTE $0x1b ++ BYTE $0x30; BYTE $0x31; BYTE $0x1a; BYTE $0x33 ++ BYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x08 ++ BYTE $0x38; BYTE $0x39; BYTE $0x3a; BYTE $0x3b ++ BYTE $0x04; BYTE $0x14; BYTE $0x3e; BYTE $0xff ++ BYTE $0x41; BYTE $0xaa; BYTE $0x4a; BYTE $0xb1 ++ BYTE $0x9f; BYTE $0xb2; BYTE $0x6a; BYTE $0xb5 ++ BYTE $0xbb; BYTE $0xb4; BYTE $0x9a; BYTE $0x8a ++ BYTE $0xb0; BYTE $0xca; BYTE $0xaf; BYTE $0xbc ++ BYTE $0x90; BYTE $0x8f; BYTE $0xea; BYTE $0xfa ++ BYTE $0xbe; BYTE $0xa0; BYTE $0xb6; BYTE $0xb3 ++ BYTE $0x9d; BYTE $0xda; BYTE $0x9b; BYTE $0x8b ++ BYTE $0xb7; BYTE $0xb8; BYTE $0xb9; BYTE $0xab ++ BYTE $0x64; BYTE $0x65; BYTE $0x62; BYTE $0x66 ++ BYTE $0x63; BYTE $0x67; BYTE $0x9e; BYTE $0x68 ++ BYTE $0x74; BYTE $0x71; BYTE $0x72; BYTE $0x73 ++ BYTE $0x78; BYTE $0x75; BYTE $0x76; BYTE $0x77 ++ BYTE $0xac; BYTE $0x69; BYTE $0xed; BYTE $0xee ++ BYTE $0xeb; BYTE $0xef; BYTE $0xec; BYTE $0xbf ++ BYTE $0x80; BYTE $0xfd; BYTE $0xfe; BYTE $0xfb ++ BYTE $0xfc; BYTE $0xba; BYTE $0xae; BYTE $0x59 ++ BYTE $0x44; BYTE $0x45; BYTE $0x42; BYTE $0x46 ++ BYTE $0x43; BYTE $0x47; BYTE $0x9c; BYTE $0x48 ++ BYTE $0x54; BYTE $0x51; BYTE $0x52; BYTE $0x53 ++ BYTE $0x58; BYTE $0x55; BYTE $0x56; BYTE $0x57 ++ BYTE $0x8c; BYTE $0x49; BYTE $0xcd; BYTE $0xce ++ BYTE $0xcb; BYTE $0xcf; BYTE $0xcc; BYTE $0xe1 ++ BYTE $0x70; BYTE $0xdd; BYTE $0xde; BYTE $0xdb ++ BYTE $0xdc; BYTE $0x8d; BYTE $0x8e; BYTE $0xdf ++ ++retry: ++ WORD $0xB9931022 // TROO 2,2,b'0001' ++ BVS retry ++ RET ++ ++// func e2a(arr [] byte) ++// code page conversion from 1047 to 819 ++TEXT ·E2a(SB), NOSPLIT|NOFRAME, $0 ++ MOVD arg_base+0(FP), R2 // pointer to arry of characters ++ MOVD arg_len+8(FP), R3 // count ++ XOR R0, R0 ++ XOR R1, R1 ++ BYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2)) ++ ++ // EBCDIC -> ASCII conversion table: ++ BYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03 ++ BYTE $0x9c; BYTE $0x09; BYTE $0x86; BYTE $0x7f ++ BYTE $0x97; BYTE $0x8d; BYTE $0x8e; BYTE $0x0b ++ BYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f ++ BYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13 ++ BYTE $0x9d; BYTE $0x0a; BYTE $0x08; BYTE $0x87 ++ BYTE $0x18; BYTE $0x19; BYTE $0x92; BYTE $0x8f ++ BYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f ++ BYTE $0x80; BYTE $0x81; BYTE $0x82; BYTE $0x83 ++ BYTE $0x84; BYTE $0x85; BYTE $0x17; BYTE $0x1b ++ BYTE $0x88; BYTE $0x89; BYTE $0x8a; BYTE $0x8b ++ BYTE $0x8c; BYTE $0x05; BYTE $0x06; BYTE $0x07 ++ BYTE $0x90; BYTE $0x91; BYTE $0x16; BYTE $0x93 ++ BYTE $0x94; BYTE $0x95; BYTE $0x96; BYTE $0x04 ++ BYTE $0x98; BYTE $0x99; BYTE $0x9a; BYTE $0x9b ++ BYTE $0x14; BYTE $0x15; BYTE $0x9e; BYTE $0x1a ++ BYTE $0x20; BYTE $0xa0; BYTE $0xe2; BYTE $0xe4 ++ BYTE $0xe0; BYTE $0xe1; BYTE $0xe3; BYTE $0xe5 ++ BYTE $0xe7; BYTE $0xf1; BYTE $0xa2; BYTE $0x2e ++ BYTE $0x3c; BYTE $0x28; BYTE $0x2b; BYTE $0x7c ++ BYTE $0x26; BYTE $0xe9; BYTE $0xea; BYTE $0xeb ++ BYTE $0xe8; BYTE $0xed; BYTE $0xee; BYTE $0xef ++ BYTE $0xec; BYTE $0xdf; BYTE $0x21; BYTE $0x24 ++ BYTE $0x2a; BYTE $0x29; BYTE $0x3b; BYTE $0x5e ++ BYTE $0x2d; BYTE $0x2f; BYTE $0xc2; BYTE $0xc4 ++ BYTE $0xc0; BYTE $0xc1; BYTE $0xc3; BYTE $0xc5 ++ BYTE $0xc7; BYTE $0xd1; BYTE $0xa6; BYTE $0x2c ++ BYTE $0x25; BYTE $0x5f; BYTE $0x3e; BYTE $0x3f ++ BYTE $0xf8; BYTE $0xc9; BYTE $0xca; BYTE $0xcb ++ BYTE $0xc8; BYTE $0xcd; BYTE $0xce; BYTE $0xcf ++ BYTE $0xcc; BYTE $0x60; BYTE $0x3a; BYTE $0x23 ++ BYTE $0x40; BYTE $0x27; BYTE $0x3d; BYTE $0x22 ++ BYTE $0xd8; BYTE $0x61; BYTE $0x62; BYTE $0x63 ++ BYTE $0x64; BYTE $0x65; BYTE $0x66; BYTE $0x67 ++ BYTE $0x68; BYTE $0x69; BYTE $0xab; BYTE $0xbb ++ BYTE $0xf0; BYTE $0xfd; BYTE $0xfe; BYTE $0xb1 ++ BYTE $0xb0; BYTE $0x6a; BYTE $0x6b; BYTE $0x6c ++ BYTE $0x6d; BYTE $0x6e; BYTE $0x6f; BYTE $0x70 ++ BYTE $0x71; BYTE $0x72; BYTE $0xaa; BYTE $0xba ++ BYTE $0xe6; BYTE $0xb8; BYTE $0xc6; BYTE $0xa4 ++ BYTE $0xb5; BYTE $0x7e; BYTE $0x73; BYTE $0x74 ++ BYTE $0x75; BYTE $0x76; BYTE $0x77; BYTE $0x78 ++ BYTE $0x79; BYTE $0x7a; BYTE $0xa1; BYTE $0xbf ++ BYTE $0xd0; BYTE $0x5b; BYTE $0xde; BYTE $0xae ++ BYTE $0xac; BYTE $0xa3; BYTE $0xa5; BYTE $0xb7 ++ BYTE $0xa9; BYTE $0xa7; BYTE $0xb6; BYTE $0xbc ++ BYTE $0xbd; BYTE $0xbe; BYTE $0xdd; BYTE $0xa8 ++ BYTE $0xaf; BYTE $0x5d; BYTE $0xb4; BYTE $0xd7 ++ BYTE $0x7b; BYTE $0x41; BYTE $0x42; BYTE $0x43 ++ BYTE $0x44; BYTE $0x45; BYTE $0x46; BYTE $0x47 ++ BYTE $0x48; BYTE $0x49; BYTE $0xad; BYTE $0xf4 ++ BYTE $0xf6; BYTE $0xf2; BYTE $0xf3; BYTE $0xf5 ++ BYTE $0x7d; BYTE $0x4a; BYTE $0x4b; BYTE $0x4c ++ BYTE $0x4d; BYTE $0x4e; BYTE $0x4f; BYTE $0x50 ++ BYTE $0x51; BYTE $0x52; BYTE $0xb9; BYTE $0xfb ++ BYTE $0xfc; BYTE $0xf9; BYTE $0xfa; BYTE $0xff ++ BYTE $0x5c; BYTE $0xf7; BYTE $0x53; BYTE $0x54 ++ BYTE $0x55; BYTE $0x56; BYTE $0x57; BYTE $0x58 ++ BYTE $0x59; BYTE $0x5a; BYTE $0xb2; BYTE $0xd4 ++ BYTE $0xd6; BYTE $0xd2; BYTE $0xd3; BYTE $0xd5 ++ BYTE $0x30; BYTE $0x31; BYTE $0x32; BYTE $0x33 ++ BYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x37 ++ BYTE $0x38; BYTE $0x39; BYTE $0xb3; BYTE $0xdb ++ BYTE $0xdc; BYTE $0xd9; BYTE $0xda; BYTE $0x9f ++ ++retry: ++ WORD $0xB9931022 // TROO 2,2,b'0001' ++ BVS retry ++ RET +diff --git a/vendor/golang.org/x/sys/unix/epoll_zos.go b/vendor/golang.org/x/sys/unix/epoll_zos.go +deleted file mode 100644 +index 7753fdde..00000000 +--- a/vendor/golang.org/x/sys/unix/epoll_zos.go ++++ /dev/null +@@ -1,220 +0,0 @@ +-// Copyright 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 zos && s390x +- +-package unix +- +-import ( +- "sync" +-) +- +-// This file simulates epoll on z/OS using poll. +- +-// Analogous to epoll_event on Linux. +-// TODO(neeilan): Pad is because the Linux kernel expects a 96-bit struct. We never pass this to the kernel; remove? +-type EpollEvent struct { +- Events uint32 +- Fd int32 +- Pad int32 +-} +- +-const ( +- EPOLLERR = 0x8 +- EPOLLHUP = 0x10 +- EPOLLIN = 0x1 +- EPOLLMSG = 0x400 +- EPOLLOUT = 0x4 +- EPOLLPRI = 0x2 +- EPOLLRDBAND = 0x80 +- EPOLLRDNORM = 0x40 +- EPOLLWRBAND = 0x200 +- EPOLLWRNORM = 0x100 +- EPOLL_CTL_ADD = 0x1 +- EPOLL_CTL_DEL = 0x2 +- EPOLL_CTL_MOD = 0x3 +- // The following constants are part of the epoll API, but represent +- // currently unsupported functionality on z/OS. +- // EPOLL_CLOEXEC = 0x80000 +- // EPOLLET = 0x80000000 +- // EPOLLONESHOT = 0x40000000 +- // EPOLLRDHUP = 0x2000 // Typically used with edge-triggered notis +- // EPOLLEXCLUSIVE = 0x10000000 // Exclusive wake-up mode +- // EPOLLWAKEUP = 0x20000000 // Relies on Linux's BLOCK_SUSPEND capability +-) +- +-// TODO(neeilan): We can eliminate these epToPoll / pToEpoll calls by using identical mask values for POLL/EPOLL +-// constants where possible The lower 16 bits of epoll events (uint32) can fit any system poll event (int16). +- +-// epToPollEvt converts epoll event field to poll equivalent. +-// In epoll, Events is a 32-bit field, while poll uses 16 bits. +-func epToPollEvt(events uint32) int16 { +- var ep2p = map[uint32]int16{ +- EPOLLIN: POLLIN, +- EPOLLOUT: POLLOUT, +- EPOLLHUP: POLLHUP, +- EPOLLPRI: POLLPRI, +- EPOLLERR: POLLERR, +- } +- +- var pollEvts int16 = 0 +- for epEvt, pEvt := range ep2p { +- if (events & epEvt) != 0 { +- pollEvts |= pEvt +- } +- } +- +- return pollEvts +-} +- +-// pToEpollEvt converts 16 bit poll event bitfields to 32-bit epoll event fields. +-func pToEpollEvt(revents int16) uint32 { +- var p2ep = map[int16]uint32{ +- POLLIN: EPOLLIN, +- POLLOUT: EPOLLOUT, +- POLLHUP: EPOLLHUP, +- POLLPRI: EPOLLPRI, +- POLLERR: EPOLLERR, +- } +- +- var epollEvts uint32 = 0 +- for pEvt, epEvt := range p2ep { +- if (revents & pEvt) != 0 { +- epollEvts |= epEvt +- } +- } +- +- return epollEvts +-} +- +-// Per-process epoll implementation. +-type epollImpl struct { +- mu sync.Mutex +- epfd2ep map[int]*eventPoll +- nextEpfd int +-} +- +-// eventPoll holds a set of file descriptors being watched by the process. A process can have multiple epoll instances. +-// On Linux, this is an in-kernel data structure accessed through a fd. +-type eventPoll struct { +- mu sync.Mutex +- fds map[int]*EpollEvent +-} +- +-// epoll impl for this process. +-var impl epollImpl = epollImpl{ +- epfd2ep: make(map[int]*eventPoll), +- nextEpfd: 0, +-} +- +-func (e *epollImpl) epollcreate(size int) (epfd int, err error) { +- e.mu.Lock() +- defer e.mu.Unlock() +- epfd = e.nextEpfd +- e.nextEpfd++ +- +- e.epfd2ep[epfd] = &eventPoll{ +- fds: make(map[int]*EpollEvent), +- } +- return epfd, nil +-} +- +-func (e *epollImpl) epollcreate1(flag int) (fd int, err error) { +- return e.epollcreate(4) +-} +- +-func (e *epollImpl) epollctl(epfd int, op int, fd int, event *EpollEvent) (err error) { +- e.mu.Lock() +- defer e.mu.Unlock() +- +- ep, ok := e.epfd2ep[epfd] +- if !ok { +- +- return EBADF +- } +- +- switch op { +- case EPOLL_CTL_ADD: +- // TODO(neeilan): When we make epfds and fds disjoint, detect epoll +- // loops here (instances watching each other) and return ELOOP. +- if _, ok := ep.fds[fd]; ok { +- return EEXIST +- } +- ep.fds[fd] = event +- case EPOLL_CTL_MOD: +- if _, ok := ep.fds[fd]; !ok { +- return ENOENT +- } +- ep.fds[fd] = event +- case EPOLL_CTL_DEL: +- if _, ok := ep.fds[fd]; !ok { +- return ENOENT +- } +- delete(ep.fds, fd) +- +- } +- return nil +-} +- +-// Must be called while holding ep.mu +-func (ep *eventPoll) getFds() []int { +- fds := make([]int, len(ep.fds)) +- for fd := range ep.fds { +- fds = append(fds, fd) +- } +- return fds +-} +- +-func (e *epollImpl) epollwait(epfd int, events []EpollEvent, msec int) (n int, err error) { +- e.mu.Lock() // in [rare] case of concurrent epollcreate + epollwait +- ep, ok := e.epfd2ep[epfd] +- +- if !ok { +- e.mu.Unlock() +- return 0, EBADF +- } +- +- pollfds := make([]PollFd, 4) +- for fd, epollevt := range ep.fds { +- pollfds = append(pollfds, PollFd{Fd: int32(fd), Events: epToPollEvt(epollevt.Events)}) +- } +- e.mu.Unlock() +- +- n, err = Poll(pollfds, msec) +- if err != nil { +- return n, err +- } +- +- i := 0 +- for _, pFd := range pollfds { +- if pFd.Revents != 0 { +- events[i] = EpollEvent{Fd: pFd.Fd, Events: pToEpollEvt(pFd.Revents)} +- i++ +- } +- +- if i == n { +- break +- } +- } +- +- return n, nil +-} +- +-func EpollCreate(size int) (fd int, err error) { +- return impl.epollcreate(size) +-} +- +-func EpollCreate1(flag int) (fd int, err error) { +- return impl.epollcreate1(flag) +-} +- +-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { +- return impl.epollctl(epfd, op, fd, event) +-} +- +-// Because EpollWait mutates events, the caller is expected to coordinate +-// concurrent access if calling with the same epfd from multiple goroutines. +-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { +- return impl.epollwait(epfd, events, msec) +-} +diff --git a/vendor/golang.org/x/sys/unix/fstatfs_zos.go b/vendor/golang.org/x/sys/unix/fstatfs_zos.go +deleted file mode 100644 +index c8bde601..00000000 +--- a/vendor/golang.org/x/sys/unix/fstatfs_zos.go ++++ /dev/null +@@ -1,163 +0,0 @@ +-// Copyright 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 zos && s390x +- +-package unix +- +-import ( +- "unsafe" +-) +- +-// This file simulates fstatfs on z/OS using fstatvfs and w_getmntent. +- +-func Fstatfs(fd int, stat *Statfs_t) (err error) { +- var stat_v Statvfs_t +- err = Fstatvfs(fd, &stat_v) +- if err == nil { +- // populate stat +- stat.Type = 0 +- stat.Bsize = stat_v.Bsize +- stat.Blocks = stat_v.Blocks +- stat.Bfree = stat_v.Bfree +- stat.Bavail = stat_v.Bavail +- stat.Files = stat_v.Files +- stat.Ffree = stat_v.Ffree +- stat.Fsid = stat_v.Fsid +- stat.Namelen = stat_v.Namemax +- stat.Frsize = stat_v.Frsize +- stat.Flags = stat_v.Flag +- for passn := 0; passn < 5; passn++ { +- switch passn { +- case 0: +- err = tryGetmntent64(stat) +- break +- case 1: +- err = tryGetmntent128(stat) +- break +- case 2: +- err = tryGetmntent256(stat) +- break +- case 3: +- err = tryGetmntent512(stat) +- break +- case 4: +- err = tryGetmntent1024(stat) +- break +- default: +- break +- } +- //proceed to return if: err is nil (found), err is nonnil but not ERANGE (another error occurred) +- if err == nil || err != nil && err != ERANGE { +- break +- } +- } +- } +- return err +-} +- +-func tryGetmntent64(stat *Statfs_t) (err error) { +- var mnt_ent_buffer struct { +- header W_Mnth +- filesys_info [64]W_Mntent +- } +- var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) +- fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) +- if err != nil { +- return err +- } +- err = ERANGE //return ERANGE if no match is found in this batch +- for i := 0; i < fs_count; i++ { +- if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { +- stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) +- err = nil +- break +- } +- } +- return err +-} +- +-func tryGetmntent128(stat *Statfs_t) (err error) { +- var mnt_ent_buffer struct { +- header W_Mnth +- filesys_info [128]W_Mntent +- } +- var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) +- fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) +- if err != nil { +- return err +- } +- err = ERANGE //return ERANGE if no match is found in this batch +- for i := 0; i < fs_count; i++ { +- if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { +- stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) +- err = nil +- break +- } +- } +- return err +-} +- +-func tryGetmntent256(stat *Statfs_t) (err error) { +- var mnt_ent_buffer struct { +- header W_Mnth +- filesys_info [256]W_Mntent +- } +- var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) +- fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) +- if err != nil { +- return err +- } +- err = ERANGE //return ERANGE if no match is found in this batch +- for i := 0; i < fs_count; i++ { +- if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { +- stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) +- err = nil +- break +- } +- } +- return err +-} +- +-func tryGetmntent512(stat *Statfs_t) (err error) { +- var mnt_ent_buffer struct { +- header W_Mnth +- filesys_info [512]W_Mntent +- } +- var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) +- fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) +- if err != nil { +- return err +- } +- err = ERANGE //return ERANGE if no match is found in this batch +- for i := 0; i < fs_count; i++ { +- if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { +- stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) +- err = nil +- break +- } +- } +- return err +-} +- +-func tryGetmntent1024(stat *Statfs_t) (err error) { +- var mnt_ent_buffer struct { +- header W_Mnth +- filesys_info [1024]W_Mntent +- } +- var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer)) +- fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size) +- if err != nil { +- return err +- } +- err = ERANGE //return ERANGE if no match is found in this batch +- for i := 0; i < fs_count; i++ { +- if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) { +- stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0]) +- err = nil +- break +- } +- } +- return err +-} +diff --git a/vendor/golang.org/x/sys/unix/ioctl_linux.go b/vendor/golang.org/x/sys/unix/ioctl_linux.go +index dbe680ea..7ca4fa12 100644 +--- a/vendor/golang.org/x/sys/unix/ioctl_linux.go ++++ b/vendor/golang.org/x/sys/unix/ioctl_linux.go +@@ -58,6 +58,102 @@ func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) { + 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 + // Linux watchdog API. For more information, see: + // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html. +diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh +index fdcaa974..6ab02b6c 100644 +--- a/vendor/golang.org/x/sys/unix/mkerrors.sh ++++ b/vendor/golang.org/x/sys/unix/mkerrors.sh +@@ -58,6 +58,7 @@ includes_Darwin=' + #define _DARWIN_USE_64_BIT_INODE + #define __APPLE_USE_RFC_3542 + #include ++#include + #include + #include + #include +@@ -157,6 +158,16 @@ includes_Linux=' + #endif + #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 ++ + // is broken on powerpc64, as it fails to include definitions of + // these structures. We just include them copied from . + #if defined(__powerpc__) +@@ -255,6 +266,7 @@ struct ltchars { + #include + #include + #include ++#include + #include + #include + #include +@@ -263,6 +275,7 @@ struct ltchars { + #include + #include + #include ++#include + #include + #include + #include +@@ -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 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ || + $2 ~ /^NFC_.*_(MAX)?SIZE$/ || ++ $2 ~ /^PTP_/ || + $2 ~ /^RAW_PAYLOAD_/ || + $2 ~ /^[US]F_/ || + $2 ~ /^TP_STATUS_/ || +@@ -549,6 +563,8 @@ ccflags="$@" + $2 !~ "NLA_TYPE_MASK" && + $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && + $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 ~ /^SIOC/ || + $2 ~ /^TIOC/ || +@@ -652,7 +668,7 @@ errors=$( + signals=$( + echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | +- grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | ++ grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | + sort + ) + +@@ -662,7 +678,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags | + sort >_error.grep + echo '#include ' | $CC -x c - -E -dM $ccflags | + 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 + + echo '// mkerrors.sh' "$@" +diff --git a/vendor/golang.org/x/sys/unix/mremap.go b/vendor/golang.org/x/sys/unix/mremap.go +index fd45fe52..3a5e776f 100644 +--- a/vendor/golang.org/x/sys/unix/mremap.go ++++ b/vendor/golang.org/x/sys/unix/mremap.go +@@ -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) { + 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 ++} +diff --git a/vendor/golang.org/x/sys/unix/pagesize_unix.go b/vendor/golang.org/x/sys/unix/pagesize_unix.go +index 4d0a3430..0482408d 100644 +--- a/vendor/golang.org/x/sys/unix/pagesize_unix.go ++++ b/vendor/golang.org/x/sys/unix/pagesize_unix.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris ++//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos + + // For Unix, get the pagesize from the runtime. + +diff --git a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go +index 130398b6..b903c006 100644 +--- a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go ++++ b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build darwin ++//go:build darwin || zos + + package unix + +diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_zos.go b/vendor/golang.org/x/sys/unix/sockcmsg_zos.go +new file mode 100644 +index 00000000..3e53dbc0 +--- /dev/null ++++ b/vendor/golang.org/x/sys/unix/sockcmsg_zos.go +@@ -0,0 +1,58 @@ ++// 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. ++ ++// Socket control messages ++ ++package unix ++ ++import "unsafe" ++ ++// UnixCredentials encodes credentials into a socket control message ++// for sending to another process. This can be used for ++// authentication. ++func UnixCredentials(ucred *Ucred) []byte { ++ b := make([]byte, CmsgSpace(SizeofUcred)) ++ h := (*Cmsghdr)(unsafe.Pointer(&b[0])) ++ h.Level = SOL_SOCKET ++ h.Type = SCM_CREDENTIALS ++ h.SetLen(CmsgLen(SizeofUcred)) ++ *(*Ucred)(h.data(0)) = *ucred ++ return b ++} ++ ++// ParseUnixCredentials decodes a socket control message that contains ++// credentials in a Ucred structure. To receive such a message, the ++// SO_PASSCRED option must be enabled on the socket. ++func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { ++ if m.Header.Level != SOL_SOCKET { ++ return nil, EINVAL ++ } ++ if m.Header.Type != SCM_CREDENTIALS { ++ return nil, EINVAL ++ } ++ ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) ++ return &ucred, nil ++} ++ ++// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO. ++func PktInfo4(info *Inet4Pktinfo) []byte { ++ b := make([]byte, CmsgSpace(SizeofInet4Pktinfo)) ++ h := (*Cmsghdr)(unsafe.Pointer(&b[0])) ++ h.Level = SOL_IP ++ h.Type = IP_PKTINFO ++ h.SetLen(CmsgLen(SizeofInet4Pktinfo)) ++ *(*Inet4Pktinfo)(h.data(0)) = *info ++ return b ++} ++ ++// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO. ++func PktInfo6(info *Inet6Pktinfo) []byte { ++ b := make([]byte, CmsgSpace(SizeofInet6Pktinfo)) ++ h := (*Cmsghdr)(unsafe.Pointer(&b[0])) ++ h.Level = SOL_IPV6 ++ h.Type = IPV6_PKTINFO ++ h.SetLen(CmsgLen(SizeofInet6Pktinfo)) ++ *(*Inet6Pktinfo)(h.data(0)) = *info ++ return b ++} +diff --git a/vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s b/vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s +new file mode 100644 +index 00000000..3c4f33cb +--- /dev/null ++++ b/vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s +@@ -0,0 +1,75 @@ ++// 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 zos && s390x && gc ++ ++#include "textflag.h" ++ ++// provide the address of function variable to be fixed up. ++ ++TEXT ·getPipe2Addr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Pipe2(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_FlockAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Flock(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_GetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Getxattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_NanosleepAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Nanosleep(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_SetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Setxattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_Wait4Addr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Wait4(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_MountAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Mount(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_UnmountAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Unmount(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_UtimesNanoAtAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·UtimesNanoAt(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_UtimesNanoAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·UtimesNano(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_MkfifoatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Mkfifoat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_ChtagAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Chtag(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++TEXT ·get_ReadlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Readlinkat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ +diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go +index 67ce6cef..6f15ba1e 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_aix.go ++++ b/vendor/golang.org/x/sys/unix/syscall_aix.go +@@ -360,7 +360,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, + var status _C_int + var r Pid_t + 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. + for err == ERESTART { + r, err = wait4(Pid_t(pid), &status, options, rusage) +diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go +index 59542a89..099867de 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go ++++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go +@@ -402,6 +402,18 @@ func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error { + 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 + + 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 shmat(id int, addr uintptr, flag int) (ret uintptr, err error) +diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +index 97cb916f..be8c0020 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go ++++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +@@ -246,6 +246,18 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e + 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 + */ +diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd.go b/vendor/golang.org/x/sys/unix/syscall_hurd.go +index ba46651f..a6a2d2fc 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_hurd.go ++++ b/vendor/golang.org/x/sys/unix/syscall_hurd.go +@@ -11,6 +11,7 @@ package unix + int ioctl(int, unsigned long int, uintptr_t); + */ + import "C" ++import "unsafe" + + func ioctl(fd int, req uint, arg uintptr) (err error) { + r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) +diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go +index 5682e262..230a9454 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_linux.go ++++ b/vendor/golang.org/x/sys/unix/syscall_linux.go +@@ -1295,6 +1295,48 @@ func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { + 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 + // socket associated with fd at the given socket level. + 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 ClockGetres(clockid int32, res *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 Close(fd int) (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 Getppid() (ppid int) + //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 Getsid(pid int) (sid int, err error) + //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 Mseal(b []byte, flags uint) (err error) +diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +index cf2ee6c7..745e5c7e 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go ++++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +@@ -182,3 +182,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error + } + return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) + } ++ ++const SYS_FSTATAT = SYS_NEWFSTATAT +diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +index 3d0e9845..dd2262a4 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go ++++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +@@ -214,3 +214,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error + } + return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) + } ++ ++const SYS_FSTATAT = SYS_NEWFSTATAT +diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +index 6f5a2889..8cf3670b 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go ++++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +@@ -187,3 +187,5 @@ func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error + } + return riscvHWProbe(pairs, setSize, set, flags) + } ++ ++const SYS_FSTATAT = SYS_NEWFSTATAT +diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go +index b25343c7..b86ded54 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go ++++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go +@@ -293,6 +293,7 @@ func Uname(uname *Utsname) error { + //sys Mkfifoat(dirfd int, path string, mode uint32) (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 Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) + //sys Nanosleep(time *Timespec, leftover *Timespec) (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) +diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go +index 77081de8..4e92e5aa 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_unix.go ++++ b/vendor/golang.org/x/sys/unix/syscall_unix.go +@@ -154,6 +154,15 @@ func Munmap(b []byte) (err error) { + 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) { + n, err = read(fd, p) + if raceenabled { +diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +index 27c41b6f..7bf5c04b 100644 +--- a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go ++++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +@@ -4,11 +4,21 @@ + + //go:build zos && s390x + ++// Many of the following syscalls are not available on all versions of z/OS. ++// Some missing calls have legacy implementations/simulations but others ++// will be missing completely. To achieve consistent failing behaviour on ++// legacy systems, we first test the function pointer via a safeloading ++// mechanism to see if the function exists on a given system. Then execution ++// is branched to either continue the function call, or return an error. ++ + package unix + + import ( + "bytes" + "fmt" ++ "os" ++ "reflect" ++ "regexp" + "runtime" + "sort" + "strings" +@@ -17,17 +27,205 @@ import ( + "unsafe" + ) + ++//go:noescape ++func initZosLibVec() ++ ++//go:noescape ++func GetZosLibVec() uintptr ++ ++func init() { ++ initZosLibVec() ++ r0, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS_____GETENV_A<<4, uintptr(unsafe.Pointer(&([]byte("__ZOS_XSYSTRACE\x00"))[0]))) ++ if r0 != 0 { ++ n, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___ATOI_A<<4, r0) ++ ZosTraceLevel = int(n) ++ r0, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS_____GETENV_A<<4, uintptr(unsafe.Pointer(&([]byte("__ZOS_XSYSTRACEFD\x00"))[0]))) ++ if r0 != 0 { ++ fd, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___ATOI_A<<4, r0) ++ f := os.NewFile(fd, "zostracefile") ++ if f != nil { ++ ZosTracefile = f ++ } ++ } ++ ++ } ++} ++ ++//go:noescape ++func CallLeFuncWithErr(funcdesc uintptr, parms ...uintptr) (ret, errno2 uintptr, err Errno) ++ ++//go:noescape ++func CallLeFuncWithPtrReturn(funcdesc uintptr, parms ...uintptr) (ret, errno2 uintptr, err Errno) ++ ++// ------------------------------- ++// pointer validity test ++// good pointer returns 0 ++// bad pointer returns 1 ++// ++//go:nosplit ++func ptrtest(uintptr) uint64 ++ ++// Load memory at ptr location with error handling if the location is invalid ++// ++//go:noescape ++func safeload(ptr uintptr) (value uintptr, error uintptr) ++ + const ( +- O_CLOEXEC = 0 // Dummy value (not supported). +- AF_LOCAL = AF_UNIX // AF_LOCAL is an alias for AF_UNIX ++ entrypointLocationOffset = 8 // From function descriptor ++ ++ xplinkEyecatcher = 0x00c300c500c500f1 // ".C.E.E.1" ++ eyecatcherOffset = 16 // From function entrypoint (negative) ++ ppa1LocationOffset = 8 // From function entrypoint (negative) ++ ++ nameLenOffset = 0x14 // From PPA1 start ++ nameOffset = 0x16 // From PPA1 start + ) + +-func syscall_syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) +-func syscall_rawsyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) +-func syscall_syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) +-func syscall_rawsyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) +-func syscall_syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) +-func syscall_rawsyscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) ++func getPpaOffset(funcptr uintptr) int64 { ++ entrypoint, err := safeload(funcptr + entrypointLocationOffset) ++ if err != 0 { ++ return -1 ++ } ++ ++ // XPLink functions have ".C.E.E.1" as the first 8 bytes (EBCDIC) ++ val, err := safeload(entrypoint - eyecatcherOffset) ++ if err != 0 { ++ return -1 ++ } ++ if val != xplinkEyecatcher { ++ return -1 ++ } ++ ++ ppaoff, err := safeload(entrypoint - ppa1LocationOffset) ++ if err != 0 { ++ return -1 ++ } ++ ++ ppaoff >>= 32 ++ return int64(ppaoff) ++} ++ ++//------------------------------- ++// function descriptor pointer validity test ++// good pointer returns 0 ++// bad pointer returns 1 ++ ++// TODO: currently mksyscall_zos_s390x.go generate empty string for funcName ++// have correct funcName pass to the funcptrtest function ++func funcptrtest(funcptr uintptr, funcName string) uint64 { ++ entrypoint, err := safeload(funcptr + entrypointLocationOffset) ++ if err != 0 { ++ return 1 ++ } ++ ++ ppaoff := getPpaOffset(funcptr) ++ if ppaoff == -1 { ++ return 1 ++ } ++ ++ // PPA1 offset value is from the start of the entire function block, not the entrypoint ++ ppa1 := (entrypoint - eyecatcherOffset) + uintptr(ppaoff) ++ ++ nameLen, err := safeload(ppa1 + nameLenOffset) ++ if err != 0 { ++ return 1 ++ } ++ ++ nameLen >>= 48 ++ if nameLen > 128 { ++ return 1 ++ } ++ ++ // no function name input to argument end here ++ if funcName == "" { ++ return 0 ++ } ++ ++ var funcname [128]byte ++ for i := 0; i < int(nameLen); i += 8 { ++ v, err := safeload(ppa1 + nameOffset + uintptr(i)) ++ if err != 0 { ++ return 1 ++ } ++ funcname[i] = byte(v >> 56) ++ funcname[i+1] = byte(v >> 48) ++ funcname[i+2] = byte(v >> 40) ++ funcname[i+3] = byte(v >> 32) ++ funcname[i+4] = byte(v >> 24) ++ funcname[i+5] = byte(v >> 16) ++ funcname[i+6] = byte(v >> 8) ++ funcname[i+7] = byte(v) ++ } ++ ++ runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, // __e2a_l ++ []uintptr{uintptr(unsafe.Pointer(&funcname[0])), nameLen}) ++ ++ name := string(funcname[:nameLen]) ++ if name != funcName { ++ return 1 ++ } ++ ++ return 0 ++} ++ ++// For detection of capabilities on a system. ++// Is function descriptor f a valid function? ++func isValidLeFunc(f uintptr) error { ++ ret := funcptrtest(f, "") ++ if ret != 0 { ++ return fmt.Errorf("Bad pointer, not an LE function ") ++ } ++ return nil ++} ++ ++// Retrieve function name from descriptor ++func getLeFuncName(f uintptr) (string, error) { ++ // assume it has been checked, only check ppa1 validity here ++ entry := ((*[2]uintptr)(unsafe.Pointer(f)))[1] ++ preamp := ((*[4]uint32)(unsafe.Pointer(entry - eyecatcherOffset))) ++ ++ offsetPpa1 := preamp[2] ++ if offsetPpa1 > 0x0ffff { ++ return "", fmt.Errorf("PPA1 offset seems too big 0x%x\n", offsetPpa1) ++ } ++ ++ ppa1 := uintptr(unsafe.Pointer(preamp)) + uintptr(offsetPpa1) ++ res := ptrtest(ppa1) ++ if res != 0 { ++ return "", fmt.Errorf("PPA1 address not valid") ++ } ++ ++ size := *(*uint16)(unsafe.Pointer(ppa1 + nameLenOffset)) ++ if size > 128 { ++ return "", fmt.Errorf("Function name seems too long, length=%d\n", size) ++ } ++ ++ var name [128]byte ++ funcname := (*[128]byte)(unsafe.Pointer(ppa1 + nameOffset)) ++ copy(name[0:size], funcname[0:size]) ++ ++ runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, // __e2a_l ++ []uintptr{uintptr(unsafe.Pointer(&name[0])), uintptr(size)}) ++ ++ return string(name[:size]), nil ++} ++ ++// Check z/OS version ++func zosLeVersion() (version, release uint32) { ++ p1 := (*(*uintptr)(unsafe.Pointer(uintptr(1208)))) >> 32 ++ p1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 88))) ++ p1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 8))) ++ p1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 984))) ++ vrm := *(*uint32)(unsafe.Pointer(p1 + 80)) ++ version = (vrm & 0x00ff0000) >> 16 ++ release = (vrm & 0x0000ff00) >> 8 ++ return ++} ++ ++// returns a zos C FILE * for stdio fd 0, 1, 2 ++func ZosStdioFilep(fd int32) uintptr { ++ return uintptr(*(*uint64)(unsafe.Pointer(uintptr(*(*uint64)(unsafe.Pointer(uintptr(*(*uint64)(unsafe.Pointer(uintptr(uint64(*(*uint32)(unsafe.Pointer(uintptr(1208)))) + 80))) + uint64((fd+2)<<3)))))))) ++} + + func copyStat(stat *Stat_t, statLE *Stat_LE_t) { + stat.Dev = uint64(statLE.Dev) +@@ -65,6 +263,21 @@ func (d *Dirent) NameString() string { + } + } + ++func DecodeData(dest []byte, sz int, val uint64) { ++ for i := 0; i < sz; i++ { ++ dest[sz-1-i] = byte((val >> (uint64(i * 8))) & 0xff) ++ } ++} ++ ++func EncodeData(data []byte) uint64 { ++ var value uint64 ++ sz := len(data) ++ for i := 0; i < sz; i++ { ++ value |= uint64(data[i]) << uint64(((sz - i - 1) * 8)) ++ } ++ return value ++} ++ + func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL +@@ -74,7 +287,9 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) +- sa.raw.Addr = sa.Addr ++ for i := 0; i < len(sa.Addr); i++ { ++ sa.raw.Addr[i] = sa.Addr[i] ++ } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil + } + +@@ -88,7 +303,9 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId +- sa.raw.Addr = sa.Addr ++ for i := 0; i < len(sa.Addr); i++ { ++ sa.raw.Addr[i] = sa.Addr[i] ++ } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil + } + +@@ -146,7 +363,9 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) { + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) +- sa.Addr = pp.Addr ++ for i := 0; i < len(sa.Addr); i++ { ++ sa.Addr[i] = pp.Addr[i] ++ } + return sa, nil + + case AF_INET6: +@@ -155,7 +374,9 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) { + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id +- sa.Addr = pp.Addr ++ for i := 0; i < len(sa.Addr); i++ { ++ sa.Addr[i] = pp.Addr[i] ++ } + return sa, nil + } + return nil, EAFNOSUPPORT +@@ -177,6 +398,43 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) { + return + } + ++func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) { ++ var rsa RawSockaddrAny ++ var len _Socklen = SizeofSockaddrAny ++ nfd, err = accept4(fd, &rsa, &len, flags) ++ if err != nil { ++ return ++ } ++ if len > SizeofSockaddrAny { ++ panic("RawSockaddrAny too small") ++ } ++ // TODO(neeilan): Remove 0 in call ++ sa, err = anyToSockaddr(0, &rsa) ++ if err != nil { ++ Close(nfd) ++ nfd = 0 ++ } ++ return ++} ++ ++func Ctermid() (tty string, err error) { ++ var termdev [1025]byte ++ runtime.EnterSyscall() ++ r0, err2, err1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___CTERMID_A<<4, uintptr(unsafe.Pointer(&termdev[0]))) ++ runtime.ExitSyscall() ++ if r0 == 0 { ++ return "", fmt.Errorf("%s (errno2=0x%x)\n", err1.Error(), err2) ++ } ++ s := string(termdev[:]) ++ idx := strings.Index(s, string(rune(0))) ++ if idx == -1 { ++ tty = s ++ } else { ++ tty = s[:idx] ++ } ++ return ++} ++ + func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) + } +@@ -190,10 +448,16 @@ func (cmsg *Cmsghdr) SetLen(length int) { + } + + //sys fcntl(fd int, cmd int, arg int) (val int, err error) ++//sys Flistxattr(fd int, dest []byte) (sz int, err error) = SYS___FLISTXATTR_A ++//sys Fremovexattr(fd int, attr string) (err error) = SYS___FREMOVEXATTR_A + //sys read(fd int, p []byte) (n int, err error) + //sys write(fd int, p []byte) (n int, err error) + ++//sys Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) = SYS___FGETXATTR_A ++//sys Fsetxattr(fd int, attr string, data []byte, flag int) (err error) = SYS___FSETXATTR_A ++ + //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = SYS___ACCEPT_A ++//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = SYS___ACCEPT4_A + //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___BIND_A + //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___CONNECT_A + //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +@@ -204,6 +468,7 @@ func (cmsg *Cmsghdr) SetLen(length int) { + //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) + //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETPEERNAME_A + //sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETSOCKNAME_A ++//sys Removexattr(path string, attr string) (err error) = SYS___REMOVEXATTR_A + //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = SYS___RECVFROM_A + //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = SYS___SENDTO_A + //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___RECVMSG_A +@@ -212,6 +477,10 @@ func (cmsg *Cmsghdr) SetLen(length int) { + //sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP + //sys ioctl(fd int, req int, arg uintptr) (err error) = SYS_IOCTL + //sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = SYS_IOCTL ++//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) = SYS_SHMAT ++//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) = SYS_SHMCTL64 ++//sys shmdt(addr uintptr) (err error) = SYS_SHMDT ++//sys shmget(key int, size int, flag int) (id int, err error) = SYS_SHMGET + + //sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A + //sys Chdir(path string) (err error) = SYS___CHDIR_A +@@ -220,14 +489,31 @@ func (cmsg *Cmsghdr) SetLen(length int) { + //sys Creat(path string, mode uint32) (fd int, err error) = SYS___CREAT_A + //sys Dup(oldfd int) (fd int, err error) + //sys Dup2(oldfd int, newfd int) (err error) ++//sys Dup3(oldfd int, newfd int, flags int) (err error) = SYS_DUP3 ++//sys Dirfd(dirp uintptr) (fd int, err error) = SYS_DIRFD ++//sys EpollCreate(size int) (fd int, err error) = SYS_EPOLL_CREATE ++//sys EpollCreate1(flags int) (fd int, err error) = SYS_EPOLL_CREATE1 ++//sys EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) = SYS_EPOLL_CTL ++//sys EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) = SYS_EPOLL_PWAIT ++//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_WAIT + //sys Errno2() (er2 int) = SYS___ERRNO2 +-//sys Err2ad() (eadd *int) = SYS___ERR2AD ++//sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD + //sys Exit(code int) ++//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) = SYS___FACCESSAT_A ++ ++func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) { ++ return Faccessat(dirfd, path, mode, flags) ++} ++ + //sys Fchdir(fd int) (err error) + //sys Fchmod(fd int, mode uint32) (err error) ++//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) = SYS___FCHMODAT_A + //sys Fchown(fd int, uid int, gid int) (err error) ++//sys Fchownat(fd int, path string, uid int, gid int, flags int) (err error) = SYS___FCHOWNAT_A + //sys FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) = SYS_FCNTL ++//sys Fdatasync(fd int) (err error) = SYS_FDATASYNC + //sys fstat(fd int, stat *Stat_LE_t) (err error) ++//sys fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) = SYS___FSTATAT_A + + func Fstat(fd int, stat *Stat_t) (err error) { + var statLE Stat_LE_t +@@ -236,28 +522,208 @@ func Fstat(fd int, stat *Stat_t) (err error) { + return + } + ++func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { ++ var statLE Stat_LE_t ++ err = fstatat(dirfd, path, &statLE, flags) ++ copyStat(stat, &statLE) ++ return ++} ++ ++func impl_Getxattr(path string, attr string, dest []byte) (sz int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(attr) ++ if err != nil { ++ return ++ } ++ var _p2 unsafe.Pointer ++ if len(dest) > 0 { ++ _p2 = unsafe.Pointer(&dest[0]) ++ } else { ++ _p2 = unsafe.Pointer(&_zero) ++ } ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest))) ++ sz = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_GetxattrAddr() *(func(path string, attr string, dest []byte) (sz int, err error)) ++ ++var Getxattr = enter_Getxattr ++ ++func enter_Getxattr(path string, attr string, dest []byte) (sz int, err error) { ++ funcref := get_GetxattrAddr() ++ if validGetxattr() { ++ *funcref = impl_Getxattr ++ } else { ++ *funcref = error_Getxattr ++ } ++ return (*funcref)(path, attr, dest) ++} ++ ++func error_Getxattr(path string, attr string, dest []byte) (sz int, err error) { ++ return -1, ENOSYS ++} ++ ++func validGetxattr() bool { ++ if funcptrtest(GetZosLibVec()+SYS___GETXATTR_A<<4, "") == 0 { ++ if name, err := getLeFuncName(GetZosLibVec() + SYS___GETXATTR_A<<4); err == nil { ++ return name == "__getxattr_a" ++ } ++ } ++ return false ++} ++ ++//sys Lgetxattr(link string, attr string, dest []byte) (sz int, err error) = SYS___LGETXATTR_A ++//sys Lsetxattr(path string, attr string, data []byte, flags int) (err error) = SYS___LSETXATTR_A ++ ++func impl_Setxattr(path string, attr string, data []byte, flags int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(attr) ++ if err != nil { ++ return ++ } ++ var _p2 unsafe.Pointer ++ if len(data) > 0 { ++ _p2 = unsafe.Pointer(&data[0]) ++ } else { ++ _p2 = unsafe.Pointer(&_zero) ++ } ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags)) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_SetxattrAddr() *(func(path string, attr string, data []byte, flags int) (err error)) ++ ++var Setxattr = enter_Setxattr ++ ++func enter_Setxattr(path string, attr string, data []byte, flags int) (err error) { ++ funcref := get_SetxattrAddr() ++ if validSetxattr() { ++ *funcref = impl_Setxattr ++ } else { ++ *funcref = error_Setxattr ++ } ++ return (*funcref)(path, attr, data, flags) ++} ++ ++func error_Setxattr(path string, attr string, data []byte, flags int) (err error) { ++ return ENOSYS ++} ++ ++func validSetxattr() bool { ++ if funcptrtest(GetZosLibVec()+SYS___SETXATTR_A<<4, "") == 0 { ++ if name, err := getLeFuncName(GetZosLibVec() + SYS___SETXATTR_A<<4); err == nil { ++ return name == "__setxattr_a" ++ } ++ } ++ return false ++} ++ ++//sys Fstatfs(fd int, buf *Statfs_t) (err error) = SYS_FSTATFS + //sys Fstatvfs(fd int, stat *Statvfs_t) (err error) = SYS_FSTATVFS + //sys Fsync(fd int) (err error) ++//sys Futimes(fd int, tv []Timeval) (err error) = SYS_FUTIMES ++//sys Futimesat(dirfd int, path string, tv []Timeval) (err error) = SYS___FUTIMESAT_A + //sys Ftruncate(fd int, length int64) (err error) +-//sys Getpagesize() (pgsize int) = SYS_GETPAGESIZE ++//sys Getrandom(buf []byte, flags int) (n int, err error) = SYS_GETRANDOM ++//sys InotifyInit() (fd int, err error) = SYS_INOTIFY_INIT ++//sys InotifyInit1(flags int) (fd int, err error) = SYS_INOTIFY_INIT1 ++//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) = SYS___INOTIFY_ADD_WATCH_A ++//sys InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) = SYS_INOTIFY_RM_WATCH ++//sys Listxattr(path string, dest []byte) (sz int, err error) = SYS___LISTXATTR_A ++//sys Llistxattr(path string, dest []byte) (sz int, err error) = SYS___LLISTXATTR_A ++//sys Lremovexattr(path string, attr string) (err error) = SYS___LREMOVEXATTR_A ++//sys Lutimes(path string, tv []Timeval) (err error) = SYS___LUTIMES_A + //sys Mprotect(b []byte, prot int) (err error) = SYS_MPROTECT + //sys Msync(b []byte, flags int) (err error) = SYS_MSYNC ++//sys Console2(cmsg *ConsMsg2, modstr *byte, concmd *uint32) (err error) = SYS___CONSOLE2 ++ ++// Pipe2 begin ++ ++//go:nosplit ++func getPipe2Addr() *(func([]int, int) error) ++ ++var Pipe2 = pipe2Enter ++ ++func pipe2Enter(p []int, flags int) (err error) { ++ if funcptrtest(GetZosLibVec()+SYS_PIPE2<<4, "") == 0 { ++ *getPipe2Addr() = pipe2Impl ++ } else { ++ *getPipe2Addr() = pipe2Error ++ } ++ return (*getPipe2Addr())(p, flags) ++} ++ ++func pipe2Impl(p []int, flags int) (err error) { ++ var pp [2]_C_int ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PIPE2<<4, uintptr(unsafe.Pointer(&pp[0])), uintptr(flags)) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } else { ++ p[0] = int(pp[0]) ++ p[1] = int(pp[1]) ++ } ++ return ++} ++func pipe2Error(p []int, flags int) (err error) { ++ return fmt.Errorf("Pipe2 is not available on this system") ++} ++ ++// Pipe2 end ++ + //sys Poll(fds []PollFd, timeout int) (n int, err error) = SYS_POLL ++ ++func Readdir(dir uintptr) (dirent *Dirent, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READDIR_A<<4, uintptr(dir)) ++ runtime.ExitSyscall() ++ dirent = (*Dirent)(unsafe.Pointer(r0)) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//sys Readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) = SYS___READDIR_R_A ++//sys Statfs(path string, buf *Statfs_t) (err error) = SYS___STATFS_A ++//sys Syncfs(fd int) (err error) = SYS_SYNCFS + //sys Times(tms *Tms) (ticks uintptr, err error) = SYS_TIMES + //sys W_Getmntent(buff *byte, size int) (lastsys int, err error) = SYS_W_GETMNTENT + //sys W_Getmntent_A(buff *byte, size int) (lastsys int, err error) = SYS___W_GETMNTENT_A + + //sys mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) = SYS___MOUNT_A +-//sys unmount(filesystem string, mtm int) (err error) = SYS___UMOUNT_A ++//sys unmount_LE(filesystem string, mtm int) (err error) = SYS___UMOUNT_A + //sys Chroot(path string) (err error) = SYS___CHROOT_A + //sys Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) = SYS_SELECT +-//sysnb Uname(buf *Utsname) (err error) = SYS___UNAME_A ++//sysnb Uname(buf *Utsname) (err error) = SYS_____OSNAME_A ++//sys Unshare(flags int) (err error) = SYS_UNSHARE + + func Ptsname(fd int) (name string, err error) { +- r0, _, e1 := syscall_syscall(SYS___PTSNAME_A, uintptr(fd), 0, 0) +- name = u2s(unsafe.Pointer(r0)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___PTSNAME_A<<4, uintptr(fd)) ++ runtime.ExitSyscall() ++ if r0 == 0 { ++ err = errnoErr2(e1, e2) ++ } else { ++ name = u2s(unsafe.Pointer(r0)) + } + return + } +@@ -272,13 +738,19 @@ func u2s(cstr unsafe.Pointer) string { + } + + func Close(fd int) (err error) { +- _, _, e1 := syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSE<<4, uintptr(fd)) ++ runtime.ExitSyscall() + for i := 0; e1 == EAGAIN && i < 10; i++ { +- _, _, _ = syscall_syscall(SYS_USLEEP, uintptr(10), 0, 0) +- _, _, e1 = syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0) ++ runtime.EnterSyscall() ++ CallLeFuncWithErr(GetZosLibVec()+SYS_USLEEP<<4, uintptr(10)) ++ runtime.ExitSyscall() ++ runtime.EnterSyscall() ++ r0, e2, e1 = CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSE<<4, uintptr(fd)) ++ runtime.ExitSyscall() + } +- if e1 != 0 { +- err = errnoErr(e1) ++ if r0 != 0 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -288,9 +760,24 @@ func Madvise(b []byte, advice int) (err error) { + return + } + ++func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { ++ return mapper.Mmap(fd, offset, length, prot, flags) ++} ++ ++func Munmap(b []byte) (err error) { ++ 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 +-//sysnb Getegid() (egid int) +-//sysnb Geteuid() (uid int) + //sysnb Getgid() (gid int) + //sysnb Getpid() (pid int) + //sysnb Getpgid(pid int) (pgid int, err error) = SYS_GETPGID +@@ -317,11 +804,14 @@ func Getrusage(who int, rusage *Rusage) (err error) { + return + } + ++//sys Getegid() (egid int) = SYS_GETEGID ++//sys Geteuid() (euid int) = SYS_GETEUID + //sysnb Getsid(pid int) (sid int, err error) = SYS_GETSID + //sysnb Getuid() (uid int) + //sysnb Kill(pid int, sig Signal) (err error) + //sys Lchown(path string, uid int, gid int) (err error) = SYS___LCHOWN_A + //sys Link(path string, link string) (err error) = SYS___LINK_A ++//sys Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) = SYS___LINKAT_A + //sys Listen(s int, n int) (err error) + //sys lstat(path string, stat *Stat_LE_t) (err error) = SYS___LSTAT_A + +@@ -332,15 +822,150 @@ func Lstat(path string, stat *Stat_t) (err error) { + return + } + ++// for checking symlinks begins with $VERSION/ $SYSNAME/ $SYSSYMR/ $SYSSYMA/ ++func isSpecialPath(path []byte) (v bool) { ++ var special = [4][8]byte{ ++ {'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'}, ++ {'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'}, ++ {'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'}, ++ {'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}} ++ ++ var i, j int ++ for i = 0; i < len(special); i++ { ++ for j = 0; j < len(special[i]); j++ { ++ if path[j] != special[i][j] { ++ break ++ } ++ } ++ if j == len(special[i]) { ++ return true ++ } ++ } ++ return false ++} ++ ++func realpath(srcpath string, abspath []byte) (pathlen int, errno int) { ++ var source [1024]byte ++ copy(source[:], srcpath) ++ source[len(srcpath)] = 0 ++ ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___REALPATH_A<<4, //__realpath_a() ++ []uintptr{uintptr(unsafe.Pointer(&source[0])), ++ uintptr(unsafe.Pointer(&abspath[0]))}) ++ if ret != 0 { ++ index := bytes.IndexByte(abspath[:], byte(0)) ++ if index != -1 { ++ return index, 0 ++ } ++ } else { ++ errptr := (*int)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, []uintptr{}))) //__errno() ++ return 0, *errptr ++ } ++ return 0, 245 // EBADDATA 245 ++} ++ ++func Readlink(path string, buf []byte) (n int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 unsafe.Pointer ++ if len(buf) > 0 { ++ _p1 = unsafe.Pointer(&buf[0]) ++ } else { ++ _p1 = unsafe.Pointer(&_zero) ++ } ++ n = int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___READLINK_A<<4, ++ []uintptr{uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))})) ++ runtime.KeepAlive(unsafe.Pointer(_p0)) ++ if n == -1 { ++ value := *(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, []uintptr{}))) ++ err = errnoErr(Errno(value)) ++ } else { ++ if buf[0] == '$' { ++ if isSpecialPath(buf[1:9]) { ++ cnt, err1 := realpath(path, buf) ++ if err1 == 0 { ++ n = cnt ++ } ++ } ++ } ++ } ++ return ++} ++ ++func impl_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 unsafe.Pointer ++ if len(buf) > 0 { ++ _p1 = unsafe.Pointer(&buf[0]) ++ } else { ++ _p1 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READLINKAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) ++ runtime.ExitSyscall() ++ n = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ return n, err ++ } else { ++ if buf[0] == '$' { ++ if isSpecialPath(buf[1:9]) { ++ cnt, err1 := realpath(path, buf) ++ if err1 == 0 { ++ n = cnt ++ } ++ } ++ } ++ } ++ return ++} ++ ++//go:nosplit ++func get_ReadlinkatAddr() *(func(dirfd int, path string, buf []byte) (n int, err error)) ++ ++var Readlinkat = enter_Readlinkat ++ ++func enter_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { ++ funcref := get_ReadlinkatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___READLINKAT_A<<4, "") == 0 { ++ *funcref = impl_Readlinkat ++ } else { ++ *funcref = error_Readlinkat ++ } ++ return (*funcref)(dirfd, path, buf) ++} ++ ++func error_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { ++ n = -1 ++ err = ENOSYS ++ return ++} ++ + //sys Mkdir(path string, mode uint32) (err error) = SYS___MKDIR_A ++//sys Mkdirat(dirfd int, path string, mode uint32) (err error) = SYS___MKDIRAT_A + //sys Mkfifo(path string, mode uint32) (err error) = SYS___MKFIFO_A + //sys Mknod(path string, mode uint32, dev int) (err error) = SYS___MKNOD_A ++//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) = SYS___MKNODAT_A ++//sys PivotRoot(newroot string, oldroot string) (err error) = SYS___PIVOT_ROOT_A + //sys Pread(fd int, p []byte, offset int64) (n int, err error) + //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +-//sys Readlink(path string, buf []byte) (n int, err error) = SYS___READLINK_A ++//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) = SYS___PRCTL_A ++//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT + //sys Rename(from string, to string) (err error) = SYS___RENAME_A ++//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) = SYS___RENAMEAT_A ++//sys Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) = SYS___RENAMEAT2_A + //sys Rmdir(path string) (err error) = SYS___RMDIR_A + //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK ++//sys Setegid(egid int) (err error) = SYS_SETEGID ++//sys Seteuid(euid int) (err error) = SYS_SETEUID ++//sys Sethostname(p []byte) (err error) = SYS___SETHOSTNAME_A ++//sys Setns(fd int, nstype int) (err error) = SYS_SETNS + //sys Setpriority(which int, who int, prio int) (err error) + //sysnb Setpgid(pid int, pgid int) (err error) = SYS_SETPGID + //sysnb Setrlimit(resource int, lim *Rlimit) (err error) +@@ -360,32 +985,57 @@ func Stat(path string, sta *Stat_t) (err error) { + } + + //sys Symlink(path string, link string) (err error) = SYS___SYMLINK_A ++//sys Symlinkat(oldPath string, dirfd int, newPath string) (err error) = SYS___SYMLINKAT_A + //sys Sync() = SYS_SYNC + //sys Truncate(path string, length int64) (err error) = SYS___TRUNCATE_A + //sys Tcgetattr(fildes int, termptr *Termios) (err error) = SYS_TCGETATTR + //sys Tcsetattr(fildes int, when int, termptr *Termios) (err error) = SYS_TCSETATTR + //sys Umask(mask int) (oldmask int) + //sys Unlink(path string) (err error) = SYS___UNLINK_A ++//sys Unlinkat(dirfd int, path string, flags int) (err error) = SYS___UNLINKAT_A + //sys Utime(path string, utim *Utimbuf) (err error) = SYS___UTIME_A + + //sys open(path string, mode int, perm uint32) (fd int, err error) = SYS___OPEN_A + + func Open(path string, mode int, perm uint32) (fd int, err error) { ++ if mode&O_ACCMODE == 0 { ++ mode |= O_RDONLY ++ } + return open(path, mode, perm) + } + +-func Mkfifoat(dirfd int, path string, mode uint32) (err error) { +- wd, err := Getwd() +- if err != nil { +- return err ++//sys openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) = SYS___OPENAT_A ++ ++func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { ++ if flags&O_ACCMODE == 0 { ++ flags |= O_RDONLY + } ++ return openat(dirfd, path, flags, mode) ++} + +- if err := Fchdir(dirfd); err != nil { +- return err ++//sys openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) = SYS___OPENAT2_A ++ ++func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) { ++ if how.Flags&O_ACCMODE == 0 { ++ how.Flags |= O_RDONLY + } +- defer Chdir(wd) ++ return openat2(dirfd, path, how, SizeofOpenHow) ++} + +- return Mkfifo(path, mode) ++func ZosFdToPath(dirfd int) (path string, err error) { ++ var buffer [1024]byte ++ runtime.EnterSyscall() ++ ret, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_W_IOCTL<<4, uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))) ++ runtime.ExitSyscall() ++ if ret == 0 { ++ zb := bytes.IndexByte(buffer[:], 0) ++ if zb == -1 { ++ zb = len(buffer) ++ } ++ CallLeFuncWithErr(GetZosLibVec()+SYS___E2A_L<<4, uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)) ++ return string(buffer[:zb]), nil ++ } ++ return "", errnoErr2(e1, e2) + } + + //sys remove(path string) (err error) +@@ -403,10 +1053,12 @@ func Getcwd(buf []byte) (n int, err error) { + } else { + p = unsafe.Pointer(&_zero) + } +- _, _, e := syscall_syscall(SYS___GETCWD_A, uintptr(p), uintptr(len(buf)), 0) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___GETCWD_A<<4, uintptr(p), uintptr(len(buf))) ++ runtime.ExitSyscall() + n = clen(buf) + 1 +- if e != 0 { +- err = errnoErr(e) ++ if r0 == 0 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -520,9 +1172,41 @@ func (w WaitStatus) StopSignal() Signal { + + func (w WaitStatus) TrapCause() int { return -1 } + ++//sys waitid(idType int, id int, info *Siginfo, options int) (err error) ++ ++func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) { ++ return waitid(idType, id, info, options) ++} ++ + //sys waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) + +-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { ++func impl_Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAIT4<<4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage))) ++ runtime.ExitSyscall() ++ wpid = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_Wait4Addr() *(func(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)) ++ ++var Wait4 = enter_Wait4 ++ ++func enter_Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { ++ funcref := get_Wait4Addr() ++ if funcptrtest(GetZosLibVec()+SYS_WAIT4<<4, "") == 0 { ++ *funcref = impl_Wait4 ++ } else { ++ *funcref = legacyWait4 ++ } ++ return (*funcref)(pid, wstatus, options, rusage) ++} ++ ++func legacyWait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + // TODO(mundaym): z/OS doesn't have wait4. I don't think getrusage does what we want. + // At the moment rusage will not be touched. + var status _C_int +@@ -571,23 +1255,62 @@ func Pipe(p []int) (err error) { + } + var pp [2]_C_int + err = pipe(&pp) +- if err == nil { +- p[0] = int(pp[0]) +- p[1] = int(pp[1]) +- } ++ p[0] = int(pp[0]) ++ p[1] = int(pp[1]) + return + } + + //sys utimes(path string, timeval *[2]Timeval) (err error) = SYS___UTIMES_A + + func Utimes(path string, tv []Timeval) (err error) { ++ if tv == nil { ++ return utimes(path, nil) ++ } + if len(tv) != 2 { + return EINVAL + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) + } + +-func UtimesNano(path string, ts []Timespec) error { ++//sys utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) = SYS___UTIMENSAT_A ++ ++func validUtimensat() bool { ++ if funcptrtest(GetZosLibVec()+SYS___UTIMENSAT_A<<4, "") == 0 { ++ if name, err := getLeFuncName(GetZosLibVec() + SYS___UTIMENSAT_A<<4); err == nil { ++ return name == "__utimensat_a" ++ } ++ } ++ return false ++} ++ ++// Begin UtimesNano ++ ++//go:nosplit ++func get_UtimesNanoAddr() *(func(path string, ts []Timespec) (err error)) ++ ++var UtimesNano = enter_UtimesNano ++ ++func enter_UtimesNano(path string, ts []Timespec) (err error) { ++ funcref := get_UtimesNanoAddr() ++ if validUtimensat() { ++ *funcref = utimesNanoImpl ++ } else { ++ *funcref = legacyUtimesNano ++ } ++ return (*funcref)(path, ts) ++} ++ ++func utimesNanoImpl(path string, ts []Timespec) (err error) { ++ if ts == nil { ++ return utimensat(AT_FDCWD, path, nil, 0) ++ } ++ if len(ts) != 2 { ++ return EINVAL ++ } ++ return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) ++} ++ ++func legacyUtimesNano(path string, ts []Timespec) (err error) { + if len(ts) != 2 { + return EINVAL + } +@@ -600,6 +1323,70 @@ func UtimesNano(path string, ts []Timespec) error { + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) + } + ++// End UtimesNano ++ ++// Begin UtimesNanoAt ++ ++//go:nosplit ++func get_UtimesNanoAtAddr() *(func(dirfd int, path string, ts []Timespec, flags int) (err error)) ++ ++var UtimesNanoAt = enter_UtimesNanoAt ++ ++func enter_UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) (err error) { ++ funcref := get_UtimesNanoAtAddr() ++ if validUtimensat() { ++ *funcref = utimesNanoAtImpl ++ } else { ++ *funcref = legacyUtimesNanoAt ++ } ++ return (*funcref)(dirfd, path, ts, flags) ++} ++ ++func utimesNanoAtImpl(dirfd int, path string, ts []Timespec, flags int) (err error) { ++ if ts == nil { ++ return utimensat(dirfd, path, nil, flags) ++ } ++ if len(ts) != 2 { ++ return EINVAL ++ } ++ return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) ++} ++ ++func legacyUtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) (err error) { ++ if path[0] != '/' { ++ dirPath, err := ZosFdToPath(dirfd) ++ if err != nil { ++ return err ++ } ++ path = dirPath + "/" + path ++ } ++ if flags == AT_SYMLINK_NOFOLLOW { ++ if len(ts) != 2 { ++ return EINVAL ++ } ++ ++ if ts[0].Nsec >= 5e8 { ++ ts[0].Sec++ ++ } ++ ts[0].Nsec = 0 ++ if ts[1].Nsec >= 5e8 { ++ ts[1].Sec++ ++ } ++ ts[1].Nsec = 0 ++ ++ // Not as efficient as it could be because Timespec and ++ // Timeval have different types in the different OSes ++ tv := []Timeval{ ++ NsecToTimeval(TimespecToNsec(ts[0])), ++ NsecToTimeval(TimespecToNsec(ts[1])), ++ } ++ return Lutimes(path, tv) ++ } ++ return UtimesNano(path, ts) ++} ++ ++// End UtimesNanoAt ++ + func Getsockname(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny +@@ -1191,10 +1978,13 @@ func Opendir(name string) (uintptr, error) { + if err != nil { + return 0, err + } +- dir, _, e := syscall_syscall(SYS___OPENDIR_A, uintptr(unsafe.Pointer(p)), 0, 0) ++ err = nil ++ runtime.EnterSyscall() ++ dir, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___OPENDIR_A<<4, uintptr(unsafe.Pointer(p))) ++ runtime.ExitSyscall() + runtime.KeepAlive(unsafe.Pointer(p)) +- if e != 0 { +- err = errnoErr(e) ++ if dir == 0 { ++ err = errnoErr2(e1, e2) + } + return dir, err + } +@@ -1202,51 +1992,27 @@ func Opendir(name string) (uintptr, error) { + // clearsyscall.Errno resets the errno value to 0. + func clearErrno() + +-func Readdir(dir uintptr) (*Dirent, error) { +- var ent Dirent +- var res uintptr +- // __readdir_r_a returns errno at the end of the directory stream, rather than 0. +- // Therefore to avoid false positives we clear errno before calling it. +- +- // TODO(neeilan): Commented this out to get sys/unix compiling on z/OS. Uncomment and fix. Error: "undefined: clearsyscall" +- //clearsyscall.Errno() // TODO(mundaym): check pre-emption rules. +- +- e, _, _ := syscall_syscall(SYS___READDIR_R_A, dir, uintptr(unsafe.Pointer(&ent)), uintptr(unsafe.Pointer(&res))) +- var err error +- if e != 0 { +- err = errnoErr(Errno(e)) +- } +- if res == 0 { +- return nil, err +- } +- return &ent, err +-} +- +-func readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) { +- r0, _, e1 := syscall_syscall(SYS___READDIR_R_A, dirp, uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) +- if int64(r0) == -1 { +- err = errnoErr(Errno(e1)) +- } +- return +-} +- + func Closedir(dir uintptr) error { +- _, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0) +- if e != 0 { +- return errnoErr(e) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSEDIR<<4, dir) ++ runtime.ExitSyscall() ++ if r0 != 0 { ++ return errnoErr2(e1, e2) + } + return nil + } + + func Seekdir(dir uintptr, pos int) { +- _, _, _ = syscall_syscall(SYS_SEEKDIR, dir, uintptr(pos), 0) ++ runtime.EnterSyscall() ++ CallLeFuncWithErr(GetZosLibVec()+SYS_SEEKDIR<<4, dir, uintptr(pos)) ++ runtime.ExitSyscall() + } + + func Telldir(dir uintptr) (int, error) { +- p, _, e := syscall_syscall(SYS_TELLDIR, dir, 0, 0) ++ p, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TELLDIR<<4, dir) + pos := int(p) +- if pos == -1 { +- return pos, errnoErr(e) ++ if int64(p) == -1 { ++ return pos, errnoErr2(e1, e2) + } + return pos, nil + } +@@ -1261,19 +2027,55 @@ func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { + *(*int64)(unsafe.Pointer(&flock[4])) = lk.Start + *(*int64)(unsafe.Pointer(&flock[12])) = lk.Len + *(*int32)(unsafe.Pointer(&flock[20])) = lk.Pid +- _, _, errno := syscall_syscall(SYS_FCNTL, fd, uintptr(cmd), uintptr(unsafe.Pointer(&flock))) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, fd, uintptr(cmd), uintptr(unsafe.Pointer(&flock))) ++ runtime.ExitSyscall() + lk.Type = *(*int16)(unsafe.Pointer(&flock[0])) + lk.Whence = *(*int16)(unsafe.Pointer(&flock[2])) + lk.Start = *(*int64)(unsafe.Pointer(&flock[4])) + lk.Len = *(*int64)(unsafe.Pointer(&flock[12])) + lk.Pid = *(*int32)(unsafe.Pointer(&flock[20])) +- if errno == 0 { ++ if r0 == 0 { + return nil + } +- return errno ++ return errnoErr2(e1, e2) ++} ++ ++func impl_Flock(fd int, how int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FLOCK<<4, uintptr(fd), uintptr(how)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FlockAddr() *(func(fd int, how int) (err error)) ++ ++var Flock = enter_Flock ++ ++func validFlock(fp uintptr) bool { ++ if funcptrtest(GetZosLibVec()+SYS_FLOCK<<4, "") == 0 { ++ if name, err := getLeFuncName(GetZosLibVec() + SYS_FLOCK<<4); err == nil { ++ return name == "flock" ++ } ++ } ++ return false ++} ++ ++func enter_Flock(fd int, how int) (err error) { ++ funcref := get_FlockAddr() ++ if validFlock(GetZosLibVec() + SYS_FLOCK<<4) { ++ *funcref = impl_Flock ++ } else { ++ *funcref = legacyFlock ++ } ++ return (*funcref)(fd, how) + } + +-func Flock(fd int, how int) error { ++func legacyFlock(fd int, how int) error { + + var flock_type int16 + var fcntl_cmd int +@@ -1307,41 +2109,51 @@ func Flock(fd int, how int) error { + } + + func Mlock(b []byte) (err error) { +- _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP) ++ runtime.ExitSyscall() ++ if r0 != 0 { ++ err = errnoErr2(e1, e2) + } + return + } + + func Mlock2(b []byte, flags int) (err error) { +- _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP) ++ runtime.ExitSyscall() ++ if r0 != 0 { ++ err = errnoErr2(e1, e2) + } + return + } + + func Mlockall(flags int) (err error) { +- _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP) ++ runtime.ExitSyscall() ++ if r0 != 0 { ++ err = errnoErr2(e1, e2) + } + return + } + + func Munlock(b []byte) (err error) { +- _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_SWAP) ++ runtime.ExitSyscall() ++ if r0 != 0 { ++ err = errnoErr2(e1, e2) + } + return + } + + func Munlockall() (err error) { +- _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_SWAP) ++ runtime.ExitSyscall() ++ if r0 != 0 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1367,20 +2179,109 @@ func ClockGettime(clockid int32, ts *Timespec) error { + ts.Sec = int64(tm.Utime / ticks_per_sec) + ts.Nsec = int64(tm.Utime) * nsec_per_sec / int64(ticks_per_sec) + } else { +- return EINVAL ++ return EINVAL ++ } ++ return nil ++} ++ ++// Chtag ++ ++//go:nosplit ++func get_ChtagAddr() *(func(path string, ccsid uint64, textbit uint64) error) ++ ++var Chtag = enter_Chtag ++ ++func enter_Chtag(path string, ccsid uint64, textbit uint64) error { ++ funcref := get_ChtagAddr() ++ if validSetxattr() { ++ *funcref = impl_Chtag ++ } else { ++ *funcref = legacy_Chtag ++ } ++ return (*funcref)(path, ccsid, textbit) ++} ++ ++func legacy_Chtag(path string, ccsid uint64, textbit uint64) error { ++ tag := ccsid<<16 | textbit<<15 ++ var tag_buff [8]byte ++ DecodeData(tag_buff[:], 8, tag) ++ return Setxattr(path, "filetag", tag_buff[:], XATTR_REPLACE) ++} ++ ++func impl_Chtag(path string, ccsid uint64, textbit uint64) error { ++ tag := ccsid<<16 | textbit<<15 ++ var tag_buff [4]byte ++ DecodeData(tag_buff[:], 4, tag) ++ return Setxattr(path, "system.filetag", tag_buff[:], XATTR_REPLACE) ++} ++ ++// End of Chtag ++ ++// Nanosleep ++ ++//go:nosplit ++func get_NanosleepAddr() *(func(time *Timespec, leftover *Timespec) error) ++ ++var Nanosleep = enter_Nanosleep ++ ++func enter_Nanosleep(time *Timespec, leftover *Timespec) error { ++ funcref := get_NanosleepAddr() ++ if funcptrtest(GetZosLibVec()+SYS_NANOSLEEP<<4, "") == 0 { ++ *funcref = impl_Nanosleep ++ } else { ++ *funcref = legacyNanosleep ++ } ++ return (*funcref)(time, leftover) ++} ++ ++func impl_Nanosleep(time *Timespec, leftover *Timespec) error { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_NANOSLEEP<<4, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ return errnoErr2(e1, e2) + } + return nil + } + +-func Statfs(path string, stat *Statfs_t) (err error) { +- fd, err := open(path, O_RDONLY, 0) +- defer Close(fd) +- if err != nil { +- return err ++func legacyNanosleep(time *Timespec, leftover *Timespec) error { ++ t0 := runtime.Nanotime1() ++ var secrem uint32 ++ var nsecrem uint32 ++ total := time.Sec*1000000000 + time.Nsec ++ elapsed := runtime.Nanotime1() - t0 ++ var rv int32 ++ var rc int32 ++ var err error ++ // repeatedly sleep for 1 second until less than 1 second left ++ for total-elapsed > 1000000000 { ++ rv, rc, _ = BpxCondTimedWait(uint32(1), uint32(0), uint32(CW_CONDVAR), &secrem, &nsecrem) ++ if rv != 0 && rc != 112 { // 112 is EAGAIN ++ if leftover != nil && rc == 120 { // 120 is EINTR ++ leftover.Sec = int64(secrem) ++ leftover.Nsec = int64(nsecrem) ++ } ++ err = Errno(rc) ++ return err ++ } ++ elapsed = runtime.Nanotime1() - t0 ++ } ++ // sleep the remainder ++ if total > elapsed { ++ rv, rc, _ = BpxCondTimedWait(uint32(0), uint32(total-elapsed), uint32(CW_CONDVAR), &secrem, &nsecrem) ++ } ++ if leftover != nil && rc == 120 { ++ leftover.Sec = int64(secrem) ++ leftover.Nsec = int64(nsecrem) ++ } ++ if rv != 0 && rc != 112 { ++ err = Errno(rc) + } +- return Fstatfs(fd, stat) ++ return err + } + ++// End of Nanosleep ++ + var ( + Stdin = 0 + Stdout = 1 +@@ -1395,6 +2296,9 @@ var ( + errENOENT error = syscall.ENOENT + ) + ++var ZosTraceLevel int ++var ZosTracefile *os.File ++ + var ( + signalNameMapOnce sync.Once + signalNameMap map[string]syscall.Signal +@@ -1416,6 +2320,56 @@ func errnoErr(e Errno) error { + return e + } + ++var reg *regexp.Regexp ++ ++// enhanced with zos specific errno2 ++func errnoErr2(e Errno, e2 uintptr) error { ++ switch e { ++ case 0: ++ return nil ++ case EAGAIN: ++ return errEAGAIN ++ /* ++ Allow the retrieval of errno2 for EINVAL and ENOENT on zos ++ case EINVAL: ++ return errEINVAL ++ case ENOENT: ++ return errENOENT ++ */ ++ } ++ if ZosTraceLevel > 0 { ++ var name string ++ if reg == nil { ++ reg = regexp.MustCompile("(^unix\\.[^/]+$|.*\\/unix\\.[^/]+$)") ++ } ++ i := 1 ++ pc, file, line, ok := runtime.Caller(i) ++ if ok { ++ name = runtime.FuncForPC(pc).Name() ++ } ++ for ok && reg.MatchString(runtime.FuncForPC(pc).Name()) { ++ i += 1 ++ pc, file, line, ok = runtime.Caller(i) ++ } ++ if ok { ++ if ZosTracefile == nil { ++ ZosConsolePrintf("From %s:%d\n", file, line) ++ ZosConsolePrintf("%s: %s (errno2=0x%x)\n", name, e.Error(), e2) ++ } else { ++ fmt.Fprintf(ZosTracefile, "From %s:%d\n", file, line) ++ fmt.Fprintf(ZosTracefile, "%s: %s (errno2=0x%x)\n", name, e.Error(), e2) ++ } ++ } else { ++ if ZosTracefile == nil { ++ ZosConsolePrintf("%s (errno2=0x%x)\n", e.Error(), e2) ++ } else { ++ fmt.Fprintf(ZosTracefile, "%s (errno2=0x%x)\n", e.Error(), e2) ++ } ++ } ++ } ++ return e ++} ++ + // ErrnoName returns the error name for error number e. + func ErrnoName(e Errno) string { + i := sort.Search(len(errorList), func(i int) bool { +@@ -1474,6 +2428,9 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d + return nil, EINVAL + } + ++ // Set __MAP_64 by default ++ flags |= __MAP_64 ++ + // Map the requested memory. + addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset) + if errno != nil { +@@ -1520,14 +2477,6 @@ func (m *mmapper) Munmap(data []byte) (err error) { + return nil + } + +-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { +- return mapper.Mmap(fd, offset, length, prot, flags) +-} +- +-func Munmap(b []byte) (err error) { +- return mapper.Munmap(b) +-} +- + func Read(fd int, p []byte) (n int, err error) { + n, err = read(fd, p) + if raceenabled { +@@ -1786,83 +2735,170 @@ func Exec(argv0 string, argv []string, envv []string) error { + return syscall.Exec(argv0, argv, envv) + } + +-func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { ++func Getag(path string) (ccsid uint16, flag uint16, err error) { ++ var val [8]byte ++ sz, err := Getxattr(path, "ccsid", val[:]) ++ if err != nil { ++ return ++ } ++ ccsid = uint16(EncodeData(val[0:sz])) ++ sz, err = Getxattr(path, "flags", val[:]) ++ if err != nil { ++ return ++ } ++ flag = uint16(EncodeData(val[0:sz]) >> 15) ++ return ++} ++ ++// Mount begin ++func impl_Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(source) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(target) ++ if err != nil { ++ return ++ } ++ var _p2 *byte ++ _p2, err = BytePtrFromString(fstype) ++ if err != nil { ++ return ++ } ++ var _p3 *byte ++ _p3, err = BytePtrFromString(data) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MOUNT1_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(_p3))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_MountAddr() *(func(source string, target string, fstype string, flags uintptr, data string) (err error)) ++ ++var Mount = enter_Mount ++ ++func enter_Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { ++ funcref := get_MountAddr() ++ if validMount() { ++ *funcref = impl_Mount ++ } else { ++ *funcref = legacyMount ++ } ++ return (*funcref)(source, target, fstype, flags, data) ++} ++ ++func legacyMount(source string, target string, fstype string, flags uintptr, data string) (err error) { + if needspace := 8 - len(fstype); needspace <= 0 { +- fstype = fstype[:8] ++ fstype = fstype[0:8] + } else { +- fstype += " "[:needspace] ++ fstype += " "[0:needspace] + } + return mount_LE(target, source, fstype, uint32(flags), int32(len(data)), data) + } + +-func Unmount(name string, mtm int) (err error) { ++func validMount() bool { ++ if funcptrtest(GetZosLibVec()+SYS___MOUNT1_A<<4, "") == 0 { ++ if name, err := getLeFuncName(GetZosLibVec() + SYS___MOUNT1_A<<4); err == nil { ++ return name == "__mount1_a" ++ } ++ } ++ return false ++} ++ ++// Mount end ++ ++// Unmount begin ++func impl_Unmount(target string, flags int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(target) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UMOUNT2_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_UnmountAddr() *(func(target string, flags int) (err error)) ++ ++var Unmount = enter_Unmount ++ ++func enter_Unmount(target string, flags int) (err error) { ++ funcref := get_UnmountAddr() ++ if funcptrtest(GetZosLibVec()+SYS___UMOUNT2_A<<4, "") == 0 { ++ *funcref = impl_Unmount ++ } else { ++ *funcref = legacyUnmount ++ } ++ return (*funcref)(target, flags) ++} ++ ++func legacyUnmount(name string, mtm int) (err error) { + // mountpoint is always a full path and starts with a '/' + // check if input string is not a mountpoint but a filesystem name + if name[0] != '/' { +- return unmount(name, mtm) ++ return unmount_LE(name, mtm) + } + // treat name as mountpoint + b2s := func(arr []byte) string { +- nulli := bytes.IndexByte(arr, 0) +- if nulli == -1 { +- return string(arr) +- } else { +- return string(arr[:nulli]) ++ var str string ++ for i := 0; i < len(arr); i++ { ++ if arr[i] == 0 { ++ str = string(arr[:i]) ++ break ++ } + } ++ return str + } + var buffer struct { + header W_Mnth + fsinfo [64]W_Mntent + } +- fsCount, err := W_Getmntent_A((*byte)(unsafe.Pointer(&buffer)), int(unsafe.Sizeof(buffer))) +- if err != nil { +- return err +- } +- if fsCount == 0 { +- return EINVAL +- } +- for i := 0; i < fsCount; i++ { +- if b2s(buffer.fsinfo[i].Mountpoint[:]) == name { +- err = unmount(b2s(buffer.fsinfo[i].Fsname[:]), mtm) +- break ++ fs_count, err := W_Getmntent_A((*byte)(unsafe.Pointer(&buffer)), int(unsafe.Sizeof(buffer))) ++ if err == nil { ++ err = EINVAL ++ for i := 0; i < fs_count; i++ { ++ if b2s(buffer.fsinfo[i].Mountpoint[:]) == name { ++ err = unmount_LE(b2s(buffer.fsinfo[i].Fsname[:]), mtm) ++ break ++ } + } ++ } else if fs_count == 0 { ++ err = EINVAL + } + return err + } + +-func fdToPath(dirfd int) (path string, err error) { +- var buffer [1024]byte +- // w_ctrl() +- ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4, +- []uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))}) +- if ret == 0 { +- zb := bytes.IndexByte(buffer[:], 0) +- if zb == -1 { +- zb = len(buffer) +- } +- // __e2a_l() +- runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, +- []uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)}) +- return string(buffer[:zb]), nil +- } +- // __errno() +- errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, +- []uintptr{})))) +- // __errno2() +- errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4, +- []uintptr{})) +- // strerror_r() +- ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4, +- []uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024}) +- if ret == 0 { +- zb := bytes.IndexByte(buffer[:], 0) +- if zb == -1 { +- zb = len(buffer) +- } +- return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2) +- } else { +- return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2) ++// Unmount end ++ ++func direntIno(buf []byte) (uint64, bool) { ++ return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) ++} ++ ++func direntReclen(buf []byte) (uint64, bool) { ++ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) ++} ++ ++func direntNamlen(buf []byte) (uint64, bool) { ++ reclen, ok := direntReclen(buf) ++ if !ok { ++ return 0, false + } ++ return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true + } + + func direntLeToDirentUnix(dirent *direntLE, dir uintptr, path string) (Dirent, error) { +@@ -1904,7 +2940,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + } + + // Get path from fd to avoid unavailable call (fdopendir) +- path, err := fdToPath(fd) ++ path, err := ZosFdToPath(fd) + if err != nil { + return 0, err + } +@@ -1918,7 +2954,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + for { + var entryLE direntLE + var entrypLE *direntLE +- e := readdir_r(d, &entryLE, &entrypLE) ++ e := Readdir_r(d, &entryLE, &entrypLE) + if e != nil { + return n, e + } +@@ -1964,23 +3000,214 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + return n, nil + } + +-func ReadDirent(fd int, buf []byte) (n int, err error) { +- var base = (*uintptr)(unsafe.Pointer(new(uint64))) +- return Getdirentries(fd, buf, base) ++func Err2ad() (eadd *int) { ++ r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS___ERR2AD<<4) ++ eadd = (*int)(unsafe.Pointer(r0)) ++ return + } + +-func direntIno(buf []byte) (uint64, bool) { +- return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) ++func ZosConsolePrintf(format string, v ...interface{}) (int, error) { ++ type __cmsg struct { ++ _ uint16 ++ _ [2]uint8 ++ __msg_length uint32 ++ __msg uintptr ++ _ [4]uint8 ++ } ++ msg := fmt.Sprintf(format, v...) ++ strptr := unsafe.Pointer((*reflect.StringHeader)(unsafe.Pointer(&msg)).Data) ++ len := (*reflect.StringHeader)(unsafe.Pointer(&msg)).Len ++ cmsg := __cmsg{__msg_length: uint32(len), __msg: uintptr(strptr)} ++ cmd := uint32(0) ++ runtime.EnterSyscall() ++ rc, err2, err1 := CallLeFuncWithErr(GetZosLibVec()+SYS_____CONSOLE_A<<4, uintptr(unsafe.Pointer(&cmsg)), 0, uintptr(unsafe.Pointer(&cmd))) ++ runtime.ExitSyscall() ++ if rc != 0 { ++ return 0, fmt.Errorf("%s (errno2=0x%x)\n", err1.Error(), err2) ++ } ++ return 0, nil ++} ++func ZosStringToEbcdicBytes(str string, nullterm bool) (ebcdicBytes []byte) { ++ if nullterm { ++ ebcdicBytes = []byte(str + "\x00") ++ } else { ++ ebcdicBytes = []byte(str) ++ } ++ A2e(ebcdicBytes) ++ return ++} ++func ZosEbcdicBytesToString(b []byte, trimRight bool) (str string) { ++ res := make([]byte, len(b)) ++ copy(res, b) ++ E2a(res) ++ if trimRight { ++ str = string(bytes.TrimRight(res, " \x00")) ++ } else { ++ str = string(res) ++ } ++ return + } + +-func direntReclen(buf []byte) (uint64, bool) { +- return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) ++func fdToPath(dirfd int) (path string, err error) { ++ var buffer [1024]byte ++ // w_ctrl() ++ ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4, ++ []uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))}) ++ if ret == 0 { ++ zb := bytes.IndexByte(buffer[:], 0) ++ if zb == -1 { ++ zb = len(buffer) ++ } ++ // __e2a_l() ++ runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, ++ []uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)}) ++ return string(buffer[:zb]), nil ++ } ++ // __errno() ++ errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, ++ []uintptr{})))) ++ // __errno2() ++ errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4, ++ []uintptr{})) ++ // strerror_r() ++ ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4, ++ []uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024}) ++ if ret == 0 { ++ zb := bytes.IndexByte(buffer[:], 0) ++ if zb == -1 { ++ zb = len(buffer) ++ } ++ return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2) ++ } else { ++ return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2) ++ } + } + +-func direntNamlen(buf []byte) (uint64, bool) { +- reclen, ok := direntReclen(buf) +- if !ok { +- return 0, false ++func impl_Mkfifoat(dirfd int, path string, mode uint32) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return + } +- return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKFIFOAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_MkfifoatAddr() *(func(dirfd int, path string, mode uint32) (err error)) ++ ++var Mkfifoat = enter_Mkfifoat ++ ++func enter_Mkfifoat(dirfd int, path string, mode uint32) (err error) { ++ funcref := get_MkfifoatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___MKFIFOAT_A<<4, "") == 0 { ++ *funcref = impl_Mkfifoat ++ } else { ++ *funcref = legacy_Mkfifoat ++ } ++ return (*funcref)(dirfd, path, mode) ++} ++ ++func legacy_Mkfifoat(dirfd int, path string, mode uint32) (err error) { ++ dirname, err := ZosFdToPath(dirfd) ++ if err != nil { ++ return err ++ } ++ return Mkfifo(dirname+"/"+path, mode) ++} ++ ++//sys Posix_openpt(oflag int) (fd int, err error) = SYS_POSIX_OPENPT ++//sys Grantpt(fildes int) (rc int, err error) = SYS_GRANTPT ++//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 + } +diff --git a/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/vendor/golang.org/x/sys/unix/sysvshm_unix.go +index 79a84f18..672d6b0a 100644 +--- a/vendor/golang.org/x/sys/unix/sysvshm_unix.go ++++ b/vendor/golang.org/x/sys/unix/sysvshm_unix.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build (darwin && !ios) || linux ++//go:build (darwin && !ios) || linux || zos + + package unix + +diff --git a/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go b/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go +index 9eb0db66..8b7977a2 100644 +--- a/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go ++++ b/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build darwin && !ios ++//go:build (darwin && !ios) || zos + + package unix + +diff --git a/vendor/golang.org/x/sys/unix/vgetrandom_linux.go b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go +new file mode 100644 +index 00000000..07ac8e09 +--- /dev/null ++++ b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go +@@ -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) +diff --git a/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go +new file mode 100644 +index 00000000..297e97bc +--- /dev/null ++++ b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go +@@ -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 ++} +diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +index e40fa852..d73c4652 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +@@ -237,6 +237,9 @@ const ( + CLOCK_UPTIME_RAW_APPROX = 0x9 + CLONE_NOFOLLOW = 0x1 + CLONE_NOOWNERCOPY = 0x2 ++ CONNECT_DATA_AUTHENTICATED = 0x4 ++ CONNECT_DATA_IDEMPOTENT = 0x2 ++ CONNECT_RESUME_ON_READ_WRITE = 0x1 + CR0 = 0x0 + CR1 = 0x1000 + CR2 = 0x2000 +@@ -1169,6 +1172,11 @@ const ( + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 ++ RENAME_EXCL = 0x4 ++ RENAME_NOFOLLOW_ANY = 0x10 ++ RENAME_RESERVED1 = 0x8 ++ RENAME_SECLUDE = 0x1 ++ RENAME_SWAP = 0x2 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 +@@ -1260,6 +1268,10 @@ const ( + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 ++ SAE_ASSOCID_ALL = 0xffffffff ++ SAE_ASSOCID_ANY = 0x0 ++ SAE_CONNID_ALL = 0xffffffff ++ SAE_CONNID_ANY = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +index bb02aa6c..4a55a400 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +@@ -237,6 +237,9 @@ const ( + CLOCK_UPTIME_RAW_APPROX = 0x9 + CLONE_NOFOLLOW = 0x1 + CLONE_NOOWNERCOPY = 0x2 ++ CONNECT_DATA_AUTHENTICATED = 0x4 ++ CONNECT_DATA_IDEMPOTENT = 0x2 ++ CONNECT_RESUME_ON_READ_WRITE = 0x1 + CR0 = 0x0 + CR1 = 0x1000 + CR2 = 0x2000 +@@ -1169,6 +1172,11 @@ const ( + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 ++ RENAME_EXCL = 0x4 ++ RENAME_NOFOLLOW_ANY = 0x10 ++ RENAME_RESERVED1 = 0x8 ++ RENAME_SECLUDE = 0x1 ++ RENAME_SWAP = 0x2 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 +@@ -1260,6 +1268,10 @@ const ( + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 ++ SAE_ASSOCID_ALL = 0xffffffff ++ SAE_ASSOCID_ANY = 0x0 ++ SAE_CONNID_ALL = 0xffffffff ++ SAE_CONNID_ANY = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go +index 36bf8399..6ebc48b3 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go +@@ -321,6 +321,9 @@ const ( + AUDIT_INTEGRITY_STATUS = 0x70a + AUDIT_IPC = 0x517 + AUDIT_IPC_SET_PERM = 0x51f ++ AUDIT_IPE_ACCESS = 0x58c ++ AUDIT_IPE_CONFIG_CHANGE = 0x58d ++ AUDIT_IPE_POLICY_LOAD = 0x58e + AUDIT_KERNEL = 0x7d0 + AUDIT_KERNEL_OTHER = 0x524 + AUDIT_KERN_MODULE = 0x532 +@@ -457,6 +460,7 @@ const ( + B600 = 0x8 + B75 = 0x2 + B9600 = 0xd ++ BCACHEFS_SUPER_MAGIC = 0xca451a4e + BDEVFS_MAGIC = 0x62646576 + BINDERFS_SUPER_MAGIC = 0x6c6f6f70 + BINFMTFS_MAGIC = 0x42494e4d +@@ -488,11 +492,14 @@ const ( + BPF_F_ID = 0x20 + BPF_F_NETFILTER_IP_DEFRAG = 0x1 + BPF_F_QUERY_EFFECTIVE = 0x1 ++ BPF_F_REDIRECT_FLAGS = 0x19 + BPF_F_REPLACE = 0x4 + BPF_F_SLEEPABLE = 0x10 + BPF_F_STRICT_ALIGNMENT = 0x1 ++ BPF_F_TEST_REG_INVARIANTS = 0x80 + BPF_F_TEST_RND_HI32 = 0x4 + BPF_F_TEST_RUN_ON_CPU = 0x1 ++ BPF_F_TEST_SKB_CHECKSUM_COMPLETE = 0x4 + BPF_F_TEST_STATE_FREQ = 0x8 + BPF_F_TEST_XDP_LIVE_FRAMES = 0x2 + BPF_F_XDP_DEV_BOUND_ONLY = 0x40 +@@ -501,6 +508,7 @@ const ( + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 ++ BPF_JCOND = 0xe0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 +@@ -656,6 +664,9 @@ const ( + CAN_NPROTO = 0x8 + CAN_RAW = 0x1 + 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_SFF_ID_BITS = 0xb + CAN_SFF_MASK = 0x7ff +@@ -923,6 +934,7 @@ const ( + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 ++ EPOLL_IOC_TYPE = 0x8a + EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2 + ESP_V4_FLOW = 0xa + ESP_V6_FLOW = 0xc +@@ -936,9 +948,6 @@ const ( + ETHTOOL_FEC_OFF = 0x4 + ETHTOOL_FEC_RS = 0x8 + ETHTOOL_FLAG_ALL = 0x7 +- ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 +- ETHTOOL_FLAG_OMIT_REPLY = 0x2 +- ETHTOOL_FLAG_STATS = 0x4 + ETHTOOL_FLASHDEV = 0x33 + ETHTOOL_FLASH_MAX_FILENAME = 0x80 + ETHTOOL_FWVERS_LEN = 0x20 +@@ -1161,6 +1170,7 @@ const ( + EXTA = 0xe + EXTB = 0xf + F2FS_SUPER_MAGIC = 0xf2f52010 ++ FALLOC_FL_ALLOCATE_RANGE = 0x0 + FALLOC_FL_COLLAPSE_RANGE = 0x8 + FALLOC_FL_INSERT_RANGE = 0x20 + FALLOC_FL_KEEP_SIZE = 0x1 +@@ -1338,6 +1348,7 @@ const ( + F_OFD_SETLK = 0x25 + F_OFD_SETLKW = 0x26 + F_OK = 0x0 ++ F_SEAL_EXEC = 0x20 + F_SEAL_FUTURE_WRITE = 0x10 + F_SEAL_GROW = 0x4 + F_SEAL_SEAL = 0x1 +@@ -1626,6 +1637,7 @@ const ( + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 ++ IP_LOCAL_PORT_RANGE = 0x33 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 +@@ -1652,6 +1664,7 @@ const ( + IP_PMTUDISC_OMIT = 0x5 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 ++ IP_PROTOCOL = 0x34 + IP_RECVERR = 0xb + IP_RECVERR_RFC4884 = 0x1a + IP_RECVFRAGSIZE = 0x19 +@@ -1697,6 +1710,8 @@ const ( + KEXEC_ARCH_S390 = 0x160000 + KEXEC_ARCH_SH = 0x2a0000 + KEXEC_ARCH_X86_64 = 0x3e0000 ++ KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8 ++ KEXEC_FILE_DEBUG = 0x8 + KEXEC_FILE_NO_INITRAMFS = 0x4 + KEXEC_FILE_ON_CRASH = 0x2 + KEXEC_FILE_UNLOAD = 0x1 +@@ -1771,6 +1786,7 @@ const ( + KEY_SPEC_USER_KEYRING = -0x4 + KEY_SPEC_USER_SESSION_KEYRING = -0x5 + LANDLOCK_ACCESS_FS_EXECUTE = 0x1 ++ LANDLOCK_ACCESS_FS_IOCTL_DEV = 0x8000 + LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800 + LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40 + LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80 +@@ -1788,6 +1804,8 @@ const ( + LANDLOCK_ACCESS_NET_BIND_TCP = 0x1 + LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2 + 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_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 +@@ -1852,6 +1870,19 @@ const ( + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + 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_SHIFT = 0x1a + MAP_PRIVATE = 0x2 +@@ -1898,6 +1929,9 @@ const ( + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 ++ 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_IGNORE_MODVERSIONS = 0x1 + MODULE_INIT_IGNORE_VERMAGIC = 0x2 +@@ -2163,10 +2197,10 @@ const ( + NFT_REG_SIZE = 0x10 + NFT_REJECT_ICMPX_MAX = 0x3 + NFT_RT_MAX = 0x4 +- NFT_SECMARK_CTX_MAXLEN = 0x100 ++ NFT_SECMARK_CTX_MAXLEN = 0x1000 + NFT_SET_MAXNAMELEN = 0x100 + NFT_SOCKET_MAX = 0x3 +- NFT_TABLE_F_MASK = 0x3 ++ NFT_TABLE_F_MASK = 0x7 + NFT_TABLE_MAXNAMELEN = 0x100 + NFT_TRACETYPE_MAX = 0x3 + NFT_TUNNEL_F_MASK = 0x7 +@@ -2302,6 +2336,7 @@ const ( + PERF_AUX_FLAG_PARTIAL = 0x4 + PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00 + PERF_AUX_FLAG_TRUNCATED = 0x1 ++ PERF_BRANCH_ENTRY_INFO_BITS_MAX = 0x21 + PERF_BR_ARM64_DEBUG_DATA = 0x7 + PERF_BR_ARM64_DEBUG_EXIT = 0x5 + PERF_BR_ARM64_DEBUG_HALT = 0x4 +@@ -2331,9 +2366,11 @@ const ( + PERF_MEM_LVLNUM_IO = 0xa + PERF_MEM_LVLNUM_L1 = 0x1 + PERF_MEM_LVLNUM_L2 = 0x2 ++ PERF_MEM_LVLNUM_L2_MHB = 0x5 + PERF_MEM_LVLNUM_L3 = 0x3 + PERF_MEM_LVLNUM_L4 = 0x4 + PERF_MEM_LVLNUM_LFB = 0xc ++ PERF_MEM_LVLNUM_MSC = 0x6 + PERF_MEM_LVLNUM_NA = 0xf + PERF_MEM_LVLNUM_PMEM = 0xe + PERF_MEM_LVLNUM_RAM = 0xd +@@ -2399,12 +2436,14 @@ const ( + PERF_RECORD_MISC_USER = 0x2 + PERF_SAMPLE_BRANCH_PLM_ALL = 0x7 + PERF_SAMPLE_WEIGHT_TYPE = 0x1004000 ++ PID_FS_MAGIC = 0x50494446 + PIPEFS_MAGIC = 0x50495045 + PPPIOCGNPMODE = 0xc008744c + PPPIOCNEWUNIT = 0xc004743e + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 ++ PROCFS_IOCTL_MAGIC = 'f' + PROC_SUPER_MAGIC = 0x9fa0 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 +@@ -2486,6 +2525,23 @@ const ( + PR_PAC_GET_ENABLED_KEYS = 0x3d + PR_PAC_RESET_KEYS = 0x36 + 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_SET_CONTROL = 0x45 + PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3 +@@ -2577,6 +2633,28 @@ const ( + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + 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_CONT = 0x7 + PTRACE_DETACH = 0x11 +@@ -2890,14 +2968,17 @@ const ( + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + RWF_APPEND = 0x10 ++ RWF_ATOMIC = 0x40 + RWF_DSYNC = 0x2 + RWF_HIPRI = 0x1 ++ RWF_NOAPPEND = 0x20 + RWF_NOWAIT = 0x8 +- RWF_SUPPORTED = 0x1f ++ RWF_SUPPORTED = 0x7f + RWF_SYNC = 0x4 + RWF_WRITE_LIFE_NOT_SET = 0x0 + SCHED_BATCH = 0x3 + SCHED_DEADLINE = 0x6 ++ SCHED_EXT = 0x7 + SCHED_FIFO = 0x1 + SCHED_FLAG_ALL = 0x7f + SCHED_FLAG_DL_OVERRUN = 0x4 +@@ -2914,7 +2995,9 @@ const ( + SCHED_RESET_ON_FORK = 0x40000000 + SCHED_RR = 0x2 + SCM_CREDENTIALS = 0x2 ++ SCM_PIDFD = 0x4 + SCM_RIGHTS = 0x1 ++ SCM_SECURITY = 0x3 + SCM_TIMESTAMP = 0x1d + SC_LOG_FLUSH = 0x100000 + SECCOMP_ADDFD_FLAG_SEND = 0x2 +@@ -3047,6 +3130,8 @@ const ( + SIOCSMIIREG = 0x8949 + SIOCSRARP = 0x8962 + SIOCWANDEV = 0x894a ++ SK_DIAG_BPF_STORAGE_MAX = 0x3 ++ SK_DIAG_BPF_STORAGE_REQ_MAX = 0x1 + SMACK_MAGIC = 0x43415d53 + SMART_AUTOSAVE = 0xd2 + SMART_AUTO_OFFLINE = 0xdb +@@ -3067,6 +3152,8 @@ const ( + SOCKFS_MAGIC = 0x534f434b + SOCK_BUF_LOCK_MASK = 0x3 + SOCK_DCCP = 0x6 ++ SOCK_DESTROY = 0x15 ++ SOCK_DIAG_BY_FAMILY = 0x14 + SOCK_IOC_TYPE = 0x89 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 +@@ -3160,6 +3247,7 @@ const ( + STATX_ATTR_MOUNT_ROOT = 0x2000 + STATX_ATTR_NODUMP = 0x40 + STATX_ATTR_VERITY = 0x100000 ++ STATX_ATTR_WRITE_ATOMIC = 0x400000 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 +@@ -3168,12 +3256,15 @@ const ( + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MNT_ID = 0x1000 ++ STATX_MNT_ID_UNIQUE = 0x4000 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 ++ STATX_SUBVOL = 0x8000 + STATX_TYPE = 0x1 + STATX_UID = 0x8 ++ STATX_WRITE_ATOMIC = 0x10000 + STATX__RESERVED = 0x80000000 + SYNC_FILE_RANGE_WAIT_AFTER = 0x4 + SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 +@@ -3255,6 +3346,7 @@ const ( + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_EXT = 0x20 ++ TCP_MD5SIG_FLAG_IFINDEX = 0x2 + TCP_MD5SIG_FLAG_PREFIX = 0x1 + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 +@@ -3562,12 +3654,17 @@ const ( + XDP_RX_RING = 0x2 + XDP_SHARED_UMEM = 0x1 + XDP_STATISTICS = 0x7 ++ XDP_TXMD_FLAGS_CHECKSUM = 0x2 ++ XDP_TXMD_FLAGS_TIMESTAMP = 0x1 ++ XDP_TX_METADATA = 0x2 + XDP_TX_RING = 0x3 + XDP_UMEM_COMPLETION_RING = 0x6 + XDP_UMEM_FILL_RING = 0x5 + XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 + XDP_UMEM_PGOFF_FILL_RING = 0x100000000 + XDP_UMEM_REG = 0x4 ++ XDP_UMEM_TX_METADATA_LEN = 0x4 ++ XDP_UMEM_TX_SW_CSUM = 0x2 + XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1 + XDP_USE_NEED_WAKEUP = 0x8 + XDP_USE_SG = 0x10 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +index 42ff8c3c..c0d45e32 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x80088a02 ++ EPIOCSPARAMS = 0x40088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -107,6 +109,7 @@ const ( + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 ++ HIDIOCREVOKE = 0x4004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 +@@ -118,6 +121,7 @@ const ( + IXOFF = 0x1000 + IXON = 0x400 + MAP_32BIT = 0x40 ++ MAP_ABOVE4G = 0x80 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 +@@ -150,9 +154,14 @@ const ( + NFDBITS = 0x20 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x8008b705 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 ++ NS_GET_PID_FROM_PIDNS = 0x8004b706 ++ NS_GET_PID_IN_PIDNS = 0x8004b708 ++ NS_GET_TGID_FROM_PIDNS = 0x8004b707 ++ NS_GET_TGID_IN_PIDNS = 0x8004b709 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -229,6 +238,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x7434 + PPPIOCXFERUNIT = 0x744e + 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_GETFPXREGS = 0x12 + PTRACE_GET_THREAD_AREA = 0x19 +@@ -275,6 +298,8 @@ const ( + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -313,6 +338,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +index dca43600..c731d24f 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x80088a02 ++ EPIOCSPARAMS = 0x40088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -107,6 +109,7 @@ const ( + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 ++ HIDIOCREVOKE = 0x4004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 +@@ -118,6 +121,7 @@ const ( + IXOFF = 0x1000 + IXON = 0x400 + MAP_32BIT = 0x40 ++ MAP_ABOVE4G = 0x80 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 +@@ -150,9 +154,14 @@ const ( + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x8008b705 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 ++ NS_GET_PID_FROM_PIDNS = 0x8004b706 ++ NS_GET_PID_IN_PIDNS = 0x8004b708 ++ NS_GET_TGID_FROM_PIDNS = 0x8004b707 ++ NS_GET_TGID_IN_PIDNS = 0x8004b709 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -229,6 +238,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x7434 + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff ++ PTP_CLOCK_GETCAPS = 0x80503d01 ++ PTP_CLOCK_GETCAPS2 = 0x80503d0a ++ PTP_ENABLE_PPS = 0x40043d04 ++ PTP_ENABLE_PPS2 = 0x40043d0d ++ PTP_EXTTS_REQUEST = 0x40103d02 ++ PTP_EXTTS_REQUEST2 = 0x40103d0b ++ PTP_MASK_CLEAR_ALL = 0x3d13 ++ PTP_MASK_EN_SINGLE = 0x40043d14 ++ PTP_PEROUT_REQUEST = 0x40383d03 ++ PTP_PEROUT_REQUEST2 = 0x40383d0c ++ PTP_PIN_SETFUNC = 0x40603d07 ++ PTP_PIN_SETFUNC2 = 0x40603d10 ++ PTP_SYS_OFFSET = 0x43403d05 ++ PTP_SYS_OFFSET2 = 0x43403d0e + PTRACE_ARCH_PRCTL = 0x1e + PTRACE_GETFPREGS = 0xe + PTRACE_GETFPXREGS = 0x12 +@@ -276,6 +299,8 @@ const ( + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -314,6 +339,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +index 5cca668a..680018a4 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x80088a02 ++ EPIOCSPARAMS = 0x40088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 ++ HIDIOCREVOKE = 0x4004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 +@@ -148,9 +151,14 @@ const ( + NFDBITS = 0x20 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x8008b705 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 ++ NS_GET_PID_FROM_PIDNS = 0x8004b706 ++ NS_GET_PID_IN_PIDNS = 0x8004b708 ++ NS_GET_TGID_FROM_PIDNS = 0x8004b707 ++ NS_GET_TGID_IN_PIDNS = 0x8004b709 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -227,6 +235,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x7434 + PPPIOCXFERUNIT = 0x744e + 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_GETFDPIC = 0x1f + PTRACE_GETFDPIC_EXEC = 0x0 +@@ -282,6 +304,8 @@ const ( + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -320,6 +344,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +index d8cae6d1..a63909f3 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x80088a02 ++ EPIOCSPARAMS = 0x40088a01 + EPOLL_CLOEXEC = 0x80000 + ESR_MAGIC = 0x45535201 + EXTPROC = 0x10000 +@@ -87,6 +89,7 @@ const ( + FICLONE = 0x40049409 + FICLONERANGE = 0x4020940d + FLUSHO = 0x1000 ++ FPMR_MAGIC = 0x46504d52 + FPSIMD_MAGIC = 0x46508001 + FS_IOC_ENABLE_VERITY = 0x40806685 + FS_IOC_GETFLAGS = 0x80086601 +@@ -109,6 +112,7 @@ const ( + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 ++ HIDIOCREVOKE = 0x4004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 +@@ -151,9 +155,14 @@ const ( + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x8008b705 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 ++ NS_GET_PID_FROM_PIDNS = 0x8004b706 ++ NS_GET_PID_IN_PIDNS = 0x8004b708 ++ NS_GET_TGID_FROM_PIDNS = 0x8004b707 ++ NS_GET_TGID_IN_PIDNS = 0x8004b709 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -197,6 +206,7 @@ const ( + PERF_EVENT_IOC_SET_BPF = 0x40042408 + PERF_EVENT_IOC_SET_FILTER = 0x40082406 + PERF_EVENT_IOC_SET_OUTPUT = 0x2405 ++ POE_MAGIC = 0x504f4530 + PPPIOCATTACH = 0x4004743d + PPPIOCATTCHAN = 0x40047438 + PPPIOCBRIDGECHAN = 0x40047435 +@@ -232,6 +242,20 @@ const ( + PROT_BTI = 0x10 + PROT_MTE = 0x20 + 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_POKEMTETAGS = 0x22 + PTRACE_SYSEMU = 0x1f +@@ -272,6 +296,8 @@ const ( + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -310,6 +336,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +index 28e39afd..9b0a2573 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x80088a02 ++ EPIOCSPARAMS = 0x40088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -107,6 +109,7 @@ const ( + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 ++ HIDIOCREVOKE = 0x4004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 +@@ -152,9 +155,14 @@ const ( + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x8008b705 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 ++ NS_GET_PID_FROM_PIDNS = 0x8004b706 ++ NS_GET_PID_IN_PIDNS = 0x8004b708 ++ NS_GET_TGID_FROM_PIDNS = 0x8004b707 ++ NS_GET_TGID_IN_PIDNS = 0x8004b709 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -231,6 +239,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x7434 + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff ++ PTP_CLOCK_GETCAPS = 0x80503d01 ++ PTP_CLOCK_GETCAPS2 = 0x80503d0a ++ PTP_ENABLE_PPS = 0x40043d04 ++ PTP_ENABLE_PPS2 = 0x40043d0d ++ PTP_EXTTS_REQUEST = 0x40103d02 ++ PTP_EXTTS_REQUEST2 = 0x40103d0b ++ PTP_MASK_CLEAR_ALL = 0x3d13 ++ PTP_MASK_EN_SINGLE = 0x40043d14 ++ PTP_PEROUT_REQUEST = 0x40383d03 ++ PTP_PEROUT_REQUEST2 = 0x40383d0c ++ PTP_PIN_SETFUNC = 0x40603d07 ++ PTP_PIN_SETFUNC2 = 0x40603d10 ++ PTP_SYS_OFFSET = 0x43403d05 ++ PTP_SYS_OFFSET2 = 0x43403d0e + PTRACE_SYSEMU = 0x1f + PTRACE_SYSEMU_SINGLESTEP = 0x20 + RLIMIT_AS = 0x9 +@@ -269,6 +291,8 @@ const ( + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -307,6 +331,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +index cd66e92c..958e6e06 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 ++ EPIOCGPARAMS = 0x40088a02 ++ EPIOCSPARAMS = 0x80088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 ++ HIDIOCREVOKE = 0x8004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x100 +@@ -148,9 +151,14 @@ const ( + NFDBITS = 0x20 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x4008b705 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + 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 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -227,6 +235,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x20007434 + PPPIOCXFERUNIT = 0x2000744e + 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_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 +@@ -275,6 +297,8 @@ const ( + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -313,6 +337,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +index c1595eba..50c7f25b 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 ++ EPIOCGPARAMS = 0x40088a02 ++ EPIOCSPARAMS = 0x80088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 ++ HIDIOCREVOKE = 0x8004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x100 +@@ -148,9 +151,14 @@ const ( + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x4008b705 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + 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 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -227,6 +235,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x20007434 + PPPIOCXFERUNIT = 0x2000744e + 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_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 +@@ -275,6 +297,8 @@ const ( + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -313,6 +337,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +index ee9456b0..ced21d66 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 ++ EPIOCGPARAMS = 0x40088a02 ++ EPIOCSPARAMS = 0x80088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 ++ HIDIOCREVOKE = 0x8004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x100 +@@ -148,9 +151,14 @@ const ( + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x4008b705 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + 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 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -227,6 +235,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x20007434 + PPPIOCXFERUNIT = 0x2000744e + 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_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 +@@ -275,6 +297,8 @@ const ( + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -313,6 +337,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +index 8cfca81e..226c0441 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x80 ++ EPIOCGPARAMS = 0x40088a02 ++ EPIOCSPARAMS = 0x80088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 ++ HIDIOCREVOKE = 0x8004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x100 +@@ -148,9 +151,14 @@ const ( + NFDBITS = 0x20 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x4008b705 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + 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 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -227,6 +235,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x20007434 + PPPIOCXFERUNIT = 0x2000744e + 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_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 +@@ -275,6 +297,8 @@ const ( + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -313,6 +337,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +index 60b0deb3..3122737c 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x20 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x40088a02 ++ EPIOCSPARAMS = 0x80088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000000 + FF1 = 0x4000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 ++ HIDIOCREVOKE = 0x8004480d + HUPCL = 0x4000 + ICANON = 0x100 + IEXTEN = 0x400 +@@ -150,9 +153,14 @@ const ( + NL3 = 0x300 + NLDLY = 0x300 + NOFLSH = 0x80000000 ++ NS_GET_MNTNS_ID = 0x4008b705 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + 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 + OLCUC = 0x4 + ONLCR = 0x2 +@@ -230,6 +238,20 @@ const ( + PPPIOCXFERUNIT = 0x2000744e + PROT_SAO = 0x10 + 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_GETFPREGS = 0xe + PTRACE_GETREGS64 = 0x16 +@@ -330,6 +352,8 @@ const ( + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -368,6 +392,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +index f90aa728..eb5d3467 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x20 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x40088a02 ++ EPIOCSPARAMS = 0x80088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000000 + FF1 = 0x4000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 ++ HIDIOCREVOKE = 0x8004480d + HUPCL = 0x4000 + ICANON = 0x100 + IEXTEN = 0x400 +@@ -150,9 +153,14 @@ const ( + NL3 = 0x300 + NLDLY = 0x300 + NOFLSH = 0x80000000 ++ NS_GET_MNTNS_ID = 0x4008b705 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + 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 + OLCUC = 0x4 + ONLCR = 0x2 +@@ -230,6 +238,20 @@ const ( + PPPIOCXFERUNIT = 0x2000744e + PROT_SAO = 0x10 + 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_GETFPREGS = 0xe + PTRACE_GETREGS64 = 0x16 +@@ -334,6 +356,8 @@ const ( + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -372,6 +396,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +index ba9e0150..e921ebc6 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x20 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x40088a02 ++ EPIOCSPARAMS = 0x80088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000000 + FF1 = 0x4000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 ++ HIDIOCREVOKE = 0x8004480d + HUPCL = 0x4000 + ICANON = 0x100 + IEXTEN = 0x400 +@@ -150,9 +153,14 @@ const ( + NL3 = 0x300 + NLDLY = 0x300 + NOFLSH = 0x80000000 ++ NS_GET_MNTNS_ID = 0x4008b705 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + 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 + OLCUC = 0x4 + ONLCR = 0x2 +@@ -230,6 +238,20 @@ const ( + PPPIOCXFERUNIT = 0x2000744e + PROT_SAO = 0x10 + 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_GETFPREGS = 0xe + PTRACE_GETREGS64 = 0x16 +@@ -334,6 +356,8 @@ const ( + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -372,6 +396,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +index 07cdfd6e..38ba81c5 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x80088a02 ++ EPIOCSPARAMS = 0x40088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 ++ HIDIOCREVOKE = 0x4004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 +@@ -148,9 +151,14 @@ const ( + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x8008b705 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 ++ NS_GET_PID_FROM_PIDNS = 0x8004b706 ++ NS_GET_PID_IN_PIDNS = 0x8004b708 ++ NS_GET_TGID_FROM_PIDNS = 0x8004b707 ++ NS_GET_TGID_IN_PIDNS = 0x8004b709 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -227,6 +235,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x7434 + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff ++ PTP_CLOCK_GETCAPS = 0x80503d01 ++ PTP_CLOCK_GETCAPS2 = 0x80503d0a ++ PTP_ENABLE_PPS = 0x40043d04 ++ PTP_ENABLE_PPS2 = 0x40043d0d ++ PTP_EXTTS_REQUEST = 0x40103d02 ++ PTP_EXTTS_REQUEST2 = 0x40103d0b ++ PTP_MASK_CLEAR_ALL = 0x3d13 ++ PTP_MASK_EN_SINGLE = 0x40043d14 ++ PTP_PEROUT_REQUEST = 0x40383d03 ++ PTP_PEROUT_REQUEST2 = 0x40383d0c ++ PTP_PIN_SETFUNC = 0x40603d07 ++ PTP_PIN_SETFUNC2 = 0x40603d10 ++ PTP_SYS_OFFSET = 0x43403d05 ++ PTP_SYS_OFFSET2 = 0x43403d0e + PTRACE_GETFDPIC = 0x21 + PTRACE_GETFDPIC_EXEC = 0x0 + PTRACE_GETFDPIC_INTERP = 0x1 +@@ -266,6 +288,8 @@ const ( + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -304,6 +328,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +index 2f1dd214..71f04009 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +@@ -78,6 +78,8 @@ const ( + ECHOPRT = 0x400 + EFD_CLOEXEC = 0x80000 + EFD_NONBLOCK = 0x800 ++ EPIOCGPARAMS = 0x80088a02 ++ EPIOCSPARAMS = 0x40088a01 + EPOLL_CLOEXEC = 0x80000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -106,6 +108,7 @@ const ( + HIDIOCGRAWINFO = 0x80084803 + HIDIOCGRDESC = 0x90044802 + HIDIOCGRDESCSIZE = 0x80044801 ++ HIDIOCREVOKE = 0x4004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 +@@ -148,9 +151,14 @@ const ( + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x8008b705 + NS_GET_NSTYPE = 0xb703 + NS_GET_OWNER_UID = 0xb704 + NS_GET_PARENT = 0xb702 ++ NS_GET_PID_FROM_PIDNS = 0x8004b706 ++ NS_GET_PID_IN_PIDNS = 0x8004b708 ++ NS_GET_TGID_FROM_PIDNS = 0x8004b707 ++ NS_GET_TGID_IN_PIDNS = 0x8004b709 + NS_GET_USERNS = 0xb701 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -227,6 +235,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x7434 + PPPIOCXFERUNIT = 0x744e + PR_SET_PTRACER_ANY = 0xffffffffffffffff ++ PTP_CLOCK_GETCAPS = 0x80503d01 ++ PTP_CLOCK_GETCAPS2 = 0x80503d0a ++ PTP_ENABLE_PPS = 0x40043d04 ++ PTP_ENABLE_PPS2 = 0x40043d0d ++ PTP_EXTTS_REQUEST = 0x40103d02 ++ PTP_EXTTS_REQUEST2 = 0x40103d0b ++ PTP_MASK_CLEAR_ALL = 0x3d13 ++ PTP_MASK_EN_SINGLE = 0x40043d14 ++ PTP_PEROUT_REQUEST = 0x40383d03 ++ PTP_PEROUT_REQUEST2 = 0x40383d0c ++ PTP_PIN_SETFUNC = 0x40603d07 ++ PTP_PIN_SETFUNC2 = 0x40603d10 ++ PTP_SYS_OFFSET = 0x43403d05 ++ PTP_SYS_OFFSET2 = 0x43403d0e + PTRACE_DISABLE_TE = 0x5010 + PTRACE_ENABLE_TE = 0x5009 + PTRACE_GET_LAST_BREAK = 0x5006 +@@ -338,6 +360,8 @@ const ( + RTC_WIE_ON = 0x700f + RTC_WKALM_RD = 0x80287010 + RTC_WKALM_SET = 0x4028700f ++ SCM_DEVMEM_DMABUF = 0x4f ++ SCM_DEVMEM_LINEAR = 0x4e + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPING_OPT_STATS = 0x36 + SCM_TIMESTAMPING_PKTINFO = 0x3a +@@ -376,6 +400,9 @@ const ( + SO_CNX_ADVICE = 0x35 + SO_COOKIE = 0x39 + SO_DETACH_REUSEPORT_BPF = 0x44 ++ SO_DEVMEM_DMABUF = 0x4f ++ SO_DEVMEM_DONTNEED = 0x50 ++ SO_DEVMEM_LINEAR = 0x4e + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +index f40519d9..c44a3133 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +@@ -82,6 +82,8 @@ const ( + EFD_CLOEXEC = 0x400000 + EFD_NONBLOCK = 0x4000 + EMT_TAGOVF = 0x1 ++ EPIOCGPARAMS = 0x40088a02 ++ EPIOCSPARAMS = 0x80088a01 + EPOLL_CLOEXEC = 0x400000 + EXTPROC = 0x10000 + FF1 = 0x8000 +@@ -110,6 +112,7 @@ const ( + HIDIOCGRAWINFO = 0x40084803 + HIDIOCGRDESC = 0x50044802 + HIDIOCGRDESCSIZE = 0x40044801 ++ HIDIOCREVOKE = 0x8004480d + HUPCL = 0x400 + ICANON = 0x2 + IEXTEN = 0x8000 +@@ -153,9 +156,14 @@ const ( + NFDBITS = 0x40 + NLDLY = 0x100 + NOFLSH = 0x80 ++ NS_GET_MNTNS_ID = 0x4008b705 + NS_GET_NSTYPE = 0x2000b703 + NS_GET_OWNER_UID = 0x2000b704 + 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 + OLCUC = 0x2 + ONLCR = 0x4 +@@ -232,6 +240,20 @@ const ( + PPPIOCUNBRIDGECHAN = 0x20007434 + PPPIOCXFERUNIT = 0x2000744e + 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_GETFPREGS = 0xe + PTRACE_GETFPREGS64 = 0x19 +@@ -329,6 +351,8 @@ const ( + RTC_WIE_ON = 0x2000700f + RTC_WKALM_RD = 0x40287010 + RTC_WKALM_SET = 0x8028700f ++ SCM_DEVMEM_DMABUF = 0x58 ++ SCM_DEVMEM_LINEAR = 0x57 + SCM_TIMESTAMPING = 0x23 + SCM_TIMESTAMPING_OPT_STATS = 0x38 + SCM_TIMESTAMPING_PKTINFO = 0x3c +@@ -415,6 +439,9 @@ const ( + SO_CNX_ADVICE = 0x37 + SO_COOKIE = 0x3b + SO_DETACH_REUSEPORT_BPF = 0x47 ++ SO_DEVMEM_DMABUF = 0x58 ++ SO_DEVMEM_DONTNEED = 0x59 ++ SO_DEVMEM_LINEAR = 0x57 + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 +diff --git a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +index 4dfd2e05..1ec2b140 100644 +--- a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go ++++ b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +@@ -10,41 +10,99 @@ + package unix + + const ( +- BRKINT = 0x0001 +- CLOCK_MONOTONIC = 0x1 +- CLOCK_PROCESS_CPUTIME_ID = 0x2 +- CLOCK_REALTIME = 0x0 +- CLOCK_THREAD_CPUTIME_ID = 0x3 +- CS8 = 0x0030 +- CSIZE = 0x0030 +- ECHO = 0x00000008 +- ECHONL = 0x00000001 +- FD_CLOEXEC = 0x01 +- FD_CLOFORK = 0x02 +- FNDELAY = 0x04 +- F_CLOSFD = 9 +- F_CONTROL_CVT = 13 +- F_DUPFD = 0 +- F_DUPFD2 = 8 +- F_GETFD = 1 +- F_GETFL = 259 +- F_GETLK = 5 +- F_GETOWN = 10 +- F_OK = 0x0 +- F_RDLCK = 1 +- F_SETFD = 2 +- F_SETFL = 4 +- F_SETLK = 6 +- F_SETLKW = 7 +- F_SETOWN = 11 +- F_SETTAG = 12 +- F_UNLCK = 3 +- F_WRLCK = 2 +- FSTYPE_ZFS = 0xe9 //"Z" +- FSTYPE_HFS = 0xc8 //"H" +- FSTYPE_NFS = 0xd5 //"N" +- FSTYPE_TFS = 0xe3 //"T" +- FSTYPE_AUTOMOUNT = 0xc1 //"A" ++ BRKINT = 0x0001 ++ CLOCAL = 0x1 ++ CLOCK_MONOTONIC = 0x1 ++ CLOCK_PROCESS_CPUTIME_ID = 0x2 ++ CLOCK_REALTIME = 0x0 ++ CLOCK_THREAD_CPUTIME_ID = 0x3 ++ CLONE_NEWIPC = 0x08000000 ++ CLONE_NEWNET = 0x40000000 ++ CLONE_NEWNS = 0x00020000 ++ CLONE_NEWPID = 0x20000000 ++ CLONE_NEWUTS = 0x04000000 ++ CLONE_PARENT = 0x00008000 ++ CS8 = 0x0030 ++ CSIZE = 0x0030 ++ ECHO = 0x00000008 ++ ECHONL = 0x00000001 ++ EFD_SEMAPHORE = 0x00002000 ++ EFD_CLOEXEC = 0x00001000 ++ EFD_NONBLOCK = 0x00000004 ++ EPOLL_CLOEXEC = 0x00001000 ++ EPOLL_CTL_ADD = 0 ++ EPOLL_CTL_MOD = 1 ++ EPOLL_CTL_DEL = 2 ++ EPOLLRDNORM = 0x0001 ++ EPOLLRDBAND = 0x0002 ++ EPOLLIN = 0x0003 ++ EPOLLOUT = 0x0004 ++ EPOLLWRBAND = 0x0008 ++ EPOLLPRI = 0x0010 ++ EPOLLERR = 0x0020 ++ EPOLLHUP = 0x0040 ++ EPOLLEXCLUSIVE = 0x20000000 ++ EPOLLONESHOT = 0x40000000 ++ FD_CLOEXEC = 0x01 ++ FD_CLOFORK = 0x02 ++ FD_SETSIZE = 0x800 ++ FNDELAY = 0x04 ++ F_CLOSFD = 9 ++ F_CONTROL_CVT = 13 ++ F_DUPFD = 0 ++ F_DUPFD2 = 8 ++ F_GETFD = 1 ++ F_GETFL = 259 ++ F_GETLK = 5 ++ F_GETOWN = 10 ++ F_OK = 0x0 ++ F_RDLCK = 1 ++ F_SETFD = 2 ++ F_SETFL = 4 ++ F_SETLK = 6 ++ F_SETLKW = 7 ++ F_SETOWN = 11 ++ F_SETTAG = 12 ++ F_UNLCK = 3 ++ F_WRLCK = 2 ++ FSTYPE_ZFS = 0xe9 //"Z" ++ FSTYPE_HFS = 0xc8 //"H" ++ FSTYPE_NFS = 0xd5 //"N" ++ FSTYPE_TFS = 0xe3 //"T" ++ FSTYPE_AUTOMOUNT = 0xc1 //"A" ++ GRND_NONBLOCK = 1 ++ GRND_RANDOM = 2 ++ HUPCL = 0x0100 // Hang up on last close ++ IN_CLOEXEC = 0x00001000 ++ IN_NONBLOCK = 0x00000004 ++ IN_ACCESS = 0x00000001 ++ IN_MODIFY = 0x00000002 ++ IN_ATTRIB = 0x00000004 ++ IN_CLOSE_WRITE = 0x00000008 ++ IN_CLOSE_NOWRITE = 0x00000010 ++ IN_OPEN = 0x00000020 ++ IN_MOVED_FROM = 0x00000040 ++ IN_MOVED_TO = 0x00000080 ++ IN_CREATE = 0x00000100 ++ IN_DELETE = 0x00000200 ++ IN_DELETE_SELF = 0x00000400 ++ IN_MOVE_SELF = 0x00000800 ++ IN_UNMOUNT = 0x00002000 ++ IN_Q_OVERFLOW = 0x00004000 ++ IN_IGNORED = 0x00008000 ++ IN_CLOSE = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) ++ IN_MOVE = (IN_MOVED_FROM | IN_MOVED_TO) ++ IN_ALL_EVENTS = (IN_ACCESS | IN_MODIFY | IN_ATTRIB | ++ IN_CLOSE | IN_OPEN | IN_MOVE | ++ IN_CREATE | IN_DELETE | IN_DELETE_SELF | ++ IN_MOVE_SELF) ++ IN_ONLYDIR = 0x01000000 ++ IN_DONT_FOLLOW = 0x02000000 ++ IN_EXCL_UNLINK = 0x04000000 ++ IN_MASK_CREATE = 0x10000000 ++ IN_MASK_ADD = 0x20000000 ++ IN_ISDIR = 0x40000000 ++ IN_ONESHOT = 0x80000000 + IP6F_MORE_FRAG = 0x0001 + IP6F_OFF_MASK = 0xfff8 + IP6F_RESERVED_MASK = 0x0006 +@@ -152,10 +210,18 @@ const ( + IP_PKTINFO = 101 + IP_RECVPKTINFO = 102 + IP_TOS = 2 +- IP_TTL = 3 ++ IP_TTL = 14 + IP_UNBLOCK_SOURCE = 11 ++ ICMP6_FILTER = 1 ++ MCAST_INCLUDE = 0 ++ MCAST_EXCLUDE = 1 ++ MCAST_JOIN_GROUP = 40 ++ MCAST_LEAVE_GROUP = 41 ++ MCAST_JOIN_SOURCE_GROUP = 42 ++ MCAST_LEAVE_SOURCE_GROUP = 43 ++ MCAST_BLOCK_SOURCE = 44 ++ MCAST_UNBLOCK_SOURCE = 46 + ICANON = 0x0010 +- ICMP6_FILTER = 0x26 + ICRNL = 0x0002 + IEXTEN = 0x0020 + IGNBRK = 0x0004 +@@ -165,10 +231,10 @@ const ( + ISTRIP = 0x0080 + IXON = 0x0200 + IXOFF = 0x0100 +- LOCK_SH = 0x1 // Not exist on zOS +- LOCK_EX = 0x2 // Not exist on zOS +- LOCK_NB = 0x4 // Not exist on zOS +- LOCK_UN = 0x8 // Not exist on zOS ++ LOCK_SH = 0x1 ++ LOCK_EX = 0x2 ++ LOCK_NB = 0x4 ++ LOCK_UN = 0x8 + POLLIN = 0x0003 + POLLOUT = 0x0004 + POLLPRI = 0x0010 +@@ -182,15 +248,29 @@ const ( + MAP_PRIVATE = 0x1 // changes are private + MAP_SHARED = 0x2 // changes are shared + MAP_FIXED = 0x4 // place exactly +- MCAST_JOIN_GROUP = 40 +- MCAST_LEAVE_GROUP = 41 +- MCAST_JOIN_SOURCE_GROUP = 42 +- MCAST_LEAVE_SOURCE_GROUP = 43 +- MCAST_BLOCK_SOURCE = 44 +- MCAST_UNBLOCK_SOURCE = 45 ++ __MAP_MEGA = 0x8 ++ __MAP_64 = 0x10 ++ MAP_ANON = 0x20 ++ MAP_ANONYMOUS = 0x20 + MS_SYNC = 0x1 // msync - synchronous writes + MS_ASYNC = 0x2 // asynchronous writes + MS_INVALIDATE = 0x4 // invalidate mappings ++ MS_BIND = 0x00001000 ++ MS_MOVE = 0x00002000 ++ MS_NOSUID = 0x00000002 ++ MS_PRIVATE = 0x00040000 ++ MS_REC = 0x00004000 ++ MS_REMOUNT = 0x00008000 ++ MS_RDONLY = 0x00000001 ++ MS_UNBINDABLE = 0x00020000 ++ MNT_DETACH = 0x00000004 ++ ZOSDSFS_SUPER_MAGIC = 0x44534653 // zOS DSFS ++ NFS_SUPER_MAGIC = 0x6969 // NFS ++ NSFS_MAGIC = 0x6e736673 // PROCNS ++ PROC_SUPER_MAGIC = 0x9fa0 // proc FS ++ ZOSTFS_SUPER_MAGIC = 0x544653 // zOS TFS ++ ZOSUFS_SUPER_MAGIC = 0x554653 // zOS UFS ++ ZOSZFS_SUPER_MAGIC = 0x5A4653 // zOS ZFS + MTM_RDONLY = 0x80000000 + MTM_RDWR = 0x40000000 + MTM_UMOUNT = 0x10000000 +@@ -205,13 +285,20 @@ const ( + MTM_REMOUNT = 0x00000100 + MTM_NOSECURITY = 0x00000080 + NFDBITS = 0x20 ++ ONLRET = 0x0020 // NL performs CR function + O_ACCMODE = 0x03 + O_APPEND = 0x08 + O_ASYNCSIG = 0x0200 + O_CREAT = 0x80 ++ O_DIRECT = 0x00002000 ++ O_NOFOLLOW = 0x00004000 ++ O_DIRECTORY = 0x00008000 ++ O_PATH = 0x00080000 ++ O_CLOEXEC = 0x00001000 + O_EXCL = 0x40 + O_GETFL = 0x0F + O_LARGEFILE = 0x0400 ++ O_NDELAY = 0x4 + O_NONBLOCK = 0x04 + O_RDONLY = 0x02 + O_RDWR = 0x03 +@@ -248,6 +335,7 @@ const ( + AF_IUCV = 17 + AF_LAT = 14 + AF_LINK = 18 ++ AF_LOCAL = AF_UNIX // AF_LOCAL is an alias for AF_UNIX + AF_MAX = 30 + AF_NBS = 7 + AF_NDD = 23 +@@ -285,15 +373,33 @@ const ( + RLIMIT_AS = 5 + RLIMIT_NOFILE = 6 + RLIMIT_MEMLIMIT = 7 ++ RLIMIT_MEMLOCK = 0x8 + RLIM_INFINITY = 2147483647 ++ SCHED_FIFO = 0x2 ++ SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x01 + SF_CLOSE = 0x00000002 + SF_REUSE = 0x00000001 ++ SHM_RND = 0x2 ++ SHM_RDONLY = 0x1 ++ SHMLBA = 0x1000 ++ IPC_STAT = 0x3 ++ IPC_SET = 0x2 ++ IPC_RMID = 0x1 ++ IPC_PRIVATE = 0x0 ++ IPC_CREAT = 0x1000000 ++ __IPC_MEGA = 0x4000000 ++ __IPC_SHAREAS = 0x20000000 ++ __IPC_BELOWBAR = 0x10000000 ++ IPC_EXCL = 0x2000000 ++ __IPC_GIGA = 0x8000000 + SHUT_RD = 0 + SHUT_RDWR = 2 + SHUT_WR = 1 ++ SOCK_CLOEXEC = 0x00001000 + SOCK_CONN_DGRAM = 6 + SOCK_DGRAM = 2 ++ SOCK_NONBLOCK = 0x800 + SOCK_RAW = 3 + SOCK_RDM = 4 + SOCK_SEQPACKET = 5 +@@ -378,8 +484,6 @@ const ( + S_IFMST = 0x00FF0000 + TCP_KEEPALIVE = 0x8 + TCP_NODELAY = 0x1 +- TCP_INFO = 0xb +- TCP_USER_TIMEOUT = 0x1 + TIOCGWINSZ = 0x4008a368 + TIOCSWINSZ = 0x8008a367 + TIOCSBRK = 0x2000a77b +@@ -427,7 +531,10 @@ const ( + VSUSP = 9 + VTIME = 10 + WCONTINUED = 0x4 ++ WEXITED = 0x8 + WNOHANG = 0x1 ++ WNOWAIT = 0x20 ++ WSTOPPED = 0x10 + WUNTRACED = 0x2 + _BPX_SWAP = 1 + _BPX_NONSWAP = 2 +@@ -452,8 +559,30 @@ const ( + MADV_FREE = 15 // for Linux compatibility -- no zos semantics + MADV_WIPEONFORK = 16 // for Linux compatibility -- no zos semantics + MADV_KEEPONFORK = 17 // for Linux compatibility -- no zos semantics +- AT_SYMLINK_NOFOLLOW = 1 // for Unix compatibility -- no zos semantics +- AT_FDCWD = 2 // for Unix compatibility -- no zos semantics ++ AT_SYMLINK_FOLLOW = 0x400 ++ AT_SYMLINK_NOFOLLOW = 0x100 ++ XATTR_CREATE = 0x1 ++ XATTR_REPLACE = 0x2 ++ P_PID = 0 ++ P_PGID = 1 ++ P_ALL = 2 ++ PR_SET_NAME = 15 ++ PR_GET_NAME = 16 ++ PR_SET_NO_NEW_PRIVS = 38 ++ PR_GET_NO_NEW_PRIVS = 39 ++ PR_SET_DUMPABLE = 4 ++ PR_GET_DUMPABLE = 3 ++ PR_SET_PDEATHSIG = 1 ++ PR_GET_PDEATHSIG = 2 ++ PR_SET_CHILD_SUBREAPER = 36 ++ PR_GET_CHILD_SUBREAPER = 37 ++ AT_FDCWD = -100 ++ AT_EACCESS = 0x200 ++ AT_EMPTY_PATH = 0x1000 ++ AT_REMOVEDIR = 0x200 ++ RENAME_NOREPLACE = 1 << 0 ++ ST_RDONLY = 1 ++ ST_NOSUID = 2 + ) + + const ( +@@ -476,6 +605,7 @@ const ( + EMLINK = Errno(125) + ENAMETOOLONG = Errno(126) + ENFILE = Errno(127) ++ ENOATTR = Errno(265) + ENODEV = Errno(128) + ENOENT = Errno(129) + ENOEXEC = Errno(130) +@@ -700,7 +830,7 @@ var errorList = [...]struct { + {145, "EDC5145I", "The parameter list is too long, or the message to receive was too large for the buffer."}, + {146, "EDC5146I", "Too many levels of symbolic links."}, + {147, "EDC5147I", "Illegal byte sequence."}, +- {148, "", ""}, ++ {148, "EDC5148I", "The named attribute or data not available."}, + {149, "EDC5149I", "Value Overflow Error."}, + {150, "EDC5150I", "UNIX System Services is not active."}, + {151, "EDC5151I", "Dynamic allocation error."}, +@@ -743,6 +873,7 @@ var errorList = [...]struct { + {259, "EDC5259I", "A CUN_RS_NO_CONVERSION error was issued by Unicode Services."}, + {260, "EDC5260I", "A CUN_RS_TABLE_NOT_ALIGNED error was issued by Unicode Services."}, + {262, "EDC5262I", "An iconv() function encountered an unexpected error while using Unicode Services."}, ++ {265, "EDC5265I", "The named attribute not available."}, + {1000, "EDC8000I", "A bad socket-call constant was found in the IUCV header."}, + {1001, "EDC8001I", "An error was found in the IUCV header."}, + {1002, "EDC8002I", "A socket descriptor is out of range."}, +diff --git a/vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s b/vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s +new file mode 100644 +index 00000000..b77ff5db +--- /dev/null ++++ b/vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s +@@ -0,0 +1,364 @@ ++// go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s ++// Code generated by the command above; see README.md. DO NOT EDIT. ++ ++//go:build zos && s390x ++#include "textflag.h" ++ ++// provide the address of function variable to be fixed up. ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Flistxattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Fremovexattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Fgetxattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Fsetxattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_accept4Addr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·accept4(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_RemovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Removexattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_Dup3Addr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Dup3(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_DirfdAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Dirfd(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_EpollCreateAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·EpollCreate(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_EpollCreate1Addr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·EpollCreate1(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_EpollCtlAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·EpollCtl(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_EpollPwaitAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·EpollPwait(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_EpollWaitAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·EpollWait(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_EventfdAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Eventfd(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FaccessatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Faccessat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FchmodatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Fchmodat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FchownatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Fchownat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FdatasyncAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Fdatasync(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_fstatatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·fstatat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_LgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Lgetxattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_LsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Lsetxattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FstatfsAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Fstatfs(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FutimesAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Futimes(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_FutimesatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Futimesat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_GetrandomAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Getrandom(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_InotifyInitAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·InotifyInit(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_InotifyInit1Addr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·InotifyInit1(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_InotifyAddWatchAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·InotifyAddWatch(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_InotifyRmWatchAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·InotifyRmWatch(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_ListxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Listxattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_LlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Llistxattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_LremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Lremovexattr(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_LutimesAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Lutimes(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_StatfsAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Statfs(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_SyncfsAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Syncfs(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_UnshareAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Unshare(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_LinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Linkat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_MkdiratAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Mkdirat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_MknodatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Mknodat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_PivotRootAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·PivotRoot(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_PrctlAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Prctl(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_PrlimitAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Prlimit(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_RenameatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Renameat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_Renameat2Addr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Renameat2(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_SethostnameAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Sethostname(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_SetnsAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Setns(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_SymlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Symlinkat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_UnlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·Unlinkat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_openatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·openat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_openat2Addr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·openat2(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++TEXT ·get_utimensatAddr(SB), NOSPLIT|NOFRAME, $0-8 ++ MOVD $·utimensat(SB), R8 ++ MOVD R8, ret+0(FP) ++ RET +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +index ccb02f24..24b346e1 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +@@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func renamexNp(from string, to string, flag uint32) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(from) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(to) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_renamex_np_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(from) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(to) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_renameatx_np_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { +@@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func pthread_chdir_np(path string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_pthread_chdir_np_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func pthread_fchdir_np(fd int) (err error) { ++ _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_pthread_fchdir_np_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { ++ var _p0 unsafe.Pointer ++ if len(iov) > 0 { ++ _p0 = unsafe.Pointer(&iov[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_connectx_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { + _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) + if e1 != 0 { +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +index 8b8bb284..ebd21310 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s ++++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +@@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 + GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 + DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) + ++TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_renamex_np(SB) ++GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) ++ ++TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_renameatx_np(SB) ++GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) ++ + 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_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_pthread_chdir_np(SB) ++GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) ++ ++TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_pthread_fchdir_np(SB) ++GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) ++ ++TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_connectx(SB) ++GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) ++ + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sendfile(SB) + GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +index 1b40b997..824b9c2d 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +@@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func renamexNp(from string, to string, flag uint32) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(from) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(to) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_renamex_np_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(from) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(to) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_renameatx_np_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { +@@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func pthread_chdir_np(path string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_pthread_chdir_np_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func pthread_fchdir_np(fd int) (err error) { ++ _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_pthread_fchdir_np_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { ++ var _p0 unsafe.Pointer ++ if len(iov) > 0 { ++ _p0 = unsafe.Pointer(&iov[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_connectx_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { + _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) + if e1 != 0 { +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +index 08362c1a..4f178a22 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s ++++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +@@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 + GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 + DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) + ++TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_renamex_np(SB) ++GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) ++ ++TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_renameatx_np(SB) ++GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) ++ + 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_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_pthread_chdir_np(SB) ++GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) ++ ++TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_pthread_fchdir_np(SB) ++GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) ++ ++TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_connectx(SB) ++GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) ++ + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_sendfile(SB) + GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go +index 87d8612a..5cc1e8eb 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go +@@ -592,6 +592,16 @@ func ClockGettime(clockid int32, time *Timespec) (err error) { + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func ClockSettime(clockid int32, time *Timespec) (err error) { ++ _, _, e1 := Syscall(SYS_CLOCK_SETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { + _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) + if e1 != 0 { +@@ -971,23 +981,6 @@ func Getpriority(which int, who int) (prio int, err error) { + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Getrandom(buf []byte, flags int) (n int, err error) { +- var _p0 unsafe.Pointer +- if len(buf) > 0 { +- _p0 = unsafe.Pointer(&buf[0]) +- } else { +- _p0 = unsafe.Pointer(&_zero) +- } +- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) +- n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) +- } +- return +-} +- +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +- + func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { +@@ -2229,3 +2222,19 @@ func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) + } + return + } ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Mseal(b []byte, flags uint) (err error) { ++ var _p0 unsafe.Pointer ++ if len(b) > 0 { ++ _p0 = unsafe.Pointer(&b[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ _, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags)) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +index 9dc42410..1851df14 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(fsType) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(dir) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_mount_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_mount mount "libc.so" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +index 41b56173..0b43c693 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 + GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 + DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) + ++TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_mount(SB) ++GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 ++DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) ++ + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_nanosleep(SB) + GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +index 0d3a0751..e1ec0dbe 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(fsType) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(dir) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_mount_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_mount mount "libc.so" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +index 4019a656..880c6d6e 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 + GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 + DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) + ++TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_mount(SB) ++GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) ++ + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_nanosleep(SB) + GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +index c39f7776..7c8452a6 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(fsType) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(dir) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_mount_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_mount mount "libc.so" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +index ac4af24f..b8ef95b0 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 + GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 + DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) + ++TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_mount(SB) ++GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 ++DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) ++ + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_nanosleep(SB) + GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +index 57571d07..2ffdf861 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(fsType) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(dir) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_mount_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_mount mount "libc.so" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +index f77d5321..2af3b5c7 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 + GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 + DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) + ++TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_mount(SB) ++GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) ++ + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_nanosleep(SB) + GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +index e62963e6..1da08d52 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(fsType) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(dir) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_mount_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_mount mount "libc.so" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +index fae140b6..b7a25135 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 + GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 + DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) + ++TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_mount(SB) ++GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) ++ + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_nanosleep(SB) + GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +index 00831354..6e85b0aa 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(fsType) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(dir) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_mount_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_mount mount "libc.so" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +index 9d1e0ff0..f15dadf0 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +@@ -555,6 +555,12 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 + GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 + DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) + ++TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 ++ CALL libc_mount(SB) ++ RET ++GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) ++ + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_nanosleep(SB) + RET +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +index 79029ed5..28b487df 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +@@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + ++func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(fsType) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(dir) ++ if err != nil { ++ return ++ } ++ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) ++ if e1 != 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ ++var libc_mount_trampoline_addr uintptr ++ ++//go:cgo_import_dynamic libc_mount mount "libc.so" ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +index da115f9a..1e7f321e 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s ++++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +@@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 + GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 + DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) + ++TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 ++ JMP libc_mount(SB) ++GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 ++DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) ++ + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_nanosleep(SB) + GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 +diff --git a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go +index 94f01123..7ccf66b7 100644 +--- a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go ++++ b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go +@@ -1,4 +1,4 @@ +-// go run mksyscall.go -tags zos,s390x syscall_zos_s390x.go ++// go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s + // Code generated by the command above; see README.md. DO NOT EDIT. + + //go:build zos && s390x +@@ -6,17 +6,100 @@ + package unix + + import ( ++ "runtime" ++ "syscall" + "unsafe" + ) + ++var _ syscall.Errno ++ + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func fcntl(fd int, cmd int, arg int) (val int, err error) { +- r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), uintptr(arg)) ++ runtime.ExitSyscall() + val = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Flistxattr(fd int, dest []byte) (sz int, err error) { ++ var _p0 unsafe.Pointer ++ if len(dest) > 0 { ++ _p0 = unsafe.Pointer(&dest[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FLISTXATTR_A<<4, uintptr(fd), uintptr(_p0), uintptr(len(dest))) ++ runtime.ExitSyscall() ++ sz = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FlistxattrAddr() *(func(fd int, dest []byte) (sz int, err error)) ++ ++var Flistxattr = enter_Flistxattr ++ ++func enter_Flistxattr(fd int, dest []byte) (sz int, err error) { ++ funcref := get_FlistxattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___FLISTXATTR_A<<4, "") == 0 { ++ *funcref = impl_Flistxattr ++ } else { ++ *funcref = error_Flistxattr ++ } ++ return (*funcref)(fd, dest) ++} ++ ++func error_Flistxattr(fd int, dest []byte) (sz int, err error) { ++ sz = -1 ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Fremovexattr(fd int, attr string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(attr) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FREMOVEXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FremovexattrAddr() *(func(fd int, attr string) (err error)) ++ ++var Fremovexattr = enter_Fremovexattr ++ ++func enter_Fremovexattr(fd int, attr string) (err error) { ++ funcref := get_FremovexattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___FREMOVEXATTR_A<<4, "") == 0 { ++ *funcref = impl_Fremovexattr ++ } else { ++ *funcref = error_Fremovexattr + } ++ return (*funcref)(fd, attr) ++} ++ ++func error_Fremovexattr(fd int, attr string) (err error) { ++ err = ENOSYS + return + } + +@@ -29,10 +112,12 @@ func read(fd int, p []byte) (n int, err error) { + } else { + _p0 = unsafe.Pointer(&_zero) + } +- r0, _, e1 := syscall_syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_READ<<4, uintptr(fd), uintptr(_p0), uintptr(len(p))) ++ runtime.ExitSyscall() + n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -46,31 +131,159 @@ func write(fd int, p []byte) (n int, err error) { + } else { + _p0 = unsafe.Pointer(&_zero) + } +- r0, _, e1 := syscall_syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WRITE<<4, uintptr(fd), uintptr(_p0), uintptr(len(p))) ++ runtime.ExitSyscall() + n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(attr) ++ if err != nil { ++ return ++ } ++ var _p1 unsafe.Pointer ++ if len(dest) > 0 { ++ _p1 = unsafe.Pointer(&dest[0]) ++ } else { ++ _p1 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FGETXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) ++ runtime.ExitSyscall() ++ sz = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FgetxattrAddr() *(func(fd int, attr string, dest []byte) (sz int, err error)) ++ ++var Fgetxattr = enter_Fgetxattr ++ ++func enter_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { ++ funcref := get_FgetxattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___FGETXATTR_A<<4, "") == 0 { ++ *funcref = impl_Fgetxattr ++ } else { ++ *funcref = error_Fgetxattr ++ } ++ return (*funcref)(fd, attr, dest) ++} ++ ++func error_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { ++ sz = -1 ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(attr) ++ if err != nil { ++ return ++ } ++ var _p1 unsafe.Pointer ++ if len(data) > 0 { ++ _p1 = unsafe.Pointer(&data[0]) ++ } else { ++ _p1 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FSETXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(data)), uintptr(flag)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FsetxattrAddr() *(func(fd int, attr string, data []byte, flag int) (err error)) ++ ++var Fsetxattr = enter_Fsetxattr ++ ++func enter_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) { ++ funcref := get_FsetxattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___FSETXATTR_A<<4, "") == 0 { ++ *funcref = impl_Fsetxattr ++ } else { ++ *funcref = error_Fsetxattr + } ++ return (*funcref)(fd, attr, data, flag) ++} ++ ++func error_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { +- r0, _, e1 := syscall_syscall(SYS___ACCEPT_A, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCEPT_A<<4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCEPT4_A<<4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)) ++ runtime.ExitSyscall() + fd = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_accept4Addr() *(func(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)) ++ ++var accept4 = enter_accept4 ++ ++func enter_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { ++ funcref := get_accept4Addr() ++ if funcptrtest(GetZosLibVec()+SYS___ACCEPT4_A<<4, "") == 0 { ++ *funcref = impl_accept4 ++ } else { ++ *funcref = error_accept4 + } ++ return (*funcref)(s, rsa, addrlen, flags) ++} ++ ++func error_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { ++ fd = -1 ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { +- _, _, e1 := syscall_syscall(SYS___BIND_A, uintptr(s), uintptr(addr), uintptr(addrlen)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___BIND_A<<4, uintptr(s), uintptr(addr), uintptr(addrlen)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -78,9 +291,11 @@ func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { +- _, _, e1 := syscall_syscall(SYS___CONNECT_A, uintptr(s), uintptr(addr), uintptr(addrlen)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CONNECT_A<<4, uintptr(s), uintptr(addr), uintptr(addrlen)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -88,10 +303,10 @@ func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func getgroups(n int, list *_Gid_t) (nn int, err error) { +- r0, _, e1 := syscall_rawsyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETGROUPS<<4, uintptr(n), uintptr(unsafe.Pointer(list))) + nn = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -99,9 +314,9 @@ func getgroups(n int, list *_Gid_t) (nn int, err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func setgroups(n int, list *_Gid_t) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETGROUPS<<4, uintptr(n), uintptr(unsafe.Pointer(list))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -109,9 +324,11 @@ func setgroups(n int, list *_Gid_t) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { +- _, _, e1 := syscall_syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETSOCKOPT<<4, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -119,9 +336,11 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { +- _, _, e1 := syscall_syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETSOCKOPT<<4, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -129,10 +348,10 @@ func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func socket(domain int, typ int, proto int) (fd int, err error) { +- r0, _, e1 := syscall_rawsyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SOCKET<<4, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -140,9 +359,9 @@ func socket(domain int, typ int, proto int) (fd int, err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { +- _, _, e1 := syscall_rawsyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SOCKETPAIR<<4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -150,9 +369,9 @@ func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS___GETPEERNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETPEERNAME_A<<4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -160,10 +379,52 @@ func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS___GETSOCKNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETSOCKNAME_A<<4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Removexattr(path string, attr string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(attr) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___REMOVEXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_RemovexattrAddr() *(func(path string, attr string) (err error)) ++ ++var Removexattr = enter_Removexattr ++ ++func enter_Removexattr(path string, attr string) (err error) { ++ funcref := get_RemovexattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___REMOVEXATTR_A<<4, "") == 0 { ++ *funcref = impl_Removexattr ++ } else { ++ *funcref = error_Removexattr + } ++ return (*funcref)(path, attr) ++} ++ ++func error_Removexattr(path string, attr string) (err error) { ++ err = ENOSYS + return + } + +@@ -176,10 +437,12 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl + } else { + _p0 = unsafe.Pointer(&_zero) + } +- r0, _, e1 := syscall_syscall6(SYS___RECVFROM_A, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RECVFROM_A<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) ++ runtime.ExitSyscall() + n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -193,9 +456,11 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) ( + } else { + _p0 = unsafe.Pointer(&_zero) + } +- _, _, e1 := syscall_syscall6(SYS___SENDTO_A, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SENDTO_A<<4, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -203,10 +468,12 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) ( + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { +- r0, _, e1 := syscall_syscall(SYS___RECVMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RECVMSG_A<<4, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) ++ runtime.ExitSyscall() + n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -214,10 +481,12 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { +- r0, _, e1 := syscall_syscall(SYS___SENDMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SENDMSG_A<<4, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) ++ runtime.ExitSyscall() + n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -225,10 +494,12 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { +- r0, _, e1 := syscall_syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MMAP<<4, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ++ runtime.ExitSyscall() + ret = uintptr(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -236,9 +507,11 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) ( + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func munmap(addr uintptr, length uintptr) (err error) { +- _, _, e1 := syscall_syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MUNMAP<<4, uintptr(addr), uintptr(length)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -246,9 +519,11 @@ func munmap(addr uintptr, length uintptr) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func ioctl(fd int, req int, arg uintptr) (err error) { +- _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_IOCTL<<4, uintptr(fd), uintptr(req), uintptr(arg)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -256,9 +531,62 @@ func ioctl(fd int, req int, arg uintptr) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { +- _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_IOCTL<<4, uintptr(fd), uintptr(req), uintptr(arg)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMAT<<4, uintptr(id), uintptr(addr), uintptr(flag)) ++ runtime.ExitSyscall() ++ ret = uintptr(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMCTL64<<4, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf))) ++ runtime.ExitSyscall() ++ result = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func shmdt(addr uintptr) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMDT<<4, uintptr(addr)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func shmget(key int, size int, flag int) (id int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMGET<<4, uintptr(key), uintptr(size), uintptr(flag)) ++ runtime.ExitSyscall() ++ id = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -271,9 +599,11 @@ func Access(path string, mode uint32) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___ACCESS_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCESS_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -286,9 +616,11 @@ func Chdir(path string) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___CHDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHDIR_A<<4, uintptr(unsafe.Pointer(_p0))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -301,9 +633,11 @@ func Chown(path string, uid int, gid int) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___CHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHOWN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -316,9 +650,11 @@ func Chmod(path string, mode uint32) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___CHMOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHMOD_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -331,10 +667,12 @@ func Creat(path string, mode uint32) (fd int, err error) { + if err != nil { + return + } +- r0, _, e1 := syscall_syscall(SYS___CREAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CREAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) ++ runtime.ExitSyscall() + fd = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -342,10 +680,12 @@ func Creat(path string, mode uint32) (fd int, err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Dup(oldfd int) (fd int, err error) { +- r0, _, e1 := syscall_syscall(SYS_DUP, uintptr(oldfd), 0, 0) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP<<4, uintptr(oldfd)) ++ runtime.ExitSyscall() + fd = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -353,617 +693,2216 @@ func Dup(oldfd int) (fd int, err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Dup2(oldfd int, newfd int) (err error) { +- _, _, e1 := syscall_syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP2<<4, uintptr(oldfd), uintptr(newfd)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Errno2() (er2 int) { +- uer2, _, _ := syscall_syscall(SYS___ERRNO2, 0, 0, 0) +- er2 = int(uer2) ++func impl_Dup3(oldfd int, newfd int, flags int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP3<<4, uintptr(oldfd), uintptr(newfd), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_Dup3Addr() *(func(oldfd int, newfd int, flags int) (err error)) + +-func Err2ad() (eadd *int) { +- ueadd, _, _ := syscall_syscall(SYS___ERR2AD, 0, 0, 0) +- eadd = (*int)(unsafe.Pointer(ueadd)) +- return +-} ++var Dup3 = enter_Dup3 + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++func enter_Dup3(oldfd int, newfd int, flags int) (err error) { ++ funcref := get_Dup3Addr() ++ if funcptrtest(GetZosLibVec()+SYS_DUP3<<4, "") == 0 { ++ *funcref = impl_Dup3 ++ } else { ++ *funcref = error_Dup3 ++ } ++ return (*funcref)(oldfd, newfd, flags) ++} + +-func Exit(code int) { +- syscall_syscall(SYS_EXIT, uintptr(code), 0, 0) ++func error_Dup3(oldfd int, newfd int, flags int) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Fchdir(fd int) (err error) { +- _, _, e1 := syscall_syscall(SYS_FCHDIR, uintptr(fd), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++func impl_Dirfd(dirp uintptr) (fd int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DIRFD<<4, uintptr(dirp)) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_DirfdAddr() *(func(dirp uintptr) (fd int, err error)) + +-func Fchmod(fd int, mode uint32) (err error) { +- _, _, e1 := syscall_syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++var Dirfd = enter_Dirfd ++ ++func enter_Dirfd(dirp uintptr) (fd int, err error) { ++ funcref := get_DirfdAddr() ++ if funcptrtest(GetZosLibVec()+SYS_DIRFD<<4, "") == 0 { ++ *funcref = impl_Dirfd ++ } else { ++ *funcref = error_Dirfd + } ++ return (*funcref)(dirp) ++} ++ ++func error_Dirfd(dirp uintptr) (fd int, err error) { ++ fd = -1 ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Fchown(fd int, uid int, gid int) (err error) { +- _, _, e1 := syscall_syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) +- if e1 != 0 { +- err = errnoErr(e1) ++func impl_EpollCreate(size int) (fd int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CREATE<<4, uintptr(size)) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_EpollCreateAddr() *(func(size int) (fd int, err error)) + +-func FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) { +- r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) +- retval = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++var EpollCreate = enter_EpollCreate ++ ++func enter_EpollCreate(size int) (fd int, err error) { ++ funcref := get_EpollCreateAddr() ++ if funcptrtest(GetZosLibVec()+SYS_EPOLL_CREATE<<4, "") == 0 { ++ *funcref = impl_EpollCreate ++ } else { ++ *funcref = error_EpollCreate + } ++ return (*funcref)(size) ++} ++ ++func error_EpollCreate(size int) (fd int, err error) { ++ fd = -1 ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func fstat(fd int, stat *Stat_LE_t) (err error) { +- _, _, e1 := syscall_syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++func impl_EpollCreate1(flags int) (fd int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CREATE1<<4, uintptr(flags)) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_EpollCreate1Addr() *(func(flags int) (fd int, err error)) + +-func Fstatvfs(fd int, stat *Statvfs_t) (err error) { +- _, _, e1 := syscall_syscall(SYS_FSTATVFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++var EpollCreate1 = enter_EpollCreate1 ++ ++func enter_EpollCreate1(flags int) (fd int, err error) { ++ funcref := get_EpollCreate1Addr() ++ if funcptrtest(GetZosLibVec()+SYS_EPOLL_CREATE1<<4, "") == 0 { ++ *funcref = impl_EpollCreate1 ++ } else { ++ *funcref = error_EpollCreate1 + } ++ return (*funcref)(flags) ++} ++ ++func error_EpollCreate1(flags int) (fd int, err error) { ++ fd = -1 ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Fsync(fd int) (err error) { +- _, _, e1 := syscall_syscall(SYS_FSYNC, uintptr(fd), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++func impl_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CTL<<4, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_EpollCtlAddr() *(func(epfd int, op int, fd int, event *EpollEvent) (err error)) + +-func Ftruncate(fd int, length int64) (err error) { +- _, _, e1 := syscall_syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++var EpollCtl = enter_EpollCtl ++ ++func enter_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { ++ funcref := get_EpollCtlAddr() ++ if funcptrtest(GetZosLibVec()+SYS_EPOLL_CTL<<4, "") == 0 { ++ *funcref = impl_EpollCtl ++ } else { ++ *funcref = error_EpollCtl + } +- return ++ return (*funcref)(epfd, op, fd, event) + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +- +-func Getpagesize() (pgsize int) { +- r0, _, _ := syscall_syscall(SYS_GETPAGESIZE, 0, 0, 0) +- pgsize = int(r0) ++func error_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Mprotect(b []byte, prot int) (err error) { ++func impl_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) { + var _p0 unsafe.Pointer +- if len(b) > 0 { +- _p0 = unsafe.Pointer(&b[0]) ++ if len(events) > 0 { ++ _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } +- _, _, e1 := syscall_syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_PWAIT<<4, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), uintptr(unsafe.Pointer(sigmask))) ++ runtime.ExitSyscall() ++ n = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_EpollPwaitAddr() *(func(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error)) + +-func Msync(b []byte, flags int) (err error) { +- var _p0 unsafe.Pointer +- if len(b) > 0 { +- _p0 = unsafe.Pointer(&b[0]) ++var EpollPwait = enter_EpollPwait ++ ++func enter_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) { ++ funcref := get_EpollPwaitAddr() ++ if funcptrtest(GetZosLibVec()+SYS_EPOLL_PWAIT<<4, "") == 0 { ++ *funcref = impl_EpollPwait + } else { +- _p0 = unsafe.Pointer(&_zero) +- } +- _, _, e1 := syscall_syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) +- if e1 != 0 { +- err = errnoErr(e1) ++ *funcref = error_EpollPwait + } ++ return (*funcref)(epfd, events, msec, sigmask) ++} ++ ++func error_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) { ++ n = -1 ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Poll(fds []PollFd, timeout int) (n int, err error) { ++func impl_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer +- if len(fds) > 0 { +- _p0 = unsafe.Pointer(&fds[0]) ++ if len(events) > 0 { ++ _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } +- r0, _, e1 := syscall_syscall(SYS_POLL, uintptr(_p0), uintptr(len(fds)), uintptr(timeout)) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_WAIT<<4, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec)) ++ runtime.ExitSyscall() + n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_EpollWaitAddr() *(func(epfd int, events []EpollEvent, msec int) (n int, err error)) + +-func Times(tms *Tms) (ticks uintptr, err error) { +- r0, _, e1 := syscall_syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) +- ticks = uintptr(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++var EpollWait = enter_EpollWait ++ ++func enter_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { ++ funcref := get_EpollWaitAddr() ++ if funcptrtest(GetZosLibVec()+SYS_EPOLL_WAIT<<4, "") == 0 { ++ *funcref = impl_EpollWait ++ } else { ++ *funcref = error_EpollWait + } ++ return (*funcref)(epfd, events, msec) ++} ++ ++func error_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { ++ n = -1 ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func W_Getmntent(buff *byte, size int) (lastsys int, err error) { +- r0, _, e1 := syscall_syscall(SYS_W_GETMNTENT, uintptr(unsafe.Pointer(buff)), uintptr(size), 0) +- lastsys = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) +- } ++func Errno2() (er2 int) { ++ runtime.EnterSyscall() ++ r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS___ERRNO2<<4) ++ runtime.ExitSyscall() ++ er2 = int(r0) + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func W_Getmntent_A(buff *byte, size int) (lastsys int, err error) { +- r0, _, e1 := syscall_syscall(SYS___W_GETMNTENT_A, uintptr(unsafe.Pointer(buff)), uintptr(size), 0) +- lastsys = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++func impl_Eventfd(initval uint, flags int) (fd int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EVENTFD<<4, uintptr(initval), uintptr(flags)) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + ++//go:nosplit ++func get_EventfdAddr() *(func(initval uint, flags int) (fd int, err error)) ++ ++var Eventfd = enter_Eventfd ++ ++func enter_Eventfd(initval uint, flags int) (fd int, err error) { ++ funcref := get_EventfdAddr() ++ if funcptrtest(GetZosLibVec()+SYS_EVENTFD<<4, "") == 0 { ++ *funcref = impl_Eventfd ++ } else { ++ *funcref = error_Eventfd ++ } ++ return (*funcref)(initval, flags) ++} ++ ++func error_Eventfd(initval uint, flags int) (fd int, err error) { ++ fd = -1 ++ err = ENOSYS ++ return ++} ++ + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) { ++func Exit(code int) { ++ runtime.EnterSyscall() ++ CallLeFuncWithErr(GetZosLibVec()+SYS_EXIT<<4, uintptr(code)) ++ runtime.ExitSyscall() ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } +- var _p1 *byte +- _p1, err = BytePtrFromString(filesystem) +- if err != nil { +- return +- } +- var _p2 *byte +- _p2, err = BytePtrFromString(fstype) +- if err != nil { +- return +- } +- var _p3 *byte +- _p3, err = BytePtrFromString(parm) +- if err != nil { +- return +- } +- _, _, e1 := syscall_syscall6(SYS___MOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(mtm), uintptr(parmlen), uintptr(unsafe.Pointer(_p3))) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FACCESSAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_FaccessatAddr() *(func(dirfd int, path string, mode uint32, flags int) (err error)) + +-func unmount(filesystem string, mtm int) (err error) { ++var Faccessat = enter_Faccessat ++ ++func enter_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { ++ funcref := get_FaccessatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___FACCESSAT_A<<4, "") == 0 { ++ *funcref = impl_Faccessat ++ } else { ++ *funcref = error_Faccessat ++ } ++ return (*funcref)(dirfd, path, mode, flags) ++} ++ ++func error_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Fchdir(fd int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHDIR<<4, uintptr(fd)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Fchmod(fd int, mode uint32) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHMOD<<4, uintptr(fd), uintptr(mode)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte +- _p0, err = BytePtrFromString(filesystem) ++ _p0, err = BytePtrFromString(path) + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___UMOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mtm), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FCHMODAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FchmodatAddr() *(func(dirfd int, path string, mode uint32, flags int) (err error)) ++ ++var Fchmodat = enter_Fchmodat ++ ++func enter_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { ++ funcref := get_FchmodatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___FCHMODAT_A<<4, "") == 0 { ++ *funcref = impl_Fchmodat ++ } else { ++ *funcref = error_Fchmodat ++ } ++ return (*funcref)(dirfd, path, mode, flags) ++} ++ ++func error_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Fchown(fd int, uid int, gid int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHOWN<<4, uintptr(fd), uintptr(uid), uintptr(gid)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Chroot(path string) (err error) { ++func impl_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___CHROOT_A, uintptr(unsafe.Pointer(_p0)), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FCHOWNAT_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FchownatAddr() *(func(fd int, path string, uid int, gid int, flags int) (err error)) ++ ++var Fchownat = enter_Fchownat ++ ++func enter_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) { ++ funcref := get_FchownatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___FCHOWNAT_A<<4, "") == 0 { ++ *funcref = impl_Fchownat ++ } else { ++ *funcref = error_Fchownat + } ++ return (*funcref)(fd, path, uid, gid, flags) ++} ++ ++func error_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Uname(buf *Utsname) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS___UNAME_A, uintptr(unsafe.Pointer(buf)), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++func FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), uintptr(arg)) ++ runtime.ExitSyscall() ++ retval = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Gethostname(buf []byte) (err error) { ++func impl_Fdatasync(fd int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FDATASYNC<<4, uintptr(fd)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FdatasyncAddr() *(func(fd int) (err error)) ++ ++var Fdatasync = enter_Fdatasync ++ ++func enter_Fdatasync(fd int) (err error) { ++ funcref := get_FdatasyncAddr() ++ if funcptrtest(GetZosLibVec()+SYS_FDATASYNC<<4, "") == 0 { ++ *funcref = impl_Fdatasync ++ } else { ++ *funcref = error_Fdatasync ++ } ++ return (*funcref)(fd) ++} ++ ++func error_Fdatasync(fd int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func fstat(fd int, stat *Stat_LE_t) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTAT<<4, uintptr(fd), uintptr(unsafe.Pointer(stat))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FSTATAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_fstatatAddr() *(func(dirfd int, path string, stat *Stat_LE_t, flags int) (err error)) ++ ++var fstatat = enter_fstatat ++ ++func enter_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) { ++ funcref := get_fstatatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___FSTATAT_A<<4, "") == 0 { ++ *funcref = impl_fstatat ++ } else { ++ *funcref = error_fstatat ++ } ++ return (*funcref)(dirfd, path, stat, flags) ++} ++ ++func error_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(link) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(attr) ++ if err != nil { ++ return ++ } ++ var _p2 unsafe.Pointer ++ if len(dest) > 0 { ++ _p2 = unsafe.Pointer(&dest[0]) ++ } else { ++ _p2 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LGETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest))) ++ runtime.ExitSyscall() ++ sz = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_LgetxattrAddr() *(func(link string, attr string, dest []byte) (sz int, err error)) ++ ++var Lgetxattr = enter_Lgetxattr ++ ++func enter_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { ++ funcref := get_LgetxattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___LGETXATTR_A<<4, "") == 0 { ++ *funcref = impl_Lgetxattr ++ } else { ++ *funcref = error_Lgetxattr ++ } ++ return (*funcref)(link, attr, dest) ++} ++ ++func error_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { ++ sz = -1 ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Lsetxattr(path string, attr string, data []byte, flags int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(attr) ++ if err != nil { ++ return ++ } ++ var _p2 unsafe.Pointer ++ if len(data) > 0 { ++ _p2 = unsafe.Pointer(&data[0]) ++ } else { ++ _p2 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LSETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_LsetxattrAddr() *(func(path string, attr string, data []byte, flags int) (err error)) ++ ++var Lsetxattr = enter_Lsetxattr ++ ++func enter_Lsetxattr(path string, attr string, data []byte, flags int) (err error) { ++ funcref := get_LsetxattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___LSETXATTR_A<<4, "") == 0 { ++ *funcref = impl_Lsetxattr ++ } else { ++ *funcref = error_Lsetxattr ++ } ++ return (*funcref)(path, attr, data, flags) ++} ++ ++func error_Lsetxattr(path string, attr string, data []byte, flags int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Fstatfs(fd int, buf *Statfs_t) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTATFS<<4, uintptr(fd), uintptr(unsafe.Pointer(buf))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FstatfsAddr() *(func(fd int, buf *Statfs_t) (err error)) ++ ++var Fstatfs = enter_Fstatfs ++ ++func enter_Fstatfs(fd int, buf *Statfs_t) (err error) { ++ funcref := get_FstatfsAddr() ++ if funcptrtest(GetZosLibVec()+SYS_FSTATFS<<4, "") == 0 { ++ *funcref = impl_Fstatfs ++ } else { ++ *funcref = error_Fstatfs ++ } ++ return (*funcref)(fd, buf) ++} ++ ++func error_Fstatfs(fd int, buf *Statfs_t) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Fstatvfs(fd int, stat *Statvfs_t) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTATVFS<<4, uintptr(fd), uintptr(unsafe.Pointer(stat))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Fsync(fd int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSYNC<<4, uintptr(fd)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Futimes(fd int, tv []Timeval) (err error) { + var _p0 unsafe.Pointer +- if len(buf) > 0 { +- _p0 = unsafe.Pointer(&buf[0]) ++ if len(tv) > 0 { ++ _p0 = unsafe.Pointer(&tv[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } +- _, _, e1 := syscall_syscall(SYS___GETHOSTNAME_A, uintptr(_p0), uintptr(len(buf)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FUTIMES<<4, uintptr(fd), uintptr(_p0), uintptr(len(tv))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_FutimesAddr() *(func(fd int, tv []Timeval) (err error)) + +-func Getegid() (egid int) { +- r0, _, _ := syscall_rawsyscall(SYS_GETEGID, 0, 0, 0) +- egid = int(r0) ++var Futimes = enter_Futimes ++ ++func enter_Futimes(fd int, tv []Timeval) (err error) { ++ funcref := get_FutimesAddr() ++ if funcptrtest(GetZosLibVec()+SYS_FUTIMES<<4, "") == 0 { ++ *funcref = impl_Futimes ++ } else { ++ *funcref = error_Futimes ++ } ++ return (*funcref)(fd, tv) ++} ++ ++func error_Futimes(fd int, tv []Timeval) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Geteuid() (uid int) { +- r0, _, _ := syscall_rawsyscall(SYS_GETEUID, 0, 0, 0) +- uid = int(r0) ++func impl_Futimesat(dirfd int, path string, tv []Timeval) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 unsafe.Pointer ++ if len(tv) > 0 { ++ _p1 = unsafe.Pointer(&tv[0]) ++ } else { ++ _p1 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FUTIMESAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(tv))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_FutimesatAddr() *(func(dirfd int, path string, tv []Timeval) (err error)) ++ ++var Futimesat = enter_Futimesat ++ ++func enter_Futimesat(dirfd int, path string, tv []Timeval) (err error) { ++ funcref := get_FutimesatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___FUTIMESAT_A<<4, "") == 0 { ++ *funcref = impl_Futimesat ++ } else { ++ *funcref = error_Futimesat ++ } ++ return (*funcref)(dirfd, path, tv) ++} ++ ++func error_Futimesat(dirfd int, path string, tv []Timeval) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Getgid() (gid int) { +- r0, _, _ := syscall_rawsyscall(SYS_GETGID, 0, 0, 0) +- gid = int(r0) ++func Ftruncate(fd int, length int64) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FTRUNCATE<<4, uintptr(fd), uintptr(length)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Getpid() (pid int) { +- r0, _, _ := syscall_rawsyscall(SYS_GETPID, 0, 0, 0) +- pid = int(r0) ++func impl_Getrandom(buf []byte, flags int) (n int, err error) { ++ var _p0 unsafe.Pointer ++ if len(buf) > 0 { ++ _p0 = unsafe.Pointer(&buf[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRANDOM<<4, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) ++ runtime.ExitSyscall() ++ n = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_GetrandomAddr() *(func(buf []byte, flags int) (n int, err error)) ++ ++var Getrandom = enter_Getrandom ++ ++func enter_Getrandom(buf []byte, flags int) (n int, err error) { ++ funcref := get_GetrandomAddr() ++ if funcptrtest(GetZosLibVec()+SYS_GETRANDOM<<4, "") == 0 { ++ *funcref = impl_Getrandom ++ } else { ++ *funcref = error_Getrandom ++ } ++ return (*funcref)(buf, flags) ++} ++ ++func error_Getrandom(buf []byte, flags int) (n int, err error) { ++ n = -1 ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Getpgid(pid int) (pgid int, err error) { +- r0, _, e1 := syscall_rawsyscall(SYS_GETPGID, uintptr(pid), 0, 0) +- pgid = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++func impl_InotifyInit() (fd int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec() + SYS_INOTIFY_INIT<<4) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_InotifyInitAddr() *(func() (fd int, err error)) ++ ++var InotifyInit = enter_InotifyInit ++ ++func enter_InotifyInit() (fd int, err error) { ++ funcref := get_InotifyInitAddr() ++ if funcptrtest(GetZosLibVec()+SYS_INOTIFY_INIT<<4, "") == 0 { ++ *funcref = impl_InotifyInit ++ } else { ++ *funcref = error_InotifyInit + } ++ return (*funcref)() ++} ++ ++func error_InotifyInit() (fd int, err error) { ++ fd = -1 ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Getppid() (pid int) { +- r0, _, _ := syscall_rawsyscall(SYS_GETPPID, 0, 0, 0) +- pid = int(r0) ++func impl_InotifyInit1(flags int) (fd int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_INOTIFY_INIT1<<4, uintptr(flags)) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_InotifyInit1Addr() *(func(flags int) (fd int, err error)) ++ ++var InotifyInit1 = enter_InotifyInit1 ++ ++func enter_InotifyInit1(flags int) (fd int, err error) { ++ funcref := get_InotifyInit1Addr() ++ if funcptrtest(GetZosLibVec()+SYS_INOTIFY_INIT1<<4, "") == 0 { ++ *funcref = impl_InotifyInit1 ++ } else { ++ *funcref = error_InotifyInit1 ++ } ++ return (*funcref)(flags) ++} ++ ++func error_InotifyInit1(flags int) (fd int, err error) { ++ fd = -1 ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(pathname) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___INOTIFY_ADD_WATCH_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) ++ runtime.ExitSyscall() ++ watchdesc = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_InotifyAddWatchAddr() *(func(fd int, pathname string, mask uint32) (watchdesc int, err error)) ++ ++var InotifyAddWatch = enter_InotifyAddWatch ++ ++func enter_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { ++ funcref := get_InotifyAddWatchAddr() ++ if funcptrtest(GetZosLibVec()+SYS___INOTIFY_ADD_WATCH_A<<4, "") == 0 { ++ *funcref = impl_InotifyAddWatch ++ } else { ++ *funcref = error_InotifyAddWatch ++ } ++ return (*funcref)(fd, pathname, mask) ++} ++ ++func error_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { ++ watchdesc = -1 ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_INOTIFY_RM_WATCH<<4, uintptr(fd), uintptr(watchdesc)) ++ runtime.ExitSyscall() ++ success = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_InotifyRmWatchAddr() *(func(fd int, watchdesc uint32) (success int, err error)) ++ ++var InotifyRmWatch = enter_InotifyRmWatch ++ ++func enter_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { ++ funcref := get_InotifyRmWatchAddr() ++ if funcptrtest(GetZosLibVec()+SYS_INOTIFY_RM_WATCH<<4, "") == 0 { ++ *funcref = impl_InotifyRmWatch ++ } else { ++ *funcref = error_InotifyRmWatch ++ } ++ return (*funcref)(fd, watchdesc) ++} ++ ++func error_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { ++ success = -1 ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Listxattr(path string, dest []byte) (sz int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 unsafe.Pointer ++ if len(dest) > 0 { ++ _p1 = unsafe.Pointer(&dest[0]) ++ } else { ++ _p1 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LISTXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) ++ runtime.ExitSyscall() ++ sz = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_ListxattrAddr() *(func(path string, dest []byte) (sz int, err error)) ++ ++var Listxattr = enter_Listxattr ++ ++func enter_Listxattr(path string, dest []byte) (sz int, err error) { ++ funcref := get_ListxattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___LISTXATTR_A<<4, "") == 0 { ++ *funcref = impl_Listxattr ++ } else { ++ *funcref = error_Listxattr ++ } ++ return (*funcref)(path, dest) ++} ++ ++func error_Listxattr(path string, dest []byte) (sz int, err error) { ++ sz = -1 ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Llistxattr(path string, dest []byte) (sz int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 unsafe.Pointer ++ if len(dest) > 0 { ++ _p1 = unsafe.Pointer(&dest[0]) ++ } else { ++ _p1 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LLISTXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) ++ runtime.ExitSyscall() ++ sz = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_LlistxattrAddr() *(func(path string, dest []byte) (sz int, err error)) ++ ++var Llistxattr = enter_Llistxattr ++ ++func enter_Llistxattr(path string, dest []byte) (sz int, err error) { ++ funcref := get_LlistxattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___LLISTXATTR_A<<4, "") == 0 { ++ *funcref = impl_Llistxattr ++ } else { ++ *funcref = error_Llistxattr ++ } ++ return (*funcref)(path, dest) ++} ++ ++func error_Llistxattr(path string, dest []byte) (sz int, err error) { ++ sz = -1 ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Lremovexattr(path string, attr string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(attr) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LREMOVEXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_LremovexattrAddr() *(func(path string, attr string) (err error)) ++ ++var Lremovexattr = enter_Lremovexattr ++ ++func enter_Lremovexattr(path string, attr string) (err error) { ++ funcref := get_LremovexattrAddr() ++ if funcptrtest(GetZosLibVec()+SYS___LREMOVEXATTR_A<<4, "") == 0 { ++ *funcref = impl_Lremovexattr ++ } else { ++ *funcref = error_Lremovexattr ++ } ++ return (*funcref)(path, attr) ++} ++ ++func error_Lremovexattr(path string, attr string) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Lutimes(path string, tv []Timeval) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 unsafe.Pointer ++ if len(tv) > 0 { ++ _p1 = unsafe.Pointer(&tv[0]) ++ } else { ++ _p1 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LUTIMES_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(tv))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_LutimesAddr() *(func(path string, tv []Timeval) (err error)) ++ ++var Lutimes = enter_Lutimes ++ ++func enter_Lutimes(path string, tv []Timeval) (err error) { ++ funcref := get_LutimesAddr() ++ if funcptrtest(GetZosLibVec()+SYS___LUTIMES_A<<4, "") == 0 { ++ *funcref = impl_Lutimes ++ } else { ++ *funcref = error_Lutimes ++ } ++ return (*funcref)(path, tv) ++} ++ ++func error_Lutimes(path string, tv []Timeval) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Mprotect(b []byte, prot int) (err error) { ++ var _p0 unsafe.Pointer ++ if len(b) > 0 { ++ _p0 = unsafe.Pointer(&b[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MPROTECT<<4, uintptr(_p0), uintptr(len(b)), uintptr(prot)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Msync(b []byte, flags int) (err error) { ++ var _p0 unsafe.Pointer ++ if len(b) > 0 { ++ _p0 = unsafe.Pointer(&b[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MSYNC<<4, uintptr(_p0), uintptr(len(b)), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Console2(cmsg *ConsMsg2, modstr *byte, concmd *uint32) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CONSOLE2<<4, uintptr(unsafe.Pointer(cmsg)), uintptr(unsafe.Pointer(modstr)), uintptr(unsafe.Pointer(concmd))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Poll(fds []PollFd, timeout int) (n int, err error) { ++ var _p0 unsafe.Pointer ++ if len(fds) > 0 { ++ _p0 = unsafe.Pointer(&fds[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_POLL<<4, uintptr(_p0), uintptr(len(fds)), uintptr(timeout)) ++ runtime.ExitSyscall() ++ n = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READDIR_R_A<<4, uintptr(dirp), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Statfs(path string, buf *Statfs_t) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___STATFS_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_StatfsAddr() *(func(path string, buf *Statfs_t) (err error)) ++ ++var Statfs = enter_Statfs ++ ++func enter_Statfs(path string, buf *Statfs_t) (err error) { ++ funcref := get_StatfsAddr() ++ if funcptrtest(GetZosLibVec()+SYS___STATFS_A<<4, "") == 0 { ++ *funcref = impl_Statfs ++ } else { ++ *funcref = error_Statfs ++ } ++ return (*funcref)(path, buf) ++} ++ ++func error_Statfs(path string, buf *Statfs_t) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Syncfs(fd int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SYNCFS<<4, uintptr(fd)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_SyncfsAddr() *(func(fd int) (err error)) ++ ++var Syncfs = enter_Syncfs ++ ++func enter_Syncfs(fd int) (err error) { ++ funcref := get_SyncfsAddr() ++ if funcptrtest(GetZosLibVec()+SYS_SYNCFS<<4, "") == 0 { ++ *funcref = impl_Syncfs ++ } else { ++ *funcref = error_Syncfs ++ } ++ return (*funcref)(fd) ++} ++ ++func error_Syncfs(fd int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Times(tms *Tms) (ticks uintptr, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TIMES<<4, uintptr(unsafe.Pointer(tms))) ++ runtime.ExitSyscall() ++ ticks = uintptr(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func W_Getmntent(buff *byte, size int) (lastsys int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_W_GETMNTENT<<4, uintptr(unsafe.Pointer(buff)), uintptr(size)) ++ runtime.ExitSyscall() ++ lastsys = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func W_Getmntent_A(buff *byte, size int) (lastsys int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___W_GETMNTENT_A<<4, uintptr(unsafe.Pointer(buff)), uintptr(size)) ++ runtime.ExitSyscall() ++ lastsys = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(filesystem) ++ if err != nil { ++ return ++ } ++ var _p2 *byte ++ _p2, err = BytePtrFromString(fstype) ++ if err != nil { ++ return ++ } ++ var _p3 *byte ++ _p3, err = BytePtrFromString(parm) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MOUNT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(mtm), uintptr(parmlen), uintptr(unsafe.Pointer(_p3))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func unmount_LE(filesystem string, mtm int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(filesystem) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UMOUNT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mtm)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Chroot(path string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHROOT_A<<4, uintptr(unsafe.Pointer(_p0))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SELECT<<4, uintptr(nmsgsfds), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout))) ++ runtime.ExitSyscall() ++ ret = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Uname(buf *Utsname) (err error) { ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_____OSNAME_A<<4, uintptr(unsafe.Pointer(buf))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Unshare(flags int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_UNSHARE<<4, uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_UnshareAddr() *(func(flags int) (err error)) ++ ++var Unshare = enter_Unshare ++ ++func enter_Unshare(flags int) (err error) { ++ funcref := get_UnshareAddr() ++ if funcptrtest(GetZosLibVec()+SYS_UNSHARE<<4, "") == 0 { ++ *funcref = impl_Unshare ++ } else { ++ *funcref = error_Unshare ++ } ++ return (*funcref)(flags) ++} ++ ++func error_Unshare(flags int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Gethostname(buf []byte) (err error) { ++ var _p0 unsafe.Pointer ++ if len(buf) > 0 { ++ _p0 = unsafe.Pointer(&buf[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETHOSTNAME_A<<4, uintptr(_p0), uintptr(len(buf))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Getgid() (gid int) { ++ r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETGID<<4) ++ gid = int(r0) ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Getpid() (pid int) { ++ r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETPID<<4) ++ pid = int(r0) ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Getpgid(pid int) (pgid int, err error) { ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETPGID<<4, uintptr(pid)) ++ pgid = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Getppid() (pid int) { ++ r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETPPID<<4) ++ pid = int(r0) ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Getpriority(which int, who int) (prio int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETPRIORITY<<4, uintptr(which), uintptr(who)) ++ runtime.ExitSyscall() ++ prio = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Getrlimit(resource int, rlim *Rlimit) (err error) { ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRLIMIT<<4, uintptr(resource), uintptr(unsafe.Pointer(rlim))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func getrusage(who int, rusage *rusage_zos) (err error) { ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRUSAGE<<4, uintptr(who), uintptr(unsafe.Pointer(rusage))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Getegid() (egid int) { ++ runtime.EnterSyscall() ++ r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETEGID<<4) ++ runtime.ExitSyscall() ++ egid = int(r0) ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Geteuid() (euid int) { ++ runtime.EnterSyscall() ++ r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETEUID<<4) ++ runtime.ExitSyscall() ++ euid = int(r0) ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Getsid(pid int) (sid int, err error) { ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETSID<<4, uintptr(pid)) ++ sid = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Getuid() (uid int) { ++ r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETUID<<4) ++ uid = int(r0) ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Kill(pid int, sig Signal) (err error) { ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_KILL<<4, uintptr(pid), uintptr(sig)) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Lchown(path string, uid int, gid int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LCHOWN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Link(path string, link string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(link) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LINK_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(oldPath) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(newPath) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LINKAT_A<<4, uintptr(oldDirFd), uintptr(unsafe.Pointer(_p0)), uintptr(newDirFd), uintptr(unsafe.Pointer(_p1)), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_LinkatAddr() *(func(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error)) ++ ++var Linkat = enter_Linkat ++ ++func enter_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) { ++ funcref := get_LinkatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___LINKAT_A<<4, "") == 0 { ++ *funcref = impl_Linkat ++ } else { ++ *funcref = error_Linkat ++ } ++ return (*funcref)(oldDirFd, oldPath, newDirFd, newPath, flags) ++} ++ ++func error_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Listen(s int, n int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_LISTEN<<4, uintptr(s), uintptr(n)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func lstat(path string, stat *Stat_LE_t) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LSTAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Mkdir(path string, mode uint32) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKDIR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Mkdirat(dirfd int, path string, mode uint32) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKDIRAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_MkdiratAddr() *(func(dirfd int, path string, mode uint32) (err error)) ++ ++var Mkdirat = enter_Mkdirat ++ ++func enter_Mkdirat(dirfd int, path string, mode uint32) (err error) { ++ funcref := get_MkdiratAddr() ++ if funcptrtest(GetZosLibVec()+SYS___MKDIRAT_A<<4, "") == 0 { ++ *funcref = impl_Mkdirat ++ } else { ++ *funcref = error_Mkdirat ++ } ++ return (*funcref)(dirfd, path, mode) ++} ++ ++func error_Mkdirat(dirfd int, path string, mode uint32) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Mkfifo(path string, mode uint32) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKFIFO_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Mknod(path string, mode uint32, dev int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKNOD_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKNODAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_MknodatAddr() *(func(dirfd int, path string, mode uint32, dev int) (err error)) ++ ++var Mknodat = enter_Mknodat ++ ++func enter_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { ++ funcref := get_MknodatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___MKNODAT_A<<4, "") == 0 { ++ *funcref = impl_Mknodat ++ } else { ++ *funcref = error_Mknodat ++ } ++ return (*funcref)(dirfd, path, mode, dev) ++} ++ ++func error_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_PivotRoot(newroot string, oldroot string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(newroot) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(oldroot) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___PIVOT_ROOT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_PivotRootAddr() *(func(newroot string, oldroot string) (err error)) ++ ++var PivotRoot = enter_PivotRoot ++ ++func enter_PivotRoot(newroot string, oldroot string) (err error) { ++ funcref := get_PivotRootAddr() ++ if funcptrtest(GetZosLibVec()+SYS___PIVOT_ROOT_A<<4, "") == 0 { ++ *funcref = impl_PivotRoot ++ } else { ++ *funcref = error_PivotRoot ++ } ++ return (*funcref)(newroot, oldroot) ++} ++ ++func error_PivotRoot(newroot string, oldroot string) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Pread(fd int, p []byte, offset int64) (n int, err error) { ++ var _p0 unsafe.Pointer ++ if len(p) > 0 { ++ _p0 = unsafe.Pointer(&p[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PREAD<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset)) ++ runtime.ExitSyscall() ++ n = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Getpriority(which int, who int) (prio int, err error) { +- r0, _, e1 := syscall_syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) +- prio = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ++ var _p0 unsafe.Pointer ++ if len(p) > 0 { ++ _p0 = unsafe.Pointer(&p[0]) ++ } else { ++ _p0 = unsafe.Pointer(&_zero) ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PWRITE<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset)) ++ runtime.ExitSyscall() ++ n = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Getrlimit(resource int, rlim *Rlimit) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++func impl_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___PRCTL_A<<4, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_PrctlAddr() *(func(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)) + +-func getrusage(who int, rusage *rusage_zos) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++var Prctl = enter_Prctl ++ ++func enter_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { ++ funcref := get_PrctlAddr() ++ if funcptrtest(GetZosLibVec()+SYS___PRCTL_A<<4, "") == 0 { ++ *funcref = impl_Prctl ++ } else { ++ *funcref = error_Prctl + } +- return ++ return (*funcref)(option, arg2, arg3, arg4, arg5) + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +- +-func Getsid(pid int) (sid int, err error) { +- r0, _, e1 := syscall_rawsyscall(SYS_GETSID, uintptr(pid), 0, 0) +- sid = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) +- } ++func error_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Getuid() (uid int) { +- r0, _, _ := syscall_rawsyscall(SYS_GETUID, 0, 0, 0) +- uid = int(r0) ++func impl_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PRLIMIT<<4, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_PrlimitAddr() *(func(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error)) + +-func Kill(pid int, sig Signal) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++var Prlimit = enter_Prlimit ++ ++func enter_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { ++ funcref := get_PrlimitAddr() ++ if funcptrtest(GetZosLibVec()+SYS_PRLIMIT<<4, "") == 0 { ++ *funcref = impl_Prlimit ++ } else { ++ *funcref = error_Prlimit + } ++ return (*funcref)(pid, resource, newlimit, old) ++} ++ ++func error_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Lchown(path string, uid int, gid int) (err error) { ++func Rename(from string, to string) (err error) { + var _p0 *byte +- _p0, err = BytePtrFromString(path) ++ _p0, err = BytePtrFromString(from) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(to) + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___LCHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAME_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Link(path string, link string) (err error) { ++func impl_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte +- _p0, err = BytePtrFromString(path) ++ _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte +- _p1, err = BytePtrFromString(link) ++ _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___LINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAMEAT_A<<4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_RenameatAddr() *(func(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)) + +-func Listen(s int, n int) (err error) { +- _, _, e1 := syscall_syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++var Renameat = enter_Renameat ++ ++func enter_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { ++ funcref := get_RenameatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___RENAMEAT_A<<4, "") == 0 { ++ *funcref = impl_Renameat ++ } else { ++ *funcref = error_Renameat + } ++ return (*funcref)(olddirfd, oldpath, newdirfd, newpath) ++} ++ ++func error_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func lstat(path string, stat *Stat_LE_t) (err error) { ++func impl_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { + var _p0 *byte +- _p0, err = BytePtrFromString(path) ++ _p0, err = BytePtrFromString(oldpath) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___LSTAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAMEAT2_A<<4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_Renameat2Addr() *(func(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)) + +-func Mkdir(path string, mode uint32) (err error) { +- var _p0 *byte +- _p0, err = BytePtrFromString(path) +- if err != nil { +- return +- } +- _, _, e1 := syscall_syscall(SYS___MKDIR_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++var Renameat2 = enter_Renameat2 ++ ++func enter_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { ++ funcref := get_Renameat2Addr() ++ if funcptrtest(GetZosLibVec()+SYS___RENAMEAT2_A<<4, "") == 0 { ++ *funcref = impl_Renameat2 ++ } else { ++ *funcref = error_Renameat2 + } ++ return (*funcref)(olddirfd, oldpath, newdirfd, newpath, flags) ++} ++ ++func error_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Mkfifo(path string, mode uint32) (err error) { ++func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___MKFIFO_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RMDIR_A<<4, uintptr(unsafe.Pointer(_p0))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Mknod(path string, mode uint32, dev int) (err error) { +- var _p0 *byte +- _p0, err = BytePtrFromString(path) +- if err != nil { +- return +- } +- _, _, e1 := syscall_syscall(SYS___MKNOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) +- if e1 != 0 { +- err = errnoErr(e1) ++func Seek(fd int, offset int64, whence int) (off int64, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_LSEEK<<4, uintptr(fd), uintptr(offset), uintptr(whence)) ++ runtime.ExitSyscall() ++ off = int64(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Pread(fd int, p []byte, offset int64) (n int, err error) { +- var _p0 unsafe.Pointer +- if len(p) > 0 { +- _p0 = unsafe.Pointer(&p[0]) +- } else { +- _p0 = unsafe.Pointer(&_zero) ++func Setegid(egid int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETEGID<<4, uintptr(egid)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } +- r0, _, e1 := syscall_syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) +- n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Seteuid(euid int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETEUID<<4, uintptr(euid)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Pwrite(fd int, p []byte, offset int64) (n int, err error) { ++func impl_Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } +- r0, _, e1 := syscall_syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) +- n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SETHOSTNAME_A<<4, uintptr(_p0), uintptr(len(p))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_SethostnameAddr() *(func(p []byte) (err error)) + +-func Readlink(path string, buf []byte) (n int, err error) { +- var _p0 *byte +- _p0, err = BytePtrFromString(path) +- if err != nil { +- return +- } +- var _p1 unsafe.Pointer +- if len(buf) > 0 { +- _p1 = unsafe.Pointer(&buf[0]) ++var Sethostname = enter_Sethostname ++ ++func enter_Sethostname(p []byte) (err error) { ++ funcref := get_SethostnameAddr() ++ if funcptrtest(GetZosLibVec()+SYS___SETHOSTNAME_A<<4, "") == 0 { ++ *funcref = impl_Sethostname + } else { +- _p1 = unsafe.Pointer(&_zero) ++ *funcref = error_Sethostname + } +- r0, _, e1 := syscall_syscall(SYS___READLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) +- n = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) +- } +- return ++ return (*funcref)(p) + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +- +-func Rename(from string, to string) (err error) { +- var _p0 *byte +- _p0, err = BytePtrFromString(from) +- if err != nil { +- return +- } +- var _p1 *byte +- _p1, err = BytePtrFromString(to) +- if err != nil { +- return +- } +- _, _, e1 := syscall_syscall(SYS___RENAME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) +- if e1 != 0 { +- err = errnoErr(e1) +- } ++func error_Sethostname(p []byte) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Rmdir(path string) (err error) { +- var _p0 *byte +- _p0, err = BytePtrFromString(path) +- if err != nil { +- return +- } +- _, _, e1 := syscall_syscall(SYS___RMDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++func impl_Setns(fd int, nstype int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETNS<<4, uintptr(fd), uintptr(nstype)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + +-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++//go:nosplit ++func get_SetnsAddr() *(func(fd int, nstype int) (err error)) + +-func Seek(fd int, offset int64, whence int) (off int64, err error) { +- r0, _, e1 := syscall_syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) +- off = int64(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++var Setns = enter_Setns ++ ++func enter_Setns(fd int, nstype int) (err error) { ++ funcref := get_SetnsAddr() ++ if funcptrtest(GetZosLibVec()+SYS_SETNS<<4, "") == 0 { ++ *funcref = impl_Setns ++ } else { ++ *funcref = error_Setns + } ++ return (*funcref)(fd, nstype) ++} ++ ++func error_Setns(fd int, nstype int) (err error) { ++ err = ENOSYS + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Setpriority(which int, who int, prio int) (err error) { +- _, _, e1 := syscall_syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETPRIORITY<<4, uintptr(which), uintptr(who), uintptr(prio)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -971,9 +2910,9 @@ func Setpriority(which int, who int, prio int) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Setpgid(pid int, pgid int) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETPGID<<4, uintptr(pid), uintptr(pgid)) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -981,9 +2920,9 @@ func Setpgid(pid int, pgid int) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Setrlimit(resource int, lim *Rlimit) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(lim)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETRLIMIT<<4, uintptr(resource), uintptr(unsafe.Pointer(lim))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -991,9 +2930,9 @@ func Setrlimit(resource int, lim *Rlimit) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Setregid(rgid int, egid int) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETREGID<<4, uintptr(rgid), uintptr(egid)) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1001,9 +2940,9 @@ func Setregid(rgid int, egid int) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Setreuid(ruid int, euid int) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETREUID<<4, uintptr(ruid), uintptr(euid)) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1011,10 +2950,10 @@ func Setreuid(ruid int, euid int) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Setsid() (pid int, err error) { +- r0, _, e1 := syscall_rawsyscall(SYS_SETSID, 0, 0, 0) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec() + SYS_SETSID<<4) + pid = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1022,9 +2961,11 @@ func Setsid() (pid int, err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Setuid(uid int) (err error) { +- _, _, e1 := syscall_syscall(SYS_SETUID, uintptr(uid), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETUID<<4, uintptr(uid)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1032,9 +2973,11 @@ func Setuid(uid int) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Setgid(uid int) (err error) { +- _, _, e1 := syscall_syscall(SYS_SETGID, uintptr(uid), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETGID<<4, uintptr(uid)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1042,9 +2985,11 @@ func Setgid(uid int) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Shutdown(fd int, how int) (err error) { +- _, _, e1 := syscall_syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHUTDOWN<<4, uintptr(fd), uintptr(how)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1057,9 +3002,11 @@ func stat(path string, statLE *Stat_LE_t) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___STAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statLE)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___STAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statLE))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1077,17 +3024,63 @@ func Symlink(path string, link string) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___SYMLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SYMLINK_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Symlinkat(oldPath string, dirfd int, newPath string) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(oldPath) ++ if err != nil { ++ return ++ } ++ var _p1 *byte ++ _p1, err = BytePtrFromString(newPath) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SYMLINKAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(dirfd), uintptr(unsafe.Pointer(_p1))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + ++//go:nosplit ++func get_SymlinkatAddr() *(func(oldPath string, dirfd int, newPath string) (err error)) ++ ++var Symlinkat = enter_Symlinkat ++ ++func enter_Symlinkat(oldPath string, dirfd int, newPath string) (err error) { ++ funcref := get_SymlinkatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___SYMLINKAT_A<<4, "") == 0 { ++ *funcref = impl_Symlinkat ++ } else { ++ *funcref = error_Symlinkat ++ } ++ return (*funcref)(oldPath, dirfd, newPath) ++} ++ ++func error_Symlinkat(oldPath string, dirfd int, newPath string) (err error) { ++ err = ENOSYS ++ return ++} ++ + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Sync() { +- syscall_syscall(SYS_SYNC, 0, 0, 0) ++ runtime.EnterSyscall() ++ CallLeFuncWithErr(GetZosLibVec() + SYS_SYNC<<4) ++ runtime.ExitSyscall() + return + } + +@@ -1099,9 +3092,11 @@ func Truncate(path string, length int64) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___TRUNCATE_A, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___TRUNCATE_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(length)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1109,9 +3104,11 @@ func Truncate(path string, length int64) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Tcgetattr(fildes int, termptr *Termios) (err error) { +- _, _, e1 := syscall_syscall(SYS_TCGETATTR, uintptr(fildes), uintptr(unsafe.Pointer(termptr)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TCGETATTR<<4, uintptr(fildes), uintptr(unsafe.Pointer(termptr))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1119,9 +3116,11 @@ func Tcgetattr(fildes int, termptr *Termios) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Tcsetattr(fildes int, when int, termptr *Termios) (err error) { +- _, _, e1 := syscall_syscall(SYS_TCSETATTR, uintptr(fildes), uintptr(when), uintptr(unsafe.Pointer(termptr))) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TCSETATTR<<4, uintptr(fildes), uintptr(when), uintptr(unsafe.Pointer(termptr))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1129,7 +3128,9 @@ func Tcsetattr(fildes int, when int, termptr *Termios) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func Umask(mask int) (oldmask int) { +- r0, _, _ := syscall_syscall(SYS_UMASK, uintptr(mask), 0, 0) ++ runtime.EnterSyscall() ++ r0, _, _ := CallLeFuncWithErr(GetZosLibVec()+SYS_UMASK<<4, uintptr(mask)) ++ runtime.ExitSyscall() + oldmask = int(r0) + return + } +@@ -1142,10 +3143,49 @@ func Unlink(path string) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___UNLINK_A, uintptr(unsafe.Pointer(_p0)), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UNLINK_A<<4, uintptr(unsafe.Pointer(_p0))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_Unlinkat(dirfd int, path string, flags int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UNLINKAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_UnlinkatAddr() *(func(dirfd int, path string, flags int) (err error)) ++ ++var Unlinkat = enter_Unlinkat ++ ++func enter_Unlinkat(dirfd int, path string, flags int) (err error) { ++ funcref := get_UnlinkatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___UNLINKAT_A<<4, "") == 0 { ++ *funcref = impl_Unlinkat ++ } else { ++ *funcref = error_Unlinkat + } ++ return (*funcref)(dirfd, path, flags) ++} ++ ++func error_Unlinkat(dirfd int, path string, flags int) (err error) { ++ err = ENOSYS + return + } + +@@ -1157,9 +3197,11 @@ func Utime(path string, utim *Utimbuf) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___UTIME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(utim)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIME_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(utim))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1172,11 +3214,91 @@ func open(path string, mode int, perm uint32) (fd int, err error) { + if err != nil { + return + } +- r0, _, e1 := syscall_syscall(SYS___OPEN_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPEN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPENAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode)) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_openatAddr() *(func(dirfd int, path string, flags int, mode uint32) (fd int, err error)) ++ ++var openat = enter_openat ++ ++func enter_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { ++ funcref := get_openatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___OPENAT_A<<4, "") == 0 { ++ *funcref = impl_openat ++ } else { ++ *funcref = error_openat ++ } ++ return (*funcref)(dirfd, path, flags, mode) ++} ++ ++func error_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { ++ fd = -1 ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func impl_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPENAT2_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size)) ++ runtime.ExitSyscall() + fd = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_openat2Addr() *(func(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error)) ++ ++var openat2 = enter_openat2 ++ ++func enter_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { ++ funcref := get_openat2Addr() ++ if funcptrtest(GetZosLibVec()+SYS___OPENAT2_A<<4, "") == 0 { ++ *funcref = impl_openat2 ++ } else { ++ *funcref = error_openat2 + } ++ return (*funcref)(dirfd, path, open_how, size) ++} ++ ++func error_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { ++ fd = -1 ++ err = ENOSYS + return + } + +@@ -1188,9 +3310,23 @@ func remove(path string) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_REMOVE<<4, uintptr(unsafe.Pointer(_p0))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func waitid(idType int, id int, info *Siginfo, options int) (err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAITID<<4, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1198,10 +3334,12 @@ func remove(path string) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) { +- r0, _, e1 := syscall_syscall(SYS_WAITPID, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options)) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAITPID<<4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options)) ++ runtime.ExitSyscall() + wpid = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1209,9 +3347,9 @@ func waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func gettimeofday(tv *timeval_zos) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETTIMEOFDAY<<4, uintptr(unsafe.Pointer(tv))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1219,9 +3357,9 @@ func gettimeofday(tv *timeval_zos) (err error) { + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + + func pipe(p *[2]_C_int) (err error) { +- _, _, e1 := syscall_rawsyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PIPE<<4, uintptr(unsafe.Pointer(p))) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +@@ -1234,20 +3372,87 @@ func utimes(path string, timeval *[2]Timeval) (err error) { + if err != nil { + return + } +- _, _, e1 := syscall_syscall(SYS___UTIMES_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) +- if e1 != 0 { +- err = errnoErr(e1) ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIMES_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval))) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } + + // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +-func Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) { +- r0, _, e1 := syscall_syscall6(SYS_SELECT, uintptr(nmsgsfds), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) +- ret = int(r0) +- if e1 != 0 { +- err = errnoErr(e1) ++func impl_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) { ++ var _p0 *byte ++ _p0, err = BytePtrFromString(path) ++ if err != nil { ++ return ++ } ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIMENSAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(ts)), uintptr(flags)) ++ runtime.ExitSyscall() ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++//go:nosplit ++func get_utimensatAddr() *(func(dirfd int, path string, ts *[2]Timespec, flags int) (err error)) ++ ++var utimensat = enter_utimensat ++ ++func enter_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) { ++ funcref := get_utimensatAddr() ++ if funcptrtest(GetZosLibVec()+SYS___UTIMENSAT_A<<4, "") == 0 { ++ *funcref = impl_utimensat ++ } else { ++ *funcref = error_utimensat ++ } ++ return (*funcref)(dirfd, path, ts, flags) ++} ++ ++func error_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) { ++ err = ENOSYS ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Posix_openpt(oflag int) (fd int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_POSIX_OPENPT<<4, uintptr(oflag)) ++ runtime.ExitSyscall() ++ fd = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Grantpt(fildes int) (rc int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GRANTPT<<4, uintptr(fildes)) ++ runtime.ExitSyscall() ++ rc = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) ++ } ++ return ++} ++ ++// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT ++ ++func Unlockpt(fildes int) (rc int, err error) { ++ runtime.EnterSyscall() ++ r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_UNLOCKPT<<4, uintptr(fildes)) ++ runtime.ExitSyscall() ++ rc = int(r0) ++ if int64(r0) == -1 { ++ err = errnoErr2(e1, e2) + } + return + } +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +index 0cc3ce49..524b0820 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +@@ -452,4 +452,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +index 856d92d6..f485dbf4 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +@@ -341,6 +341,7 @@ const ( + SYS_STATX = 332 + SYS_IO_PGETEVENTS = 333 + SYS_RSEQ = 334 ++ SYS_URETPROBE = 335 + SYS_PIDFD_SEND_SIGNAL = 424 + SYS_IO_URING_SETUP = 425 + SYS_IO_URING_ENTER = 426 +@@ -374,4 +375,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +index 8d467094..70b35bf3 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +@@ -416,4 +416,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +index edc17324..1893e2fe 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +@@ -85,7 +85,7 @@ const ( + SYS_SPLICE = 76 + SYS_TEE = 77 + SYS_READLINKAT = 78 +- SYS_FSTATAT = 79 ++ SYS_NEWFSTATAT = 79 + SYS_FSTAT = 80 + SYS_SYNC = 81 + SYS_FSYNC = 82 +@@ -319,4 +319,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +index 445eba20..16a4017d 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +@@ -84,6 +84,8 @@ const ( + SYS_SPLICE = 76 + SYS_TEE = 77 + SYS_READLINKAT = 78 ++ SYS_NEWFSTATAT = 79 ++ SYS_FSTAT = 80 + SYS_SYNC = 81 + SYS_FSYNC = 82 + SYS_FDATASYNC = 83 +@@ -313,4 +315,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +index adba01bc..7e567f1e 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +@@ -436,4 +436,10 @@ const ( + SYS_FUTEX_WAKE = 4454 + SYS_FUTEX_WAIT = 4455 + SYS_FUTEX_REQUEUE = 4456 ++ SYS_STATMOUNT = 4457 ++ SYS_LISTMOUNT = 4458 ++ SYS_LSM_GET_SELF_ATTR = 4459 ++ SYS_LSM_SET_SELF_ATTR = 4460 ++ SYS_LSM_LIST_MODULES = 4461 ++ SYS_MSEAL = 4462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +index 014c4e9c..38ae55e5 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +@@ -366,4 +366,10 @@ const ( + SYS_FUTEX_WAKE = 5454 + SYS_FUTEX_WAIT = 5455 + SYS_FUTEX_REQUEUE = 5456 ++ SYS_STATMOUNT = 5457 ++ SYS_LISTMOUNT = 5458 ++ SYS_LSM_GET_SELF_ATTR = 5459 ++ SYS_LSM_SET_SELF_ATTR = 5460 ++ SYS_LSM_LIST_MODULES = 5461 ++ SYS_MSEAL = 5462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +index ccc97d74..55e92e60 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +@@ -366,4 +366,10 @@ const ( + SYS_FUTEX_WAKE = 5454 + SYS_FUTEX_WAIT = 5455 + SYS_FUTEX_REQUEUE = 5456 ++ SYS_STATMOUNT = 5457 ++ SYS_LISTMOUNT = 5458 ++ SYS_LSM_GET_SELF_ATTR = 5459 ++ SYS_LSM_SET_SELF_ATTR = 5460 ++ SYS_LSM_LIST_MODULES = 5461 ++ SYS_MSEAL = 5462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +index ec2b64a9..60658d6a 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +@@ -436,4 +436,10 @@ const ( + SYS_FUTEX_WAKE = 4454 + SYS_FUTEX_WAIT = 4455 + SYS_FUTEX_REQUEUE = 4456 ++ SYS_STATMOUNT = 4457 ++ SYS_LISTMOUNT = 4458 ++ SYS_LSM_GET_SELF_ATTR = 4459 ++ SYS_LSM_SET_SELF_ATTR = 4460 ++ SYS_LSM_LIST_MODULES = 4461 ++ SYS_MSEAL = 4462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +index 21a839e3..e203e8a7 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +@@ -443,4 +443,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +index c11121ec..5944b97d 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +@@ -415,4 +415,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +index 909b631f..c66d416d 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +@@ -415,4 +415,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +index e49bed16..a5459e76 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +@@ -84,7 +84,7 @@ const ( + SYS_SPLICE = 76 + SYS_TEE = 77 + SYS_READLINKAT = 78 +- SYS_FSTATAT = 79 ++ SYS_NEWFSTATAT = 79 + SYS_FSTAT = 80 + SYS_SYNC = 81 + SYS_FSYNC = 82 +@@ -320,4 +320,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +index 66017d2d..01d86825 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +@@ -381,4 +381,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +index 47bab18d..7b703e77 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +@@ -394,4 +394,10 @@ const ( + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ++ SYS_STATMOUNT = 457 ++ SYS_LISTMOUNT = 458 ++ SYS_LSM_GET_SELF_ATTR = 459 ++ SYS_LSM_SET_SELF_ATTR = 460 ++ SYS_LSM_LIST_MODULES = 461 ++ SYS_MSEAL = 462 + ) +diff --git a/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go +index b2e30858..5e8c263c 100644 +--- a/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go ++++ b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go +@@ -1,2669 +1,2852 @@ +-// Copyright 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 run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s ++// Code generated by the command above; see README.md. DO NOT EDIT. + + //go:build zos && s390x + + package unix + +-// TODO: auto-generate. +- + const ( +- SYS_ACOSD128 = 0xB80 +- SYS_ACOSD32 = 0xB7E +- SYS_ACOSD64 = 0xB7F +- SYS_ACOSHD128 = 0xB83 +- SYS_ACOSHD32 = 0xB81 +- SYS_ACOSHD64 = 0xB82 +- SYS_AIO_FSYNC = 0xC69 +- SYS_ASCTIME = 0x0AE +- SYS_ASCTIME64 = 0xCD7 +- SYS_ASCTIME64_R = 0xCD8 +- SYS_ASIND128 = 0xB86 +- SYS_ASIND32 = 0xB84 +- SYS_ASIND64 = 0xB85 +- SYS_ASINHD128 = 0xB89 +- SYS_ASINHD32 = 0xB87 +- SYS_ASINHD64 = 0xB88 +- SYS_ATAN2D128 = 0xB8F +- SYS_ATAN2D32 = 0xB8D +- SYS_ATAN2D64 = 0xB8E +- SYS_ATAND128 = 0xB8C +- SYS_ATAND32 = 0xB8A +- SYS_ATAND64 = 0xB8B +- SYS_ATANHD128 = 0xB92 +- SYS_ATANHD32 = 0xB90 +- SYS_ATANHD64 = 0xB91 +- SYS_BIND2ADDRSEL = 0xD59 +- SYS_C16RTOMB = 0xD40 +- SYS_C32RTOMB = 0xD41 +- SYS_CBRTD128 = 0xB95 +- SYS_CBRTD32 = 0xB93 +- SYS_CBRTD64 = 0xB94 +- SYS_CEILD128 = 0xB98 +- SYS_CEILD32 = 0xB96 +- SYS_CEILD64 = 0xB97 +- SYS_CLEARENV = 0x0C9 +- SYS_CLEARERR_UNLOCKED = 0xCA1 +- SYS_CLOCK = 0x0AA +- SYS_CLOGL = 0xA00 +- SYS_CLRMEMF = 0x0BD +- SYS_CONJ = 0xA03 +- SYS_CONJF = 0xA06 +- SYS_CONJL = 0xA09 +- SYS_COPYSIGND128 = 0xB9E +- SYS_COPYSIGND32 = 0xB9C +- SYS_COPYSIGND64 = 0xB9D +- SYS_COSD128 = 0xBA1 +- SYS_COSD32 = 0xB9F +- SYS_COSD64 = 0xBA0 +- SYS_COSHD128 = 0xBA4 +- SYS_COSHD32 = 0xBA2 +- SYS_COSHD64 = 0xBA3 +- SYS_CPOW = 0xA0C +- SYS_CPOWF = 0xA0F +- SYS_CPOWL = 0xA12 +- SYS_CPROJ = 0xA15 +- SYS_CPROJF = 0xA18 +- SYS_CPROJL = 0xA1B +- SYS_CREAL = 0xA1E +- SYS_CREALF = 0xA21 +- SYS_CREALL = 0xA24 +- SYS_CSIN = 0xA27 +- SYS_CSINF = 0xA2A +- SYS_CSINH = 0xA30 +- SYS_CSINHF = 0xA33 +- SYS_CSINHL = 0xA36 +- SYS_CSINL = 0xA2D +- SYS_CSNAP = 0x0C5 +- SYS_CSQRT = 0xA39 +- SYS_CSQRTF = 0xA3C +- SYS_CSQRTL = 0xA3F +- SYS_CTAN = 0xA42 +- SYS_CTANF = 0xA45 +- SYS_CTANH = 0xA4B +- SYS_CTANHF = 0xA4E +- SYS_CTANHL = 0xA51 +- SYS_CTANL = 0xA48 +- SYS_CTIME = 0x0AB +- SYS_CTIME64 = 0xCD9 +- SYS_CTIME64_R = 0xCDA +- SYS_CTRACE = 0x0C6 +- SYS_DIFFTIME = 0x0A7 +- SYS_DIFFTIME64 = 0xCDB +- SYS_DLADDR = 0xC82 +- SYS_DYNALLOC = 0x0C3 +- SYS_DYNFREE = 0x0C2 +- SYS_ERFCD128 = 0xBAA +- SYS_ERFCD32 = 0xBA8 +- SYS_ERFCD64 = 0xBA9 +- SYS_ERFD128 = 0xBA7 +- SYS_ERFD32 = 0xBA5 +- SYS_ERFD64 = 0xBA6 +- SYS_EXP2D128 = 0xBB0 +- SYS_EXP2D32 = 0xBAE +- SYS_EXP2D64 = 0xBAF +- SYS_EXPD128 = 0xBAD +- SYS_EXPD32 = 0xBAB +- SYS_EXPD64 = 0xBAC +- SYS_EXPM1D128 = 0xBB3 +- SYS_EXPM1D32 = 0xBB1 +- SYS_EXPM1D64 = 0xBB2 +- SYS_FABSD128 = 0xBB6 +- SYS_FABSD32 = 0xBB4 +- SYS_FABSD64 = 0xBB5 +- SYS_FDELREC_UNLOCKED = 0xCA2 +- SYS_FDIMD128 = 0xBB9 +- SYS_FDIMD32 = 0xBB7 +- SYS_FDIMD64 = 0xBB8 +- SYS_FDOPEN_UNLOCKED = 0xCFC +- SYS_FECLEAREXCEPT = 0xAEA +- SYS_FEGETENV = 0xAEB +- SYS_FEGETEXCEPTFLAG = 0xAEC +- SYS_FEGETROUND = 0xAED +- SYS_FEHOLDEXCEPT = 0xAEE +- SYS_FEOF_UNLOCKED = 0xCA3 +- SYS_FERAISEEXCEPT = 0xAEF +- SYS_FERROR_UNLOCKED = 0xCA4 +- SYS_FESETENV = 0xAF0 +- SYS_FESETEXCEPTFLAG = 0xAF1 +- SYS_FESETROUND = 0xAF2 +- SYS_FETCHEP = 0x0BF +- SYS_FETESTEXCEPT = 0xAF3 +- SYS_FEUPDATEENV = 0xAF4 +- SYS_FE_DEC_GETROUND = 0xBBA +- SYS_FE_DEC_SETROUND = 0xBBB +- SYS_FFLUSH_UNLOCKED = 0xCA5 +- SYS_FGETC_UNLOCKED = 0xC80 +- SYS_FGETPOS64 = 0xCEE +- SYS_FGETPOS64_UNLOCKED = 0xCF4 +- SYS_FGETPOS_UNLOCKED = 0xCA6 +- SYS_FGETS_UNLOCKED = 0xC7C +- SYS_FGETWC_UNLOCKED = 0xCA7 +- SYS_FGETWS_UNLOCKED = 0xCA8 +- SYS_FILENO_UNLOCKED = 0xCA9 +- SYS_FLDATA = 0x0C1 +- SYS_FLDATA_UNLOCKED = 0xCAA +- SYS_FLOCATE_UNLOCKED = 0xCAB +- SYS_FLOORD128 = 0xBBE +- SYS_FLOORD32 = 0xBBC +- SYS_FLOORD64 = 0xBBD +- SYS_FMA = 0xA63 +- SYS_FMAD128 = 0xBC1 +- SYS_FMAD32 = 0xBBF +- SYS_FMAD64 = 0xBC0 +- SYS_FMAF = 0xA66 +- SYS_FMAL = 0xA69 +- SYS_FMAX = 0xA6C +- SYS_FMAXD128 = 0xBC4 +- SYS_FMAXD32 = 0xBC2 +- SYS_FMAXD64 = 0xBC3 +- SYS_FMAXF = 0xA6F +- SYS_FMAXL = 0xA72 +- SYS_FMIN = 0xA75 +- SYS_FMIND128 = 0xBC7 +- SYS_FMIND32 = 0xBC5 +- SYS_FMIND64 = 0xBC6 +- SYS_FMINF = 0xA78 +- SYS_FMINL = 0xA7B +- SYS_FMODD128 = 0xBCA +- SYS_FMODD32 = 0xBC8 +- SYS_FMODD64 = 0xBC9 +- SYS_FOPEN64 = 0xD49 +- SYS_FOPEN64_UNLOCKED = 0xD4A +- SYS_FOPEN_UNLOCKED = 0xCFA +- SYS_FPRINTF_UNLOCKED = 0xCAC +- SYS_FPUTC_UNLOCKED = 0xC81 +- SYS_FPUTS_UNLOCKED = 0xC7E +- SYS_FPUTWC_UNLOCKED = 0xCAD +- SYS_FPUTWS_UNLOCKED = 0xCAE +- SYS_FREAD_NOUPDATE = 0xCEC +- SYS_FREAD_NOUPDATE_UNLOCKED = 0xCED +- SYS_FREAD_UNLOCKED = 0xC7B +- SYS_FREEIFADDRS = 0xCE6 +- SYS_FREOPEN64 = 0xD4B +- SYS_FREOPEN64_UNLOCKED = 0xD4C +- SYS_FREOPEN_UNLOCKED = 0xCFB +- SYS_FREXPD128 = 0xBCE +- SYS_FREXPD32 = 0xBCC +- SYS_FREXPD64 = 0xBCD +- SYS_FSCANF_UNLOCKED = 0xCAF +- SYS_FSEEK64 = 0xCEF +- SYS_FSEEK64_UNLOCKED = 0xCF5 +- SYS_FSEEKO64 = 0xCF0 +- SYS_FSEEKO64_UNLOCKED = 0xCF6 +- SYS_FSEEKO_UNLOCKED = 0xCB1 +- SYS_FSEEK_UNLOCKED = 0xCB0 +- SYS_FSETPOS64 = 0xCF1 +- SYS_FSETPOS64_UNLOCKED = 0xCF7 +- SYS_FSETPOS_UNLOCKED = 0xCB3 +- SYS_FTELL64 = 0xCF2 +- SYS_FTELL64_UNLOCKED = 0xCF8 +- SYS_FTELLO64 = 0xCF3 +- SYS_FTELLO64_UNLOCKED = 0xCF9 +- SYS_FTELLO_UNLOCKED = 0xCB5 +- SYS_FTELL_UNLOCKED = 0xCB4 +- SYS_FUPDATE = 0x0B5 +- SYS_FUPDATE_UNLOCKED = 0xCB7 +- SYS_FWIDE_UNLOCKED = 0xCB8 +- SYS_FWPRINTF_UNLOCKED = 0xCB9 +- SYS_FWRITE_UNLOCKED = 0xC7A +- SYS_FWSCANF_UNLOCKED = 0xCBA +- SYS_GETDATE64 = 0xD4F +- SYS_GETIFADDRS = 0xCE7 +- SYS_GETIPV4SOURCEFILTER = 0xC77 +- SYS_GETSOURCEFILTER = 0xC79 +- SYS_GETSYNTX = 0x0FD +- SYS_GETS_UNLOCKED = 0xC7D +- SYS_GETTIMEOFDAY64 = 0xD50 +- SYS_GETWCHAR_UNLOCKED = 0xCBC +- SYS_GETWC_UNLOCKED = 0xCBB +- SYS_GMTIME = 0x0B0 +- SYS_GMTIME64 = 0xCDC +- SYS_GMTIME64_R = 0xCDD +- SYS_HYPOTD128 = 0xBD1 +- SYS_HYPOTD32 = 0xBCF +- SYS_HYPOTD64 = 0xBD0 +- SYS_ILOGBD128 = 0xBD4 +- SYS_ILOGBD32 = 0xBD2 +- SYS_ILOGBD64 = 0xBD3 +- SYS_ILOGBF = 0xA7E +- SYS_ILOGBL = 0xA81 +- SYS_INET6_IS_SRCADDR = 0xD5A +- SYS_ISBLANK = 0x0FE +- SYS_ISWALNUM = 0x0FF +- SYS_LDEXPD128 = 0xBD7 +- SYS_LDEXPD32 = 0xBD5 +- SYS_LDEXPD64 = 0xBD6 +- SYS_LGAMMAD128 = 0xBDA +- SYS_LGAMMAD32 = 0xBD8 +- SYS_LGAMMAD64 = 0xBD9 +- SYS_LIO_LISTIO = 0xC6A +- SYS_LLRINT = 0xA84 +- SYS_LLRINTD128 = 0xBDD +- SYS_LLRINTD32 = 0xBDB +- SYS_LLRINTD64 = 0xBDC +- SYS_LLRINTF = 0xA87 +- SYS_LLRINTL = 0xA8A +- SYS_LLROUND = 0xA8D +- SYS_LLROUNDD128 = 0xBE0 +- SYS_LLROUNDD32 = 0xBDE +- SYS_LLROUNDD64 = 0xBDF +- SYS_LLROUNDF = 0xA90 +- SYS_LLROUNDL = 0xA93 +- SYS_LOCALTIM = 0x0B1 +- SYS_LOCALTIME = 0x0B1 +- SYS_LOCALTIME64 = 0xCDE +- SYS_LOCALTIME64_R = 0xCDF +- SYS_LOG10D128 = 0xBE6 +- SYS_LOG10D32 = 0xBE4 +- SYS_LOG10D64 = 0xBE5 +- SYS_LOG1PD128 = 0xBE9 +- SYS_LOG1PD32 = 0xBE7 +- SYS_LOG1PD64 = 0xBE8 +- SYS_LOG2D128 = 0xBEC +- SYS_LOG2D32 = 0xBEA +- SYS_LOG2D64 = 0xBEB +- SYS_LOGBD128 = 0xBEF +- SYS_LOGBD32 = 0xBED +- SYS_LOGBD64 = 0xBEE +- SYS_LOGBF = 0xA96 +- SYS_LOGBL = 0xA99 +- SYS_LOGD128 = 0xBE3 +- SYS_LOGD32 = 0xBE1 +- SYS_LOGD64 = 0xBE2 +- SYS_LRINT = 0xA9C +- SYS_LRINTD128 = 0xBF2 +- SYS_LRINTD32 = 0xBF0 +- SYS_LRINTD64 = 0xBF1 +- SYS_LRINTF = 0xA9F +- SYS_LRINTL = 0xAA2 +- SYS_LROUNDD128 = 0xBF5 +- SYS_LROUNDD32 = 0xBF3 +- SYS_LROUNDD64 = 0xBF4 +- SYS_LROUNDL = 0xAA5 +- SYS_MBLEN = 0x0AF +- SYS_MBRTOC16 = 0xD42 +- SYS_MBRTOC32 = 0xD43 +- SYS_MEMSET = 0x0A3 +- SYS_MKTIME = 0x0AC +- SYS_MKTIME64 = 0xCE0 +- SYS_MODFD128 = 0xBF8 +- SYS_MODFD32 = 0xBF6 +- SYS_MODFD64 = 0xBF7 +- SYS_NAN = 0xAA8 +- SYS_NAND128 = 0xBFB +- SYS_NAND32 = 0xBF9 +- SYS_NAND64 = 0xBFA +- SYS_NANF = 0xAAA +- SYS_NANL = 0xAAC +- SYS_NEARBYINT = 0xAAE +- SYS_NEARBYINTD128 = 0xBFE +- SYS_NEARBYINTD32 = 0xBFC +- SYS_NEARBYINTD64 = 0xBFD +- SYS_NEARBYINTF = 0xAB1 +- SYS_NEARBYINTL = 0xAB4 +- SYS_NEXTAFTERD128 = 0xC01 +- SYS_NEXTAFTERD32 = 0xBFF +- SYS_NEXTAFTERD64 = 0xC00 +- SYS_NEXTAFTERF = 0xAB7 +- SYS_NEXTAFTERL = 0xABA +- SYS_NEXTTOWARD = 0xABD +- SYS_NEXTTOWARDD128 = 0xC04 +- SYS_NEXTTOWARDD32 = 0xC02 +- SYS_NEXTTOWARDD64 = 0xC03 +- SYS_NEXTTOWARDF = 0xAC0 +- SYS_NEXTTOWARDL = 0xAC3 +- SYS_NL_LANGINFO = 0x0FC +- SYS_PERROR_UNLOCKED = 0xCBD +- SYS_POSIX_FALLOCATE = 0xCE8 +- SYS_POSIX_MEMALIGN = 0xCE9 +- SYS_POSIX_OPENPT = 0xC66 +- SYS_POWD128 = 0xC07 +- SYS_POWD32 = 0xC05 +- SYS_POWD64 = 0xC06 +- SYS_PRINTF_UNLOCKED = 0xCBE +- SYS_PSELECT = 0xC67 +- SYS_PTHREAD_ATTR_GETSTACK = 0xB3E +- SYS_PTHREAD_ATTR_SETSTACK = 0xB3F +- SYS_PTHREAD_SECURITY_APPLID_NP = 0xCE4 +- SYS_PUTS_UNLOCKED = 0xC7F +- SYS_PUTWCHAR_UNLOCKED = 0xCC0 +- SYS_PUTWC_UNLOCKED = 0xCBF +- SYS_QUANTEXPD128 = 0xD46 +- SYS_QUANTEXPD32 = 0xD44 +- SYS_QUANTEXPD64 = 0xD45 +- SYS_QUANTIZED128 = 0xC0A +- SYS_QUANTIZED32 = 0xC08 +- SYS_QUANTIZED64 = 0xC09 +- SYS_REMAINDERD128 = 0xC0D +- SYS_REMAINDERD32 = 0xC0B +- SYS_REMAINDERD64 = 0xC0C +- SYS_RESIZE_ALLOC = 0xCEB +- SYS_REWIND_UNLOCKED = 0xCC1 +- SYS_RINTD128 = 0xC13 +- SYS_RINTD32 = 0xC11 +- SYS_RINTD64 = 0xC12 +- SYS_RINTF = 0xACB +- SYS_RINTL = 0xACD +- SYS_ROUND = 0xACF +- SYS_ROUNDD128 = 0xC16 +- SYS_ROUNDD32 = 0xC14 +- SYS_ROUNDD64 = 0xC15 +- SYS_ROUNDF = 0xAD2 +- SYS_ROUNDL = 0xAD5 +- SYS_SAMEQUANTUMD128 = 0xC19 +- SYS_SAMEQUANTUMD32 = 0xC17 +- SYS_SAMEQUANTUMD64 = 0xC18 +- SYS_SCALBLN = 0xAD8 +- SYS_SCALBLND128 = 0xC1C +- SYS_SCALBLND32 = 0xC1A +- SYS_SCALBLND64 = 0xC1B +- SYS_SCALBLNF = 0xADB +- SYS_SCALBLNL = 0xADE +- SYS_SCALBND128 = 0xC1F +- SYS_SCALBND32 = 0xC1D +- SYS_SCALBND64 = 0xC1E +- SYS_SCALBNF = 0xAE3 +- SYS_SCALBNL = 0xAE6 +- SYS_SCANF_UNLOCKED = 0xCC2 +- SYS_SCHED_YIELD = 0xB32 +- SYS_SETENV = 0x0C8 +- SYS_SETIPV4SOURCEFILTER = 0xC76 +- SYS_SETSOURCEFILTER = 0xC78 +- SYS_SHM_OPEN = 0xC8C +- SYS_SHM_UNLINK = 0xC8D +- SYS_SIND128 = 0xC22 +- SYS_SIND32 = 0xC20 +- SYS_SIND64 = 0xC21 +- SYS_SINHD128 = 0xC25 +- SYS_SINHD32 = 0xC23 +- SYS_SINHD64 = 0xC24 +- SYS_SIZEOF_ALLOC = 0xCEA +- SYS_SOCKATMARK = 0xC68 +- SYS_SQRTD128 = 0xC28 +- SYS_SQRTD32 = 0xC26 +- SYS_SQRTD64 = 0xC27 +- SYS_STRCHR = 0x0A0 +- SYS_STRCSPN = 0x0A1 +- SYS_STRERROR = 0x0A8 +- SYS_STRERROR_R = 0xB33 +- SYS_STRFTIME = 0x0B2 +- SYS_STRLEN = 0x0A9 +- SYS_STRPBRK = 0x0A2 +- SYS_STRSPN = 0x0A4 +- SYS_STRSTR = 0x0A5 +- SYS_STRTOD128 = 0xC2B +- SYS_STRTOD32 = 0xC29 +- SYS_STRTOD64 = 0xC2A +- SYS_STRTOK = 0x0A6 +- SYS_TAND128 = 0xC2E +- SYS_TAND32 = 0xC2C +- SYS_TAND64 = 0xC2D +- SYS_TANHD128 = 0xC31 +- SYS_TANHD32 = 0xC2F +- SYS_TANHD64 = 0xC30 +- SYS_TGAMMAD128 = 0xC34 +- SYS_TGAMMAD32 = 0xC32 +- SYS_TGAMMAD64 = 0xC33 +- SYS_TIME = 0x0AD +- SYS_TIME64 = 0xCE1 +- SYS_TMPFILE64 = 0xD4D +- SYS_TMPFILE64_UNLOCKED = 0xD4E +- SYS_TMPFILE_UNLOCKED = 0xCFD +- SYS_TRUNCD128 = 0xC40 +- SYS_TRUNCD32 = 0xC3E +- SYS_TRUNCD64 = 0xC3F +- SYS_UNGETC_UNLOCKED = 0xCC3 +- SYS_UNGETWC_UNLOCKED = 0xCC4 +- SYS_UNSETENV = 0xB34 +- SYS_VFPRINTF_UNLOCKED = 0xCC5 +- SYS_VFSCANF_UNLOCKED = 0xCC7 +- SYS_VFWPRINTF_UNLOCKED = 0xCC9 +- SYS_VFWSCANF_UNLOCKED = 0xCCB +- SYS_VPRINTF_UNLOCKED = 0xCCD +- SYS_VSCANF_UNLOCKED = 0xCCF +- SYS_VWPRINTF_UNLOCKED = 0xCD1 +- SYS_VWSCANF_UNLOCKED = 0xCD3 +- SYS_WCSTOD128 = 0xC43 +- SYS_WCSTOD32 = 0xC41 +- SYS_WCSTOD64 = 0xC42 +- SYS_WPRINTF_UNLOCKED = 0xCD5 +- SYS_WSCANF_UNLOCKED = 0xCD6 +- SYS__FLUSHLBF = 0xD68 +- SYS__FLUSHLBF_UNLOCKED = 0xD6F +- SYS___ACOSHF_H = 0xA54 +- SYS___ACOSHL_H = 0xA55 +- SYS___ASINHF_H = 0xA56 +- SYS___ASINHL_H = 0xA57 +- SYS___ATANPID128 = 0xC6D +- SYS___ATANPID32 = 0xC6B +- SYS___ATANPID64 = 0xC6C +- SYS___CBRTF_H = 0xA58 +- SYS___CBRTL_H = 0xA59 +- SYS___CDUMP = 0x0C4 +- SYS___CLASS = 0xAFA +- SYS___CLASS2 = 0xB99 +- SYS___CLASS2D128 = 0xC99 +- SYS___CLASS2D32 = 0xC97 +- SYS___CLASS2D64 = 0xC98 +- SYS___CLASS2F = 0xC91 +- SYS___CLASS2F_B = 0xC93 +- SYS___CLASS2F_H = 0xC94 +- SYS___CLASS2L = 0xC92 +- SYS___CLASS2L_B = 0xC95 +- SYS___CLASS2L_H = 0xC96 +- SYS___CLASS2_B = 0xB9A +- SYS___CLASS2_H = 0xB9B +- SYS___CLASS_B = 0xAFB +- SYS___CLASS_H = 0xAFC +- SYS___CLOGL_B = 0xA01 +- SYS___CLOGL_H = 0xA02 +- SYS___CLRENV = 0x0C9 +- SYS___CLRMF = 0x0BD +- SYS___CODEPAGE_INFO = 0xC64 +- SYS___CONJF_B = 0xA07 +- SYS___CONJF_H = 0xA08 +- SYS___CONJL_B = 0xA0A +- SYS___CONJL_H = 0xA0B +- SYS___CONJ_B = 0xA04 +- SYS___CONJ_H = 0xA05 +- SYS___COPYSIGN_B = 0xA5A +- SYS___COPYSIGN_H = 0xAF5 +- SYS___COSPID128 = 0xC70 +- SYS___COSPID32 = 0xC6E +- SYS___COSPID64 = 0xC6F +- SYS___CPOWF_B = 0xA10 +- SYS___CPOWF_H = 0xA11 +- SYS___CPOWL_B = 0xA13 +- SYS___CPOWL_H = 0xA14 +- SYS___CPOW_B = 0xA0D +- SYS___CPOW_H = 0xA0E +- SYS___CPROJF_B = 0xA19 +- SYS___CPROJF_H = 0xA1A +- SYS___CPROJL_B = 0xA1C +- SYS___CPROJL_H = 0xA1D +- SYS___CPROJ_B = 0xA16 +- SYS___CPROJ_H = 0xA17 +- SYS___CREALF_B = 0xA22 +- SYS___CREALF_H = 0xA23 +- SYS___CREALL_B = 0xA25 +- SYS___CREALL_H = 0xA26 +- SYS___CREAL_B = 0xA1F +- SYS___CREAL_H = 0xA20 +- SYS___CSINF_B = 0xA2B +- SYS___CSINF_H = 0xA2C +- SYS___CSINHF_B = 0xA34 +- SYS___CSINHF_H = 0xA35 +- SYS___CSINHL_B = 0xA37 +- SYS___CSINHL_H = 0xA38 +- SYS___CSINH_B = 0xA31 +- SYS___CSINH_H = 0xA32 +- SYS___CSINL_B = 0xA2E +- SYS___CSINL_H = 0xA2F +- SYS___CSIN_B = 0xA28 +- SYS___CSIN_H = 0xA29 +- SYS___CSNAP = 0x0C5 +- SYS___CSQRTF_B = 0xA3D +- SYS___CSQRTF_H = 0xA3E +- SYS___CSQRTL_B = 0xA40 +- SYS___CSQRTL_H = 0xA41 +- SYS___CSQRT_B = 0xA3A +- SYS___CSQRT_H = 0xA3B +- SYS___CTANF_B = 0xA46 +- SYS___CTANF_H = 0xA47 +- SYS___CTANHF_B = 0xA4F +- SYS___CTANHF_H = 0xA50 +- SYS___CTANHL_B = 0xA52 +- SYS___CTANHL_H = 0xA53 +- SYS___CTANH_B = 0xA4C +- SYS___CTANH_H = 0xA4D +- SYS___CTANL_B = 0xA49 +- SYS___CTANL_H = 0xA4A +- SYS___CTAN_B = 0xA43 +- SYS___CTAN_H = 0xA44 +- SYS___CTEST = 0x0C7 +- SYS___CTRACE = 0x0C6 +- SYS___D1TOP = 0xC9B +- SYS___D2TOP = 0xC9C +- SYS___D4TOP = 0xC9D +- SYS___DYNALL = 0x0C3 +- SYS___DYNFRE = 0x0C2 +- SYS___EXP2F_H = 0xA5E +- SYS___EXP2L_H = 0xA5F +- SYS___EXP2_H = 0xA5D +- SYS___EXPM1F_H = 0xA5B +- SYS___EXPM1L_H = 0xA5C +- SYS___FBUFSIZE = 0xD60 +- SYS___FLBF = 0xD62 +- SYS___FLDATA = 0x0C1 +- SYS___FMAF_B = 0xA67 +- SYS___FMAF_H = 0xA68 +- SYS___FMAL_B = 0xA6A +- SYS___FMAL_H = 0xA6B +- SYS___FMAXF_B = 0xA70 +- SYS___FMAXF_H = 0xA71 +- SYS___FMAXL_B = 0xA73 +- SYS___FMAXL_H = 0xA74 +- SYS___FMAX_B = 0xA6D +- SYS___FMAX_H = 0xA6E +- SYS___FMA_B = 0xA64 +- SYS___FMA_H = 0xA65 +- SYS___FMINF_B = 0xA79 +- SYS___FMINF_H = 0xA7A +- SYS___FMINL_B = 0xA7C +- SYS___FMINL_H = 0xA7D +- SYS___FMIN_B = 0xA76 +- SYS___FMIN_H = 0xA77 +- SYS___FPENDING = 0xD61 +- SYS___FPENDING_UNLOCKED = 0xD6C +- SYS___FPURGE = 0xD69 +- SYS___FPURGE_UNLOCKED = 0xD70 +- SYS___FP_CAST_D = 0xBCB +- SYS___FREADABLE = 0xD63 +- SYS___FREADAHEAD = 0xD6A +- SYS___FREADAHEAD_UNLOCKED = 0xD71 +- SYS___FREADING = 0xD65 +- SYS___FREADING_UNLOCKED = 0xD6D +- SYS___FSEEK2 = 0xB3C +- SYS___FSETERR = 0xD6B +- SYS___FSETLOCKING = 0xD67 +- SYS___FTCHEP = 0x0BF +- SYS___FTELL2 = 0xB3B +- SYS___FUPDT = 0x0B5 +- SYS___FWRITABLE = 0xD64 +- SYS___FWRITING = 0xD66 +- SYS___FWRITING_UNLOCKED = 0xD6E +- SYS___GETCB = 0x0B4 +- SYS___GETGRGID1 = 0xD5B +- SYS___GETGRNAM1 = 0xD5C +- SYS___GETTHENT = 0xCE5 +- SYS___GETTOD = 0xD3E +- SYS___HYPOTF_H = 0xAF6 +- SYS___HYPOTL_H = 0xAF7 +- SYS___ILOGBF_B = 0xA7F +- SYS___ILOGBF_H = 0xA80 +- SYS___ILOGBL_B = 0xA82 +- SYS___ILOGBL_H = 0xA83 +- SYS___ISBLANK_A = 0xB2E +- SYS___ISBLNK = 0x0FE +- SYS___ISWBLANK_A = 0xB2F +- SYS___LE_CEEGTJS = 0xD72 +- SYS___LE_TRACEBACK = 0xB7A +- SYS___LGAMMAL_H = 0xA62 +- SYS___LGAMMA_B_C99 = 0xB39 +- SYS___LGAMMA_H_C99 = 0xB38 +- SYS___LGAMMA_R_C99 = 0xB3A +- SYS___LLRINTF_B = 0xA88 +- SYS___LLRINTF_H = 0xA89 +- SYS___LLRINTL_B = 0xA8B +- SYS___LLRINTL_H = 0xA8C +- SYS___LLRINT_B = 0xA85 +- SYS___LLRINT_H = 0xA86 +- SYS___LLROUNDF_B = 0xA91 +- SYS___LLROUNDF_H = 0xA92 +- SYS___LLROUNDL_B = 0xA94 +- SYS___LLROUNDL_H = 0xA95 +- SYS___LLROUND_B = 0xA8E +- SYS___LLROUND_H = 0xA8F +- SYS___LOCALE_CTL = 0xD47 +- SYS___LOG1PF_H = 0xA60 +- SYS___LOG1PL_H = 0xA61 +- SYS___LOGBF_B = 0xA97 +- SYS___LOGBF_H = 0xA98 +- SYS___LOGBL_B = 0xA9A +- SYS___LOGBL_H = 0xA9B +- SYS___LOGIN_APPLID = 0xCE2 +- SYS___LRINTF_B = 0xAA0 +- SYS___LRINTF_H = 0xAA1 +- SYS___LRINTL_B = 0xAA3 +- SYS___LRINTL_H = 0xAA4 +- SYS___LRINT_B = 0xA9D +- SYS___LRINT_H = 0xA9E +- SYS___LROUNDF_FIXUP = 0xB31 +- SYS___LROUNDL_B = 0xAA6 +- SYS___LROUNDL_H = 0xAA7 +- SYS___LROUND_FIXUP = 0xB30 +- SYS___MOSERVICES = 0xD3D +- SYS___MUST_STAY_CLEAN = 0xB7C +- SYS___NANF_B = 0xAAB +- SYS___NANL_B = 0xAAD +- SYS___NAN_B = 0xAA9 +- SYS___NEARBYINTF_B = 0xAB2 +- SYS___NEARBYINTF_H = 0xAB3 +- SYS___NEARBYINTL_B = 0xAB5 +- SYS___NEARBYINTL_H = 0xAB6 +- SYS___NEARBYINT_B = 0xAAF +- SYS___NEARBYINT_H = 0xAB0 +- SYS___NEXTAFTERF_B = 0xAB8 +- SYS___NEXTAFTERF_H = 0xAB9 +- SYS___NEXTAFTERL_B = 0xABB +- SYS___NEXTAFTERL_H = 0xABC +- SYS___NEXTTOWARDF_B = 0xAC1 +- SYS___NEXTTOWARDF_H = 0xAC2 +- SYS___NEXTTOWARDL_B = 0xAC4 +- SYS___NEXTTOWARDL_H = 0xAC5 +- SYS___NEXTTOWARD_B = 0xABE +- SYS___NEXTTOWARD_H = 0xABF +- SYS___O_ENV = 0xB7D +- SYS___PASSWD_APPLID = 0xCE3 +- SYS___PTOD1 = 0xC9E +- SYS___PTOD2 = 0xC9F +- SYS___PTOD4 = 0xCA0 +- SYS___REGCOMP_STD = 0x0EA +- SYS___REMAINDERF_H = 0xAC6 +- SYS___REMAINDERL_H = 0xAC7 +- SYS___REMQUOD128 = 0xC10 +- SYS___REMQUOD32 = 0xC0E +- SYS___REMQUOD64 = 0xC0F +- SYS___REMQUOF_H = 0xAC9 +- SYS___REMQUOL_H = 0xACA +- SYS___REMQUO_H = 0xAC8 +- SYS___RINTF_B = 0xACC +- SYS___RINTL_B = 0xACE +- SYS___ROUNDF_B = 0xAD3 +- SYS___ROUNDF_H = 0xAD4 +- SYS___ROUNDL_B = 0xAD6 +- SYS___ROUNDL_H = 0xAD7 +- SYS___ROUND_B = 0xAD0 +- SYS___ROUND_H = 0xAD1 +- SYS___SCALBLNF_B = 0xADC +- SYS___SCALBLNF_H = 0xADD +- SYS___SCALBLNL_B = 0xADF +- SYS___SCALBLNL_H = 0xAE0 +- SYS___SCALBLN_B = 0xAD9 +- SYS___SCALBLN_H = 0xADA +- SYS___SCALBNF_B = 0xAE4 +- SYS___SCALBNF_H = 0xAE5 +- SYS___SCALBNL_B = 0xAE7 +- SYS___SCALBNL_H = 0xAE8 +- SYS___SCALBN_B = 0xAE1 +- SYS___SCALBN_H = 0xAE2 +- SYS___SETENV = 0x0C8 +- SYS___SINPID128 = 0xC73 +- SYS___SINPID32 = 0xC71 +- SYS___SINPID64 = 0xC72 +- SYS___SMF_RECORD2 = 0xD48 +- SYS___STATIC_REINIT = 0xB3D +- SYS___TGAMMAF_H_C99 = 0xB79 +- SYS___TGAMMAL_H = 0xAE9 +- SYS___TGAMMA_H_C99 = 0xB78 +- SYS___TOCSNAME2 = 0xC9A +- SYS_CEIL = 0x01F +- SYS_CHAUDIT = 0x1E0 +- SYS_EXP = 0x01A +- SYS_FCHAUDIT = 0x1E1 +- SYS_FREXP = 0x01D +- SYS_GETGROUPSBYNAME = 0x1E2 +- SYS_GETPWUID = 0x1A0 +- SYS_GETUID = 0x1A1 +- SYS_ISATTY = 0x1A3 +- SYS_KILL = 0x1A4 +- SYS_LDEXP = 0x01E +- SYS_LINK = 0x1A5 +- SYS_LOG10 = 0x01C +- SYS_LSEEK = 0x1A6 +- SYS_LSTAT = 0x1A7 +- SYS_MKDIR = 0x1A8 +- SYS_MKFIFO = 0x1A9 +- SYS_MKNOD = 0x1AA +- SYS_MODF = 0x01B +- SYS_MOUNT = 0x1AB +- SYS_OPEN = 0x1AC +- SYS_OPENDIR = 0x1AD +- SYS_PATHCONF = 0x1AE +- SYS_PAUSE = 0x1AF +- SYS_PIPE = 0x1B0 +- SYS_PTHREAD_ATTR_DESTROY = 0x1E7 +- SYS_PTHREAD_ATTR_GETDETACHSTATE = 0x1EB +- SYS_PTHREAD_ATTR_GETSTACKSIZE = 0x1E9 +- SYS_PTHREAD_ATTR_GETWEIGHT_NP = 0x1ED +- SYS_PTHREAD_ATTR_INIT = 0x1E6 +- SYS_PTHREAD_ATTR_SETDETACHSTATE = 0x1EA +- SYS_PTHREAD_ATTR_SETSTACKSIZE = 0x1E8 +- SYS_PTHREAD_ATTR_SETWEIGHT_NP = 0x1EC +- SYS_PTHREAD_CANCEL = 0x1EE +- SYS_PTHREAD_CLEANUP_POP = 0x1F0 +- SYS_PTHREAD_CLEANUP_PUSH = 0x1EF +- SYS_PTHREAD_CONDATTR_DESTROY = 0x1F2 +- SYS_PTHREAD_CONDATTR_INIT = 0x1F1 +- SYS_PTHREAD_COND_BROADCAST = 0x1F6 +- SYS_PTHREAD_COND_DESTROY = 0x1F4 +- SYS_PTHREAD_COND_INIT = 0x1F3 +- SYS_PTHREAD_COND_SIGNAL = 0x1F5 +- SYS_PTHREAD_COND_TIMEDWAIT = 0x1F8 +- SYS_PTHREAD_COND_WAIT = 0x1F7 +- SYS_PTHREAD_CREATE = 0x1F9 +- SYS_PTHREAD_DETACH = 0x1FA +- SYS_PTHREAD_EQUAL = 0x1FB +- SYS_PTHREAD_EXIT = 0x1E4 +- SYS_PTHREAD_GETSPECIFIC = 0x1FC +- SYS_PTHREAD_JOIN = 0x1FD +- SYS_PTHREAD_KEY_CREATE = 0x1FE +- SYS_PTHREAD_KILL = 0x1E5 +- SYS_PTHREAD_MUTEXATTR_INIT = 0x1FF +- SYS_READ = 0x1B2 +- SYS_READDIR = 0x1B3 +- SYS_READLINK = 0x1B4 +- SYS_REWINDDIR = 0x1B5 +- SYS_RMDIR = 0x1B6 +- SYS_SETEGID = 0x1B7 +- SYS_SETEUID = 0x1B8 +- SYS_SETGID = 0x1B9 +- SYS_SETPGID = 0x1BA +- SYS_SETSID = 0x1BB +- SYS_SETUID = 0x1BC +- SYS_SIGACTION = 0x1BD +- SYS_SIGADDSET = 0x1BE +- SYS_SIGDELSET = 0x1BF +- SYS_SIGEMPTYSET = 0x1C0 +- SYS_SIGFILLSET = 0x1C1 +- SYS_SIGISMEMBER = 0x1C2 +- SYS_SIGLONGJMP = 0x1C3 +- SYS_SIGPENDING = 0x1C4 +- SYS_SIGPROCMASK = 0x1C5 +- SYS_SIGSETJMP = 0x1C6 +- SYS_SIGSUSPEND = 0x1C7 +- SYS_SIGWAIT = 0x1E3 +- SYS_SLEEP = 0x1C8 +- SYS_STAT = 0x1C9 +- SYS_SYMLINK = 0x1CB +- SYS_SYSCONF = 0x1CC +- SYS_TCDRAIN = 0x1CD +- SYS_TCFLOW = 0x1CE +- SYS_TCFLUSH = 0x1CF +- SYS_TCGETATTR = 0x1D0 +- SYS_TCGETPGRP = 0x1D1 +- SYS_TCSENDBREAK = 0x1D2 +- SYS_TCSETATTR = 0x1D3 +- SYS_TCSETPGRP = 0x1D4 +- SYS_TIMES = 0x1D5 +- SYS_TTYNAME = 0x1D6 +- SYS_TZSET = 0x1D7 +- SYS_UMASK = 0x1D8 +- SYS_UMOUNT = 0x1D9 +- SYS_UNAME = 0x1DA +- SYS_UNLINK = 0x1DB +- SYS_UTIME = 0x1DC +- SYS_WAIT = 0x1DD +- SYS_WAITPID = 0x1DE +- SYS_WRITE = 0x1DF +- SYS_W_GETPSENT = 0x1B1 +- SYS_W_IOCTL = 0x1A2 +- SYS_W_STATFS = 0x1CA +- SYS_A64L = 0x2EF +- SYS_BCMP = 0x2B9 +- SYS_BCOPY = 0x2BA +- SYS_BZERO = 0x2BB +- SYS_CATCLOSE = 0x2B6 +- SYS_CATGETS = 0x2B7 +- SYS_CATOPEN = 0x2B8 +- SYS_CRYPT = 0x2AC +- SYS_DBM_CLEARERR = 0x2F7 +- SYS_DBM_CLOSE = 0x2F8 +- SYS_DBM_DELETE = 0x2F9 +- SYS_DBM_ERROR = 0x2FA +- SYS_DBM_FETCH = 0x2FB +- SYS_DBM_FIRSTKEY = 0x2FC +- SYS_DBM_NEXTKEY = 0x2FD +- SYS_DBM_OPEN = 0x2FE +- SYS_DBM_STORE = 0x2FF +- SYS_DRAND48 = 0x2B2 +- SYS_ENCRYPT = 0x2AD +- SYS_ENDUTXENT = 0x2E1 +- SYS_ERAND48 = 0x2B3 +- SYS_ERF = 0x02C +- SYS_ERFC = 0x02D +- SYS_FCHDIR = 0x2D9 +- SYS_FFS = 0x2BC +- SYS_FMTMSG = 0x2E5 +- SYS_FSTATVFS = 0x2B4 +- SYS_FTIME = 0x2F5 +- SYS_GAMMA = 0x02E +- SYS_GETDATE = 0x2A6 +- SYS_GETPAGESIZE = 0x2D8 +- SYS_GETTIMEOFDAY = 0x2F6 +- SYS_GETUTXENT = 0x2E0 +- SYS_GETUTXID = 0x2E2 +- SYS_GETUTXLINE = 0x2E3 +- SYS_HCREATE = 0x2C6 +- SYS_HDESTROY = 0x2C7 +- SYS_HSEARCH = 0x2C8 +- SYS_HYPOT = 0x02B +- SYS_INDEX = 0x2BD +- SYS_INITSTATE = 0x2C2 +- SYS_INSQUE = 0x2CF +- SYS_ISASCII = 0x2ED +- SYS_JRAND48 = 0x2E6 +- SYS_L64A = 0x2F0 +- SYS_LCONG48 = 0x2EA +- SYS_LFIND = 0x2C9 +- SYS_LRAND48 = 0x2E7 +- SYS_LSEARCH = 0x2CA +- SYS_MEMCCPY = 0x2D4 +- SYS_MRAND48 = 0x2E8 +- SYS_NRAND48 = 0x2E9 +- SYS_PCLOSE = 0x2D2 +- SYS_POPEN = 0x2D1 +- SYS_PUTUTXLINE = 0x2E4 +- SYS_RANDOM = 0x2C4 +- SYS_REMQUE = 0x2D0 +- SYS_RINDEX = 0x2BE +- SYS_SEED48 = 0x2EC +- SYS_SETKEY = 0x2AE +- SYS_SETSTATE = 0x2C3 +- SYS_SETUTXENT = 0x2DF +- SYS_SRAND48 = 0x2EB +- SYS_SRANDOM = 0x2C5 +- SYS_STATVFS = 0x2B5 +- SYS_STRCASECMP = 0x2BF +- SYS_STRDUP = 0x2C0 +- SYS_STRNCASECMP = 0x2C1 +- SYS_SWAB = 0x2D3 +- SYS_TDELETE = 0x2CB +- SYS_TFIND = 0x2CC +- SYS_TOASCII = 0x2EE +- SYS_TSEARCH = 0x2CD +- SYS_TWALK = 0x2CE +- SYS_UALARM = 0x2F1 +- SYS_USLEEP = 0x2F2 +- SYS_WAIT3 = 0x2A7 +- SYS_WAITID = 0x2A8 +- SYS_Y1 = 0x02A +- SYS___ATOE = 0x2DB +- SYS___ATOE_L = 0x2DC +- SYS___CATTRM = 0x2A9 +- SYS___CNVBLK = 0x2AF +- SYS___CRYTRM = 0x2B0 +- SYS___DLGHT = 0x2A1 +- SYS___ECRTRM = 0x2B1 +- SYS___ETOA = 0x2DD +- SYS___ETOA_L = 0x2DE +- SYS___GDTRM = 0x2AA +- SYS___OCLCK = 0x2DA +- SYS___OPARGF = 0x2A2 +- SYS___OPERRF = 0x2A5 +- SYS___OPINDF = 0x2A4 +- SYS___OPOPTF = 0x2A3 +- SYS___RNDTRM = 0x2AB +- SYS___SRCTRM = 0x2F4 +- SYS___TZONE = 0x2A0 +- SYS___UTXTRM = 0x2F3 +- SYS_ASIN = 0x03E +- SYS_ISXDIGIT = 0x03B +- SYS_SETLOCAL = 0x03A +- SYS_SETLOCALE = 0x03A +- SYS_SIN = 0x03F +- SYS_TOLOWER = 0x03C +- SYS_TOUPPER = 0x03D +- SYS_ACCEPT_AND_RECV = 0x4F7 +- SYS_ATOL = 0x04E +- SYS_CHECKSCH = 0x4BC +- SYS_CHECKSCHENV = 0x4BC +- SYS_CLEARERR = 0x04C +- SYS_CONNECTS = 0x4B5 +- SYS_CONNECTSERVER = 0x4B5 +- SYS_CONNECTW = 0x4B4 +- SYS_CONNECTWORKMGR = 0x4B4 +- SYS_CONTINUE = 0x4B3 +- SYS_CONTINUEWORKUNIT = 0x4B3 +- SYS_COPYSIGN = 0x4C2 +- SYS_CREATEWO = 0x4B2 +- SYS_CREATEWORKUNIT = 0x4B2 +- SYS_DELETEWO = 0x4B9 +- SYS_DELETEWORKUNIT = 0x4B9 +- SYS_DISCONNE = 0x4B6 +- SYS_DISCONNECTSERVER = 0x4B6 +- SYS_FEOF = 0x04D +- SYS_FERROR = 0x04A +- SYS_FINITE = 0x4C8 +- SYS_GAMMA_R = 0x4E2 +- SYS_JOINWORK = 0x4B7 +- SYS_JOINWORKUNIT = 0x4B7 +- SYS_LEAVEWOR = 0x4B8 +- SYS_LEAVEWORKUNIT = 0x4B8 +- SYS_LGAMMA_R = 0x4EB +- SYS_MATHERR = 0x4D0 +- SYS_PERROR = 0x04F +- SYS_QUERYMET = 0x4BA +- SYS_QUERYMETRICS = 0x4BA +- SYS_QUERYSCH = 0x4BB +- SYS_QUERYSCHENV = 0x4BB +- SYS_REWIND = 0x04B +- SYS_SCALBN = 0x4D4 +- SYS_SIGNIFIC = 0x4D5 +- SYS_SIGNIFICAND = 0x4D5 +- SYS___ACOSH_B = 0x4DA +- SYS___ACOS_B = 0x4D9 +- SYS___ASINH_B = 0x4BE +- SYS___ASIN_B = 0x4DB +- SYS___ATAN2_B = 0x4DC +- SYS___ATANH_B = 0x4DD +- SYS___ATAN_B = 0x4BF +- SYS___CBRT_B = 0x4C0 +- SYS___CEIL_B = 0x4C1 +- SYS___COSH_B = 0x4DE +- SYS___COS_B = 0x4C3 +- SYS___DGHT = 0x4A8 +- SYS___ENVN = 0x4B0 +- SYS___ERFC_B = 0x4C5 +- SYS___ERF_B = 0x4C4 +- SYS___EXPM1_B = 0x4C6 +- SYS___EXP_B = 0x4DF +- SYS___FABS_B = 0x4C7 +- SYS___FLOOR_B = 0x4C9 +- SYS___FMOD_B = 0x4E0 +- SYS___FP_SETMODE = 0x4F8 +- SYS___FREXP_B = 0x4CA +- SYS___GAMMA_B = 0x4E1 +- SYS___GDRR = 0x4A1 +- SYS___HRRNO = 0x4A2 +- SYS___HYPOT_B = 0x4E3 +- SYS___ILOGB_B = 0x4CB +- SYS___ISNAN_B = 0x4CC +- SYS___J0_B = 0x4E4 +- SYS___J1_B = 0x4E6 +- SYS___JN_B = 0x4E8 +- SYS___LDEXP_B = 0x4CD +- SYS___LGAMMA_B = 0x4EA +- SYS___LOG10_B = 0x4ED +- SYS___LOG1P_B = 0x4CE +- SYS___LOGB_B = 0x4CF +- SYS___LOGIN = 0x4F5 +- SYS___LOG_B = 0x4EC +- SYS___MLOCKALL = 0x4B1 +- SYS___MODF_B = 0x4D1 +- SYS___NEXTAFTER_B = 0x4D2 +- SYS___OPENDIR2 = 0x4F3 +- SYS___OPEN_STAT = 0x4F6 +- SYS___OPND = 0x4A5 +- SYS___OPPT = 0x4A6 +- SYS___OPRG = 0x4A3 +- SYS___OPRR = 0x4A4 +- SYS___PID_AFFINITY = 0x4BD +- SYS___POW_B = 0x4EE +- SYS___READDIR2 = 0x4F4 +- SYS___REMAINDER_B = 0x4EF +- SYS___RINT_B = 0x4D3 +- SYS___SCALB_B = 0x4F0 +- SYS___SIGACTIONSET = 0x4FB +- SYS___SIGGM = 0x4A7 +- SYS___SINH_B = 0x4F1 +- SYS___SIN_B = 0x4D6 +- SYS___SQRT_B = 0x4F2 +- SYS___TANH_B = 0x4D8 +- SYS___TAN_B = 0x4D7 +- SYS___TRRNO = 0x4AF +- SYS___TZNE = 0x4A9 +- SYS___TZZN = 0x4AA +- SYS___UCREATE = 0x4FC +- SYS___UFREE = 0x4FE +- SYS___UHEAPREPORT = 0x4FF +- SYS___UMALLOC = 0x4FD +- SYS___Y0_B = 0x4E5 +- SYS___Y1_B = 0x4E7 +- SYS___YN_B = 0x4E9 +- SYS_ABORT = 0x05C +- SYS_ASCTIME_R = 0x5E0 +- SYS_ATEXIT = 0x05D +- SYS_CONNECTE = 0x5AE +- SYS_CONNECTEXPORTIMPORT = 0x5AE +- SYS_CTIME_R = 0x5E1 +- SYS_DN_COMP = 0x5DF +- SYS_DN_EXPAND = 0x5DD +- SYS_DN_SKIPNAME = 0x5DE +- SYS_EXIT = 0x05A +- SYS_EXPORTWO = 0x5A1 +- SYS_EXPORTWORKUNIT = 0x5A1 +- SYS_EXTRACTW = 0x5A5 +- SYS_EXTRACTWORKUNIT = 0x5A5 +- SYS_FSEEKO = 0x5C9 +- SYS_FTELLO = 0x5C8 +- SYS_GETGRGID_R = 0x5E7 +- SYS_GETGRNAM_R = 0x5E8 +- SYS_GETLOGIN_R = 0x5E9 +- SYS_GETPWNAM_R = 0x5EA +- SYS_GETPWUID_R = 0x5EB +- SYS_GMTIME_R = 0x5E2 +- SYS_IMPORTWO = 0x5A3 +- SYS_IMPORTWORKUNIT = 0x5A3 +- SYS_INET_NTOP = 0x5D3 +- SYS_INET_PTON = 0x5D4 +- SYS_LLABS = 0x5CE +- SYS_LLDIV = 0x5CB +- SYS_LOCALTIME_R = 0x5E3 +- SYS_PTHREAD_ATFORK = 0x5ED +- SYS_PTHREAD_ATTR_GETDETACHSTATE_U98 = 0x5FB +- SYS_PTHREAD_ATTR_GETGUARDSIZE = 0x5EE +- SYS_PTHREAD_ATTR_GETSCHEDPARAM = 0x5F9 +- SYS_PTHREAD_ATTR_GETSTACKADDR = 0x5EF +- SYS_PTHREAD_ATTR_SETDETACHSTATE_U98 = 0x5FC +- SYS_PTHREAD_ATTR_SETGUARDSIZE = 0x5F0 +- SYS_PTHREAD_ATTR_SETSCHEDPARAM = 0x5FA +- SYS_PTHREAD_ATTR_SETSTACKADDR = 0x5F1 +- SYS_PTHREAD_CONDATTR_GETPSHARED = 0x5F2 +- SYS_PTHREAD_CONDATTR_SETPSHARED = 0x5F3 +- SYS_PTHREAD_DETACH_U98 = 0x5FD +- SYS_PTHREAD_GETCONCURRENCY = 0x5F4 +- SYS_PTHREAD_GETSPECIFIC_U98 = 0x5FE +- SYS_PTHREAD_KEY_DELETE = 0x5F5 +- SYS_PTHREAD_SETCANCELSTATE = 0x5FF +- SYS_PTHREAD_SETCONCURRENCY = 0x5F6 +- SYS_PTHREAD_SIGMASK = 0x5F7 +- SYS_QUERYENC = 0x5AD +- SYS_QUERYWORKUNITCLASSIFICATION = 0x5AD +- SYS_RAISE = 0x05E +- SYS_RAND_R = 0x5E4 +- SYS_READDIR_R = 0x5E6 +- SYS_REALLOC = 0x05B +- SYS_RES_INIT = 0x5D8 +- SYS_RES_MKQUERY = 0x5D7 +- SYS_RES_QUERY = 0x5D9 +- SYS_RES_QUERYDOMAIN = 0x5DC +- SYS_RES_SEARCH = 0x5DA +- SYS_RES_SEND = 0x5DB +- SYS_SETJMP = 0x05F +- SYS_SIGQUEUE = 0x5A9 +- SYS_STRTOK_R = 0x5E5 +- SYS_STRTOLL = 0x5B0 +- SYS_STRTOULL = 0x5B1 +- SYS_TTYNAME_R = 0x5EC +- SYS_UNDOEXPO = 0x5A2 +- SYS_UNDOEXPORTWORKUNIT = 0x5A2 +- SYS_UNDOIMPO = 0x5A4 +- SYS_UNDOIMPORTWORKUNIT = 0x5A4 +- SYS_WCSTOLL = 0x5CC +- SYS_WCSTOULL = 0x5CD +- SYS___ABORT = 0x05C +- SYS___CONSOLE2 = 0x5D2 +- SYS___CPL = 0x5A6 +- SYS___DISCARDDATA = 0x5F8 +- SYS___DSA_PREV = 0x5B2 +- SYS___EP_FIND = 0x5B3 +- SYS___FP_SWAPMODE = 0x5AF +- SYS___GETUSERID = 0x5AB +- SYS___GET_CPUID = 0x5B9 +- SYS___GET_SYSTEM_SETTINGS = 0x5BA +- SYS___IPDOMAINNAME = 0x5AC +- SYS___MAP_INIT = 0x5A7 +- SYS___MAP_SERVICE = 0x5A8 +- SYS___MOUNT = 0x5AA +- SYS___MSGRCV_TIMED = 0x5B7 +- SYS___RES = 0x5D6 +- SYS___SEMOP_TIMED = 0x5B8 +- SYS___SERVER_THREADS_QUERY = 0x5B4 +- SYS_FPRINTF = 0x06D +- SYS_FSCANF = 0x06A +- SYS_PRINTF = 0x06F +- SYS_SETBUF = 0x06B +- SYS_SETVBUF = 0x06C +- SYS_SSCANF = 0x06E +- SYS___CATGETS_A = 0x6C0 +- SYS___CHAUDIT_A = 0x6F4 +- SYS___CHMOD_A = 0x6E8 +- SYS___COLLATE_INIT_A = 0x6AC +- SYS___CREAT_A = 0x6F6 +- SYS___CTYPE_INIT_A = 0x6AF +- SYS___DLLLOAD_A = 0x6DF +- SYS___DLLQUERYFN_A = 0x6E0 +- SYS___DLLQUERYVAR_A = 0x6E1 +- SYS___E2A_L = 0x6E3 +- SYS___EXECLE_A = 0x6A0 +- SYS___EXECLP_A = 0x6A4 +- SYS___EXECVE_A = 0x6C1 +- SYS___EXECVP_A = 0x6C2 +- SYS___EXECV_A = 0x6B1 +- SYS___FPRINTF_A = 0x6FA +- SYS___GETADDRINFO_A = 0x6BF +- SYS___GETNAMEINFO_A = 0x6C4 +- SYS___GET_WCTYPE_STD_A = 0x6AE +- SYS___ICONV_OPEN_A = 0x6DE +- SYS___IF_INDEXTONAME_A = 0x6DC +- SYS___IF_NAMETOINDEX_A = 0x6DB +- SYS___ISWCTYPE_A = 0x6B0 +- SYS___IS_WCTYPE_STD_A = 0x6B2 +- SYS___LOCALECONV_A = 0x6B8 +- SYS___LOCALECONV_STD_A = 0x6B9 +- SYS___LOCALE_INIT_A = 0x6B7 +- SYS___LSTAT_A = 0x6EE +- SYS___LSTAT_O_A = 0x6EF +- SYS___MKDIR_A = 0x6E9 +- SYS___MKFIFO_A = 0x6EC +- SYS___MKNOD_A = 0x6F0 +- SYS___MONETARY_INIT_A = 0x6BC +- SYS___MOUNT_A = 0x6F1 +- SYS___NL_CSINFO_A = 0x6D6 +- SYS___NL_LANGINFO_A = 0x6BA +- SYS___NL_LNAGINFO_STD_A = 0x6BB +- SYS___NL_MONINFO_A = 0x6D7 +- SYS___NL_NUMINFO_A = 0x6D8 +- SYS___NL_RESPINFO_A = 0x6D9 +- SYS___NL_TIMINFO_A = 0x6DA +- SYS___NUMERIC_INIT_A = 0x6C6 +- SYS___OPEN_A = 0x6F7 +- SYS___PRINTF_A = 0x6DD +- SYS___RESP_INIT_A = 0x6C7 +- SYS___RPMATCH_A = 0x6C8 +- SYS___RPMATCH_C_A = 0x6C9 +- SYS___RPMATCH_STD_A = 0x6CA +- SYS___SETLOCALE_A = 0x6F9 +- SYS___SPAWNP_A = 0x6C5 +- SYS___SPAWN_A = 0x6C3 +- SYS___SPRINTF_A = 0x6FB +- SYS___STAT_A = 0x6EA +- SYS___STAT_O_A = 0x6EB +- SYS___STRCOLL_STD_A = 0x6A1 +- SYS___STRFMON_A = 0x6BD +- SYS___STRFMON_STD_A = 0x6BE +- SYS___STRFTIME_A = 0x6CC +- SYS___STRFTIME_STD_A = 0x6CD +- SYS___STRPTIME_A = 0x6CE +- SYS___STRPTIME_STD_A = 0x6CF +- SYS___STRXFRM_A = 0x6A2 +- SYS___STRXFRM_C_A = 0x6A3 +- SYS___STRXFRM_STD_A = 0x6A5 +- SYS___SYNTAX_INIT_A = 0x6D4 +- SYS___TIME_INIT_A = 0x6CB +- SYS___TOD_INIT_A = 0x6D5 +- SYS___TOWLOWER_A = 0x6B3 +- SYS___TOWLOWER_STD_A = 0x6B4 +- SYS___TOWUPPER_A = 0x6B5 +- SYS___TOWUPPER_STD_A = 0x6B6 +- SYS___UMOUNT_A = 0x6F2 +- SYS___VFPRINTF_A = 0x6FC +- SYS___VPRINTF_A = 0x6FD +- SYS___VSPRINTF_A = 0x6FE +- SYS___VSWPRINTF_A = 0x6FF +- SYS___WCSCOLL_A = 0x6A6 +- SYS___WCSCOLL_C_A = 0x6A7 +- SYS___WCSCOLL_STD_A = 0x6A8 +- SYS___WCSFTIME_A = 0x6D0 +- SYS___WCSFTIME_STD_A = 0x6D1 +- SYS___WCSXFRM_A = 0x6A9 +- SYS___WCSXFRM_C_A = 0x6AA +- SYS___WCSXFRM_STD_A = 0x6AB +- SYS___WCTYPE_A = 0x6AD +- SYS___W_GETMNTENT_A = 0x6F5 +- SYS_____CCSIDTYPE_A = 0x6E6 +- SYS_____CHATTR_A = 0x6E2 +- SYS_____CSNAMETYPE_A = 0x6E7 +- SYS_____OPEN_STAT_A = 0x6ED +- SYS_____SPAWN2_A = 0x6D2 +- SYS_____SPAWNP2_A = 0x6D3 +- SYS_____TOCCSID_A = 0x6E4 +- SYS_____TOCSNAME_A = 0x6E5 +- SYS_ACL_FREE = 0x7FF +- SYS_ACL_INIT = 0x7FE +- SYS_FWIDE = 0x7DF +- SYS_FWPRINTF = 0x7D1 +- SYS_FWRITE = 0x07E +- SYS_FWSCANF = 0x7D5 +- SYS_GETCHAR = 0x07B +- SYS_GETS = 0x07C +- SYS_M_CREATE_LAYOUT = 0x7C9 +- SYS_M_DESTROY_LAYOUT = 0x7CA +- SYS_M_GETVALUES_LAYOUT = 0x7CB +- SYS_M_SETVALUES_LAYOUT = 0x7CC +- SYS_M_TRANSFORM_LAYOUT = 0x7CD +- SYS_M_WTRANSFORM_LAYOUT = 0x7CE +- SYS_PREAD = 0x7C7 +- SYS_PUTC = 0x07D +- SYS_PUTCHAR = 0x07A +- SYS_PUTS = 0x07F +- SYS_PWRITE = 0x7C8 +- SYS_TOWCTRAN = 0x7D8 +- SYS_TOWCTRANS = 0x7D8 +- SYS_UNATEXIT = 0x7B5 +- SYS_VFWPRINT = 0x7D3 +- SYS_VFWPRINTF = 0x7D3 +- SYS_VWPRINTF = 0x7D4 +- SYS_WCTRANS = 0x7D7 +- SYS_WPRINTF = 0x7D2 +- SYS_WSCANF = 0x7D6 +- SYS___ASCTIME_R_A = 0x7A1 +- SYS___BASENAME_A = 0x7DC +- SYS___BTOWC_A = 0x7E4 +- SYS___CDUMP_A = 0x7B7 +- SYS___CEE3DMP_A = 0x7B6 +- SYS___CEILF_H = 0x7F4 +- SYS___CEILL_H = 0x7F5 +- SYS___CEIL_H = 0x7EA +- SYS___CRYPT_A = 0x7BE +- SYS___CSNAP_A = 0x7B8 +- SYS___CTEST_A = 0x7B9 +- SYS___CTIME_R_A = 0x7A2 +- SYS___CTRACE_A = 0x7BA +- SYS___DBM_OPEN_A = 0x7E6 +- SYS___DIRNAME_A = 0x7DD +- SYS___FABSF_H = 0x7FA +- SYS___FABSL_H = 0x7FB +- SYS___FABS_H = 0x7ED +- SYS___FGETWC_A = 0x7AA +- SYS___FGETWS_A = 0x7AD +- SYS___FLOORF_H = 0x7F6 +- SYS___FLOORL_H = 0x7F7 +- SYS___FLOOR_H = 0x7EB +- SYS___FPUTWC_A = 0x7A5 +- SYS___FPUTWS_A = 0x7A8 +- SYS___GETTIMEOFDAY_A = 0x7AE +- SYS___GETWCHAR_A = 0x7AC +- SYS___GETWC_A = 0x7AB +- SYS___GLOB_A = 0x7DE +- SYS___GMTIME_A = 0x7AF +- SYS___GMTIME_R_A = 0x7B0 +- SYS___INET_PTON_A = 0x7BC +- SYS___J0_H = 0x7EE +- SYS___J1_H = 0x7EF +- SYS___JN_H = 0x7F0 +- SYS___LOCALTIME_A = 0x7B1 +- SYS___LOCALTIME_R_A = 0x7B2 +- SYS___MALLOC24 = 0x7FC +- SYS___MALLOC31 = 0x7FD +- SYS___MKTIME_A = 0x7B3 +- SYS___MODFF_H = 0x7F8 +- SYS___MODFL_H = 0x7F9 +- SYS___MODF_H = 0x7EC +- SYS___OPENDIR_A = 0x7C2 +- SYS___OSNAME = 0x7E0 +- SYS___PUTWCHAR_A = 0x7A7 +- SYS___PUTWC_A = 0x7A6 +- SYS___READDIR_A = 0x7C3 +- SYS___STRTOLL_A = 0x7A3 +- SYS___STRTOULL_A = 0x7A4 +- SYS___SYSLOG_A = 0x7BD +- SYS___TZZNA = 0x7B4 +- SYS___UNGETWC_A = 0x7A9 +- SYS___UTIME_A = 0x7A0 +- SYS___VFPRINTF2_A = 0x7E7 +- SYS___VPRINTF2_A = 0x7E8 +- SYS___VSPRINTF2_A = 0x7E9 +- SYS___VSWPRNTF2_A = 0x7BB +- SYS___WCSTOD_A = 0x7D9 +- SYS___WCSTOL_A = 0x7DA +- SYS___WCSTOUL_A = 0x7DB +- SYS___WCTOB_A = 0x7E5 +- SYS___Y0_H = 0x7F1 +- SYS___Y1_H = 0x7F2 +- SYS___YN_H = 0x7F3 +- SYS_____OPENDIR2_A = 0x7BF +- SYS_____OSNAME_A = 0x7E1 +- SYS_____READDIR2_A = 0x7C0 +- SYS_DLCLOSE = 0x8DF +- SYS_DLERROR = 0x8E0 +- SYS_DLOPEN = 0x8DD +- SYS_DLSYM = 0x8DE +- SYS_FLOCKFILE = 0x8D3 +- SYS_FTRYLOCKFILE = 0x8D4 +- SYS_FUNLOCKFILE = 0x8D5 +- SYS_GETCHAR_UNLOCKED = 0x8D7 +- SYS_GETC_UNLOCKED = 0x8D6 +- SYS_PUTCHAR_UNLOCKED = 0x8D9 +- SYS_PUTC_UNLOCKED = 0x8D8 +- SYS_SNPRINTF = 0x8DA +- SYS_VSNPRINTF = 0x8DB +- SYS_WCSCSPN = 0x08B +- SYS_WCSLEN = 0x08C +- SYS_WCSNCAT = 0x08D +- SYS_WCSNCMP = 0x08A +- SYS_WCSNCPY = 0x08F +- SYS_WCSSPN = 0x08E +- SYS___ABSF_H = 0x8E7 +- SYS___ABSL_H = 0x8E8 +- SYS___ABS_H = 0x8E6 +- SYS___ACOSF_H = 0x8EA +- SYS___ACOSH_H = 0x8EC +- SYS___ACOSL_H = 0x8EB +- SYS___ACOS_H = 0x8E9 +- SYS___ASINF_H = 0x8EE +- SYS___ASINH_H = 0x8F0 +- SYS___ASINL_H = 0x8EF +- SYS___ASIN_H = 0x8ED +- SYS___ATAN2F_H = 0x8F8 +- SYS___ATAN2L_H = 0x8F9 +- SYS___ATAN2_H = 0x8F7 +- SYS___ATANF_H = 0x8F2 +- SYS___ATANHF_H = 0x8F5 +- SYS___ATANHL_H = 0x8F6 +- SYS___ATANH_H = 0x8F4 +- SYS___ATANL_H = 0x8F3 +- SYS___ATAN_H = 0x8F1 +- SYS___CBRT_H = 0x8FA +- SYS___COPYSIGNF_H = 0x8FB +- SYS___COPYSIGNL_H = 0x8FC +- SYS___COSF_H = 0x8FE +- SYS___COSL_H = 0x8FF +- SYS___COS_H = 0x8FD +- SYS___DLERROR_A = 0x8D2 +- SYS___DLOPEN_A = 0x8D0 +- SYS___DLSYM_A = 0x8D1 +- SYS___GETUTXENT_A = 0x8C6 +- SYS___GETUTXID_A = 0x8C7 +- SYS___GETUTXLINE_A = 0x8C8 +- SYS___ITOA = 0x8AA +- SYS___ITOA_A = 0x8B0 +- SYS___LE_CONDITION_TOKEN_BUILD = 0x8A5 +- SYS___LE_MSG_ADD_INSERT = 0x8A6 +- SYS___LE_MSG_GET = 0x8A7 +- SYS___LE_MSG_GET_AND_WRITE = 0x8A8 +- SYS___LE_MSG_WRITE = 0x8A9 +- SYS___LLTOA = 0x8AE +- SYS___LLTOA_A = 0x8B4 +- SYS___LTOA = 0x8AC +- SYS___LTOA_A = 0x8B2 +- SYS___PUTCHAR_UNLOCKED_A = 0x8CC +- SYS___PUTC_UNLOCKED_A = 0x8CB +- SYS___PUTUTXLINE_A = 0x8C9 +- SYS___RESET_EXCEPTION_HANDLER = 0x8E3 +- SYS___REXEC_A = 0x8C4 +- SYS___REXEC_AF_A = 0x8C5 +- SYS___SET_EXCEPTION_HANDLER = 0x8E2 +- SYS___SNPRINTF_A = 0x8CD +- SYS___SUPERKILL = 0x8A4 +- SYS___TCGETATTR_A = 0x8A1 +- SYS___TCSETATTR_A = 0x8A2 +- SYS___ULLTOA = 0x8AF +- SYS___ULLTOA_A = 0x8B5 +- SYS___ULTOA = 0x8AD +- SYS___ULTOA_A = 0x8B3 +- SYS___UTOA = 0x8AB +- SYS___UTOA_A = 0x8B1 +- SYS___VHM_EVENT = 0x8E4 +- SYS___VSNPRINTF_A = 0x8CE +- SYS_____GETENV_A = 0x8C3 +- SYS_____UTMPXNAME_A = 0x8CA +- SYS_CACOSH = 0x9A0 +- SYS_CACOSHF = 0x9A3 +- SYS_CACOSHL = 0x9A6 +- SYS_CARG = 0x9A9 +- SYS_CARGF = 0x9AC +- SYS_CARGL = 0x9AF +- SYS_CASIN = 0x9B2 +- SYS_CASINF = 0x9B5 +- SYS_CASINH = 0x9BB +- SYS_CASINHF = 0x9BE +- SYS_CASINHL = 0x9C1 +- SYS_CASINL = 0x9B8 +- SYS_CATAN = 0x9C4 +- SYS_CATANF = 0x9C7 +- SYS_CATANH = 0x9CD +- SYS_CATANHF = 0x9D0 +- SYS_CATANHL = 0x9D3 +- SYS_CATANL = 0x9CA +- SYS_CCOS = 0x9D6 +- SYS_CCOSF = 0x9D9 +- SYS_CCOSH = 0x9DF +- SYS_CCOSHF = 0x9E2 +- SYS_CCOSHL = 0x9E5 +- SYS_CCOSL = 0x9DC +- SYS_CEXP = 0x9E8 +- SYS_CEXPF = 0x9EB +- SYS_CEXPL = 0x9EE +- SYS_CIMAG = 0x9F1 +- SYS_CIMAGF = 0x9F4 +- SYS_CIMAGL = 0x9F7 +- SYS_CLOGF = 0x9FD +- SYS_MEMCHR = 0x09B +- SYS_MEMCMP = 0x09A +- SYS_STRCOLL = 0x09C +- SYS_STRNCMP = 0x09D +- SYS_STRRCHR = 0x09F +- SYS_STRXFRM = 0x09E +- SYS___CACOSHF_B = 0x9A4 +- SYS___CACOSHF_H = 0x9A5 +- SYS___CACOSHL_B = 0x9A7 +- SYS___CACOSHL_H = 0x9A8 +- SYS___CACOSH_B = 0x9A1 +- SYS___CACOSH_H = 0x9A2 +- SYS___CARGF_B = 0x9AD +- SYS___CARGF_H = 0x9AE +- SYS___CARGL_B = 0x9B0 +- SYS___CARGL_H = 0x9B1 +- SYS___CARG_B = 0x9AA +- SYS___CARG_H = 0x9AB +- SYS___CASINF_B = 0x9B6 +- SYS___CASINF_H = 0x9B7 +- SYS___CASINHF_B = 0x9BF +- SYS___CASINHF_H = 0x9C0 +- SYS___CASINHL_B = 0x9C2 +- SYS___CASINHL_H = 0x9C3 +- SYS___CASINH_B = 0x9BC +- SYS___CASINH_H = 0x9BD +- SYS___CASINL_B = 0x9B9 +- SYS___CASINL_H = 0x9BA +- SYS___CASIN_B = 0x9B3 +- SYS___CASIN_H = 0x9B4 +- SYS___CATANF_B = 0x9C8 +- SYS___CATANF_H = 0x9C9 +- SYS___CATANHF_B = 0x9D1 +- SYS___CATANHF_H = 0x9D2 +- SYS___CATANHL_B = 0x9D4 +- SYS___CATANHL_H = 0x9D5 +- SYS___CATANH_B = 0x9CE +- SYS___CATANH_H = 0x9CF +- SYS___CATANL_B = 0x9CB +- SYS___CATANL_H = 0x9CC +- SYS___CATAN_B = 0x9C5 +- SYS___CATAN_H = 0x9C6 +- SYS___CCOSF_B = 0x9DA +- SYS___CCOSF_H = 0x9DB +- SYS___CCOSHF_B = 0x9E3 +- SYS___CCOSHF_H = 0x9E4 +- SYS___CCOSHL_B = 0x9E6 +- SYS___CCOSHL_H = 0x9E7 +- SYS___CCOSH_B = 0x9E0 +- SYS___CCOSH_H = 0x9E1 +- SYS___CCOSL_B = 0x9DD +- SYS___CCOSL_H = 0x9DE +- SYS___CCOS_B = 0x9D7 +- SYS___CCOS_H = 0x9D8 +- SYS___CEXPF_B = 0x9EC +- SYS___CEXPF_H = 0x9ED +- SYS___CEXPL_B = 0x9EF +- SYS___CEXPL_H = 0x9F0 +- SYS___CEXP_B = 0x9E9 +- SYS___CEXP_H = 0x9EA +- SYS___CIMAGF_B = 0x9F5 +- SYS___CIMAGF_H = 0x9F6 +- SYS___CIMAGL_B = 0x9F8 +- SYS___CIMAGL_H = 0x9F9 +- SYS___CIMAG_B = 0x9F2 +- SYS___CIMAG_H = 0x9F3 +- SYS___CLOG = 0x9FA +- SYS___CLOGF_B = 0x9FE +- SYS___CLOGF_H = 0x9FF +- SYS___CLOG_B = 0x9FB +- SYS___CLOG_H = 0x9FC +- SYS_ISWCTYPE = 0x10C +- SYS_ISWXDIGI = 0x10A +- SYS_ISWXDIGIT = 0x10A +- SYS_MBSINIT = 0x10F +- SYS_TOWLOWER = 0x10D +- SYS_TOWUPPER = 0x10E +- SYS_WCTYPE = 0x10B +- SYS_WCSSTR = 0x11B +- SYS___RPMTCH = 0x11A +- SYS_WCSTOD = 0x12E +- SYS_WCSTOK = 0x12C +- SYS_WCSTOL = 0x12D +- SYS_WCSTOUL = 0x12F +- SYS_FGETWC = 0x13C +- SYS_FGETWS = 0x13D +- SYS_FPUTWC = 0x13E +- SYS_FPUTWS = 0x13F +- SYS_REGERROR = 0x13B +- SYS_REGFREE = 0x13A +- SYS_COLLEQUIV = 0x14F +- SYS_COLLTOSTR = 0x14E +- SYS_ISMCCOLLEL = 0x14C +- SYS_STRTOCOLL = 0x14D +- SYS_DLLFREE = 0x16F +- SYS_DLLQUERYFN = 0x16D +- SYS_DLLQUERYVAR = 0x16E +- SYS_GETMCCOLL = 0x16A +- SYS_GETWMCCOLL = 0x16B +- SYS___ERR2AD = 0x16C +- SYS_CFSETOSPEED = 0x17A +- SYS_CHDIR = 0x17B +- SYS_CHMOD = 0x17C +- SYS_CHOWN = 0x17D +- SYS_CLOSE = 0x17E +- SYS_CLOSEDIR = 0x17F +- SYS_LOG = 0x017 +- SYS_COSH = 0x018 +- SYS_FCHMOD = 0x18A +- SYS_FCHOWN = 0x18B +- SYS_FCNTL = 0x18C +- SYS_FILENO = 0x18D +- SYS_FORK = 0x18E +- SYS_FPATHCONF = 0x18F +- SYS_GETLOGIN = 0x19A +- SYS_GETPGRP = 0x19C +- SYS_GETPID = 0x19D +- SYS_GETPPID = 0x19E +- SYS_GETPWNAM = 0x19F +- SYS_TANH = 0x019 +- SYS_W_GETMNTENT = 0x19B +- SYS_POW = 0x020 +- SYS_PTHREAD_SELF = 0x20A +- SYS_PTHREAD_SETINTR = 0x20B +- SYS_PTHREAD_SETINTRTYPE = 0x20C +- SYS_PTHREAD_SETSPECIFIC = 0x20D +- SYS_PTHREAD_TESTINTR = 0x20E +- SYS_PTHREAD_YIELD = 0x20F +- SYS_SQRT = 0x021 +- SYS_FLOOR = 0x022 +- SYS_J1 = 0x023 +- SYS_WCSPBRK = 0x23F +- SYS_BSEARCH = 0x24C +- SYS_FABS = 0x024 +- SYS_GETENV = 0x24A +- SYS_LDIV = 0x24D +- SYS_SYSTEM = 0x24B +- SYS_FMOD = 0x025 +- SYS___RETHROW = 0x25F +- SYS___THROW = 0x25E +- SYS_J0 = 0x026 +- SYS_PUTENV = 0x26A +- SYS___GETENV = 0x26F +- SYS_SEMCTL = 0x27A +- SYS_SEMGET = 0x27B +- SYS_SEMOP = 0x27C +- SYS_SHMAT = 0x27D +- SYS_SHMCTL = 0x27E +- SYS_SHMDT = 0x27F +- SYS_YN = 0x027 +- SYS_JN = 0x028 +- SYS_SIGALTSTACK = 0x28A +- SYS_SIGHOLD = 0x28B +- SYS_SIGIGNORE = 0x28C +- SYS_SIGINTERRUPT = 0x28D +- SYS_SIGPAUSE = 0x28E +- SYS_SIGRELSE = 0x28F +- SYS_GETOPT = 0x29A +- SYS_GETSUBOPT = 0x29D +- SYS_LCHOWN = 0x29B +- SYS_SETPGRP = 0x29E +- SYS_TRUNCATE = 0x29C +- SYS_Y0 = 0x029 +- SYS___GDERR = 0x29F +- SYS_ISALPHA = 0x030 +- SYS_VFORK = 0x30F +- SYS__LONGJMP = 0x30D +- SYS__SETJMP = 0x30E +- SYS_GLOB = 0x31A +- SYS_GLOBFREE = 0x31B +- SYS_ISALNUM = 0x031 +- SYS_PUTW = 0x31C +- SYS_SEEKDIR = 0x31D +- SYS_TELLDIR = 0x31E +- SYS_TEMPNAM = 0x31F +- SYS_GETTIMEOFDAY_R = 0x32E +- SYS_ISLOWER = 0x032 +- SYS_LGAMMA = 0x32C +- SYS_REMAINDER = 0x32A +- SYS_SCALB = 0x32B +- SYS_SYNC = 0x32F +- SYS_TTYSLOT = 0x32D +- SYS_ENDPROTOENT = 0x33A +- SYS_ENDSERVENT = 0x33B +- SYS_GETHOSTBYADDR = 0x33D +- SYS_GETHOSTBYADDR_R = 0x33C +- SYS_GETHOSTBYNAME = 0x33F +- SYS_GETHOSTBYNAME_R = 0x33E +- SYS_ISCNTRL = 0x033 +- SYS_GETSERVBYNAME = 0x34A +- SYS_GETSERVBYPORT = 0x34B +- SYS_GETSERVENT = 0x34C +- SYS_GETSOCKNAME = 0x34D +- SYS_GETSOCKOPT = 0x34E +- SYS_INET_ADDR = 0x34F +- SYS_ISDIGIT = 0x034 +- SYS_ISGRAPH = 0x035 +- SYS_SELECT = 0x35B +- SYS_SELECTEX = 0x35C +- SYS_SEND = 0x35D +- SYS_SENDTO = 0x35F +- SYS_CHROOT = 0x36A +- SYS_ISNAN = 0x36D +- SYS_ISUPPER = 0x036 +- SYS_ULIMIT = 0x36C +- SYS_UTIMES = 0x36E +- SYS_W_STATVFS = 0x36B +- SYS___H_ERRNO = 0x36F +- SYS_GRANTPT = 0x37A +- SYS_ISPRINT = 0x037 +- SYS_TCGETSID = 0x37C +- SYS_UNLOCKPT = 0x37B +- SYS___TCGETCP = 0x37D +- SYS___TCSETCP = 0x37E +- SYS___TCSETTABLES = 0x37F +- SYS_ISPUNCT = 0x038 +- SYS_NLIST = 0x38C +- SYS___IPDBCS = 0x38D +- SYS___IPDSPX = 0x38E +- SYS___IPMSGC = 0x38F +- SYS___STHOSTENT = 0x38B +- SYS___STSERVENT = 0x38A +- SYS_ISSPACE = 0x039 +- SYS_COS = 0x040 +- SYS_T_ALLOC = 0x40A +- SYS_T_BIND = 0x40B +- SYS_T_CLOSE = 0x40C +- SYS_T_CONNECT = 0x40D +- SYS_T_ERROR = 0x40E +- SYS_T_FREE = 0x40F +- SYS_TAN = 0x041 +- SYS_T_RCVREL = 0x41A +- SYS_T_RCVUDATA = 0x41B +- SYS_T_RCVUDERR = 0x41C +- SYS_T_SND = 0x41D +- SYS_T_SNDDIS = 0x41E +- SYS_T_SNDREL = 0x41F +- SYS_GETPMSG = 0x42A +- SYS_ISASTREAM = 0x42B +- SYS_PUTMSG = 0x42C +- SYS_PUTPMSG = 0x42D +- SYS_SINH = 0x042 +- SYS___ISPOSIXON = 0x42E +- SYS___OPENMVSREL = 0x42F +- SYS_ACOS = 0x043 +- SYS_ATAN = 0x044 +- SYS_ATAN2 = 0x045 +- SYS_FTELL = 0x046 +- SYS_FGETPOS = 0x047 +- SYS_SOCK_DEBUG = 0x47A +- SYS_SOCK_DO_TESTSTOR = 0x47D +- SYS_TAKESOCKET = 0x47E +- SYS___SERVER_INIT = 0x47F +- SYS_FSEEK = 0x048 +- SYS___IPHOST = 0x48B +- SYS___IPNODE = 0x48C +- SYS___SERVER_CLASSIFY_CREATE = 0x48D +- SYS___SERVER_CLASSIFY_DESTROY = 0x48E +- SYS___SERVER_CLASSIFY_RESET = 0x48F +- SYS___SMF_RECORD = 0x48A +- SYS_FSETPOS = 0x049 +- SYS___FNWSA = 0x49B +- SYS___SPAWN2 = 0x49D +- SYS___SPAWNP2 = 0x49E +- SYS_ATOF = 0x050 +- SYS_PTHREAD_MUTEXATTR_GETPSHARED = 0x50A +- SYS_PTHREAD_MUTEXATTR_SETPSHARED = 0x50B +- SYS_PTHREAD_RWLOCK_DESTROY = 0x50C +- SYS_PTHREAD_RWLOCK_INIT = 0x50D +- SYS_PTHREAD_RWLOCK_RDLOCK = 0x50E +- SYS_PTHREAD_RWLOCK_TRYRDLOCK = 0x50F +- SYS_ATOI = 0x051 +- SYS___FP_CLASS = 0x51D +- SYS___FP_CLR_FLAG = 0x51A +- SYS___FP_FINITE = 0x51E +- SYS___FP_ISNAN = 0x51F +- SYS___FP_RAISE_XCP = 0x51C +- SYS___FP_READ_FLAG = 0x51B +- SYS_RAND = 0x052 +- SYS_SIGTIMEDWAIT = 0x52D +- SYS_SIGWAITINFO = 0x52E +- SYS___CHKBFP = 0x52F +- SYS___FPC_RS = 0x52C +- SYS___FPC_RW = 0x52A +- SYS___FPC_SM = 0x52B +- SYS_STRTOD = 0x053 +- SYS_STRTOL = 0x054 +- SYS_STRTOUL = 0x055 +- SYS_MALLOC = 0x056 +- SYS_SRAND = 0x057 +- SYS_CALLOC = 0x058 +- SYS_FREE = 0x059 +- SYS___OSENV = 0x59F +- SYS___W_PIOCTL = 0x59E +- SYS_LONGJMP = 0x060 +- SYS___FLOORF_B = 0x60A +- SYS___FLOORL_B = 0x60B +- SYS___FREXPF_B = 0x60C +- SYS___FREXPL_B = 0x60D +- SYS___LDEXPF_B = 0x60E +- SYS___LDEXPL_B = 0x60F +- SYS_SIGNAL = 0x061 +- SYS___ATAN2F_B = 0x61A +- SYS___ATAN2L_B = 0x61B +- SYS___COSHF_B = 0x61C +- SYS___COSHL_B = 0x61D +- SYS___EXPF_B = 0x61E +- SYS___EXPL_B = 0x61F +- SYS_TMPNAM = 0x062 +- SYS___ABSF_B = 0x62A +- SYS___ABSL_B = 0x62C +- SYS___ABS_B = 0x62B +- SYS___FMODF_B = 0x62D +- SYS___FMODL_B = 0x62E +- SYS___MODFF_B = 0x62F +- SYS_ATANL = 0x63A +- SYS_CEILF = 0x63B +- SYS_CEILL = 0x63C +- SYS_COSF = 0x63D +- SYS_COSHF = 0x63F +- SYS_COSL = 0x63E +- SYS_REMOVE = 0x063 +- SYS_POWL = 0x64A +- SYS_RENAME = 0x064 +- SYS_SINF = 0x64B +- SYS_SINHF = 0x64F +- SYS_SINL = 0x64C +- SYS_SQRTF = 0x64D +- SYS_SQRTL = 0x64E +- SYS_BTOWC = 0x65F +- SYS_FREXPL = 0x65A +- SYS_LDEXPF = 0x65B +- SYS_LDEXPL = 0x65C +- SYS_MODFF = 0x65D +- SYS_MODFL = 0x65E +- SYS_TMPFILE = 0x065 +- SYS_FREOPEN = 0x066 +- SYS___CHARMAP_INIT_A = 0x66E +- SYS___GETHOSTBYADDR_R_A = 0x66C +- SYS___GETHOSTBYNAME_A = 0x66A +- SYS___GETHOSTBYNAME_R_A = 0x66D +- SYS___MBLEN_A = 0x66F +- SYS___RES_INIT_A = 0x66B +- SYS_FCLOSE = 0x067 +- SYS___GETGRGID_R_A = 0x67D +- SYS___WCSTOMBS_A = 0x67A +- SYS___WCSTOMBS_STD_A = 0x67B +- SYS___WCSWIDTH_A = 0x67C +- SYS___WCSWIDTH_ASIA = 0x67F +- SYS___WCSWIDTH_STD_A = 0x67E +- SYS_FFLUSH = 0x068 +- SYS___GETLOGIN_R_A = 0x68E +- SYS___GETPWNAM_R_A = 0x68C +- SYS___GETPWUID_R_A = 0x68D +- SYS___TTYNAME_R_A = 0x68F +- SYS___WCWIDTH_ASIA = 0x68B +- SYS___WCWIDTH_STD_A = 0x68A +- SYS_FOPEN = 0x069 +- SYS___REGEXEC_A = 0x69A +- SYS___REGEXEC_STD_A = 0x69B +- SYS___REGFREE_A = 0x69C +- SYS___REGFREE_STD_A = 0x69D +- SYS___STRCOLL_A = 0x69E +- SYS___STRCOLL_C_A = 0x69F +- SYS_SCANF = 0x070 +- SYS___A64L_A = 0x70C +- SYS___ECVT_A = 0x70D +- SYS___FCVT_A = 0x70E +- SYS___GCVT_A = 0x70F +- SYS___STRTOUL_A = 0x70A +- SYS_____AE_CORRESTBL_QUERY_A = 0x70B +- SYS_SPRINTF = 0x071 +- SYS___ACCESS_A = 0x71F +- SYS___CATOPEN_A = 0x71E +- SYS___GETOPT_A = 0x71D +- SYS___REALPATH_A = 0x71A +- SYS___SETENV_A = 0x71B +- SYS___SYSTEM_A = 0x71C +- SYS_FGETC = 0x072 +- SYS___GAI_STRERROR_A = 0x72F +- SYS___RMDIR_A = 0x72A +- SYS___STATVFS_A = 0x72B +- SYS___SYMLINK_A = 0x72C +- SYS___TRUNCATE_A = 0x72D +- SYS___UNLINK_A = 0x72E +- SYS_VFPRINTF = 0x073 +- SYS___ISSPACE_A = 0x73A +- SYS___ISUPPER_A = 0x73B +- SYS___ISWALNUM_A = 0x73F +- SYS___ISXDIGIT_A = 0x73C +- SYS___TOLOWER_A = 0x73D +- SYS___TOUPPER_A = 0x73E +- SYS_VPRINTF = 0x074 +- SYS___CONFSTR_A = 0x74B +- SYS___FDOPEN_A = 0x74E +- SYS___FLDATA_A = 0x74F +- SYS___FTOK_A = 0x74C +- SYS___ISWXDIGIT_A = 0x74A +- SYS___MKTEMP_A = 0x74D +- SYS_VSPRINTF = 0x075 +- SYS___GETGRGID_A = 0x75A +- SYS___GETGRNAM_A = 0x75B +- SYS___GETGROUPSBYNAME_A = 0x75C +- SYS___GETHOSTENT_A = 0x75D +- SYS___GETHOSTNAME_A = 0x75E +- SYS___GETLOGIN_A = 0x75F +- SYS_GETC = 0x076 +- SYS___CREATEWORKUNIT_A = 0x76A +- SYS___CTERMID_A = 0x76B +- SYS___FMTMSG_A = 0x76C +- SYS___INITGROUPS_A = 0x76D +- SYS___MSGRCV_A = 0x76F +- SYS_____LOGIN_A = 0x76E +- SYS_FGETS = 0x077 +- SYS___STRCASECMP_A = 0x77B +- SYS___STRNCASECMP_A = 0x77C +- SYS___TTYNAME_A = 0x77D +- SYS___UNAME_A = 0x77E +- SYS___UTIMES_A = 0x77F +- SYS_____SERVER_PWU_A = 0x77A +- SYS_FPUTC = 0x078 +- SYS___CREAT_O_A = 0x78E +- SYS___ENVNA = 0x78F +- SYS___FREAD_A = 0x78A +- SYS___FWRITE_A = 0x78B +- SYS___ISASCII = 0x78D +- SYS___OPEN_O_A = 0x78C +- SYS_FPUTS = 0x079 +- SYS___ASCTIME_A = 0x79C +- SYS___CTIME_A = 0x79D +- SYS___GETDATE_A = 0x79E +- SYS___GETSERVBYPORT_A = 0x79A +- SYS___GETSERVENT_A = 0x79B +- SYS___TZSET_A = 0x79F +- SYS_ACL_FROM_TEXT = 0x80C +- SYS_ACL_SET_FD = 0x80A +- SYS_ACL_SET_FILE = 0x80B +- SYS_ACL_SORT = 0x80E +- SYS_ACL_TO_TEXT = 0x80D +- SYS_UNGETC = 0x080 +- SYS___SHUTDOWN_REGISTRATION = 0x80F +- SYS_FREAD = 0x081 +- SYS_FREEADDRINFO = 0x81A +- SYS_GAI_STRERROR = 0x81B +- SYS_REXEC_AF = 0x81C +- SYS___DYNALLOC_A = 0x81F +- SYS___POE = 0x81D +- SYS_WCSTOMBS = 0x082 +- SYS___INET_ADDR_A = 0x82F +- SYS___NLIST_A = 0x82A +- SYS_____TCGETCP_A = 0x82B +- SYS_____TCSETCP_A = 0x82C +- SYS_____W_PIOCTL_A = 0x82E +- SYS_MBTOWC = 0x083 +- SYS___CABEND = 0x83D +- SYS___LE_CIB_GET = 0x83E +- SYS___RECVMSG_A = 0x83B +- SYS___SENDMSG_A = 0x83A +- SYS___SET_LAA_FOR_JIT = 0x83F +- SYS_____LCHATTR_A = 0x83C +- SYS_WCTOMB = 0x084 +- SYS___CBRTL_B = 0x84A +- SYS___COPYSIGNF_B = 0x84B +- SYS___COPYSIGNL_B = 0x84C +- SYS___COTANF_B = 0x84D +- SYS___COTANL_B = 0x84F +- SYS___COTAN_B = 0x84E +- SYS_MBSTOWCS = 0x085 +- SYS___LOG1PL_B = 0x85A +- SYS___LOG2F_B = 0x85B +- SYS___LOG2L_B = 0x85D +- SYS___LOG2_B = 0x85C +- SYS___REMAINDERF_B = 0x85E +- SYS___REMAINDERL_B = 0x85F +- SYS_ACOSHF = 0x86E +- SYS_ACOSHL = 0x86F +- SYS_WCSCPY = 0x086 +- SYS___ERFCF_B = 0x86D +- SYS___ERFF_B = 0x86C +- SYS___LROUNDF_B = 0x86A +- SYS___LROUND_B = 0x86B +- SYS_COTANL = 0x87A +- SYS_EXP2F = 0x87B +- SYS_EXP2L = 0x87C +- SYS_EXPM1F = 0x87D +- SYS_EXPM1L = 0x87E +- SYS_FDIMF = 0x87F +- SYS_WCSCAT = 0x087 +- SYS___COTANL = 0x87A +- SYS_REMAINDERF = 0x88A +- SYS_REMAINDERL = 0x88B +- SYS_REMAINDF = 0x88A +- SYS_REMAINDL = 0x88B +- SYS_REMQUO = 0x88D +- SYS_REMQUOF = 0x88C +- SYS_REMQUOL = 0x88E +- SYS_TGAMMAF = 0x88F +- SYS_WCSCHR = 0x088 +- SYS_ERFCF = 0x89B +- SYS_ERFCL = 0x89C +- SYS_ERFL = 0x89A +- SYS_EXP2 = 0x89E +- SYS_WCSCMP = 0x089 +- SYS___EXP2_B = 0x89D +- SYS___FAR_JUMP = 0x89F +- SYS_ABS = 0x090 +- SYS___ERFCL_H = 0x90A +- SYS___EXPF_H = 0x90C +- SYS___EXPL_H = 0x90D +- SYS___EXPM1_H = 0x90E +- SYS___EXP_H = 0x90B +- SYS___FDIM_H = 0x90F +- SYS_DIV = 0x091 +- SYS___LOG2F_H = 0x91F +- SYS___LOG2_H = 0x91E +- SYS___LOGB_H = 0x91D +- SYS___LOGF_H = 0x91B +- SYS___LOGL_H = 0x91C +- SYS___LOG_H = 0x91A +- SYS_LABS = 0x092 +- SYS___POWL_H = 0x92A +- SYS___REMAINDER_H = 0x92B +- SYS___RINT_H = 0x92C +- SYS___SCALB_H = 0x92D +- SYS___SINF_H = 0x92F +- SYS___SIN_H = 0x92E +- SYS_STRNCPY = 0x093 +- SYS___TANHF_H = 0x93B +- SYS___TANHL_H = 0x93C +- SYS___TANH_H = 0x93A +- SYS___TGAMMAF_H = 0x93E +- SYS___TGAMMA_H = 0x93D +- SYS___TRUNC_H = 0x93F +- SYS_MEMCPY = 0x094 +- SYS_VFWSCANF = 0x94A +- SYS_VSWSCANF = 0x94E +- SYS_VWSCANF = 0x94C +- SYS_INET6_RTH_ADD = 0x95D +- SYS_INET6_RTH_INIT = 0x95C +- SYS_INET6_RTH_REVERSE = 0x95E +- SYS_INET6_RTH_SEGMENTS = 0x95F +- SYS_INET6_RTH_SPACE = 0x95B +- SYS_MEMMOVE = 0x095 +- SYS_WCSTOLD = 0x95A +- SYS_STRCPY = 0x096 +- SYS_STRCMP = 0x097 +- SYS_CABS = 0x98E +- SYS_STRCAT = 0x098 +- SYS___CABS_B = 0x98F +- SYS___POW_II = 0x98A +- SYS___POW_II_B = 0x98B +- SYS___POW_II_H = 0x98C +- SYS_CACOSF = 0x99A +- SYS_CACOSL = 0x99D +- SYS_STRNCAT = 0x099 +- SYS___CACOSF_B = 0x99B +- SYS___CACOSF_H = 0x99C +- SYS___CACOSL_B = 0x99E +- SYS___CACOSL_H = 0x99F +- SYS_ISWALPHA = 0x100 +- SYS_ISWBLANK = 0x101 +- SYS___ISWBLK = 0x101 +- SYS_ISWCNTRL = 0x102 +- SYS_ISWDIGIT = 0x103 +- SYS_ISWGRAPH = 0x104 +- SYS_ISWLOWER = 0x105 +- SYS_ISWPRINT = 0x106 +- SYS_ISWPUNCT = 0x107 +- SYS_ISWSPACE = 0x108 +- SYS_ISWUPPER = 0x109 +- SYS_WCTOB = 0x110 +- SYS_MBRLEN = 0x111 +- SYS_MBRTOWC = 0x112 +- SYS_MBSRTOWC = 0x113 +- SYS_MBSRTOWCS = 0x113 +- SYS_WCRTOMB = 0x114 +- SYS_WCSRTOMB = 0x115 +- SYS_WCSRTOMBS = 0x115 +- SYS___CSID = 0x116 +- SYS___WCSID = 0x117 +- SYS_STRPTIME = 0x118 +- SYS___STRPTM = 0x118 +- SYS_STRFMON = 0x119 +- SYS_WCSCOLL = 0x130 +- SYS_WCSXFRM = 0x131 +- SYS_WCSWIDTH = 0x132 +- SYS_WCWIDTH = 0x133 +- SYS_WCSFTIME = 0x134 +- SYS_SWPRINTF = 0x135 +- SYS_VSWPRINT = 0x136 +- SYS_VSWPRINTF = 0x136 +- SYS_SWSCANF = 0x137 +- SYS_REGCOMP = 0x138 +- SYS_REGEXEC = 0x139 +- SYS_GETWC = 0x140 +- SYS_GETWCHAR = 0x141 +- SYS_PUTWC = 0x142 +- SYS_PUTWCHAR = 0x143 +- SYS_UNGETWC = 0x144 +- SYS_ICONV_OPEN = 0x145 +- SYS_ICONV = 0x146 +- SYS_ICONV_CLOSE = 0x147 +- SYS_COLLRANGE = 0x150 +- SYS_CCLASS = 0x151 +- SYS_COLLORDER = 0x152 +- SYS___DEMANGLE = 0x154 +- SYS_FDOPEN = 0x155 +- SYS___ERRNO = 0x156 +- SYS___ERRNO2 = 0x157 +- SYS___TERROR = 0x158 +- SYS_MAXCOLL = 0x169 +- SYS_DLLLOAD = 0x170 +- SYS__EXIT = 0x174 +- SYS_ACCESS = 0x175 +- SYS_ALARM = 0x176 +- SYS_CFGETISPEED = 0x177 +- SYS_CFGETOSPEED = 0x178 +- SYS_CFSETISPEED = 0x179 +- SYS_CREAT = 0x180 +- SYS_CTERMID = 0x181 +- SYS_DUP = 0x182 +- SYS_DUP2 = 0x183 +- SYS_EXECL = 0x184 +- SYS_EXECLE = 0x185 +- SYS_EXECLP = 0x186 +- SYS_EXECV = 0x187 +- SYS_EXECVE = 0x188 +- SYS_EXECVP = 0x189 +- SYS_FSTAT = 0x190 +- SYS_FSYNC = 0x191 +- SYS_FTRUNCATE = 0x192 +- SYS_GETCWD = 0x193 +- SYS_GETEGID = 0x194 +- SYS_GETEUID = 0x195 +- SYS_GETGID = 0x196 +- SYS_GETGRGID = 0x197 +- SYS_GETGRNAM = 0x198 +- SYS_GETGROUPS = 0x199 +- SYS_PTHREAD_MUTEXATTR_DESTROY = 0x200 +- SYS_PTHREAD_MUTEXATTR_SETKIND_NP = 0x201 +- SYS_PTHREAD_MUTEXATTR_GETKIND_NP = 0x202 +- SYS_PTHREAD_MUTEX_INIT = 0x203 +- SYS_PTHREAD_MUTEX_DESTROY = 0x204 +- SYS_PTHREAD_MUTEX_LOCK = 0x205 +- SYS_PTHREAD_MUTEX_TRYLOCK = 0x206 +- SYS_PTHREAD_MUTEX_UNLOCK = 0x207 +- SYS_PTHREAD_ONCE = 0x209 +- SYS_TW_OPEN = 0x210 +- SYS_TW_FCNTL = 0x211 +- SYS_PTHREAD_JOIN_D4_NP = 0x212 +- SYS_PTHREAD_CONDATTR_SETKIND_NP = 0x213 +- SYS_PTHREAD_CONDATTR_GETKIND_NP = 0x214 +- SYS_EXTLINK_NP = 0x215 +- SYS___PASSWD = 0x216 +- SYS_SETGROUPS = 0x217 +- SYS_INITGROUPS = 0x218 +- SYS_WCSRCHR = 0x240 +- SYS_SVC99 = 0x241 +- SYS___SVC99 = 0x241 +- SYS_WCSWCS = 0x242 +- SYS_LOCALECO = 0x243 +- SYS_LOCALECONV = 0x243 +- SYS___LIBREL = 0x244 +- SYS_RELEASE = 0x245 +- SYS___RLSE = 0x245 +- SYS_FLOCATE = 0x246 +- SYS___FLOCT = 0x246 +- SYS_FDELREC = 0x247 +- SYS___FDLREC = 0x247 +- SYS_FETCH = 0x248 +- SYS___FETCH = 0x248 +- SYS_QSORT = 0x249 +- SYS___CLEANUPCATCH = 0x260 +- SYS___CATCHMATCH = 0x261 +- SYS___CLEAN2UPCATCH = 0x262 +- SYS_GETPRIORITY = 0x270 +- SYS_NICE = 0x271 +- SYS_SETPRIORITY = 0x272 +- SYS_GETITIMER = 0x273 +- SYS_SETITIMER = 0x274 +- SYS_MSGCTL = 0x275 +- SYS_MSGGET = 0x276 +- SYS_MSGRCV = 0x277 +- SYS_MSGSND = 0x278 +- SYS_MSGXRCV = 0x279 +- SYS___MSGXR = 0x279 +- SYS_SHMGET = 0x280 +- SYS___GETIPC = 0x281 +- SYS_SETGRENT = 0x282 +- SYS_GETGRENT = 0x283 +- SYS_ENDGRENT = 0x284 +- SYS_SETPWENT = 0x285 +- SYS_GETPWENT = 0x286 +- SYS_ENDPWENT = 0x287 +- SYS_BSD_SIGNAL = 0x288 +- SYS_KILLPG = 0x289 +- SYS_SIGSET = 0x290 +- SYS_SIGSTACK = 0x291 +- SYS_GETRLIMIT = 0x292 +- SYS_SETRLIMIT = 0x293 +- SYS_GETRUSAGE = 0x294 +- SYS_MMAP = 0x295 +- SYS_MPROTECT = 0x296 +- SYS_MSYNC = 0x297 +- SYS_MUNMAP = 0x298 +- SYS_CONFSTR = 0x299 +- SYS___NDMTRM = 0x300 +- SYS_FTOK = 0x301 +- SYS_BASENAME = 0x302 +- SYS_DIRNAME = 0x303 +- SYS_GETDTABLESIZE = 0x304 +- SYS_MKSTEMP = 0x305 +- SYS_MKTEMP = 0x306 +- SYS_NFTW = 0x307 +- SYS_GETWD = 0x308 +- SYS_LOCKF = 0x309 +- SYS_WORDEXP = 0x310 +- SYS_WORDFREE = 0x311 +- SYS_GETPGID = 0x312 +- SYS_GETSID = 0x313 +- SYS___UTMPXNAME = 0x314 +- SYS_CUSERID = 0x315 +- SYS_GETPASS = 0x316 +- SYS_FNMATCH = 0x317 +- SYS_FTW = 0x318 +- SYS_GETW = 0x319 +- SYS_ACOSH = 0x320 +- SYS_ASINH = 0x321 +- SYS_ATANH = 0x322 +- SYS_CBRT = 0x323 +- SYS_EXPM1 = 0x324 +- SYS_ILOGB = 0x325 +- SYS_LOGB = 0x326 +- SYS_LOG1P = 0x327 +- SYS_NEXTAFTER = 0x328 +- SYS_RINT = 0x329 +- SYS_SPAWN = 0x330 +- SYS_SPAWNP = 0x331 +- SYS_GETLOGIN_UU = 0x332 +- SYS_ECVT = 0x333 +- SYS_FCVT = 0x334 +- SYS_GCVT = 0x335 +- SYS_ACCEPT = 0x336 +- SYS_BIND = 0x337 +- SYS_CONNECT = 0x338 +- SYS_ENDHOSTENT = 0x339 +- SYS_GETHOSTENT = 0x340 +- SYS_GETHOSTID = 0x341 +- SYS_GETHOSTNAME = 0x342 +- SYS_GETNETBYADDR = 0x343 +- SYS_GETNETBYNAME = 0x344 +- SYS_GETNETENT = 0x345 +- SYS_GETPEERNAME = 0x346 +- SYS_GETPROTOBYNAME = 0x347 +- SYS_GETPROTOBYNUMBER = 0x348 +- SYS_GETPROTOENT = 0x349 +- SYS_INET_LNAOF = 0x350 +- SYS_INET_MAKEADDR = 0x351 +- SYS_INET_NETOF = 0x352 +- SYS_INET_NETWORK = 0x353 +- SYS_INET_NTOA = 0x354 +- SYS_IOCTL = 0x355 +- SYS_LISTEN = 0x356 +- SYS_READV = 0x357 +- SYS_RECV = 0x358 +- SYS_RECVFROM = 0x359 +- SYS_SETHOSTENT = 0x360 +- SYS_SETNETENT = 0x361 +- SYS_SETPEER = 0x362 +- SYS_SETPROTOENT = 0x363 +- SYS_SETSERVENT = 0x364 +- SYS_SETSOCKOPT = 0x365 +- SYS_SHUTDOWN = 0x366 +- SYS_SOCKET = 0x367 +- SYS_SOCKETPAIR = 0x368 +- SYS_WRITEV = 0x369 +- SYS_ENDNETENT = 0x370 +- SYS_CLOSELOG = 0x371 +- SYS_OPENLOG = 0x372 +- SYS_SETLOGMASK = 0x373 +- SYS_SYSLOG = 0x374 +- SYS_PTSNAME = 0x375 +- SYS_SETREUID = 0x376 +- SYS_SETREGID = 0x377 +- SYS_REALPATH = 0x378 +- SYS___SIGNGAM = 0x379 +- SYS_POLL = 0x380 +- SYS_REXEC = 0x381 +- SYS___ISASCII2 = 0x382 +- SYS___TOASCII2 = 0x383 +- SYS_CHPRIORITY = 0x384 +- SYS_PTHREAD_ATTR_SETSYNCTYPE_NP = 0x385 +- SYS_PTHREAD_ATTR_GETSYNCTYPE_NP = 0x386 +- SYS_PTHREAD_SET_LIMIT_NP = 0x387 +- SYS___STNETENT = 0x388 +- SYS___STPROTOENT = 0x389 +- SYS___SELECT1 = 0x390 +- SYS_PTHREAD_SECURITY_NP = 0x391 +- SYS___CHECK_RESOURCE_AUTH_NP = 0x392 +- SYS___CONVERT_ID_NP = 0x393 +- SYS___OPENVMREL = 0x394 +- SYS_WMEMCHR = 0x395 +- SYS_WMEMCMP = 0x396 +- SYS_WMEMCPY = 0x397 +- SYS_WMEMMOVE = 0x398 +- SYS_WMEMSET = 0x399 +- SYS___FPUTWC = 0x400 +- SYS___PUTWC = 0x401 +- SYS___PWCHAR = 0x402 +- SYS___WCSFTM = 0x403 +- SYS___WCSTOK = 0x404 +- SYS___WCWDTH = 0x405 +- SYS_T_ACCEPT = 0x409 +- SYS_T_GETINFO = 0x410 +- SYS_T_GETPROTADDR = 0x411 +- SYS_T_GETSTATE = 0x412 +- SYS_T_LISTEN = 0x413 +- SYS_T_LOOK = 0x414 +- SYS_T_OPEN = 0x415 +- SYS_T_OPTMGMT = 0x416 +- SYS_T_RCV = 0x417 +- SYS_T_RCVCONNECT = 0x418 +- SYS_T_RCVDIS = 0x419 +- SYS_T_SNDUDATA = 0x420 +- SYS_T_STRERROR = 0x421 +- SYS_T_SYNC = 0x422 +- SYS_T_UNBIND = 0x423 +- SYS___T_ERRNO = 0x424 +- SYS___RECVMSG2 = 0x425 +- SYS___SENDMSG2 = 0x426 +- SYS_FATTACH = 0x427 +- SYS_FDETACH = 0x428 +- SYS_GETMSG = 0x429 +- SYS_GETCONTEXT = 0x430 +- SYS_SETCONTEXT = 0x431 +- SYS_MAKECONTEXT = 0x432 +- SYS_SWAPCONTEXT = 0x433 +- SYS_PTHREAD_GETSPECIFIC_D8_NP = 0x434 +- SYS_GETCLIENTID = 0x470 +- SYS___GETCLIENTID = 0x471 +- SYS_GETSTABLESIZE = 0x472 +- SYS_GETIBMOPT = 0x473 +- SYS_GETIBMSOCKOPT = 0x474 +- SYS_GIVESOCKET = 0x475 +- SYS_IBMSFLUSH = 0x476 +- SYS_MAXDESC = 0x477 +- SYS_SETIBMOPT = 0x478 +- SYS_SETIBMSOCKOPT = 0x479 +- SYS___SERVER_PWU = 0x480 +- SYS_PTHREAD_TAG_NP = 0x481 +- SYS___CONSOLE = 0x482 +- SYS___WSINIT = 0x483 +- SYS___IPTCPN = 0x489 +- SYS___SERVER_CLASSIFY = 0x490 +- SYS___HEAPRPT = 0x496 +- SYS___ISBFP = 0x500 +- SYS___FP_CAST = 0x501 +- SYS___CERTIFICATE = 0x502 +- SYS_SEND_FILE = 0x503 +- SYS_AIO_CANCEL = 0x504 +- SYS_AIO_ERROR = 0x505 +- SYS_AIO_READ = 0x506 +- SYS_AIO_RETURN = 0x507 +- SYS_AIO_SUSPEND = 0x508 +- SYS_AIO_WRITE = 0x509 +- SYS_PTHREAD_RWLOCK_TRYWRLOCK = 0x510 +- SYS_PTHREAD_RWLOCK_UNLOCK = 0x511 +- SYS_PTHREAD_RWLOCK_WRLOCK = 0x512 +- SYS_PTHREAD_RWLOCKATTR_GETPSHARED = 0x513 +- SYS_PTHREAD_RWLOCKATTR_SETPSHARED = 0x514 +- SYS_PTHREAD_RWLOCKATTR_INIT = 0x515 +- SYS_PTHREAD_RWLOCKATTR_DESTROY = 0x516 +- SYS___CTTBL = 0x517 +- SYS_PTHREAD_MUTEXATTR_SETTYPE = 0x518 +- SYS_PTHREAD_MUTEXATTR_GETTYPE = 0x519 +- SYS___FP_UNORDERED = 0x520 +- SYS___FP_READ_RND = 0x521 +- SYS___FP_READ_RND_B = 0x522 +- SYS___FP_SWAP_RND = 0x523 +- SYS___FP_SWAP_RND_B = 0x524 +- SYS___FP_LEVEL = 0x525 +- SYS___FP_BTOH = 0x526 +- SYS___FP_HTOB = 0x527 +- SYS___FPC_RD = 0x528 +- SYS___FPC_WR = 0x529 +- SYS_PTHREAD_SETCANCELTYPE = 0x600 +- SYS_PTHREAD_TESTCANCEL = 0x601 +- SYS___ATANF_B = 0x602 +- SYS___ATANL_B = 0x603 +- SYS___CEILF_B = 0x604 +- SYS___CEILL_B = 0x605 +- SYS___COSF_B = 0x606 +- SYS___COSL_B = 0x607 +- SYS___FABSF_B = 0x608 +- SYS___FABSL_B = 0x609 +- SYS___SINF_B = 0x610 +- SYS___SINL_B = 0x611 +- SYS___TANF_B = 0x612 +- SYS___TANL_B = 0x613 +- SYS___TANHF_B = 0x614 +- SYS___TANHL_B = 0x615 +- SYS___ACOSF_B = 0x616 +- SYS___ACOSL_B = 0x617 +- SYS___ASINF_B = 0x618 +- SYS___ASINL_B = 0x619 +- SYS___LOGF_B = 0x620 +- SYS___LOGL_B = 0x621 +- SYS___LOG10F_B = 0x622 +- SYS___LOG10L_B = 0x623 +- SYS___POWF_B = 0x624 +- SYS___POWL_B = 0x625 +- SYS___SINHF_B = 0x626 +- SYS___SINHL_B = 0x627 +- SYS___SQRTF_B = 0x628 +- SYS___SQRTL_B = 0x629 +- SYS___MODFL_B = 0x630 +- SYS_ABSF = 0x631 +- SYS_ABSL = 0x632 +- SYS_ACOSF = 0x633 +- SYS_ACOSL = 0x634 +- SYS_ASINF = 0x635 +- SYS_ASINL = 0x636 +- SYS_ATAN2F = 0x637 +- SYS_ATAN2L = 0x638 +- SYS_ATANF = 0x639 +- SYS_COSHL = 0x640 +- SYS_EXPF = 0x641 +- SYS_EXPL = 0x642 +- SYS_TANHF = 0x643 +- SYS_TANHL = 0x644 +- SYS_LOG10F = 0x645 +- SYS_LOG10L = 0x646 +- SYS_LOGF = 0x647 +- SYS_LOGL = 0x648 +- SYS_POWF = 0x649 +- SYS_SINHL = 0x650 +- SYS_TANF = 0x651 +- SYS_TANL = 0x652 +- SYS_FABSF = 0x653 +- SYS_FABSL = 0x654 +- SYS_FLOORF = 0x655 +- SYS_FLOORL = 0x656 +- SYS_FMODF = 0x657 +- SYS_FMODL = 0x658 +- SYS_FREXPF = 0x659 +- SYS___CHATTR = 0x660 +- SYS___FCHATTR = 0x661 +- SYS___TOCCSID = 0x662 +- SYS___CSNAMETYPE = 0x663 +- SYS___TOCSNAME = 0x664 +- SYS___CCSIDTYPE = 0x665 +- SYS___AE_CORRESTBL_QUERY = 0x666 +- SYS___AE_AUTOCONVERT_STATE = 0x667 +- SYS_DN_FIND = 0x668 +- SYS___GETHOSTBYADDR_A = 0x669 +- SYS___MBLEN_SB_A = 0x670 +- SYS___MBLEN_STD_A = 0x671 +- SYS___MBLEN_UTF = 0x672 +- SYS___MBSTOWCS_A = 0x673 +- SYS___MBSTOWCS_STD_A = 0x674 +- SYS___MBTOWC_A = 0x675 +- SYS___MBTOWC_ISO1 = 0x676 +- SYS___MBTOWC_SBCS = 0x677 +- SYS___MBTOWC_MBCS = 0x678 +- SYS___MBTOWC_UTF = 0x679 +- SYS___CSID_A = 0x680 +- SYS___CSID_STD_A = 0x681 +- SYS___WCSID_A = 0x682 +- SYS___WCSID_STD_A = 0x683 +- SYS___WCTOMB_A = 0x684 +- SYS___WCTOMB_ISO1 = 0x685 +- SYS___WCTOMB_STD_A = 0x686 +- SYS___WCTOMB_UTF = 0x687 +- SYS___WCWIDTH_A = 0x688 +- SYS___GETGRNAM_R_A = 0x689 +- SYS___READDIR_R_A = 0x690 +- SYS___E2A_S = 0x691 +- SYS___FNMATCH_A = 0x692 +- SYS___FNMATCH_C_A = 0x693 +- SYS___EXECL_A = 0x694 +- SYS___FNMATCH_STD_A = 0x695 +- SYS___REGCOMP_A = 0x696 +- SYS___REGCOMP_STD_A = 0x697 +- SYS___REGERROR_A = 0x698 +- SYS___REGERROR_STD_A = 0x699 +- SYS___SWPRINTF_A = 0x700 +- SYS___FSCANF_A = 0x701 +- SYS___SCANF_A = 0x702 +- SYS___SSCANF_A = 0x703 +- SYS___SWSCANF_A = 0x704 +- SYS___ATOF_A = 0x705 +- SYS___ATOI_A = 0x706 +- SYS___ATOL_A = 0x707 +- SYS___STRTOD_A = 0x708 +- SYS___STRTOL_A = 0x709 +- SYS___L64A_A = 0x710 +- SYS___STRERROR_A = 0x711 +- SYS___PERROR_A = 0x712 +- SYS___FETCH_A = 0x713 +- SYS___GETENV_A = 0x714 +- SYS___MKSTEMP_A = 0x717 +- SYS___PTSNAME_A = 0x718 +- SYS___PUTENV_A = 0x719 +- SYS___CHDIR_A = 0x720 +- SYS___CHOWN_A = 0x721 +- SYS___CHROOT_A = 0x722 +- SYS___GETCWD_A = 0x723 +- SYS___GETWD_A = 0x724 +- SYS___LCHOWN_A = 0x725 +- SYS___LINK_A = 0x726 +- SYS___PATHCONF_A = 0x727 +- SYS___IF_NAMEINDEX_A = 0x728 +- SYS___READLINK_A = 0x729 +- SYS___EXTLINK_NP_A = 0x730 +- SYS___ISALNUM_A = 0x731 +- SYS___ISALPHA_A = 0x732 +- SYS___A2E_S = 0x733 +- SYS___ISCNTRL_A = 0x734 +- SYS___ISDIGIT_A = 0x735 +- SYS___ISGRAPH_A = 0x736 +- SYS___ISLOWER_A = 0x737 +- SYS___ISPRINT_A = 0x738 +- SYS___ISPUNCT_A = 0x739 +- SYS___ISWALPHA_A = 0x740 +- SYS___A2E_L = 0x741 +- SYS___ISWCNTRL_A = 0x742 +- SYS___ISWDIGIT_A = 0x743 +- SYS___ISWGRAPH_A = 0x744 +- SYS___ISWLOWER_A = 0x745 +- SYS___ISWPRINT_A = 0x746 +- SYS___ISWPUNCT_A = 0x747 +- SYS___ISWSPACE_A = 0x748 +- SYS___ISWUPPER_A = 0x749 +- SYS___REMOVE_A = 0x750 +- SYS___RENAME_A = 0x751 +- SYS___TMPNAM_A = 0x752 +- SYS___FOPEN_A = 0x753 +- SYS___FREOPEN_A = 0x754 +- SYS___CUSERID_A = 0x755 +- SYS___POPEN_A = 0x756 +- SYS___TEMPNAM_A = 0x757 +- SYS___FTW_A = 0x758 +- SYS___GETGRENT_A = 0x759 +- SYS___INET_NTOP_A = 0x760 +- SYS___GETPASS_A = 0x761 +- SYS___GETPWENT_A = 0x762 +- SYS___GETPWNAM_A = 0x763 +- SYS___GETPWUID_A = 0x764 +- SYS_____CHECK_RESOURCE_AUTH_NP_A = 0x765 +- SYS___CHECKSCHENV_A = 0x766 +- SYS___CONNECTSERVER_A = 0x767 +- SYS___CONNECTWORKMGR_A = 0x768 +- SYS_____CONSOLE_A = 0x769 +- SYS___MSGSND_A = 0x770 +- SYS___MSGXRCV_A = 0x771 +- SYS___NFTW_A = 0x772 +- SYS_____PASSWD_A = 0x773 +- SYS___PTHREAD_SECURITY_NP_A = 0x774 +- SYS___QUERYMETRICS_A = 0x775 +- SYS___QUERYSCHENV = 0x776 +- SYS___READV_A = 0x777 +- SYS_____SERVER_CLASSIFY_A = 0x778 +- SYS_____SERVER_INIT_A = 0x779 +- SYS___W_GETPSENT_A = 0x780 +- SYS___WRITEV_A = 0x781 +- SYS___W_STATFS_A = 0x782 +- SYS___W_STATVFS_A = 0x783 +- SYS___FPUTC_A = 0x784 +- SYS___PUTCHAR_A = 0x785 +- SYS___PUTS_A = 0x786 +- SYS___FGETS_A = 0x787 +- SYS___GETS_A = 0x788 +- SYS___FPUTS_A = 0x789 +- SYS___PUTC_A = 0x790 +- SYS___AE_THREAD_SETMODE = 0x791 +- SYS___AE_THREAD_SWAPMODE = 0x792 +- SYS___GETNETBYADDR_A = 0x793 +- SYS___GETNETBYNAME_A = 0x794 +- SYS___GETNETENT_A = 0x795 +- SYS___GETPROTOBYNAME_A = 0x796 +- SYS___GETPROTOBYNUMBER_A = 0x797 +- SYS___GETPROTOENT_A = 0x798 +- SYS___GETSERVBYNAME_A = 0x799 +- SYS_ACL_FIRST_ENTRY = 0x800 +- SYS_ACL_GET_ENTRY = 0x801 +- SYS_ACL_VALID = 0x802 +- SYS_ACL_CREATE_ENTRY = 0x803 +- SYS_ACL_DELETE_ENTRY = 0x804 +- SYS_ACL_UPDATE_ENTRY = 0x805 +- SYS_ACL_DELETE_FD = 0x806 +- SYS_ACL_DELETE_FILE = 0x807 +- SYS_ACL_GET_FD = 0x808 +- SYS_ACL_GET_FILE = 0x809 +- SYS___ERFL_B = 0x810 +- SYS___ERFCL_B = 0x811 +- SYS___LGAMMAL_B = 0x812 +- SYS___SETHOOKEVENTS = 0x813 +- SYS_IF_NAMETOINDEX = 0x814 +- SYS_IF_INDEXTONAME = 0x815 +- SYS_IF_NAMEINDEX = 0x816 +- SYS_IF_FREENAMEINDEX = 0x817 +- SYS_GETADDRINFO = 0x818 +- SYS_GETNAMEINFO = 0x819 +- SYS___DYNFREE_A = 0x820 +- SYS___RES_QUERY_A = 0x821 +- SYS___RES_SEARCH_A = 0x822 +- SYS___RES_QUERYDOMAIN_A = 0x823 +- SYS___RES_MKQUERY_A = 0x824 +- SYS___RES_SEND_A = 0x825 +- SYS___DN_EXPAND_A = 0x826 +- SYS___DN_SKIPNAME_A = 0x827 +- SYS___DN_COMP_A = 0x828 +- SYS___DN_FIND_A = 0x829 +- SYS___INET_NTOA_A = 0x830 +- SYS___INET_NETWORK_A = 0x831 +- SYS___ACCEPT_A = 0x832 +- SYS___ACCEPT_AND_RECV_A = 0x833 +- SYS___BIND_A = 0x834 +- SYS___CONNECT_A = 0x835 +- SYS___GETPEERNAME_A = 0x836 +- SYS___GETSOCKNAME_A = 0x837 +- SYS___RECVFROM_A = 0x838 +- SYS___SENDTO_A = 0x839 +- SYS___LCHATTR = 0x840 +- SYS___WRITEDOWN = 0x841 +- SYS_PTHREAD_MUTEX_INIT2 = 0x842 +- SYS___ACOSHF_B = 0x843 +- SYS___ACOSHL_B = 0x844 +- SYS___ASINHF_B = 0x845 +- SYS___ASINHL_B = 0x846 +- SYS___ATANHF_B = 0x847 +- SYS___ATANHL_B = 0x848 +- SYS___CBRTF_B = 0x849 +- SYS___EXP2F_B = 0x850 +- SYS___EXP2L_B = 0x851 +- SYS___EXPM1F_B = 0x852 +- SYS___EXPM1L_B = 0x853 +- SYS___FDIMF_B = 0x854 +- SYS___FDIM_B = 0x855 +- SYS___FDIML_B = 0x856 +- SYS___HYPOTF_B = 0x857 +- SYS___HYPOTL_B = 0x858 +- SYS___LOG1PF_B = 0x859 +- SYS___REMQUOF_B = 0x860 +- SYS___REMQUO_B = 0x861 +- SYS___REMQUOL_B = 0x862 +- SYS___TGAMMAF_B = 0x863 +- SYS___TGAMMA_B = 0x864 +- SYS___TGAMMAL_B = 0x865 +- SYS___TRUNCF_B = 0x866 +- SYS___TRUNC_B = 0x867 +- SYS___TRUNCL_B = 0x868 +- SYS___LGAMMAF_B = 0x869 +- SYS_ASINHF = 0x870 +- SYS_ASINHL = 0x871 +- SYS_ATANHF = 0x872 +- SYS_ATANHL = 0x873 +- SYS_CBRTF = 0x874 +- SYS_CBRTL = 0x875 +- SYS_COPYSIGNF = 0x876 +- SYS_CPYSIGNF = 0x876 +- SYS_COPYSIGNL = 0x877 +- SYS_CPYSIGNL = 0x877 +- SYS_COTANF = 0x878 +- SYS___COTANF = 0x878 +- SYS_COTAN = 0x879 +- SYS___COTAN = 0x879 +- SYS_FDIM = 0x881 +- SYS_FDIML = 0x882 +- SYS_HYPOTF = 0x883 +- SYS_HYPOTL = 0x884 +- SYS_LOG1PF = 0x885 +- SYS_LOG1PL = 0x886 +- SYS_LOG2F = 0x887 +- SYS_LOG2 = 0x888 +- SYS_LOG2L = 0x889 +- SYS_TGAMMA = 0x890 +- SYS_TGAMMAL = 0x891 +- SYS_TRUNCF = 0x892 +- SYS_TRUNC = 0x893 +- SYS_TRUNCL = 0x894 +- SYS_LGAMMAF = 0x895 +- SYS_LGAMMAL = 0x896 +- SYS_LROUNDF = 0x897 +- SYS_LROUND = 0x898 +- SYS_ERFF = 0x899 +- SYS___COSHF_H = 0x900 +- SYS___COSHL_H = 0x901 +- SYS___COTAN_H = 0x902 +- SYS___COTANF_H = 0x903 +- SYS___COTANL_H = 0x904 +- SYS___ERF_H = 0x905 +- SYS___ERFF_H = 0x906 +- SYS___ERFL_H = 0x907 +- SYS___ERFC_H = 0x908 +- SYS___ERFCF_H = 0x909 +- SYS___FDIMF_H = 0x910 +- SYS___FDIML_H = 0x911 +- SYS___FMOD_H = 0x912 +- SYS___FMODF_H = 0x913 +- SYS___FMODL_H = 0x914 +- SYS___GAMMA_H = 0x915 +- SYS___HYPOT_H = 0x916 +- SYS___ILOGB_H = 0x917 +- SYS___LGAMMA_H = 0x918 +- SYS___LGAMMAF_H = 0x919 +- SYS___LOG2L_H = 0x920 +- SYS___LOG1P_H = 0x921 +- SYS___LOG10_H = 0x922 +- SYS___LOG10F_H = 0x923 +- SYS___LOG10L_H = 0x924 +- SYS___LROUND_H = 0x925 +- SYS___LROUNDF_H = 0x926 +- SYS___NEXTAFTER_H = 0x927 +- SYS___POW_H = 0x928 +- SYS___POWF_H = 0x929 +- SYS___SINL_H = 0x930 +- SYS___SINH_H = 0x931 +- SYS___SINHF_H = 0x932 +- SYS___SINHL_H = 0x933 +- SYS___SQRT_H = 0x934 +- SYS___SQRTF_H = 0x935 +- SYS___SQRTL_H = 0x936 +- SYS___TAN_H = 0x937 +- SYS___TANF_H = 0x938 +- SYS___TANL_H = 0x939 +- SYS___TRUNCF_H = 0x940 +- SYS___TRUNCL_H = 0x941 +- SYS___COSH_H = 0x942 +- SYS___LE_DEBUG_SET_RESUME_MCH = 0x943 +- SYS_VFSCANF = 0x944 +- SYS_VSCANF = 0x946 +- SYS_VSSCANF = 0x948 +- SYS_IMAXABS = 0x950 +- SYS_IMAXDIV = 0x951 +- SYS_STRTOIMAX = 0x952 +- SYS_STRTOUMAX = 0x953 +- SYS_WCSTOIMAX = 0x954 +- SYS_WCSTOUMAX = 0x955 +- SYS_ATOLL = 0x956 +- SYS_STRTOF = 0x957 +- SYS_STRTOLD = 0x958 +- SYS_WCSTOF = 0x959 +- SYS_INET6_RTH_GETADDR = 0x960 +- SYS_INET6_OPT_INIT = 0x961 +- SYS_INET6_OPT_APPEND = 0x962 +- SYS_INET6_OPT_FINISH = 0x963 +- SYS_INET6_OPT_SET_VAL = 0x964 +- SYS_INET6_OPT_NEXT = 0x965 +- SYS_INET6_OPT_FIND = 0x966 +- SYS_INET6_OPT_GET_VAL = 0x967 +- SYS___POW_I = 0x987 +- SYS___POW_I_B = 0x988 +- SYS___POW_I_H = 0x989 +- SYS___CABS_H = 0x990 +- SYS_CABSF = 0x991 +- SYS___CABSF_B = 0x992 +- SYS___CABSF_H = 0x993 +- SYS_CABSL = 0x994 +- SYS___CABSL_B = 0x995 +- SYS___CABSL_H = 0x996 +- SYS_CACOS = 0x997 +- SYS___CACOS_B = 0x998 +- SYS___CACOS_H = 0x999 ++ SYS_LOG = 0x17 // 23 ++ SYS_COSH = 0x18 // 24 ++ SYS_TANH = 0x19 // 25 ++ SYS_EXP = 0x1A // 26 ++ SYS_MODF = 0x1B // 27 ++ SYS_LOG10 = 0x1C // 28 ++ SYS_FREXP = 0x1D // 29 ++ SYS_LDEXP = 0x1E // 30 ++ SYS_CEIL = 0x1F // 31 ++ SYS_POW = 0x20 // 32 ++ SYS_SQRT = 0x21 // 33 ++ SYS_FLOOR = 0x22 // 34 ++ SYS_J1 = 0x23 // 35 ++ SYS_FABS = 0x24 // 36 ++ SYS_FMOD = 0x25 // 37 ++ SYS_J0 = 0x26 // 38 ++ SYS_YN = 0x27 // 39 ++ SYS_JN = 0x28 // 40 ++ SYS_Y0 = 0x29 // 41 ++ SYS_Y1 = 0x2A // 42 ++ SYS_HYPOT = 0x2B // 43 ++ SYS_ERF = 0x2C // 44 ++ SYS_ERFC = 0x2D // 45 ++ SYS_GAMMA = 0x2E // 46 ++ SYS_ISALPHA = 0x30 // 48 ++ SYS_ISALNUM = 0x31 // 49 ++ SYS_ISLOWER = 0x32 // 50 ++ SYS_ISCNTRL = 0x33 // 51 ++ SYS_ISDIGIT = 0x34 // 52 ++ SYS_ISGRAPH = 0x35 // 53 ++ SYS_ISUPPER = 0x36 // 54 ++ SYS_ISPRINT = 0x37 // 55 ++ SYS_ISPUNCT = 0x38 // 56 ++ SYS_ISSPACE = 0x39 // 57 ++ SYS_SETLOCAL = 0x3A // 58 ++ SYS_SETLOCALE = 0x3A // 58 ++ SYS_ISXDIGIT = 0x3B // 59 ++ SYS_TOLOWER = 0x3C // 60 ++ SYS_TOUPPER = 0x3D // 61 ++ SYS_ASIN = 0x3E // 62 ++ SYS_SIN = 0x3F // 63 ++ SYS_COS = 0x40 // 64 ++ SYS_TAN = 0x41 // 65 ++ SYS_SINH = 0x42 // 66 ++ SYS_ACOS = 0x43 // 67 ++ SYS_ATAN = 0x44 // 68 ++ SYS_ATAN2 = 0x45 // 69 ++ SYS_FTELL = 0x46 // 70 ++ SYS_FGETPOS = 0x47 // 71 ++ SYS_FSEEK = 0x48 // 72 ++ SYS_FSETPOS = 0x49 // 73 ++ SYS_FERROR = 0x4A // 74 ++ SYS_REWIND = 0x4B // 75 ++ SYS_CLEARERR = 0x4C // 76 ++ SYS_FEOF = 0x4D // 77 ++ SYS_ATOL = 0x4E // 78 ++ SYS_PERROR = 0x4F // 79 ++ SYS_ATOF = 0x50 // 80 ++ SYS_ATOI = 0x51 // 81 ++ SYS_RAND = 0x52 // 82 ++ SYS_STRTOD = 0x53 // 83 ++ SYS_STRTOL = 0x54 // 84 ++ SYS_STRTOUL = 0x55 // 85 ++ SYS_MALLOC = 0x56 // 86 ++ SYS_SRAND = 0x57 // 87 ++ SYS_CALLOC = 0x58 // 88 ++ SYS_FREE = 0x59 // 89 ++ SYS_EXIT = 0x5A // 90 ++ SYS_REALLOC = 0x5B // 91 ++ SYS_ABORT = 0x5C // 92 ++ SYS___ABORT = 0x5C // 92 ++ SYS_ATEXIT = 0x5D // 93 ++ SYS_RAISE = 0x5E // 94 ++ SYS_SETJMP = 0x5F // 95 ++ SYS_LONGJMP = 0x60 // 96 ++ SYS_SIGNAL = 0x61 // 97 ++ SYS_TMPNAM = 0x62 // 98 ++ SYS_REMOVE = 0x63 // 99 ++ SYS_RENAME = 0x64 // 100 ++ SYS_TMPFILE = 0x65 // 101 ++ SYS_FREOPEN = 0x66 // 102 ++ SYS_FCLOSE = 0x67 // 103 ++ SYS_FFLUSH = 0x68 // 104 ++ SYS_FOPEN = 0x69 // 105 ++ SYS_FSCANF = 0x6A // 106 ++ SYS_SETBUF = 0x6B // 107 ++ SYS_SETVBUF = 0x6C // 108 ++ SYS_FPRINTF = 0x6D // 109 ++ SYS_SSCANF = 0x6E // 110 ++ SYS_PRINTF = 0x6F // 111 ++ SYS_SCANF = 0x70 // 112 ++ SYS_SPRINTF = 0x71 // 113 ++ SYS_FGETC = 0x72 // 114 ++ SYS_VFPRINTF = 0x73 // 115 ++ SYS_VPRINTF = 0x74 // 116 ++ SYS_VSPRINTF = 0x75 // 117 ++ SYS_GETC = 0x76 // 118 ++ SYS_FGETS = 0x77 // 119 ++ SYS_FPUTC = 0x78 // 120 ++ SYS_FPUTS = 0x79 // 121 ++ SYS_PUTCHAR = 0x7A // 122 ++ SYS_GETCHAR = 0x7B // 123 ++ SYS_GETS = 0x7C // 124 ++ SYS_PUTC = 0x7D // 125 ++ SYS_FWRITE = 0x7E // 126 ++ SYS_PUTS = 0x7F // 127 ++ SYS_UNGETC = 0x80 // 128 ++ SYS_FREAD = 0x81 // 129 ++ SYS_WCSTOMBS = 0x82 // 130 ++ SYS_MBTOWC = 0x83 // 131 ++ SYS_WCTOMB = 0x84 // 132 ++ SYS_MBSTOWCS = 0x85 // 133 ++ SYS_WCSCPY = 0x86 // 134 ++ SYS_WCSCAT = 0x87 // 135 ++ SYS_WCSCHR = 0x88 // 136 ++ SYS_WCSCMP = 0x89 // 137 ++ SYS_WCSNCMP = 0x8A // 138 ++ SYS_WCSCSPN = 0x8B // 139 ++ SYS_WCSLEN = 0x8C // 140 ++ SYS_WCSNCAT = 0x8D // 141 ++ SYS_WCSSPN = 0x8E // 142 ++ SYS_WCSNCPY = 0x8F // 143 ++ SYS_ABS = 0x90 // 144 ++ SYS_DIV = 0x91 // 145 ++ SYS_LABS = 0x92 // 146 ++ SYS_STRNCPY = 0x93 // 147 ++ SYS_MEMCPY = 0x94 // 148 ++ SYS_MEMMOVE = 0x95 // 149 ++ SYS_STRCPY = 0x96 // 150 ++ SYS_STRCMP = 0x97 // 151 ++ SYS_STRCAT = 0x98 // 152 ++ SYS_STRNCAT = 0x99 // 153 ++ SYS_MEMCMP = 0x9A // 154 ++ SYS_MEMCHR = 0x9B // 155 ++ SYS_STRCOLL = 0x9C // 156 ++ SYS_STRNCMP = 0x9D // 157 ++ SYS_STRXFRM = 0x9E // 158 ++ SYS_STRRCHR = 0x9F // 159 ++ SYS_STRCHR = 0xA0 // 160 ++ SYS_STRCSPN = 0xA1 // 161 ++ SYS_STRPBRK = 0xA2 // 162 ++ SYS_MEMSET = 0xA3 // 163 ++ SYS_STRSPN = 0xA4 // 164 ++ SYS_STRSTR = 0xA5 // 165 ++ SYS_STRTOK = 0xA6 // 166 ++ SYS_DIFFTIME = 0xA7 // 167 ++ SYS_STRERROR = 0xA8 // 168 ++ SYS_STRLEN = 0xA9 // 169 ++ SYS_CLOCK = 0xAA // 170 ++ SYS_CTIME = 0xAB // 171 ++ SYS_MKTIME = 0xAC // 172 ++ SYS_TIME = 0xAD // 173 ++ SYS_ASCTIME = 0xAE // 174 ++ SYS_MBLEN = 0xAF // 175 ++ SYS_GMTIME = 0xB0 // 176 ++ SYS_LOCALTIM = 0xB1 // 177 ++ SYS_LOCALTIME = 0xB1 // 177 ++ SYS_STRFTIME = 0xB2 // 178 ++ SYS___GETCB = 0xB4 // 180 ++ SYS_FUPDATE = 0xB5 // 181 ++ SYS___FUPDT = 0xB5 // 181 ++ SYS_CLRMEMF = 0xBD // 189 ++ SYS___CLRMF = 0xBD // 189 ++ SYS_FETCHEP = 0xBF // 191 ++ SYS___FTCHEP = 0xBF // 191 ++ SYS_FLDATA = 0xC1 // 193 ++ SYS___FLDATA = 0xC1 // 193 ++ SYS_DYNFREE = 0xC2 // 194 ++ SYS___DYNFRE = 0xC2 // 194 ++ SYS_DYNALLOC = 0xC3 // 195 ++ SYS___DYNALL = 0xC3 // 195 ++ SYS___CDUMP = 0xC4 // 196 ++ SYS_CSNAP = 0xC5 // 197 ++ SYS___CSNAP = 0xC5 // 197 ++ SYS_CTRACE = 0xC6 // 198 ++ SYS___CTRACE = 0xC6 // 198 ++ SYS___CTEST = 0xC7 // 199 ++ SYS_SETENV = 0xC8 // 200 ++ SYS___SETENV = 0xC8 // 200 ++ SYS_CLEARENV = 0xC9 // 201 ++ SYS___CLRENV = 0xC9 // 201 ++ SYS___REGCOMP_STD = 0xEA // 234 ++ SYS_NL_LANGINFO = 0xFC // 252 ++ SYS_GETSYNTX = 0xFD // 253 ++ SYS_ISBLANK = 0xFE // 254 ++ SYS___ISBLNK = 0xFE // 254 ++ SYS_ISWALNUM = 0xFF // 255 ++ SYS_ISWALPHA = 0x100 // 256 ++ SYS_ISWBLANK = 0x101 // 257 ++ SYS___ISWBLK = 0x101 // 257 ++ SYS_ISWCNTRL = 0x102 // 258 ++ SYS_ISWDIGIT = 0x103 // 259 ++ SYS_ISWGRAPH = 0x104 // 260 ++ SYS_ISWLOWER = 0x105 // 261 ++ SYS_ISWPRINT = 0x106 // 262 ++ SYS_ISWPUNCT = 0x107 // 263 ++ SYS_ISWSPACE = 0x108 // 264 ++ SYS_ISWUPPER = 0x109 // 265 ++ SYS_ISWXDIGI = 0x10A // 266 ++ SYS_ISWXDIGIT = 0x10A // 266 ++ SYS_WCTYPE = 0x10B // 267 ++ SYS_ISWCTYPE = 0x10C // 268 ++ SYS_TOWLOWER = 0x10D // 269 ++ SYS_TOWUPPER = 0x10E // 270 ++ SYS_MBSINIT = 0x10F // 271 ++ SYS_WCTOB = 0x110 // 272 ++ SYS_MBRLEN = 0x111 // 273 ++ SYS_MBRTOWC = 0x112 // 274 ++ SYS_MBSRTOWC = 0x113 // 275 ++ SYS_MBSRTOWCS = 0x113 // 275 ++ SYS_WCRTOMB = 0x114 // 276 ++ SYS_WCSRTOMB = 0x115 // 277 ++ SYS_WCSRTOMBS = 0x115 // 277 ++ SYS___CSID = 0x116 // 278 ++ SYS___WCSID = 0x117 // 279 ++ SYS_STRPTIME = 0x118 // 280 ++ SYS___STRPTM = 0x118 // 280 ++ SYS_STRFMON = 0x119 // 281 ++ SYS___RPMTCH = 0x11A // 282 ++ SYS_WCSSTR = 0x11B // 283 ++ SYS_WCSTOK = 0x12C // 300 ++ SYS_WCSTOL = 0x12D // 301 ++ SYS_WCSTOD = 0x12E // 302 ++ SYS_WCSTOUL = 0x12F // 303 ++ SYS_WCSCOLL = 0x130 // 304 ++ SYS_WCSXFRM = 0x131 // 305 ++ SYS_WCSWIDTH = 0x132 // 306 ++ SYS_WCWIDTH = 0x133 // 307 ++ SYS_WCSFTIME = 0x134 // 308 ++ SYS_SWPRINTF = 0x135 // 309 ++ SYS_VSWPRINT = 0x136 // 310 ++ SYS_VSWPRINTF = 0x136 // 310 ++ SYS_SWSCANF = 0x137 // 311 ++ SYS_REGCOMP = 0x138 // 312 ++ SYS_REGEXEC = 0x139 // 313 ++ SYS_REGFREE = 0x13A // 314 ++ SYS_REGERROR = 0x13B // 315 ++ SYS_FGETWC = 0x13C // 316 ++ SYS_FGETWS = 0x13D // 317 ++ SYS_FPUTWC = 0x13E // 318 ++ SYS_FPUTWS = 0x13F // 319 ++ SYS_GETWC = 0x140 // 320 ++ SYS_GETWCHAR = 0x141 // 321 ++ SYS_PUTWC = 0x142 // 322 ++ SYS_PUTWCHAR = 0x143 // 323 ++ SYS_UNGETWC = 0x144 // 324 ++ SYS_ICONV_OPEN = 0x145 // 325 ++ SYS_ICONV = 0x146 // 326 ++ SYS_ICONV_CLOSE = 0x147 // 327 ++ SYS_ISMCCOLLEL = 0x14C // 332 ++ SYS_STRTOCOLL = 0x14D // 333 ++ SYS_COLLTOSTR = 0x14E // 334 ++ SYS_COLLEQUIV = 0x14F // 335 ++ SYS_COLLRANGE = 0x150 // 336 ++ SYS_CCLASS = 0x151 // 337 ++ SYS_COLLORDER = 0x152 // 338 ++ SYS___DEMANGLE = 0x154 // 340 ++ SYS_FDOPEN = 0x155 // 341 ++ SYS___ERRNO = 0x156 // 342 ++ SYS___ERRNO2 = 0x157 // 343 ++ SYS___TERROR = 0x158 // 344 ++ SYS_MAXCOLL = 0x169 // 361 ++ SYS_GETMCCOLL = 0x16A // 362 ++ SYS_GETWMCCOLL = 0x16B // 363 ++ SYS___ERR2AD = 0x16C // 364 ++ SYS_DLLQUERYFN = 0x16D // 365 ++ SYS_DLLQUERYVAR = 0x16E // 366 ++ SYS_DLLFREE = 0x16F // 367 ++ SYS_DLLLOAD = 0x170 // 368 ++ SYS__EXIT = 0x174 // 372 ++ SYS_ACCESS = 0x175 // 373 ++ SYS_ALARM = 0x176 // 374 ++ SYS_CFGETISPEED = 0x177 // 375 ++ SYS_CFGETOSPEED = 0x178 // 376 ++ SYS_CFSETISPEED = 0x179 // 377 ++ SYS_CFSETOSPEED = 0x17A // 378 ++ SYS_CHDIR = 0x17B // 379 ++ SYS_CHMOD = 0x17C // 380 ++ SYS_CHOWN = 0x17D // 381 ++ SYS_CLOSE = 0x17E // 382 ++ SYS_CLOSEDIR = 0x17F // 383 ++ SYS_CREAT = 0x180 // 384 ++ SYS_CTERMID = 0x181 // 385 ++ SYS_DUP = 0x182 // 386 ++ SYS_DUP2 = 0x183 // 387 ++ SYS_EXECL = 0x184 // 388 ++ SYS_EXECLE = 0x185 // 389 ++ SYS_EXECLP = 0x186 // 390 ++ SYS_EXECV = 0x187 // 391 ++ SYS_EXECVE = 0x188 // 392 ++ SYS_EXECVP = 0x189 // 393 ++ SYS_FCHMOD = 0x18A // 394 ++ SYS_FCHOWN = 0x18B // 395 ++ SYS_FCNTL = 0x18C // 396 ++ SYS_FILENO = 0x18D // 397 ++ SYS_FORK = 0x18E // 398 ++ SYS_FPATHCONF = 0x18F // 399 ++ SYS_FSTAT = 0x190 // 400 ++ SYS_FSYNC = 0x191 // 401 ++ SYS_FTRUNCATE = 0x192 // 402 ++ SYS_GETCWD = 0x193 // 403 ++ SYS_GETEGID = 0x194 // 404 ++ SYS_GETEUID = 0x195 // 405 ++ SYS_GETGID = 0x196 // 406 ++ SYS_GETGRGID = 0x197 // 407 ++ SYS_GETGRNAM = 0x198 // 408 ++ SYS_GETGROUPS = 0x199 // 409 ++ SYS_GETLOGIN = 0x19A // 410 ++ SYS_W_GETMNTENT = 0x19B // 411 ++ SYS_GETPGRP = 0x19C // 412 ++ SYS_GETPID = 0x19D // 413 ++ SYS_GETPPID = 0x19E // 414 ++ SYS_GETPWNAM = 0x19F // 415 ++ SYS_GETPWUID = 0x1A0 // 416 ++ SYS_GETUID = 0x1A1 // 417 ++ SYS_W_IOCTL = 0x1A2 // 418 ++ SYS_ISATTY = 0x1A3 // 419 ++ SYS_KILL = 0x1A4 // 420 ++ SYS_LINK = 0x1A5 // 421 ++ SYS_LSEEK = 0x1A6 // 422 ++ SYS_LSTAT = 0x1A7 // 423 ++ SYS_MKDIR = 0x1A8 // 424 ++ SYS_MKFIFO = 0x1A9 // 425 ++ SYS_MKNOD = 0x1AA // 426 ++ SYS_MOUNT = 0x1AB // 427 ++ SYS_OPEN = 0x1AC // 428 ++ SYS_OPENDIR = 0x1AD // 429 ++ SYS_PATHCONF = 0x1AE // 430 ++ SYS_PAUSE = 0x1AF // 431 ++ SYS_PIPE = 0x1B0 // 432 ++ SYS_W_GETPSENT = 0x1B1 // 433 ++ SYS_READ = 0x1B2 // 434 ++ SYS_READDIR = 0x1B3 // 435 ++ SYS_READLINK = 0x1B4 // 436 ++ SYS_REWINDDIR = 0x1B5 // 437 ++ SYS_RMDIR = 0x1B6 // 438 ++ SYS_SETEGID = 0x1B7 // 439 ++ SYS_SETEUID = 0x1B8 // 440 ++ SYS_SETGID = 0x1B9 // 441 ++ SYS_SETPGID = 0x1BA // 442 ++ SYS_SETSID = 0x1BB // 443 ++ SYS_SETUID = 0x1BC // 444 ++ SYS_SIGACTION = 0x1BD // 445 ++ SYS_SIGADDSET = 0x1BE // 446 ++ SYS_SIGDELSET = 0x1BF // 447 ++ SYS_SIGEMPTYSET = 0x1C0 // 448 ++ SYS_SIGFILLSET = 0x1C1 // 449 ++ SYS_SIGISMEMBER = 0x1C2 // 450 ++ SYS_SIGLONGJMP = 0x1C3 // 451 ++ SYS_SIGPENDING = 0x1C4 // 452 ++ SYS_SIGPROCMASK = 0x1C5 // 453 ++ SYS_SIGSETJMP = 0x1C6 // 454 ++ SYS_SIGSUSPEND = 0x1C7 // 455 ++ SYS_SLEEP = 0x1C8 // 456 ++ SYS_STAT = 0x1C9 // 457 ++ SYS_W_STATFS = 0x1CA // 458 ++ SYS_SYMLINK = 0x1CB // 459 ++ SYS_SYSCONF = 0x1CC // 460 ++ SYS_TCDRAIN = 0x1CD // 461 ++ SYS_TCFLOW = 0x1CE // 462 ++ SYS_TCFLUSH = 0x1CF // 463 ++ SYS_TCGETATTR = 0x1D0 // 464 ++ SYS_TCGETPGRP = 0x1D1 // 465 ++ SYS_TCSENDBREAK = 0x1D2 // 466 ++ SYS_TCSETATTR = 0x1D3 // 467 ++ SYS_TCSETPGRP = 0x1D4 // 468 ++ SYS_TIMES = 0x1D5 // 469 ++ SYS_TTYNAME = 0x1D6 // 470 ++ SYS_TZSET = 0x1D7 // 471 ++ SYS_UMASK = 0x1D8 // 472 ++ SYS_UMOUNT = 0x1D9 // 473 ++ SYS_UNAME = 0x1DA // 474 ++ SYS_UNLINK = 0x1DB // 475 ++ SYS_UTIME = 0x1DC // 476 ++ SYS_WAIT = 0x1DD // 477 ++ SYS_WAITPID = 0x1DE // 478 ++ SYS_WRITE = 0x1DF // 479 ++ SYS_CHAUDIT = 0x1E0 // 480 ++ SYS_FCHAUDIT = 0x1E1 // 481 ++ SYS_GETGROUPSBYNAME = 0x1E2 // 482 ++ SYS_SIGWAIT = 0x1E3 // 483 ++ SYS_PTHREAD_EXIT = 0x1E4 // 484 ++ SYS_PTHREAD_KILL = 0x1E5 // 485 ++ SYS_PTHREAD_ATTR_INIT = 0x1E6 // 486 ++ SYS_PTHREAD_ATTR_DESTROY = 0x1E7 // 487 ++ SYS_PTHREAD_ATTR_SETSTACKSIZE = 0x1E8 // 488 ++ SYS_PTHREAD_ATTR_GETSTACKSIZE = 0x1E9 // 489 ++ SYS_PTHREAD_ATTR_SETDETACHSTATE = 0x1EA // 490 ++ SYS_PTHREAD_ATTR_GETDETACHSTATE = 0x1EB // 491 ++ SYS_PTHREAD_ATTR_SETWEIGHT_NP = 0x1EC // 492 ++ SYS_PTHREAD_ATTR_GETWEIGHT_NP = 0x1ED // 493 ++ SYS_PTHREAD_CANCEL = 0x1EE // 494 ++ SYS_PTHREAD_CLEANUP_PUSH = 0x1EF // 495 ++ SYS_PTHREAD_CLEANUP_POP = 0x1F0 // 496 ++ SYS_PTHREAD_CONDATTR_INIT = 0x1F1 // 497 ++ SYS_PTHREAD_CONDATTR_DESTROY = 0x1F2 // 498 ++ SYS_PTHREAD_COND_INIT = 0x1F3 // 499 ++ SYS_PTHREAD_COND_DESTROY = 0x1F4 // 500 ++ SYS_PTHREAD_COND_SIGNAL = 0x1F5 // 501 ++ SYS_PTHREAD_COND_BROADCAST = 0x1F6 // 502 ++ SYS_PTHREAD_COND_WAIT = 0x1F7 // 503 ++ SYS_PTHREAD_COND_TIMEDWAIT = 0x1F8 // 504 ++ SYS_PTHREAD_CREATE = 0x1F9 // 505 ++ SYS_PTHREAD_DETACH = 0x1FA // 506 ++ SYS_PTHREAD_EQUAL = 0x1FB // 507 ++ SYS_PTHREAD_GETSPECIFIC = 0x1FC // 508 ++ SYS_PTHREAD_JOIN = 0x1FD // 509 ++ SYS_PTHREAD_KEY_CREATE = 0x1FE // 510 ++ SYS_PTHREAD_MUTEXATTR_INIT = 0x1FF // 511 ++ SYS_PTHREAD_MUTEXATTR_DESTROY = 0x200 // 512 ++ SYS_PTHREAD_MUTEXATTR_SETKIND_NP = 0x201 // 513 ++ SYS_PTHREAD_MUTEXATTR_GETKIND_NP = 0x202 // 514 ++ SYS_PTHREAD_MUTEX_INIT = 0x203 // 515 ++ SYS_PTHREAD_MUTEX_DESTROY = 0x204 // 516 ++ SYS_PTHREAD_MUTEX_LOCK = 0x205 // 517 ++ SYS_PTHREAD_MUTEX_TRYLOCK = 0x206 // 518 ++ SYS_PTHREAD_MUTEX_UNLOCK = 0x207 // 519 ++ SYS_PTHREAD_ONCE = 0x209 // 521 ++ SYS_PTHREAD_SELF = 0x20A // 522 ++ SYS_PTHREAD_SETINTR = 0x20B // 523 ++ SYS_PTHREAD_SETINTRTYPE = 0x20C // 524 ++ SYS_PTHREAD_SETSPECIFIC = 0x20D // 525 ++ SYS_PTHREAD_TESTINTR = 0x20E // 526 ++ SYS_PTHREAD_YIELD = 0x20F // 527 ++ SYS_TW_OPEN = 0x210 // 528 ++ SYS_TW_FCNTL = 0x211 // 529 ++ SYS_PTHREAD_JOIN_D4_NP = 0x212 // 530 ++ SYS_PTHREAD_CONDATTR_SETKIND_NP = 0x213 // 531 ++ SYS_PTHREAD_CONDATTR_GETKIND_NP = 0x214 // 532 ++ SYS_EXTLINK_NP = 0x215 // 533 ++ SYS___PASSWD = 0x216 // 534 ++ SYS_SETGROUPS = 0x217 // 535 ++ SYS_INITGROUPS = 0x218 // 536 ++ SYS_WCSPBRK = 0x23F // 575 ++ SYS_WCSRCHR = 0x240 // 576 ++ SYS_SVC99 = 0x241 // 577 ++ SYS___SVC99 = 0x241 // 577 ++ SYS_WCSWCS = 0x242 // 578 ++ SYS_LOCALECO = 0x243 // 579 ++ SYS_LOCALECONV = 0x243 // 579 ++ SYS___LIBREL = 0x244 // 580 ++ SYS_RELEASE = 0x245 // 581 ++ SYS___RLSE = 0x245 // 581 ++ SYS_FLOCATE = 0x246 // 582 ++ SYS___FLOCT = 0x246 // 582 ++ SYS_FDELREC = 0x247 // 583 ++ SYS___FDLREC = 0x247 // 583 ++ SYS_FETCH = 0x248 // 584 ++ SYS___FETCH = 0x248 // 584 ++ SYS_QSORT = 0x249 // 585 ++ SYS_GETENV = 0x24A // 586 ++ SYS_SYSTEM = 0x24B // 587 ++ SYS_BSEARCH = 0x24C // 588 ++ SYS_LDIV = 0x24D // 589 ++ SYS___THROW = 0x25E // 606 ++ SYS___RETHROW = 0x25F // 607 ++ SYS___CLEANUPCATCH = 0x260 // 608 ++ SYS___CATCHMATCH = 0x261 // 609 ++ SYS___CLEAN2UPCATCH = 0x262 // 610 ++ SYS_PUTENV = 0x26A // 618 ++ SYS___GETENV = 0x26F // 623 ++ SYS_GETPRIORITY = 0x270 // 624 ++ SYS_NICE = 0x271 // 625 ++ SYS_SETPRIORITY = 0x272 // 626 ++ SYS_GETITIMER = 0x273 // 627 ++ SYS_SETITIMER = 0x274 // 628 ++ SYS_MSGCTL = 0x275 // 629 ++ SYS_MSGGET = 0x276 // 630 ++ SYS_MSGRCV = 0x277 // 631 ++ SYS_MSGSND = 0x278 // 632 ++ SYS_MSGXRCV = 0x279 // 633 ++ SYS___MSGXR = 0x279 // 633 ++ SYS_SEMCTL = 0x27A // 634 ++ SYS_SEMGET = 0x27B // 635 ++ SYS_SEMOP = 0x27C // 636 ++ SYS_SHMAT = 0x27D // 637 ++ SYS_SHMCTL = 0x27E // 638 ++ SYS_SHMDT = 0x27F // 639 ++ SYS_SHMGET = 0x280 // 640 ++ SYS___GETIPC = 0x281 // 641 ++ SYS_SETGRENT = 0x282 // 642 ++ SYS_GETGRENT = 0x283 // 643 ++ SYS_ENDGRENT = 0x284 // 644 ++ SYS_SETPWENT = 0x285 // 645 ++ SYS_GETPWENT = 0x286 // 646 ++ SYS_ENDPWENT = 0x287 // 647 ++ SYS_BSD_SIGNAL = 0x288 // 648 ++ SYS_KILLPG = 0x289 // 649 ++ SYS_SIGALTSTACK = 0x28A // 650 ++ SYS_SIGHOLD = 0x28B // 651 ++ SYS_SIGIGNORE = 0x28C // 652 ++ SYS_SIGINTERRUPT = 0x28D // 653 ++ SYS_SIGPAUSE = 0x28E // 654 ++ SYS_SIGRELSE = 0x28F // 655 ++ SYS_SIGSET = 0x290 // 656 ++ SYS_SIGSTACK = 0x291 // 657 ++ SYS_GETRLIMIT = 0x292 // 658 ++ SYS_SETRLIMIT = 0x293 // 659 ++ SYS_GETRUSAGE = 0x294 // 660 ++ SYS_MMAP = 0x295 // 661 ++ SYS_MPROTECT = 0x296 // 662 ++ SYS_MSYNC = 0x297 // 663 ++ SYS_MUNMAP = 0x298 // 664 ++ SYS_CONFSTR = 0x299 // 665 ++ SYS_GETOPT = 0x29A // 666 ++ SYS_LCHOWN = 0x29B // 667 ++ SYS_TRUNCATE = 0x29C // 668 ++ SYS_GETSUBOPT = 0x29D // 669 ++ SYS_SETPGRP = 0x29E // 670 ++ SYS___GDERR = 0x29F // 671 ++ SYS___TZONE = 0x2A0 // 672 ++ SYS___DLGHT = 0x2A1 // 673 ++ SYS___OPARGF = 0x2A2 // 674 ++ SYS___OPOPTF = 0x2A3 // 675 ++ SYS___OPINDF = 0x2A4 // 676 ++ SYS___OPERRF = 0x2A5 // 677 ++ SYS_GETDATE = 0x2A6 // 678 ++ SYS_WAIT3 = 0x2A7 // 679 ++ SYS_WAITID = 0x2A8 // 680 ++ SYS___CATTRM = 0x2A9 // 681 ++ SYS___GDTRM = 0x2AA // 682 ++ SYS___RNDTRM = 0x2AB // 683 ++ SYS_CRYPT = 0x2AC // 684 ++ SYS_ENCRYPT = 0x2AD // 685 ++ SYS_SETKEY = 0x2AE // 686 ++ SYS___CNVBLK = 0x2AF // 687 ++ SYS___CRYTRM = 0x2B0 // 688 ++ SYS___ECRTRM = 0x2B1 // 689 ++ SYS_DRAND48 = 0x2B2 // 690 ++ SYS_ERAND48 = 0x2B3 // 691 ++ SYS_FSTATVFS = 0x2B4 // 692 ++ SYS_STATVFS = 0x2B5 // 693 ++ SYS_CATCLOSE = 0x2B6 // 694 ++ SYS_CATGETS = 0x2B7 // 695 ++ SYS_CATOPEN = 0x2B8 // 696 ++ SYS_BCMP = 0x2B9 // 697 ++ SYS_BCOPY = 0x2BA // 698 ++ SYS_BZERO = 0x2BB // 699 ++ SYS_FFS = 0x2BC // 700 ++ SYS_INDEX = 0x2BD // 701 ++ SYS_RINDEX = 0x2BE // 702 ++ SYS_STRCASECMP = 0x2BF // 703 ++ SYS_STRDUP = 0x2C0 // 704 ++ SYS_STRNCASECMP = 0x2C1 // 705 ++ SYS_INITSTATE = 0x2C2 // 706 ++ SYS_SETSTATE = 0x2C3 // 707 ++ SYS_RANDOM = 0x2C4 // 708 ++ SYS_SRANDOM = 0x2C5 // 709 ++ SYS_HCREATE = 0x2C6 // 710 ++ SYS_HDESTROY = 0x2C7 // 711 ++ SYS_HSEARCH = 0x2C8 // 712 ++ SYS_LFIND = 0x2C9 // 713 ++ SYS_LSEARCH = 0x2CA // 714 ++ SYS_TDELETE = 0x2CB // 715 ++ SYS_TFIND = 0x2CC // 716 ++ SYS_TSEARCH = 0x2CD // 717 ++ SYS_TWALK = 0x2CE // 718 ++ SYS_INSQUE = 0x2CF // 719 ++ SYS_REMQUE = 0x2D0 // 720 ++ SYS_POPEN = 0x2D1 // 721 ++ SYS_PCLOSE = 0x2D2 // 722 ++ SYS_SWAB = 0x2D3 // 723 ++ SYS_MEMCCPY = 0x2D4 // 724 ++ SYS_GETPAGESIZE = 0x2D8 // 728 ++ SYS_FCHDIR = 0x2D9 // 729 ++ SYS___OCLCK = 0x2DA // 730 ++ SYS___ATOE = 0x2DB // 731 ++ SYS___ATOE_L = 0x2DC // 732 ++ SYS___ETOA = 0x2DD // 733 ++ SYS___ETOA_L = 0x2DE // 734 ++ SYS_SETUTXENT = 0x2DF // 735 ++ SYS_GETUTXENT = 0x2E0 // 736 ++ SYS_ENDUTXENT = 0x2E1 // 737 ++ SYS_GETUTXID = 0x2E2 // 738 ++ SYS_GETUTXLINE = 0x2E3 // 739 ++ SYS_PUTUTXLINE = 0x2E4 // 740 ++ SYS_FMTMSG = 0x2E5 // 741 ++ SYS_JRAND48 = 0x2E6 // 742 ++ SYS_LRAND48 = 0x2E7 // 743 ++ SYS_MRAND48 = 0x2E8 // 744 ++ SYS_NRAND48 = 0x2E9 // 745 ++ SYS_LCONG48 = 0x2EA // 746 ++ SYS_SRAND48 = 0x2EB // 747 ++ SYS_SEED48 = 0x2EC // 748 ++ SYS_ISASCII = 0x2ED // 749 ++ SYS_TOASCII = 0x2EE // 750 ++ SYS_A64L = 0x2EF // 751 ++ SYS_L64A = 0x2F0 // 752 ++ SYS_UALARM = 0x2F1 // 753 ++ SYS_USLEEP = 0x2F2 // 754 ++ SYS___UTXTRM = 0x2F3 // 755 ++ SYS___SRCTRM = 0x2F4 // 756 ++ SYS_FTIME = 0x2F5 // 757 ++ SYS_GETTIMEOFDAY = 0x2F6 // 758 ++ SYS_DBM_CLEARERR = 0x2F7 // 759 ++ SYS_DBM_CLOSE = 0x2F8 // 760 ++ SYS_DBM_DELETE = 0x2F9 // 761 ++ SYS_DBM_ERROR = 0x2FA // 762 ++ SYS_DBM_FETCH = 0x2FB // 763 ++ SYS_DBM_FIRSTKEY = 0x2FC // 764 ++ SYS_DBM_NEXTKEY = 0x2FD // 765 ++ SYS_DBM_OPEN = 0x2FE // 766 ++ SYS_DBM_STORE = 0x2FF // 767 ++ SYS___NDMTRM = 0x300 // 768 ++ SYS_FTOK = 0x301 // 769 ++ SYS_BASENAME = 0x302 // 770 ++ SYS_DIRNAME = 0x303 // 771 ++ SYS_GETDTABLESIZE = 0x304 // 772 ++ SYS_MKSTEMP = 0x305 // 773 ++ SYS_MKTEMP = 0x306 // 774 ++ SYS_NFTW = 0x307 // 775 ++ SYS_GETWD = 0x308 // 776 ++ SYS_LOCKF = 0x309 // 777 ++ SYS__LONGJMP = 0x30D // 781 ++ SYS__SETJMP = 0x30E // 782 ++ SYS_VFORK = 0x30F // 783 ++ SYS_WORDEXP = 0x310 // 784 ++ SYS_WORDFREE = 0x311 // 785 ++ SYS_GETPGID = 0x312 // 786 ++ SYS_GETSID = 0x313 // 787 ++ SYS___UTMPXNAME = 0x314 // 788 ++ SYS_CUSERID = 0x315 // 789 ++ SYS_GETPASS = 0x316 // 790 ++ SYS_FNMATCH = 0x317 // 791 ++ SYS_FTW = 0x318 // 792 ++ SYS_GETW = 0x319 // 793 ++ SYS_GLOB = 0x31A // 794 ++ SYS_GLOBFREE = 0x31B // 795 ++ SYS_PUTW = 0x31C // 796 ++ SYS_SEEKDIR = 0x31D // 797 ++ SYS_TELLDIR = 0x31E // 798 ++ SYS_TEMPNAM = 0x31F // 799 ++ SYS_ACOSH = 0x320 // 800 ++ SYS_ASINH = 0x321 // 801 ++ SYS_ATANH = 0x322 // 802 ++ SYS_CBRT = 0x323 // 803 ++ SYS_EXPM1 = 0x324 // 804 ++ SYS_ILOGB = 0x325 // 805 ++ SYS_LOGB = 0x326 // 806 ++ SYS_LOG1P = 0x327 // 807 ++ SYS_NEXTAFTER = 0x328 // 808 ++ SYS_RINT = 0x329 // 809 ++ SYS_REMAINDER = 0x32A // 810 ++ SYS_SCALB = 0x32B // 811 ++ SYS_LGAMMA = 0x32C // 812 ++ SYS_TTYSLOT = 0x32D // 813 ++ SYS_GETTIMEOFDAY_R = 0x32E // 814 ++ SYS_SYNC = 0x32F // 815 ++ SYS_SPAWN = 0x330 // 816 ++ SYS_SPAWNP = 0x331 // 817 ++ SYS_GETLOGIN_UU = 0x332 // 818 ++ SYS_ECVT = 0x333 // 819 ++ SYS_FCVT = 0x334 // 820 ++ SYS_GCVT = 0x335 // 821 ++ SYS_ACCEPT = 0x336 // 822 ++ SYS_BIND = 0x337 // 823 ++ SYS_CONNECT = 0x338 // 824 ++ SYS_ENDHOSTENT = 0x339 // 825 ++ SYS_ENDPROTOENT = 0x33A // 826 ++ SYS_ENDSERVENT = 0x33B // 827 ++ SYS_GETHOSTBYADDR_R = 0x33C // 828 ++ SYS_GETHOSTBYADDR = 0x33D // 829 ++ SYS_GETHOSTBYNAME_R = 0x33E // 830 ++ SYS_GETHOSTBYNAME = 0x33F // 831 ++ SYS_GETHOSTENT = 0x340 // 832 ++ SYS_GETHOSTID = 0x341 // 833 ++ SYS_GETHOSTNAME = 0x342 // 834 ++ SYS_GETNETBYADDR = 0x343 // 835 ++ SYS_GETNETBYNAME = 0x344 // 836 ++ SYS_GETNETENT = 0x345 // 837 ++ SYS_GETPEERNAME = 0x346 // 838 ++ SYS_GETPROTOBYNAME = 0x347 // 839 ++ SYS_GETPROTOBYNUMBER = 0x348 // 840 ++ SYS_GETPROTOENT = 0x349 // 841 ++ SYS_GETSERVBYNAME = 0x34A // 842 ++ SYS_GETSERVBYPORT = 0x34B // 843 ++ SYS_GETSERVENT = 0x34C // 844 ++ SYS_GETSOCKNAME = 0x34D // 845 ++ SYS_GETSOCKOPT = 0x34E // 846 ++ SYS_INET_ADDR = 0x34F // 847 ++ SYS_INET_LNAOF = 0x350 // 848 ++ SYS_INET_MAKEADDR = 0x351 // 849 ++ SYS_INET_NETOF = 0x352 // 850 ++ SYS_INET_NETWORK = 0x353 // 851 ++ SYS_INET_NTOA = 0x354 // 852 ++ SYS_IOCTL = 0x355 // 853 ++ SYS_LISTEN = 0x356 // 854 ++ SYS_READV = 0x357 // 855 ++ SYS_RECV = 0x358 // 856 ++ SYS_RECVFROM = 0x359 // 857 ++ SYS_SELECT = 0x35B // 859 ++ SYS_SELECTEX = 0x35C // 860 ++ SYS_SEND = 0x35D // 861 ++ SYS_SENDTO = 0x35F // 863 ++ SYS_SETHOSTENT = 0x360 // 864 ++ SYS_SETNETENT = 0x361 // 865 ++ SYS_SETPEER = 0x362 // 866 ++ SYS_SETPROTOENT = 0x363 // 867 ++ SYS_SETSERVENT = 0x364 // 868 ++ SYS_SETSOCKOPT = 0x365 // 869 ++ SYS_SHUTDOWN = 0x366 // 870 ++ SYS_SOCKET = 0x367 // 871 ++ SYS_SOCKETPAIR = 0x368 // 872 ++ SYS_WRITEV = 0x369 // 873 ++ SYS_CHROOT = 0x36A // 874 ++ SYS_W_STATVFS = 0x36B // 875 ++ SYS_ULIMIT = 0x36C // 876 ++ SYS_ISNAN = 0x36D // 877 ++ SYS_UTIMES = 0x36E // 878 ++ SYS___H_ERRNO = 0x36F // 879 ++ SYS_ENDNETENT = 0x370 // 880 ++ SYS_CLOSELOG = 0x371 // 881 ++ SYS_OPENLOG = 0x372 // 882 ++ SYS_SETLOGMASK = 0x373 // 883 ++ SYS_SYSLOG = 0x374 // 884 ++ SYS_PTSNAME = 0x375 // 885 ++ SYS_SETREUID = 0x376 // 886 ++ SYS_SETREGID = 0x377 // 887 ++ SYS_REALPATH = 0x378 // 888 ++ SYS___SIGNGAM = 0x379 // 889 ++ SYS_GRANTPT = 0x37A // 890 ++ SYS_UNLOCKPT = 0x37B // 891 ++ SYS_TCGETSID = 0x37C // 892 ++ SYS___TCGETCP = 0x37D // 893 ++ SYS___TCSETCP = 0x37E // 894 ++ SYS___TCSETTABLES = 0x37F // 895 ++ SYS_POLL = 0x380 // 896 ++ SYS_REXEC = 0x381 // 897 ++ SYS___ISASCII2 = 0x382 // 898 ++ SYS___TOASCII2 = 0x383 // 899 ++ SYS_CHPRIORITY = 0x384 // 900 ++ SYS_PTHREAD_ATTR_SETSYNCTYPE_NP = 0x385 // 901 ++ SYS_PTHREAD_ATTR_GETSYNCTYPE_NP = 0x386 // 902 ++ SYS_PTHREAD_SET_LIMIT_NP = 0x387 // 903 ++ SYS___STNETENT = 0x388 // 904 ++ SYS___STPROTOENT = 0x389 // 905 ++ SYS___STSERVENT = 0x38A // 906 ++ SYS___STHOSTENT = 0x38B // 907 ++ SYS_NLIST = 0x38C // 908 ++ SYS___IPDBCS = 0x38D // 909 ++ SYS___IPDSPX = 0x38E // 910 ++ SYS___IPMSGC = 0x38F // 911 ++ SYS___SELECT1 = 0x390 // 912 ++ SYS_PTHREAD_SECURITY_NP = 0x391 // 913 ++ SYS___CHECK_RESOURCE_AUTH_NP = 0x392 // 914 ++ SYS___CONVERT_ID_NP = 0x393 // 915 ++ SYS___OPENVMREL = 0x394 // 916 ++ SYS_WMEMCHR = 0x395 // 917 ++ SYS_WMEMCMP = 0x396 // 918 ++ SYS_WMEMCPY = 0x397 // 919 ++ SYS_WMEMMOVE = 0x398 // 920 ++ SYS_WMEMSET = 0x399 // 921 ++ SYS___FPUTWC = 0x400 // 1024 ++ SYS___PUTWC = 0x401 // 1025 ++ SYS___PWCHAR = 0x402 // 1026 ++ SYS___WCSFTM = 0x403 // 1027 ++ SYS___WCSTOK = 0x404 // 1028 ++ SYS___WCWDTH = 0x405 // 1029 ++ SYS_T_ACCEPT = 0x409 // 1033 ++ SYS_T_ALLOC = 0x40A // 1034 ++ SYS_T_BIND = 0x40B // 1035 ++ SYS_T_CLOSE = 0x40C // 1036 ++ SYS_T_CONNECT = 0x40D // 1037 ++ SYS_T_ERROR = 0x40E // 1038 ++ SYS_T_FREE = 0x40F // 1039 ++ SYS_T_GETINFO = 0x410 // 1040 ++ SYS_T_GETPROTADDR = 0x411 // 1041 ++ SYS_T_GETSTATE = 0x412 // 1042 ++ SYS_T_LISTEN = 0x413 // 1043 ++ SYS_T_LOOK = 0x414 // 1044 ++ SYS_T_OPEN = 0x415 // 1045 ++ SYS_T_OPTMGMT = 0x416 // 1046 ++ SYS_T_RCV = 0x417 // 1047 ++ SYS_T_RCVCONNECT = 0x418 // 1048 ++ SYS_T_RCVDIS = 0x419 // 1049 ++ SYS_T_RCVREL = 0x41A // 1050 ++ SYS_T_RCVUDATA = 0x41B // 1051 ++ SYS_T_RCVUDERR = 0x41C // 1052 ++ SYS_T_SND = 0x41D // 1053 ++ SYS_T_SNDDIS = 0x41E // 1054 ++ SYS_T_SNDREL = 0x41F // 1055 ++ SYS_T_SNDUDATA = 0x420 // 1056 ++ SYS_T_STRERROR = 0x421 // 1057 ++ SYS_T_SYNC = 0x422 // 1058 ++ SYS_T_UNBIND = 0x423 // 1059 ++ SYS___T_ERRNO = 0x424 // 1060 ++ SYS___RECVMSG2 = 0x425 // 1061 ++ SYS___SENDMSG2 = 0x426 // 1062 ++ SYS_FATTACH = 0x427 // 1063 ++ SYS_FDETACH = 0x428 // 1064 ++ SYS_GETMSG = 0x429 // 1065 ++ SYS_GETPMSG = 0x42A // 1066 ++ SYS_ISASTREAM = 0x42B // 1067 ++ SYS_PUTMSG = 0x42C // 1068 ++ SYS_PUTPMSG = 0x42D // 1069 ++ SYS___ISPOSIXON = 0x42E // 1070 ++ SYS___OPENMVSREL = 0x42F // 1071 ++ SYS_GETCONTEXT = 0x430 // 1072 ++ SYS_SETCONTEXT = 0x431 // 1073 ++ SYS_MAKECONTEXT = 0x432 // 1074 ++ SYS_SWAPCONTEXT = 0x433 // 1075 ++ SYS_PTHREAD_GETSPECIFIC_D8_NP = 0x434 // 1076 ++ SYS_GETCLIENTID = 0x470 // 1136 ++ SYS___GETCLIENTID = 0x471 // 1137 ++ SYS_GETSTABLESIZE = 0x472 // 1138 ++ SYS_GETIBMOPT = 0x473 // 1139 ++ SYS_GETIBMSOCKOPT = 0x474 // 1140 ++ SYS_GIVESOCKET = 0x475 // 1141 ++ SYS_IBMSFLUSH = 0x476 // 1142 ++ SYS_MAXDESC = 0x477 // 1143 ++ SYS_SETIBMOPT = 0x478 // 1144 ++ SYS_SETIBMSOCKOPT = 0x479 // 1145 ++ SYS_SOCK_DEBUG = 0x47A // 1146 ++ SYS_SOCK_DO_TESTSTOR = 0x47D // 1149 ++ SYS_TAKESOCKET = 0x47E // 1150 ++ SYS___SERVER_INIT = 0x47F // 1151 ++ SYS___SERVER_PWU = 0x480 // 1152 ++ SYS_PTHREAD_TAG_NP = 0x481 // 1153 ++ SYS___CONSOLE = 0x482 // 1154 ++ SYS___WSINIT = 0x483 // 1155 ++ SYS___IPTCPN = 0x489 // 1161 ++ SYS___SMF_RECORD = 0x48A // 1162 ++ SYS___IPHOST = 0x48B // 1163 ++ SYS___IPNODE = 0x48C // 1164 ++ SYS___SERVER_CLASSIFY_CREATE = 0x48D // 1165 ++ SYS___SERVER_CLASSIFY_DESTROY = 0x48E // 1166 ++ SYS___SERVER_CLASSIFY_RESET = 0x48F // 1167 ++ SYS___SERVER_CLASSIFY = 0x490 // 1168 ++ SYS___HEAPRPT = 0x496 // 1174 ++ SYS___FNWSA = 0x49B // 1179 ++ SYS___SPAWN2 = 0x49D // 1181 ++ SYS___SPAWNP2 = 0x49E // 1182 ++ SYS___GDRR = 0x4A1 // 1185 ++ SYS___HRRNO = 0x4A2 // 1186 ++ SYS___OPRG = 0x4A3 // 1187 ++ SYS___OPRR = 0x4A4 // 1188 ++ SYS___OPND = 0x4A5 // 1189 ++ SYS___OPPT = 0x4A6 // 1190 ++ SYS___SIGGM = 0x4A7 // 1191 ++ SYS___DGHT = 0x4A8 // 1192 ++ SYS___TZNE = 0x4A9 // 1193 ++ SYS___TZZN = 0x4AA // 1194 ++ SYS___TRRNO = 0x4AF // 1199 ++ SYS___ENVN = 0x4B0 // 1200 ++ SYS___MLOCKALL = 0x4B1 // 1201 ++ SYS_CREATEWO = 0x4B2 // 1202 ++ SYS_CREATEWORKUNIT = 0x4B2 // 1202 ++ SYS_CONTINUE = 0x4B3 // 1203 ++ SYS_CONTINUEWORKUNIT = 0x4B3 // 1203 ++ SYS_CONNECTW = 0x4B4 // 1204 ++ SYS_CONNECTWORKMGR = 0x4B4 // 1204 ++ SYS_CONNECTS = 0x4B5 // 1205 ++ SYS_CONNECTSERVER = 0x4B5 // 1205 ++ SYS_DISCONNE = 0x4B6 // 1206 ++ SYS_DISCONNECTSERVER = 0x4B6 // 1206 ++ SYS_JOINWORK = 0x4B7 // 1207 ++ SYS_JOINWORKUNIT = 0x4B7 // 1207 ++ SYS_LEAVEWOR = 0x4B8 // 1208 ++ SYS_LEAVEWORKUNIT = 0x4B8 // 1208 ++ SYS_DELETEWO = 0x4B9 // 1209 ++ SYS_DELETEWORKUNIT = 0x4B9 // 1209 ++ SYS_QUERYMET = 0x4BA // 1210 ++ SYS_QUERYMETRICS = 0x4BA // 1210 ++ SYS_QUERYSCH = 0x4BB // 1211 ++ SYS_QUERYSCHENV = 0x4BB // 1211 ++ SYS_CHECKSCH = 0x4BC // 1212 ++ SYS_CHECKSCHENV = 0x4BC // 1212 ++ SYS___PID_AFFINITY = 0x4BD // 1213 ++ SYS___ASINH_B = 0x4BE // 1214 ++ SYS___ATAN_B = 0x4BF // 1215 ++ SYS___CBRT_B = 0x4C0 // 1216 ++ SYS___CEIL_B = 0x4C1 // 1217 ++ SYS_COPYSIGN = 0x4C2 // 1218 ++ SYS___COS_B = 0x4C3 // 1219 ++ SYS___ERF_B = 0x4C4 // 1220 ++ SYS___ERFC_B = 0x4C5 // 1221 ++ SYS___EXPM1_B = 0x4C6 // 1222 ++ SYS___FABS_B = 0x4C7 // 1223 ++ SYS_FINITE = 0x4C8 // 1224 ++ SYS___FLOOR_B = 0x4C9 // 1225 ++ SYS___FREXP_B = 0x4CA // 1226 ++ SYS___ILOGB_B = 0x4CB // 1227 ++ SYS___ISNAN_B = 0x4CC // 1228 ++ SYS___LDEXP_B = 0x4CD // 1229 ++ SYS___LOG1P_B = 0x4CE // 1230 ++ SYS___LOGB_B = 0x4CF // 1231 ++ SYS_MATHERR = 0x4D0 // 1232 ++ SYS___MODF_B = 0x4D1 // 1233 ++ SYS___NEXTAFTER_B = 0x4D2 // 1234 ++ SYS___RINT_B = 0x4D3 // 1235 ++ SYS_SCALBN = 0x4D4 // 1236 ++ SYS_SIGNIFIC = 0x4D5 // 1237 ++ SYS_SIGNIFICAND = 0x4D5 // 1237 ++ SYS___SIN_B = 0x4D6 // 1238 ++ SYS___TAN_B = 0x4D7 // 1239 ++ SYS___TANH_B = 0x4D8 // 1240 ++ SYS___ACOS_B = 0x4D9 // 1241 ++ SYS___ACOSH_B = 0x4DA // 1242 ++ SYS___ASIN_B = 0x4DB // 1243 ++ SYS___ATAN2_B = 0x4DC // 1244 ++ SYS___ATANH_B = 0x4DD // 1245 ++ SYS___COSH_B = 0x4DE // 1246 ++ SYS___EXP_B = 0x4DF // 1247 ++ SYS___FMOD_B = 0x4E0 // 1248 ++ SYS___GAMMA_B = 0x4E1 // 1249 ++ SYS_GAMMA_R = 0x4E2 // 1250 ++ SYS___HYPOT_B = 0x4E3 // 1251 ++ SYS___J0_B = 0x4E4 // 1252 ++ SYS___Y0_B = 0x4E5 // 1253 ++ SYS___J1_B = 0x4E6 // 1254 ++ SYS___Y1_B = 0x4E7 // 1255 ++ SYS___JN_B = 0x4E8 // 1256 ++ SYS___YN_B = 0x4E9 // 1257 ++ SYS___LGAMMA_B = 0x4EA // 1258 ++ SYS_LGAMMA_R = 0x4EB // 1259 ++ SYS___LOG_B = 0x4EC // 1260 ++ SYS___LOG10_B = 0x4ED // 1261 ++ SYS___POW_B = 0x4EE // 1262 ++ SYS___REMAINDER_B = 0x4EF // 1263 ++ SYS___SCALB_B = 0x4F0 // 1264 ++ SYS___SINH_B = 0x4F1 // 1265 ++ SYS___SQRT_B = 0x4F2 // 1266 ++ SYS___OPENDIR2 = 0x4F3 // 1267 ++ SYS___READDIR2 = 0x4F4 // 1268 ++ SYS___LOGIN = 0x4F5 // 1269 ++ SYS___OPEN_STAT = 0x4F6 // 1270 ++ SYS_ACCEPT_AND_RECV = 0x4F7 // 1271 ++ SYS___FP_SETMODE = 0x4F8 // 1272 ++ SYS___SIGACTIONSET = 0x4FB // 1275 ++ SYS___UCREATE = 0x4FC // 1276 ++ SYS___UMALLOC = 0x4FD // 1277 ++ SYS___UFREE = 0x4FE // 1278 ++ SYS___UHEAPREPORT = 0x4FF // 1279 ++ SYS___ISBFP = 0x500 // 1280 ++ SYS___FP_CAST = 0x501 // 1281 ++ SYS___CERTIFICATE = 0x502 // 1282 ++ SYS_SEND_FILE = 0x503 // 1283 ++ SYS_AIO_CANCEL = 0x504 // 1284 ++ SYS_AIO_ERROR = 0x505 // 1285 ++ SYS_AIO_READ = 0x506 // 1286 ++ SYS_AIO_RETURN = 0x507 // 1287 ++ SYS_AIO_SUSPEND = 0x508 // 1288 ++ SYS_AIO_WRITE = 0x509 // 1289 ++ SYS_PTHREAD_MUTEXATTR_GETPSHARED = 0x50A // 1290 ++ SYS_PTHREAD_MUTEXATTR_SETPSHARED = 0x50B // 1291 ++ SYS_PTHREAD_RWLOCK_DESTROY = 0x50C // 1292 ++ SYS_PTHREAD_RWLOCK_INIT = 0x50D // 1293 ++ SYS_PTHREAD_RWLOCK_RDLOCK = 0x50E // 1294 ++ SYS_PTHREAD_RWLOCK_TRYRDLOCK = 0x50F // 1295 ++ SYS_PTHREAD_RWLOCK_TRYWRLOCK = 0x510 // 1296 ++ SYS_PTHREAD_RWLOCK_UNLOCK = 0x511 // 1297 ++ SYS_PTHREAD_RWLOCK_WRLOCK = 0x512 // 1298 ++ SYS_PTHREAD_RWLOCKATTR_GETPSHARED = 0x513 // 1299 ++ SYS_PTHREAD_RWLOCKATTR_SETPSHARED = 0x514 // 1300 ++ SYS_PTHREAD_RWLOCKATTR_INIT = 0x515 // 1301 ++ SYS_PTHREAD_RWLOCKATTR_DESTROY = 0x516 // 1302 ++ SYS___CTTBL = 0x517 // 1303 ++ SYS_PTHREAD_MUTEXATTR_SETTYPE = 0x518 // 1304 ++ SYS_PTHREAD_MUTEXATTR_GETTYPE = 0x519 // 1305 ++ SYS___FP_CLR_FLAG = 0x51A // 1306 ++ SYS___FP_READ_FLAG = 0x51B // 1307 ++ SYS___FP_RAISE_XCP = 0x51C // 1308 ++ SYS___FP_CLASS = 0x51D // 1309 ++ SYS___FP_FINITE = 0x51E // 1310 ++ SYS___FP_ISNAN = 0x51F // 1311 ++ SYS___FP_UNORDERED = 0x520 // 1312 ++ SYS___FP_READ_RND = 0x521 // 1313 ++ SYS___FP_READ_RND_B = 0x522 // 1314 ++ SYS___FP_SWAP_RND = 0x523 // 1315 ++ SYS___FP_SWAP_RND_B = 0x524 // 1316 ++ SYS___FP_LEVEL = 0x525 // 1317 ++ SYS___FP_BTOH = 0x526 // 1318 ++ SYS___FP_HTOB = 0x527 // 1319 ++ SYS___FPC_RD = 0x528 // 1320 ++ SYS___FPC_WR = 0x529 // 1321 ++ SYS___FPC_RW = 0x52A // 1322 ++ SYS___FPC_SM = 0x52B // 1323 ++ SYS___FPC_RS = 0x52C // 1324 ++ SYS_SIGTIMEDWAIT = 0x52D // 1325 ++ SYS_SIGWAITINFO = 0x52E // 1326 ++ SYS___CHKBFP = 0x52F // 1327 ++ SYS___W_PIOCTL = 0x59E // 1438 ++ SYS___OSENV = 0x59F // 1439 ++ SYS_EXPORTWO = 0x5A1 // 1441 ++ SYS_EXPORTWORKUNIT = 0x5A1 // 1441 ++ SYS_UNDOEXPO = 0x5A2 // 1442 ++ SYS_UNDOEXPORTWORKUNIT = 0x5A2 // 1442 ++ SYS_IMPORTWO = 0x5A3 // 1443 ++ SYS_IMPORTWORKUNIT = 0x5A3 // 1443 ++ SYS_UNDOIMPO = 0x5A4 // 1444 ++ SYS_UNDOIMPORTWORKUNIT = 0x5A4 // 1444 ++ SYS_EXTRACTW = 0x5A5 // 1445 ++ SYS_EXTRACTWORKUNIT = 0x5A5 // 1445 ++ SYS___CPL = 0x5A6 // 1446 ++ SYS___MAP_INIT = 0x5A7 // 1447 ++ SYS___MAP_SERVICE = 0x5A8 // 1448 ++ SYS_SIGQUEUE = 0x5A9 // 1449 ++ SYS___MOUNT = 0x5AA // 1450 ++ SYS___GETUSERID = 0x5AB // 1451 ++ SYS___IPDOMAINNAME = 0x5AC // 1452 ++ SYS_QUERYENC = 0x5AD // 1453 ++ SYS_QUERYWORKUNITCLASSIFICATION = 0x5AD // 1453 ++ SYS_CONNECTE = 0x5AE // 1454 ++ SYS_CONNECTEXPORTIMPORT = 0x5AE // 1454 ++ SYS___FP_SWAPMODE = 0x5AF // 1455 ++ SYS_STRTOLL = 0x5B0 // 1456 ++ SYS_STRTOULL = 0x5B1 // 1457 ++ SYS___DSA_PREV = 0x5B2 // 1458 ++ SYS___EP_FIND = 0x5B3 // 1459 ++ SYS___SERVER_THREADS_QUERY = 0x5B4 // 1460 ++ SYS___MSGRCV_TIMED = 0x5B7 // 1463 ++ SYS___SEMOP_TIMED = 0x5B8 // 1464 ++ SYS___GET_CPUID = 0x5B9 // 1465 ++ SYS___GET_SYSTEM_SETTINGS = 0x5BA // 1466 ++ SYS_FTELLO = 0x5C8 // 1480 ++ SYS_FSEEKO = 0x5C9 // 1481 ++ SYS_LLDIV = 0x5CB // 1483 ++ SYS_WCSTOLL = 0x5CC // 1484 ++ SYS_WCSTOULL = 0x5CD // 1485 ++ SYS_LLABS = 0x5CE // 1486 ++ SYS___CONSOLE2 = 0x5D2 // 1490 ++ SYS_INET_NTOP = 0x5D3 // 1491 ++ SYS_INET_PTON = 0x5D4 // 1492 ++ SYS___RES = 0x5D6 // 1494 ++ SYS_RES_MKQUERY = 0x5D7 // 1495 ++ SYS_RES_INIT = 0x5D8 // 1496 ++ SYS_RES_QUERY = 0x5D9 // 1497 ++ SYS_RES_SEARCH = 0x5DA // 1498 ++ SYS_RES_SEND = 0x5DB // 1499 ++ SYS_RES_QUERYDOMAIN = 0x5DC // 1500 ++ SYS_DN_EXPAND = 0x5DD // 1501 ++ SYS_DN_SKIPNAME = 0x5DE // 1502 ++ SYS_DN_COMP = 0x5DF // 1503 ++ SYS_ASCTIME_R = 0x5E0 // 1504 ++ SYS_CTIME_R = 0x5E1 // 1505 ++ SYS_GMTIME_R = 0x5E2 // 1506 ++ SYS_LOCALTIME_R = 0x5E3 // 1507 ++ SYS_RAND_R = 0x5E4 // 1508 ++ SYS_STRTOK_R = 0x5E5 // 1509 ++ SYS_READDIR_R = 0x5E6 // 1510 ++ SYS_GETGRGID_R = 0x5E7 // 1511 ++ SYS_GETGRNAM_R = 0x5E8 // 1512 ++ SYS_GETLOGIN_R = 0x5E9 // 1513 ++ SYS_GETPWNAM_R = 0x5EA // 1514 ++ SYS_GETPWUID_R = 0x5EB // 1515 ++ SYS_TTYNAME_R = 0x5EC // 1516 ++ SYS_PTHREAD_ATFORK = 0x5ED // 1517 ++ SYS_PTHREAD_ATTR_GETGUARDSIZE = 0x5EE // 1518 ++ SYS_PTHREAD_ATTR_GETSTACKADDR = 0x5EF // 1519 ++ SYS_PTHREAD_ATTR_SETGUARDSIZE = 0x5F0 // 1520 ++ SYS_PTHREAD_ATTR_SETSTACKADDR = 0x5F1 // 1521 ++ SYS_PTHREAD_CONDATTR_GETPSHARED = 0x5F2 // 1522 ++ SYS_PTHREAD_CONDATTR_SETPSHARED = 0x5F3 // 1523 ++ SYS_PTHREAD_GETCONCURRENCY = 0x5F4 // 1524 ++ SYS_PTHREAD_KEY_DELETE = 0x5F5 // 1525 ++ SYS_PTHREAD_SETCONCURRENCY = 0x5F6 // 1526 ++ SYS_PTHREAD_SIGMASK = 0x5F7 // 1527 ++ SYS___DISCARDDATA = 0x5F8 // 1528 ++ SYS_PTHREAD_ATTR_GETSCHEDPARAM = 0x5F9 // 1529 ++ SYS_PTHREAD_ATTR_SETSCHEDPARAM = 0x5FA // 1530 ++ SYS_PTHREAD_ATTR_GETDETACHSTATE_U98 = 0x5FB // 1531 ++ SYS_PTHREAD_ATTR_SETDETACHSTATE_U98 = 0x5FC // 1532 ++ SYS_PTHREAD_DETACH_U98 = 0x5FD // 1533 ++ SYS_PTHREAD_GETSPECIFIC_U98 = 0x5FE // 1534 ++ SYS_PTHREAD_SETCANCELSTATE = 0x5FF // 1535 ++ SYS_PTHREAD_SETCANCELTYPE = 0x600 // 1536 ++ SYS_PTHREAD_TESTCANCEL = 0x601 // 1537 ++ SYS___ATANF_B = 0x602 // 1538 ++ SYS___ATANL_B = 0x603 // 1539 ++ SYS___CEILF_B = 0x604 // 1540 ++ SYS___CEILL_B = 0x605 // 1541 ++ SYS___COSF_B = 0x606 // 1542 ++ SYS___COSL_B = 0x607 // 1543 ++ SYS___FABSF_B = 0x608 // 1544 ++ SYS___FABSL_B = 0x609 // 1545 ++ SYS___FLOORF_B = 0x60A // 1546 ++ SYS___FLOORL_B = 0x60B // 1547 ++ SYS___FREXPF_B = 0x60C // 1548 ++ SYS___FREXPL_B = 0x60D // 1549 ++ SYS___LDEXPF_B = 0x60E // 1550 ++ SYS___LDEXPL_B = 0x60F // 1551 ++ SYS___SINF_B = 0x610 // 1552 ++ SYS___SINL_B = 0x611 // 1553 ++ SYS___TANF_B = 0x612 // 1554 ++ SYS___TANL_B = 0x613 // 1555 ++ SYS___TANHF_B = 0x614 // 1556 ++ SYS___TANHL_B = 0x615 // 1557 ++ SYS___ACOSF_B = 0x616 // 1558 ++ SYS___ACOSL_B = 0x617 // 1559 ++ SYS___ASINF_B = 0x618 // 1560 ++ SYS___ASINL_B = 0x619 // 1561 ++ SYS___ATAN2F_B = 0x61A // 1562 ++ SYS___ATAN2L_B = 0x61B // 1563 ++ SYS___COSHF_B = 0x61C // 1564 ++ SYS___COSHL_B = 0x61D // 1565 ++ SYS___EXPF_B = 0x61E // 1566 ++ SYS___EXPL_B = 0x61F // 1567 ++ SYS___LOGF_B = 0x620 // 1568 ++ SYS___LOGL_B = 0x621 // 1569 ++ SYS___LOG10F_B = 0x622 // 1570 ++ SYS___LOG10L_B = 0x623 // 1571 ++ SYS___POWF_B = 0x624 // 1572 ++ SYS___POWL_B = 0x625 // 1573 ++ SYS___SINHF_B = 0x626 // 1574 ++ SYS___SINHL_B = 0x627 // 1575 ++ SYS___SQRTF_B = 0x628 // 1576 ++ SYS___SQRTL_B = 0x629 // 1577 ++ SYS___ABSF_B = 0x62A // 1578 ++ SYS___ABS_B = 0x62B // 1579 ++ SYS___ABSL_B = 0x62C // 1580 ++ SYS___FMODF_B = 0x62D // 1581 ++ SYS___FMODL_B = 0x62E // 1582 ++ SYS___MODFF_B = 0x62F // 1583 ++ SYS___MODFL_B = 0x630 // 1584 ++ SYS_ABSF = 0x631 // 1585 ++ SYS_ABSL = 0x632 // 1586 ++ SYS_ACOSF = 0x633 // 1587 ++ SYS_ACOSL = 0x634 // 1588 ++ SYS_ASINF = 0x635 // 1589 ++ SYS_ASINL = 0x636 // 1590 ++ SYS_ATAN2F = 0x637 // 1591 ++ SYS_ATAN2L = 0x638 // 1592 ++ SYS_ATANF = 0x639 // 1593 ++ SYS_ATANL = 0x63A // 1594 ++ SYS_CEILF = 0x63B // 1595 ++ SYS_CEILL = 0x63C // 1596 ++ SYS_COSF = 0x63D // 1597 ++ SYS_COSL = 0x63E // 1598 ++ SYS_COSHF = 0x63F // 1599 ++ SYS_COSHL = 0x640 // 1600 ++ SYS_EXPF = 0x641 // 1601 ++ SYS_EXPL = 0x642 // 1602 ++ SYS_TANHF = 0x643 // 1603 ++ SYS_TANHL = 0x644 // 1604 ++ SYS_LOG10F = 0x645 // 1605 ++ SYS_LOG10L = 0x646 // 1606 ++ SYS_LOGF = 0x647 // 1607 ++ SYS_LOGL = 0x648 // 1608 ++ SYS_POWF = 0x649 // 1609 ++ SYS_POWL = 0x64A // 1610 ++ SYS_SINF = 0x64B // 1611 ++ SYS_SINL = 0x64C // 1612 ++ SYS_SQRTF = 0x64D // 1613 ++ SYS_SQRTL = 0x64E // 1614 ++ SYS_SINHF = 0x64F // 1615 ++ SYS_SINHL = 0x650 // 1616 ++ SYS_TANF = 0x651 // 1617 ++ SYS_TANL = 0x652 // 1618 ++ SYS_FABSF = 0x653 // 1619 ++ SYS_FABSL = 0x654 // 1620 ++ SYS_FLOORF = 0x655 // 1621 ++ SYS_FLOORL = 0x656 // 1622 ++ SYS_FMODF = 0x657 // 1623 ++ SYS_FMODL = 0x658 // 1624 ++ SYS_FREXPF = 0x659 // 1625 ++ SYS_FREXPL = 0x65A // 1626 ++ SYS_LDEXPF = 0x65B // 1627 ++ SYS_LDEXPL = 0x65C // 1628 ++ SYS_MODFF = 0x65D // 1629 ++ SYS_MODFL = 0x65E // 1630 ++ SYS_BTOWC = 0x65F // 1631 ++ SYS___CHATTR = 0x660 // 1632 ++ SYS___FCHATTR = 0x661 // 1633 ++ SYS___TOCCSID = 0x662 // 1634 ++ SYS___CSNAMETYPE = 0x663 // 1635 ++ SYS___TOCSNAME = 0x664 // 1636 ++ SYS___CCSIDTYPE = 0x665 // 1637 ++ SYS___AE_CORRESTBL_QUERY = 0x666 // 1638 ++ SYS___AE_AUTOCONVERT_STATE = 0x667 // 1639 ++ SYS_DN_FIND = 0x668 // 1640 ++ SYS___GETHOSTBYADDR_A = 0x669 // 1641 ++ SYS___GETHOSTBYNAME_A = 0x66A // 1642 ++ SYS___RES_INIT_A = 0x66B // 1643 ++ SYS___GETHOSTBYADDR_R_A = 0x66C // 1644 ++ SYS___GETHOSTBYNAME_R_A = 0x66D // 1645 ++ SYS___CHARMAP_INIT_A = 0x66E // 1646 ++ SYS___MBLEN_A = 0x66F // 1647 ++ SYS___MBLEN_SB_A = 0x670 // 1648 ++ SYS___MBLEN_STD_A = 0x671 // 1649 ++ SYS___MBLEN_UTF = 0x672 // 1650 ++ SYS___MBSTOWCS_A = 0x673 // 1651 ++ SYS___MBSTOWCS_STD_A = 0x674 // 1652 ++ SYS___MBTOWC_A = 0x675 // 1653 ++ SYS___MBTOWC_ISO1 = 0x676 // 1654 ++ SYS___MBTOWC_SBCS = 0x677 // 1655 ++ SYS___MBTOWC_MBCS = 0x678 // 1656 ++ SYS___MBTOWC_UTF = 0x679 // 1657 ++ SYS___WCSTOMBS_A = 0x67A // 1658 ++ SYS___WCSTOMBS_STD_A = 0x67B // 1659 ++ SYS___WCSWIDTH_A = 0x67C // 1660 ++ SYS___GETGRGID_R_A = 0x67D // 1661 ++ SYS___WCSWIDTH_STD_A = 0x67E // 1662 ++ SYS___WCSWIDTH_ASIA = 0x67F // 1663 ++ SYS___CSID_A = 0x680 // 1664 ++ SYS___CSID_STD_A = 0x681 // 1665 ++ SYS___WCSID_A = 0x682 // 1666 ++ SYS___WCSID_STD_A = 0x683 // 1667 ++ SYS___WCTOMB_A = 0x684 // 1668 ++ SYS___WCTOMB_ISO1 = 0x685 // 1669 ++ SYS___WCTOMB_STD_A = 0x686 // 1670 ++ SYS___WCTOMB_UTF = 0x687 // 1671 ++ SYS___WCWIDTH_A = 0x688 // 1672 ++ SYS___GETGRNAM_R_A = 0x689 // 1673 ++ SYS___WCWIDTH_STD_A = 0x68A // 1674 ++ SYS___WCWIDTH_ASIA = 0x68B // 1675 ++ SYS___GETPWNAM_R_A = 0x68C // 1676 ++ SYS___GETPWUID_R_A = 0x68D // 1677 ++ SYS___GETLOGIN_R_A = 0x68E // 1678 ++ SYS___TTYNAME_R_A = 0x68F // 1679 ++ SYS___READDIR_R_A = 0x690 // 1680 ++ SYS___E2A_S = 0x691 // 1681 ++ SYS___FNMATCH_A = 0x692 // 1682 ++ SYS___FNMATCH_C_A = 0x693 // 1683 ++ SYS___EXECL_A = 0x694 // 1684 ++ SYS___FNMATCH_STD_A = 0x695 // 1685 ++ SYS___REGCOMP_A = 0x696 // 1686 ++ SYS___REGCOMP_STD_A = 0x697 // 1687 ++ SYS___REGERROR_A = 0x698 // 1688 ++ SYS___REGERROR_STD_A = 0x699 // 1689 ++ SYS___REGEXEC_A = 0x69A // 1690 ++ SYS___REGEXEC_STD_A = 0x69B // 1691 ++ SYS___REGFREE_A = 0x69C // 1692 ++ SYS___REGFREE_STD_A = 0x69D // 1693 ++ SYS___STRCOLL_A = 0x69E // 1694 ++ SYS___STRCOLL_C_A = 0x69F // 1695 ++ SYS___EXECLE_A = 0x6A0 // 1696 ++ SYS___STRCOLL_STD_A = 0x6A1 // 1697 ++ SYS___STRXFRM_A = 0x6A2 // 1698 ++ SYS___STRXFRM_C_A = 0x6A3 // 1699 ++ SYS___EXECLP_A = 0x6A4 // 1700 ++ SYS___STRXFRM_STD_A = 0x6A5 // 1701 ++ SYS___WCSCOLL_A = 0x6A6 // 1702 ++ SYS___WCSCOLL_C_A = 0x6A7 // 1703 ++ SYS___WCSCOLL_STD_A = 0x6A8 // 1704 ++ SYS___WCSXFRM_A = 0x6A9 // 1705 ++ SYS___WCSXFRM_C_A = 0x6AA // 1706 ++ SYS___WCSXFRM_STD_A = 0x6AB // 1707 ++ SYS___COLLATE_INIT_A = 0x6AC // 1708 ++ SYS___WCTYPE_A = 0x6AD // 1709 ++ SYS___GET_WCTYPE_STD_A = 0x6AE // 1710 ++ SYS___CTYPE_INIT_A = 0x6AF // 1711 ++ SYS___ISWCTYPE_A = 0x6B0 // 1712 ++ SYS___EXECV_A = 0x6B1 // 1713 ++ SYS___IS_WCTYPE_STD_A = 0x6B2 // 1714 ++ SYS___TOWLOWER_A = 0x6B3 // 1715 ++ SYS___TOWLOWER_STD_A = 0x6B4 // 1716 ++ SYS___TOWUPPER_A = 0x6B5 // 1717 ++ SYS___TOWUPPER_STD_A = 0x6B6 // 1718 ++ SYS___LOCALE_INIT_A = 0x6B7 // 1719 ++ SYS___LOCALECONV_A = 0x6B8 // 1720 ++ SYS___LOCALECONV_STD_A = 0x6B9 // 1721 ++ SYS___NL_LANGINFO_A = 0x6BA // 1722 ++ SYS___NL_LNAGINFO_STD_A = 0x6BB // 1723 ++ SYS___MONETARY_INIT_A = 0x6BC // 1724 ++ SYS___STRFMON_A = 0x6BD // 1725 ++ SYS___STRFMON_STD_A = 0x6BE // 1726 ++ SYS___GETADDRINFO_A = 0x6BF // 1727 ++ SYS___CATGETS_A = 0x6C0 // 1728 ++ SYS___EXECVE_A = 0x6C1 // 1729 ++ SYS___EXECVP_A = 0x6C2 // 1730 ++ SYS___SPAWN_A = 0x6C3 // 1731 ++ SYS___GETNAMEINFO_A = 0x6C4 // 1732 ++ SYS___SPAWNP_A = 0x6C5 // 1733 ++ SYS___NUMERIC_INIT_A = 0x6C6 // 1734 ++ SYS___RESP_INIT_A = 0x6C7 // 1735 ++ SYS___RPMATCH_A = 0x6C8 // 1736 ++ SYS___RPMATCH_C_A = 0x6C9 // 1737 ++ SYS___RPMATCH_STD_A = 0x6CA // 1738 ++ SYS___TIME_INIT_A = 0x6CB // 1739 ++ SYS___STRFTIME_A = 0x6CC // 1740 ++ SYS___STRFTIME_STD_A = 0x6CD // 1741 ++ SYS___STRPTIME_A = 0x6CE // 1742 ++ SYS___STRPTIME_STD_A = 0x6CF // 1743 ++ SYS___WCSFTIME_A = 0x6D0 // 1744 ++ SYS___WCSFTIME_STD_A = 0x6D1 // 1745 ++ SYS_____SPAWN2_A = 0x6D2 // 1746 ++ SYS_____SPAWNP2_A = 0x6D3 // 1747 ++ SYS___SYNTAX_INIT_A = 0x6D4 // 1748 ++ SYS___TOD_INIT_A = 0x6D5 // 1749 ++ SYS___NL_CSINFO_A = 0x6D6 // 1750 ++ SYS___NL_MONINFO_A = 0x6D7 // 1751 ++ SYS___NL_NUMINFO_A = 0x6D8 // 1752 ++ SYS___NL_RESPINFO_A = 0x6D9 // 1753 ++ SYS___NL_TIMINFO_A = 0x6DA // 1754 ++ SYS___IF_NAMETOINDEX_A = 0x6DB // 1755 ++ SYS___IF_INDEXTONAME_A = 0x6DC // 1756 ++ SYS___PRINTF_A = 0x6DD // 1757 ++ SYS___ICONV_OPEN_A = 0x6DE // 1758 ++ SYS___DLLLOAD_A = 0x6DF // 1759 ++ SYS___DLLQUERYFN_A = 0x6E0 // 1760 ++ SYS___DLLQUERYVAR_A = 0x6E1 // 1761 ++ SYS_____CHATTR_A = 0x6E2 // 1762 ++ SYS___E2A_L = 0x6E3 // 1763 ++ SYS_____TOCCSID_A = 0x6E4 // 1764 ++ SYS_____TOCSNAME_A = 0x6E5 // 1765 ++ SYS_____CCSIDTYPE_A = 0x6E6 // 1766 ++ SYS_____CSNAMETYPE_A = 0x6E7 // 1767 ++ SYS___CHMOD_A = 0x6E8 // 1768 ++ SYS___MKDIR_A = 0x6E9 // 1769 ++ SYS___STAT_A = 0x6EA // 1770 ++ SYS___STAT_O_A = 0x6EB // 1771 ++ SYS___MKFIFO_A = 0x6EC // 1772 ++ SYS_____OPEN_STAT_A = 0x6ED // 1773 ++ SYS___LSTAT_A = 0x6EE // 1774 ++ SYS___LSTAT_O_A = 0x6EF // 1775 ++ SYS___MKNOD_A = 0x6F0 // 1776 ++ SYS___MOUNT_A = 0x6F1 // 1777 ++ SYS___UMOUNT_A = 0x6F2 // 1778 ++ SYS___CHAUDIT_A = 0x6F4 // 1780 ++ SYS___W_GETMNTENT_A = 0x6F5 // 1781 ++ SYS___CREAT_A = 0x6F6 // 1782 ++ SYS___OPEN_A = 0x6F7 // 1783 ++ SYS___SETLOCALE_A = 0x6F9 // 1785 ++ SYS___FPRINTF_A = 0x6FA // 1786 ++ SYS___SPRINTF_A = 0x6FB // 1787 ++ SYS___VFPRINTF_A = 0x6FC // 1788 ++ SYS___VPRINTF_A = 0x6FD // 1789 ++ SYS___VSPRINTF_A = 0x6FE // 1790 ++ SYS___VSWPRINTF_A = 0x6FF // 1791 ++ SYS___SWPRINTF_A = 0x700 // 1792 ++ SYS___FSCANF_A = 0x701 // 1793 ++ SYS___SCANF_A = 0x702 // 1794 ++ SYS___SSCANF_A = 0x703 // 1795 ++ SYS___SWSCANF_A = 0x704 // 1796 ++ SYS___ATOF_A = 0x705 // 1797 ++ SYS___ATOI_A = 0x706 // 1798 ++ SYS___ATOL_A = 0x707 // 1799 ++ SYS___STRTOD_A = 0x708 // 1800 ++ SYS___STRTOL_A = 0x709 // 1801 ++ SYS___STRTOUL_A = 0x70A // 1802 ++ SYS_____AE_CORRESTBL_QUERY_A = 0x70B // 1803 ++ SYS___A64L_A = 0x70C // 1804 ++ SYS___ECVT_A = 0x70D // 1805 ++ SYS___FCVT_A = 0x70E // 1806 ++ SYS___GCVT_A = 0x70F // 1807 ++ SYS___L64A_A = 0x710 // 1808 ++ SYS___STRERROR_A = 0x711 // 1809 ++ SYS___PERROR_A = 0x712 // 1810 ++ SYS___FETCH_A = 0x713 // 1811 ++ SYS___GETENV_A = 0x714 // 1812 ++ SYS___MKSTEMP_A = 0x717 // 1815 ++ SYS___PTSNAME_A = 0x718 // 1816 ++ SYS___PUTENV_A = 0x719 // 1817 ++ SYS___REALPATH_A = 0x71A // 1818 ++ SYS___SETENV_A = 0x71B // 1819 ++ SYS___SYSTEM_A = 0x71C // 1820 ++ SYS___GETOPT_A = 0x71D // 1821 ++ SYS___CATOPEN_A = 0x71E // 1822 ++ SYS___ACCESS_A = 0x71F // 1823 ++ SYS___CHDIR_A = 0x720 // 1824 ++ SYS___CHOWN_A = 0x721 // 1825 ++ SYS___CHROOT_A = 0x722 // 1826 ++ SYS___GETCWD_A = 0x723 // 1827 ++ SYS___GETWD_A = 0x724 // 1828 ++ SYS___LCHOWN_A = 0x725 // 1829 ++ SYS___LINK_A = 0x726 // 1830 ++ SYS___PATHCONF_A = 0x727 // 1831 ++ SYS___IF_NAMEINDEX_A = 0x728 // 1832 ++ SYS___READLINK_A = 0x729 // 1833 ++ SYS___RMDIR_A = 0x72A // 1834 ++ SYS___STATVFS_A = 0x72B // 1835 ++ SYS___SYMLINK_A = 0x72C // 1836 ++ SYS___TRUNCATE_A = 0x72D // 1837 ++ SYS___UNLINK_A = 0x72E // 1838 ++ SYS___GAI_STRERROR_A = 0x72F // 1839 ++ SYS___EXTLINK_NP_A = 0x730 // 1840 ++ SYS___ISALNUM_A = 0x731 // 1841 ++ SYS___ISALPHA_A = 0x732 // 1842 ++ SYS___A2E_S = 0x733 // 1843 ++ SYS___ISCNTRL_A = 0x734 // 1844 ++ SYS___ISDIGIT_A = 0x735 // 1845 ++ SYS___ISGRAPH_A = 0x736 // 1846 ++ SYS___ISLOWER_A = 0x737 // 1847 ++ SYS___ISPRINT_A = 0x738 // 1848 ++ SYS___ISPUNCT_A = 0x739 // 1849 ++ SYS___ISSPACE_A = 0x73A // 1850 ++ SYS___ISUPPER_A = 0x73B // 1851 ++ SYS___ISXDIGIT_A = 0x73C // 1852 ++ SYS___TOLOWER_A = 0x73D // 1853 ++ SYS___TOUPPER_A = 0x73E // 1854 ++ SYS___ISWALNUM_A = 0x73F // 1855 ++ SYS___ISWALPHA_A = 0x740 // 1856 ++ SYS___A2E_L = 0x741 // 1857 ++ SYS___ISWCNTRL_A = 0x742 // 1858 ++ SYS___ISWDIGIT_A = 0x743 // 1859 ++ SYS___ISWGRAPH_A = 0x744 // 1860 ++ SYS___ISWLOWER_A = 0x745 // 1861 ++ SYS___ISWPRINT_A = 0x746 // 1862 ++ SYS___ISWPUNCT_A = 0x747 // 1863 ++ SYS___ISWSPACE_A = 0x748 // 1864 ++ SYS___ISWUPPER_A = 0x749 // 1865 ++ SYS___ISWXDIGIT_A = 0x74A // 1866 ++ SYS___CONFSTR_A = 0x74B // 1867 ++ SYS___FTOK_A = 0x74C // 1868 ++ SYS___MKTEMP_A = 0x74D // 1869 ++ SYS___FDOPEN_A = 0x74E // 1870 ++ SYS___FLDATA_A = 0x74F // 1871 ++ SYS___REMOVE_A = 0x750 // 1872 ++ SYS___RENAME_A = 0x751 // 1873 ++ SYS___TMPNAM_A = 0x752 // 1874 ++ SYS___FOPEN_A = 0x753 // 1875 ++ SYS___FREOPEN_A = 0x754 // 1876 ++ SYS___CUSERID_A = 0x755 // 1877 ++ SYS___POPEN_A = 0x756 // 1878 ++ SYS___TEMPNAM_A = 0x757 // 1879 ++ SYS___FTW_A = 0x758 // 1880 ++ SYS___GETGRENT_A = 0x759 // 1881 ++ SYS___GETGRGID_A = 0x75A // 1882 ++ SYS___GETGRNAM_A = 0x75B // 1883 ++ SYS___GETGROUPSBYNAME_A = 0x75C // 1884 ++ SYS___GETHOSTENT_A = 0x75D // 1885 ++ SYS___GETHOSTNAME_A = 0x75E // 1886 ++ SYS___GETLOGIN_A = 0x75F // 1887 ++ SYS___INET_NTOP_A = 0x760 // 1888 ++ SYS___GETPASS_A = 0x761 // 1889 ++ SYS___GETPWENT_A = 0x762 // 1890 ++ SYS___GETPWNAM_A = 0x763 // 1891 ++ SYS___GETPWUID_A = 0x764 // 1892 ++ SYS_____CHECK_RESOURCE_AUTH_NP_A = 0x765 // 1893 ++ SYS___CHECKSCHENV_A = 0x766 // 1894 ++ SYS___CONNECTSERVER_A = 0x767 // 1895 ++ SYS___CONNECTWORKMGR_A = 0x768 // 1896 ++ SYS_____CONSOLE_A = 0x769 // 1897 ++ SYS___CREATEWORKUNIT_A = 0x76A // 1898 ++ SYS___CTERMID_A = 0x76B // 1899 ++ SYS___FMTMSG_A = 0x76C // 1900 ++ SYS___INITGROUPS_A = 0x76D // 1901 ++ SYS_____LOGIN_A = 0x76E // 1902 ++ SYS___MSGRCV_A = 0x76F // 1903 ++ SYS___MSGSND_A = 0x770 // 1904 ++ SYS___MSGXRCV_A = 0x771 // 1905 ++ SYS___NFTW_A = 0x772 // 1906 ++ SYS_____PASSWD_A = 0x773 // 1907 ++ SYS___PTHREAD_SECURITY_NP_A = 0x774 // 1908 ++ SYS___QUERYMETRICS_A = 0x775 // 1909 ++ SYS___QUERYSCHENV = 0x776 // 1910 ++ SYS___READV_A = 0x777 // 1911 ++ SYS_____SERVER_CLASSIFY_A = 0x778 // 1912 ++ SYS_____SERVER_INIT_A = 0x779 // 1913 ++ SYS_____SERVER_PWU_A = 0x77A // 1914 ++ SYS___STRCASECMP_A = 0x77B // 1915 ++ SYS___STRNCASECMP_A = 0x77C // 1916 ++ SYS___TTYNAME_A = 0x77D // 1917 ++ SYS___UNAME_A = 0x77E // 1918 ++ SYS___UTIMES_A = 0x77F // 1919 ++ SYS___W_GETPSENT_A = 0x780 // 1920 ++ SYS___WRITEV_A = 0x781 // 1921 ++ SYS___W_STATFS_A = 0x782 // 1922 ++ SYS___W_STATVFS_A = 0x783 // 1923 ++ SYS___FPUTC_A = 0x784 // 1924 ++ SYS___PUTCHAR_A = 0x785 // 1925 ++ SYS___PUTS_A = 0x786 // 1926 ++ SYS___FGETS_A = 0x787 // 1927 ++ SYS___GETS_A = 0x788 // 1928 ++ SYS___FPUTS_A = 0x789 // 1929 ++ SYS___FREAD_A = 0x78A // 1930 ++ SYS___FWRITE_A = 0x78B // 1931 ++ SYS___OPEN_O_A = 0x78C // 1932 ++ SYS___ISASCII = 0x78D // 1933 ++ SYS___CREAT_O_A = 0x78E // 1934 ++ SYS___ENVNA = 0x78F // 1935 ++ SYS___PUTC_A = 0x790 // 1936 ++ SYS___AE_THREAD_SETMODE = 0x791 // 1937 ++ SYS___AE_THREAD_SWAPMODE = 0x792 // 1938 ++ SYS___GETNETBYADDR_A = 0x793 // 1939 ++ SYS___GETNETBYNAME_A = 0x794 // 1940 ++ SYS___GETNETENT_A = 0x795 // 1941 ++ SYS___GETPROTOBYNAME_A = 0x796 // 1942 ++ SYS___GETPROTOBYNUMBER_A = 0x797 // 1943 ++ SYS___GETPROTOENT_A = 0x798 // 1944 ++ SYS___GETSERVBYNAME_A = 0x799 // 1945 ++ SYS___GETSERVBYPORT_A = 0x79A // 1946 ++ SYS___GETSERVENT_A = 0x79B // 1947 ++ SYS___ASCTIME_A = 0x79C // 1948 ++ SYS___CTIME_A = 0x79D // 1949 ++ SYS___GETDATE_A = 0x79E // 1950 ++ SYS___TZSET_A = 0x79F // 1951 ++ SYS___UTIME_A = 0x7A0 // 1952 ++ SYS___ASCTIME_R_A = 0x7A1 // 1953 ++ SYS___CTIME_R_A = 0x7A2 // 1954 ++ SYS___STRTOLL_A = 0x7A3 // 1955 ++ SYS___STRTOULL_A = 0x7A4 // 1956 ++ SYS___FPUTWC_A = 0x7A5 // 1957 ++ SYS___PUTWC_A = 0x7A6 // 1958 ++ SYS___PUTWCHAR_A = 0x7A7 // 1959 ++ SYS___FPUTWS_A = 0x7A8 // 1960 ++ SYS___UNGETWC_A = 0x7A9 // 1961 ++ SYS___FGETWC_A = 0x7AA // 1962 ++ SYS___GETWC_A = 0x7AB // 1963 ++ SYS___GETWCHAR_A = 0x7AC // 1964 ++ SYS___FGETWS_A = 0x7AD // 1965 ++ SYS___GETTIMEOFDAY_A = 0x7AE // 1966 ++ SYS___GMTIME_A = 0x7AF // 1967 ++ SYS___GMTIME_R_A = 0x7B0 // 1968 ++ SYS___LOCALTIME_A = 0x7B1 // 1969 ++ SYS___LOCALTIME_R_A = 0x7B2 // 1970 ++ SYS___MKTIME_A = 0x7B3 // 1971 ++ SYS___TZZNA = 0x7B4 // 1972 ++ SYS_UNATEXIT = 0x7B5 // 1973 ++ SYS___CEE3DMP_A = 0x7B6 // 1974 ++ SYS___CDUMP_A = 0x7B7 // 1975 ++ SYS___CSNAP_A = 0x7B8 // 1976 ++ SYS___CTEST_A = 0x7B9 // 1977 ++ SYS___CTRACE_A = 0x7BA // 1978 ++ SYS___VSWPRNTF2_A = 0x7BB // 1979 ++ SYS___INET_PTON_A = 0x7BC // 1980 ++ SYS___SYSLOG_A = 0x7BD // 1981 ++ SYS___CRYPT_A = 0x7BE // 1982 ++ SYS_____OPENDIR2_A = 0x7BF // 1983 ++ SYS_____READDIR2_A = 0x7C0 // 1984 ++ SYS___OPENDIR_A = 0x7C2 // 1986 ++ SYS___READDIR_A = 0x7C3 // 1987 ++ SYS_PREAD = 0x7C7 // 1991 ++ SYS_PWRITE = 0x7C8 // 1992 ++ SYS_M_CREATE_LAYOUT = 0x7C9 // 1993 ++ SYS_M_DESTROY_LAYOUT = 0x7CA // 1994 ++ SYS_M_GETVALUES_LAYOUT = 0x7CB // 1995 ++ SYS_M_SETVALUES_LAYOUT = 0x7CC // 1996 ++ SYS_M_TRANSFORM_LAYOUT = 0x7CD // 1997 ++ SYS_M_WTRANSFORM_LAYOUT = 0x7CE // 1998 ++ SYS_FWPRINTF = 0x7D1 // 2001 ++ SYS_WPRINTF = 0x7D2 // 2002 ++ SYS_VFWPRINT = 0x7D3 // 2003 ++ SYS_VFWPRINTF = 0x7D3 // 2003 ++ SYS_VWPRINTF = 0x7D4 // 2004 ++ SYS_FWSCANF = 0x7D5 // 2005 ++ SYS_WSCANF = 0x7D6 // 2006 ++ SYS_WCTRANS = 0x7D7 // 2007 ++ SYS_TOWCTRAN = 0x7D8 // 2008 ++ SYS_TOWCTRANS = 0x7D8 // 2008 ++ SYS___WCSTOD_A = 0x7D9 // 2009 ++ SYS___WCSTOL_A = 0x7DA // 2010 ++ SYS___WCSTOUL_A = 0x7DB // 2011 ++ SYS___BASENAME_A = 0x7DC // 2012 ++ SYS___DIRNAME_A = 0x7DD // 2013 ++ SYS___GLOB_A = 0x7DE // 2014 ++ SYS_FWIDE = 0x7DF // 2015 ++ SYS___OSNAME = 0x7E0 // 2016 ++ SYS_____OSNAME_A = 0x7E1 // 2017 ++ SYS___BTOWC_A = 0x7E4 // 2020 ++ SYS___WCTOB_A = 0x7E5 // 2021 ++ SYS___DBM_OPEN_A = 0x7E6 // 2022 ++ SYS___VFPRINTF2_A = 0x7E7 // 2023 ++ SYS___VPRINTF2_A = 0x7E8 // 2024 ++ SYS___VSPRINTF2_A = 0x7E9 // 2025 ++ SYS___CEIL_H = 0x7EA // 2026 ++ SYS___FLOOR_H = 0x7EB // 2027 ++ SYS___MODF_H = 0x7EC // 2028 ++ SYS___FABS_H = 0x7ED // 2029 ++ SYS___J0_H = 0x7EE // 2030 ++ SYS___J1_H = 0x7EF // 2031 ++ SYS___JN_H = 0x7F0 // 2032 ++ SYS___Y0_H = 0x7F1 // 2033 ++ SYS___Y1_H = 0x7F2 // 2034 ++ SYS___YN_H = 0x7F3 // 2035 ++ SYS___CEILF_H = 0x7F4 // 2036 ++ SYS___CEILL_H = 0x7F5 // 2037 ++ SYS___FLOORF_H = 0x7F6 // 2038 ++ SYS___FLOORL_H = 0x7F7 // 2039 ++ SYS___MODFF_H = 0x7F8 // 2040 ++ SYS___MODFL_H = 0x7F9 // 2041 ++ SYS___FABSF_H = 0x7FA // 2042 ++ SYS___FABSL_H = 0x7FB // 2043 ++ SYS___MALLOC24 = 0x7FC // 2044 ++ SYS___MALLOC31 = 0x7FD // 2045 ++ SYS_ACL_INIT = 0x7FE // 2046 ++ SYS_ACL_FREE = 0x7FF // 2047 ++ SYS_ACL_FIRST_ENTRY = 0x800 // 2048 ++ SYS_ACL_GET_ENTRY = 0x801 // 2049 ++ SYS_ACL_VALID = 0x802 // 2050 ++ SYS_ACL_CREATE_ENTRY = 0x803 // 2051 ++ SYS_ACL_DELETE_ENTRY = 0x804 // 2052 ++ SYS_ACL_UPDATE_ENTRY = 0x805 // 2053 ++ SYS_ACL_DELETE_FD = 0x806 // 2054 ++ SYS_ACL_DELETE_FILE = 0x807 // 2055 ++ SYS_ACL_GET_FD = 0x808 // 2056 ++ SYS_ACL_GET_FILE = 0x809 // 2057 ++ SYS_ACL_SET_FD = 0x80A // 2058 ++ SYS_ACL_SET_FILE = 0x80B // 2059 ++ SYS_ACL_FROM_TEXT = 0x80C // 2060 ++ SYS_ACL_TO_TEXT = 0x80D // 2061 ++ SYS_ACL_SORT = 0x80E // 2062 ++ SYS___SHUTDOWN_REGISTRATION = 0x80F // 2063 ++ SYS___ERFL_B = 0x810 // 2064 ++ SYS___ERFCL_B = 0x811 // 2065 ++ SYS___LGAMMAL_B = 0x812 // 2066 ++ SYS___SETHOOKEVENTS = 0x813 // 2067 ++ SYS_IF_NAMETOINDEX = 0x814 // 2068 ++ SYS_IF_INDEXTONAME = 0x815 // 2069 ++ SYS_IF_NAMEINDEX = 0x816 // 2070 ++ SYS_IF_FREENAMEINDEX = 0x817 // 2071 ++ SYS_GETADDRINFO = 0x818 // 2072 ++ SYS_GETNAMEINFO = 0x819 // 2073 ++ SYS_FREEADDRINFO = 0x81A // 2074 ++ SYS_GAI_STRERROR = 0x81B // 2075 ++ SYS_REXEC_AF = 0x81C // 2076 ++ SYS___POE = 0x81D // 2077 ++ SYS___DYNALLOC_A = 0x81F // 2079 ++ SYS___DYNFREE_A = 0x820 // 2080 ++ SYS___RES_QUERY_A = 0x821 // 2081 ++ SYS___RES_SEARCH_A = 0x822 // 2082 ++ SYS___RES_QUERYDOMAIN_A = 0x823 // 2083 ++ SYS___RES_MKQUERY_A = 0x824 // 2084 ++ SYS___RES_SEND_A = 0x825 // 2085 ++ SYS___DN_EXPAND_A = 0x826 // 2086 ++ SYS___DN_SKIPNAME_A = 0x827 // 2087 ++ SYS___DN_COMP_A = 0x828 // 2088 ++ SYS___DN_FIND_A = 0x829 // 2089 ++ SYS___NLIST_A = 0x82A // 2090 ++ SYS_____TCGETCP_A = 0x82B // 2091 ++ SYS_____TCSETCP_A = 0x82C // 2092 ++ SYS_____W_PIOCTL_A = 0x82E // 2094 ++ SYS___INET_ADDR_A = 0x82F // 2095 ++ SYS___INET_NTOA_A = 0x830 // 2096 ++ SYS___INET_NETWORK_A = 0x831 // 2097 ++ SYS___ACCEPT_A = 0x832 // 2098 ++ SYS___ACCEPT_AND_RECV_A = 0x833 // 2099 ++ SYS___BIND_A = 0x834 // 2100 ++ SYS___CONNECT_A = 0x835 // 2101 ++ SYS___GETPEERNAME_A = 0x836 // 2102 ++ SYS___GETSOCKNAME_A = 0x837 // 2103 ++ SYS___RECVFROM_A = 0x838 // 2104 ++ SYS___SENDTO_A = 0x839 // 2105 ++ SYS___SENDMSG_A = 0x83A // 2106 ++ SYS___RECVMSG_A = 0x83B // 2107 ++ SYS_____LCHATTR_A = 0x83C // 2108 ++ SYS___CABEND = 0x83D // 2109 ++ SYS___LE_CIB_GET = 0x83E // 2110 ++ SYS___SET_LAA_FOR_JIT = 0x83F // 2111 ++ SYS___LCHATTR = 0x840 // 2112 ++ SYS___WRITEDOWN = 0x841 // 2113 ++ SYS_PTHREAD_MUTEX_INIT2 = 0x842 // 2114 ++ SYS___ACOSHF_B = 0x843 // 2115 ++ SYS___ACOSHL_B = 0x844 // 2116 ++ SYS___ASINHF_B = 0x845 // 2117 ++ SYS___ASINHL_B = 0x846 // 2118 ++ SYS___ATANHF_B = 0x847 // 2119 ++ SYS___ATANHL_B = 0x848 // 2120 ++ SYS___CBRTF_B = 0x849 // 2121 ++ SYS___CBRTL_B = 0x84A // 2122 ++ SYS___COPYSIGNF_B = 0x84B // 2123 ++ SYS___COPYSIGNL_B = 0x84C // 2124 ++ SYS___COTANF_B = 0x84D // 2125 ++ SYS___COTAN_B = 0x84E // 2126 ++ SYS___COTANL_B = 0x84F // 2127 ++ SYS___EXP2F_B = 0x850 // 2128 ++ SYS___EXP2L_B = 0x851 // 2129 ++ SYS___EXPM1F_B = 0x852 // 2130 ++ SYS___EXPM1L_B = 0x853 // 2131 ++ SYS___FDIMF_B = 0x854 // 2132 ++ SYS___FDIM_B = 0x855 // 2133 ++ SYS___FDIML_B = 0x856 // 2134 ++ SYS___HYPOTF_B = 0x857 // 2135 ++ SYS___HYPOTL_B = 0x858 // 2136 ++ SYS___LOG1PF_B = 0x859 // 2137 ++ SYS___LOG1PL_B = 0x85A // 2138 ++ SYS___LOG2F_B = 0x85B // 2139 ++ SYS___LOG2_B = 0x85C // 2140 ++ SYS___LOG2L_B = 0x85D // 2141 ++ SYS___REMAINDERF_B = 0x85E // 2142 ++ SYS___REMAINDERL_B = 0x85F // 2143 ++ SYS___REMQUOF_B = 0x860 // 2144 ++ SYS___REMQUO_B = 0x861 // 2145 ++ SYS___REMQUOL_B = 0x862 // 2146 ++ SYS___TGAMMAF_B = 0x863 // 2147 ++ SYS___TGAMMA_B = 0x864 // 2148 ++ SYS___TGAMMAL_B = 0x865 // 2149 ++ SYS___TRUNCF_B = 0x866 // 2150 ++ SYS___TRUNC_B = 0x867 // 2151 ++ SYS___TRUNCL_B = 0x868 // 2152 ++ SYS___LGAMMAF_B = 0x869 // 2153 ++ SYS___LROUNDF_B = 0x86A // 2154 ++ SYS___LROUND_B = 0x86B // 2155 ++ SYS___ERFF_B = 0x86C // 2156 ++ SYS___ERFCF_B = 0x86D // 2157 ++ SYS_ACOSHF = 0x86E // 2158 ++ SYS_ACOSHL = 0x86F // 2159 ++ SYS_ASINHF = 0x870 // 2160 ++ SYS_ASINHL = 0x871 // 2161 ++ SYS_ATANHF = 0x872 // 2162 ++ SYS_ATANHL = 0x873 // 2163 ++ SYS_CBRTF = 0x874 // 2164 ++ SYS_CBRTL = 0x875 // 2165 ++ SYS_COPYSIGNF = 0x876 // 2166 ++ SYS_CPYSIGNF = 0x876 // 2166 ++ SYS_COPYSIGNL = 0x877 // 2167 ++ SYS_CPYSIGNL = 0x877 // 2167 ++ SYS_COTANF = 0x878 // 2168 ++ SYS___COTANF = 0x878 // 2168 ++ SYS_COTAN = 0x879 // 2169 ++ SYS___COTAN = 0x879 // 2169 ++ SYS_COTANL = 0x87A // 2170 ++ SYS___COTANL = 0x87A // 2170 ++ SYS_EXP2F = 0x87B // 2171 ++ SYS_EXP2L = 0x87C // 2172 ++ SYS_EXPM1F = 0x87D // 2173 ++ SYS_EXPM1L = 0x87E // 2174 ++ SYS_FDIMF = 0x87F // 2175 ++ SYS_FDIM = 0x881 // 2177 ++ SYS_FDIML = 0x882 // 2178 ++ SYS_HYPOTF = 0x883 // 2179 ++ SYS_HYPOTL = 0x884 // 2180 ++ SYS_LOG1PF = 0x885 // 2181 ++ SYS_LOG1PL = 0x886 // 2182 ++ SYS_LOG2F = 0x887 // 2183 ++ SYS_LOG2 = 0x888 // 2184 ++ SYS_LOG2L = 0x889 // 2185 ++ SYS_REMAINDERF = 0x88A // 2186 ++ SYS_REMAINDF = 0x88A // 2186 ++ SYS_REMAINDERL = 0x88B // 2187 ++ SYS_REMAINDL = 0x88B // 2187 ++ SYS_REMQUOF = 0x88C // 2188 ++ SYS_REMQUO = 0x88D // 2189 ++ SYS_REMQUOL = 0x88E // 2190 ++ SYS_TGAMMAF = 0x88F // 2191 ++ SYS_TGAMMA = 0x890 // 2192 ++ SYS_TGAMMAL = 0x891 // 2193 ++ SYS_TRUNCF = 0x892 // 2194 ++ SYS_TRUNC = 0x893 // 2195 ++ SYS_TRUNCL = 0x894 // 2196 ++ SYS_LGAMMAF = 0x895 // 2197 ++ SYS_LGAMMAL = 0x896 // 2198 ++ SYS_LROUNDF = 0x897 // 2199 ++ SYS_LROUND = 0x898 // 2200 ++ SYS_ERFF = 0x899 // 2201 ++ SYS_ERFL = 0x89A // 2202 ++ SYS_ERFCF = 0x89B // 2203 ++ SYS_ERFCL = 0x89C // 2204 ++ SYS___EXP2_B = 0x89D // 2205 ++ SYS_EXP2 = 0x89E // 2206 ++ SYS___FAR_JUMP = 0x89F // 2207 ++ SYS___TCGETATTR_A = 0x8A1 // 2209 ++ SYS___TCSETATTR_A = 0x8A2 // 2210 ++ SYS___SUPERKILL = 0x8A4 // 2212 ++ SYS___LE_CONDITION_TOKEN_BUILD = 0x8A5 // 2213 ++ SYS___LE_MSG_ADD_INSERT = 0x8A6 // 2214 ++ SYS___LE_MSG_GET = 0x8A7 // 2215 ++ SYS___LE_MSG_GET_AND_WRITE = 0x8A8 // 2216 ++ SYS___LE_MSG_WRITE = 0x8A9 // 2217 ++ SYS___ITOA = 0x8AA // 2218 ++ SYS___UTOA = 0x8AB // 2219 ++ SYS___LTOA = 0x8AC // 2220 ++ SYS___ULTOA = 0x8AD // 2221 ++ SYS___LLTOA = 0x8AE // 2222 ++ SYS___ULLTOA = 0x8AF // 2223 ++ SYS___ITOA_A = 0x8B0 // 2224 ++ SYS___UTOA_A = 0x8B1 // 2225 ++ SYS___LTOA_A = 0x8B2 // 2226 ++ SYS___ULTOA_A = 0x8B3 // 2227 ++ SYS___LLTOA_A = 0x8B4 // 2228 ++ SYS___ULLTOA_A = 0x8B5 // 2229 ++ SYS_____GETENV_A = 0x8C3 // 2243 ++ SYS___REXEC_A = 0x8C4 // 2244 ++ SYS___REXEC_AF_A = 0x8C5 // 2245 ++ SYS___GETUTXENT_A = 0x8C6 // 2246 ++ SYS___GETUTXID_A = 0x8C7 // 2247 ++ SYS___GETUTXLINE_A = 0x8C8 // 2248 ++ SYS___PUTUTXLINE_A = 0x8C9 // 2249 ++ SYS_____UTMPXNAME_A = 0x8CA // 2250 ++ SYS___PUTC_UNLOCKED_A = 0x8CB // 2251 ++ SYS___PUTCHAR_UNLOCKED_A = 0x8CC // 2252 ++ SYS___SNPRINTF_A = 0x8CD // 2253 ++ SYS___VSNPRINTF_A = 0x8CE // 2254 ++ SYS___DLOPEN_A = 0x8D0 // 2256 ++ SYS___DLSYM_A = 0x8D1 // 2257 ++ SYS___DLERROR_A = 0x8D2 // 2258 ++ SYS_FLOCKFILE = 0x8D3 // 2259 ++ SYS_FTRYLOCKFILE = 0x8D4 // 2260 ++ SYS_FUNLOCKFILE = 0x8D5 // 2261 ++ SYS_GETC_UNLOCKED = 0x8D6 // 2262 ++ SYS_GETCHAR_UNLOCKED = 0x8D7 // 2263 ++ SYS_PUTC_UNLOCKED = 0x8D8 // 2264 ++ SYS_PUTCHAR_UNLOCKED = 0x8D9 // 2265 ++ SYS_SNPRINTF = 0x8DA // 2266 ++ SYS_VSNPRINTF = 0x8DB // 2267 ++ SYS_DLOPEN = 0x8DD // 2269 ++ SYS_DLSYM = 0x8DE // 2270 ++ SYS_DLCLOSE = 0x8DF // 2271 ++ SYS_DLERROR = 0x8E0 // 2272 ++ SYS___SET_EXCEPTION_HANDLER = 0x8E2 // 2274 ++ SYS___RESET_EXCEPTION_HANDLER = 0x8E3 // 2275 ++ SYS___VHM_EVENT = 0x8E4 // 2276 ++ SYS___ABS_H = 0x8E6 // 2278 ++ SYS___ABSF_H = 0x8E7 // 2279 ++ SYS___ABSL_H = 0x8E8 // 2280 ++ SYS___ACOS_H = 0x8E9 // 2281 ++ SYS___ACOSF_H = 0x8EA // 2282 ++ SYS___ACOSL_H = 0x8EB // 2283 ++ SYS___ACOSH_H = 0x8EC // 2284 ++ SYS___ASIN_H = 0x8ED // 2285 ++ SYS___ASINF_H = 0x8EE // 2286 ++ SYS___ASINL_H = 0x8EF // 2287 ++ SYS___ASINH_H = 0x8F0 // 2288 ++ SYS___ATAN_H = 0x8F1 // 2289 ++ SYS___ATANF_H = 0x8F2 // 2290 ++ SYS___ATANL_H = 0x8F3 // 2291 ++ SYS___ATANH_H = 0x8F4 // 2292 ++ SYS___ATANHF_H = 0x8F5 // 2293 ++ SYS___ATANHL_H = 0x8F6 // 2294 ++ SYS___ATAN2_H = 0x8F7 // 2295 ++ SYS___ATAN2F_H = 0x8F8 // 2296 ++ SYS___ATAN2L_H = 0x8F9 // 2297 ++ SYS___CBRT_H = 0x8FA // 2298 ++ SYS___COPYSIGNF_H = 0x8FB // 2299 ++ SYS___COPYSIGNL_H = 0x8FC // 2300 ++ SYS___COS_H = 0x8FD // 2301 ++ SYS___COSF_H = 0x8FE // 2302 ++ SYS___COSL_H = 0x8FF // 2303 ++ SYS___COSHF_H = 0x900 // 2304 ++ SYS___COSHL_H = 0x901 // 2305 ++ SYS___COTAN_H = 0x902 // 2306 ++ SYS___COTANF_H = 0x903 // 2307 ++ SYS___COTANL_H = 0x904 // 2308 ++ SYS___ERF_H = 0x905 // 2309 ++ SYS___ERFF_H = 0x906 // 2310 ++ SYS___ERFL_H = 0x907 // 2311 ++ SYS___ERFC_H = 0x908 // 2312 ++ SYS___ERFCF_H = 0x909 // 2313 ++ SYS___ERFCL_H = 0x90A // 2314 ++ SYS___EXP_H = 0x90B // 2315 ++ SYS___EXPF_H = 0x90C // 2316 ++ SYS___EXPL_H = 0x90D // 2317 ++ SYS___EXPM1_H = 0x90E // 2318 ++ SYS___FDIM_H = 0x90F // 2319 ++ SYS___FDIMF_H = 0x910 // 2320 ++ SYS___FDIML_H = 0x911 // 2321 ++ SYS___FMOD_H = 0x912 // 2322 ++ SYS___FMODF_H = 0x913 // 2323 ++ SYS___FMODL_H = 0x914 // 2324 ++ SYS___GAMMA_H = 0x915 // 2325 ++ SYS___HYPOT_H = 0x916 // 2326 ++ SYS___ILOGB_H = 0x917 // 2327 ++ SYS___LGAMMA_H = 0x918 // 2328 ++ SYS___LGAMMAF_H = 0x919 // 2329 ++ SYS___LOG_H = 0x91A // 2330 ++ SYS___LOGF_H = 0x91B // 2331 ++ SYS___LOGL_H = 0x91C // 2332 ++ SYS___LOGB_H = 0x91D // 2333 ++ SYS___LOG2_H = 0x91E // 2334 ++ SYS___LOG2F_H = 0x91F // 2335 ++ SYS___LOG2L_H = 0x920 // 2336 ++ SYS___LOG1P_H = 0x921 // 2337 ++ SYS___LOG10_H = 0x922 // 2338 ++ SYS___LOG10F_H = 0x923 // 2339 ++ SYS___LOG10L_H = 0x924 // 2340 ++ SYS___LROUND_H = 0x925 // 2341 ++ SYS___LROUNDF_H = 0x926 // 2342 ++ SYS___NEXTAFTER_H = 0x927 // 2343 ++ SYS___POW_H = 0x928 // 2344 ++ SYS___POWF_H = 0x929 // 2345 ++ SYS___POWL_H = 0x92A // 2346 ++ SYS___REMAINDER_H = 0x92B // 2347 ++ SYS___RINT_H = 0x92C // 2348 ++ SYS___SCALB_H = 0x92D // 2349 ++ SYS___SIN_H = 0x92E // 2350 ++ SYS___SINF_H = 0x92F // 2351 ++ SYS___SINL_H = 0x930 // 2352 ++ SYS___SINH_H = 0x931 // 2353 ++ SYS___SINHF_H = 0x932 // 2354 ++ SYS___SINHL_H = 0x933 // 2355 ++ SYS___SQRT_H = 0x934 // 2356 ++ SYS___SQRTF_H = 0x935 // 2357 ++ SYS___SQRTL_H = 0x936 // 2358 ++ SYS___TAN_H = 0x937 // 2359 ++ SYS___TANF_H = 0x938 // 2360 ++ SYS___TANL_H = 0x939 // 2361 ++ SYS___TANH_H = 0x93A // 2362 ++ SYS___TANHF_H = 0x93B // 2363 ++ SYS___TANHL_H = 0x93C // 2364 ++ SYS___TGAMMA_H = 0x93D // 2365 ++ SYS___TGAMMAF_H = 0x93E // 2366 ++ SYS___TRUNC_H = 0x93F // 2367 ++ SYS___TRUNCF_H = 0x940 // 2368 ++ SYS___TRUNCL_H = 0x941 // 2369 ++ SYS___COSH_H = 0x942 // 2370 ++ SYS___LE_DEBUG_SET_RESUME_MCH = 0x943 // 2371 ++ SYS_VFSCANF = 0x944 // 2372 ++ SYS_VSCANF = 0x946 // 2374 ++ SYS_VSSCANF = 0x948 // 2376 ++ SYS_VFWSCANF = 0x94A // 2378 ++ SYS_VWSCANF = 0x94C // 2380 ++ SYS_VSWSCANF = 0x94E // 2382 ++ SYS_IMAXABS = 0x950 // 2384 ++ SYS_IMAXDIV = 0x951 // 2385 ++ SYS_STRTOIMAX = 0x952 // 2386 ++ SYS_STRTOUMAX = 0x953 // 2387 ++ SYS_WCSTOIMAX = 0x954 // 2388 ++ SYS_WCSTOUMAX = 0x955 // 2389 ++ SYS_ATOLL = 0x956 // 2390 ++ SYS_STRTOF = 0x957 // 2391 ++ SYS_STRTOLD = 0x958 // 2392 ++ SYS_WCSTOF = 0x959 // 2393 ++ SYS_WCSTOLD = 0x95A // 2394 ++ SYS_INET6_RTH_SPACE = 0x95B // 2395 ++ SYS_INET6_RTH_INIT = 0x95C // 2396 ++ SYS_INET6_RTH_ADD = 0x95D // 2397 ++ SYS_INET6_RTH_REVERSE = 0x95E // 2398 ++ SYS_INET6_RTH_SEGMENTS = 0x95F // 2399 ++ SYS_INET6_RTH_GETADDR = 0x960 // 2400 ++ SYS_INET6_OPT_INIT = 0x961 // 2401 ++ SYS_INET6_OPT_APPEND = 0x962 // 2402 ++ SYS_INET6_OPT_FINISH = 0x963 // 2403 ++ SYS_INET6_OPT_SET_VAL = 0x964 // 2404 ++ SYS_INET6_OPT_NEXT = 0x965 // 2405 ++ SYS_INET6_OPT_FIND = 0x966 // 2406 ++ SYS_INET6_OPT_GET_VAL = 0x967 // 2407 ++ SYS___POW_I = 0x987 // 2439 ++ SYS___POW_I_B = 0x988 // 2440 ++ SYS___POW_I_H = 0x989 // 2441 ++ SYS___POW_II = 0x98A // 2442 ++ SYS___POW_II_B = 0x98B // 2443 ++ SYS___POW_II_H = 0x98C // 2444 ++ SYS_CABS = 0x98E // 2446 ++ SYS___CABS_B = 0x98F // 2447 ++ SYS___CABS_H = 0x990 // 2448 ++ SYS_CABSF = 0x991 // 2449 ++ SYS___CABSF_B = 0x992 // 2450 ++ SYS___CABSF_H = 0x993 // 2451 ++ SYS_CABSL = 0x994 // 2452 ++ SYS___CABSL_B = 0x995 // 2453 ++ SYS___CABSL_H = 0x996 // 2454 ++ SYS_CACOS = 0x997 // 2455 ++ SYS___CACOS_B = 0x998 // 2456 ++ SYS___CACOS_H = 0x999 // 2457 ++ SYS_CACOSF = 0x99A // 2458 ++ SYS___CACOSF_B = 0x99B // 2459 ++ SYS___CACOSF_H = 0x99C // 2460 ++ SYS_CACOSL = 0x99D // 2461 ++ SYS___CACOSL_B = 0x99E // 2462 ++ SYS___CACOSL_H = 0x99F // 2463 ++ SYS_CACOSH = 0x9A0 // 2464 ++ SYS___CACOSH_B = 0x9A1 // 2465 ++ SYS___CACOSH_H = 0x9A2 // 2466 ++ SYS_CACOSHF = 0x9A3 // 2467 ++ SYS___CACOSHF_B = 0x9A4 // 2468 ++ SYS___CACOSHF_H = 0x9A5 // 2469 ++ SYS_CACOSHL = 0x9A6 // 2470 ++ SYS___CACOSHL_B = 0x9A7 // 2471 ++ SYS___CACOSHL_H = 0x9A8 // 2472 ++ SYS_CARG = 0x9A9 // 2473 ++ SYS___CARG_B = 0x9AA // 2474 ++ SYS___CARG_H = 0x9AB // 2475 ++ SYS_CARGF = 0x9AC // 2476 ++ SYS___CARGF_B = 0x9AD // 2477 ++ SYS___CARGF_H = 0x9AE // 2478 ++ SYS_CARGL = 0x9AF // 2479 ++ SYS___CARGL_B = 0x9B0 // 2480 ++ SYS___CARGL_H = 0x9B1 // 2481 ++ SYS_CASIN = 0x9B2 // 2482 ++ SYS___CASIN_B = 0x9B3 // 2483 ++ SYS___CASIN_H = 0x9B4 // 2484 ++ SYS_CASINF = 0x9B5 // 2485 ++ SYS___CASINF_B = 0x9B6 // 2486 ++ SYS___CASINF_H = 0x9B7 // 2487 ++ SYS_CASINL = 0x9B8 // 2488 ++ SYS___CASINL_B = 0x9B9 // 2489 ++ SYS___CASINL_H = 0x9BA // 2490 ++ SYS_CASINH = 0x9BB // 2491 ++ SYS___CASINH_B = 0x9BC // 2492 ++ SYS___CASINH_H = 0x9BD // 2493 ++ SYS_CASINHF = 0x9BE // 2494 ++ SYS___CASINHF_B = 0x9BF // 2495 ++ SYS___CASINHF_H = 0x9C0 // 2496 ++ SYS_CASINHL = 0x9C1 // 2497 ++ SYS___CASINHL_B = 0x9C2 // 2498 ++ SYS___CASINHL_H = 0x9C3 // 2499 ++ SYS_CATAN = 0x9C4 // 2500 ++ SYS___CATAN_B = 0x9C5 // 2501 ++ SYS___CATAN_H = 0x9C6 // 2502 ++ SYS_CATANF = 0x9C7 // 2503 ++ SYS___CATANF_B = 0x9C8 // 2504 ++ SYS___CATANF_H = 0x9C9 // 2505 ++ SYS_CATANL = 0x9CA // 2506 ++ SYS___CATANL_B = 0x9CB // 2507 ++ SYS___CATANL_H = 0x9CC // 2508 ++ SYS_CATANH = 0x9CD // 2509 ++ SYS___CATANH_B = 0x9CE // 2510 ++ SYS___CATANH_H = 0x9CF // 2511 ++ SYS_CATANHF = 0x9D0 // 2512 ++ SYS___CATANHF_B = 0x9D1 // 2513 ++ SYS___CATANHF_H = 0x9D2 // 2514 ++ SYS_CATANHL = 0x9D3 // 2515 ++ SYS___CATANHL_B = 0x9D4 // 2516 ++ SYS___CATANHL_H = 0x9D5 // 2517 ++ SYS_CCOS = 0x9D6 // 2518 ++ SYS___CCOS_B = 0x9D7 // 2519 ++ SYS___CCOS_H = 0x9D8 // 2520 ++ SYS_CCOSF = 0x9D9 // 2521 ++ SYS___CCOSF_B = 0x9DA // 2522 ++ SYS___CCOSF_H = 0x9DB // 2523 ++ SYS_CCOSL = 0x9DC // 2524 ++ SYS___CCOSL_B = 0x9DD // 2525 ++ SYS___CCOSL_H = 0x9DE // 2526 ++ SYS_CCOSH = 0x9DF // 2527 ++ SYS___CCOSH_B = 0x9E0 // 2528 ++ SYS___CCOSH_H = 0x9E1 // 2529 ++ SYS_CCOSHF = 0x9E2 // 2530 ++ SYS___CCOSHF_B = 0x9E3 // 2531 ++ SYS___CCOSHF_H = 0x9E4 // 2532 ++ SYS_CCOSHL = 0x9E5 // 2533 ++ SYS___CCOSHL_B = 0x9E6 // 2534 ++ SYS___CCOSHL_H = 0x9E7 // 2535 ++ SYS_CEXP = 0x9E8 // 2536 ++ SYS___CEXP_B = 0x9E9 // 2537 ++ SYS___CEXP_H = 0x9EA // 2538 ++ SYS_CEXPF = 0x9EB // 2539 ++ SYS___CEXPF_B = 0x9EC // 2540 ++ SYS___CEXPF_H = 0x9ED // 2541 ++ SYS_CEXPL = 0x9EE // 2542 ++ SYS___CEXPL_B = 0x9EF // 2543 ++ SYS___CEXPL_H = 0x9F0 // 2544 ++ SYS_CIMAG = 0x9F1 // 2545 ++ SYS___CIMAG_B = 0x9F2 // 2546 ++ SYS___CIMAG_H = 0x9F3 // 2547 ++ SYS_CIMAGF = 0x9F4 // 2548 ++ SYS___CIMAGF_B = 0x9F5 // 2549 ++ SYS___CIMAGF_H = 0x9F6 // 2550 ++ SYS_CIMAGL = 0x9F7 // 2551 ++ SYS___CIMAGL_B = 0x9F8 // 2552 ++ SYS___CIMAGL_H = 0x9F9 // 2553 ++ SYS___CLOG = 0x9FA // 2554 ++ SYS___CLOG_B = 0x9FB // 2555 ++ SYS___CLOG_H = 0x9FC // 2556 ++ SYS_CLOGF = 0x9FD // 2557 ++ SYS___CLOGF_B = 0x9FE // 2558 ++ SYS___CLOGF_H = 0x9FF // 2559 ++ SYS_CLOGL = 0xA00 // 2560 ++ SYS___CLOGL_B = 0xA01 // 2561 ++ SYS___CLOGL_H = 0xA02 // 2562 ++ SYS_CONJ = 0xA03 // 2563 ++ SYS___CONJ_B = 0xA04 // 2564 ++ SYS___CONJ_H = 0xA05 // 2565 ++ SYS_CONJF = 0xA06 // 2566 ++ SYS___CONJF_B = 0xA07 // 2567 ++ SYS___CONJF_H = 0xA08 // 2568 ++ SYS_CONJL = 0xA09 // 2569 ++ SYS___CONJL_B = 0xA0A // 2570 ++ SYS___CONJL_H = 0xA0B // 2571 ++ SYS_CPOW = 0xA0C // 2572 ++ SYS___CPOW_B = 0xA0D // 2573 ++ SYS___CPOW_H = 0xA0E // 2574 ++ SYS_CPOWF = 0xA0F // 2575 ++ SYS___CPOWF_B = 0xA10 // 2576 ++ SYS___CPOWF_H = 0xA11 // 2577 ++ SYS_CPOWL = 0xA12 // 2578 ++ SYS___CPOWL_B = 0xA13 // 2579 ++ SYS___CPOWL_H = 0xA14 // 2580 ++ SYS_CPROJ = 0xA15 // 2581 ++ SYS___CPROJ_B = 0xA16 // 2582 ++ SYS___CPROJ_H = 0xA17 // 2583 ++ SYS_CPROJF = 0xA18 // 2584 ++ SYS___CPROJF_B = 0xA19 // 2585 ++ SYS___CPROJF_H = 0xA1A // 2586 ++ SYS_CPROJL = 0xA1B // 2587 ++ SYS___CPROJL_B = 0xA1C // 2588 ++ SYS___CPROJL_H = 0xA1D // 2589 ++ SYS_CREAL = 0xA1E // 2590 ++ SYS___CREAL_B = 0xA1F // 2591 ++ SYS___CREAL_H = 0xA20 // 2592 ++ SYS_CREALF = 0xA21 // 2593 ++ SYS___CREALF_B = 0xA22 // 2594 ++ SYS___CREALF_H = 0xA23 // 2595 ++ SYS_CREALL = 0xA24 // 2596 ++ SYS___CREALL_B = 0xA25 // 2597 ++ SYS___CREALL_H = 0xA26 // 2598 ++ SYS_CSIN = 0xA27 // 2599 ++ SYS___CSIN_B = 0xA28 // 2600 ++ SYS___CSIN_H = 0xA29 // 2601 ++ SYS_CSINF = 0xA2A // 2602 ++ SYS___CSINF_B = 0xA2B // 2603 ++ SYS___CSINF_H = 0xA2C // 2604 ++ SYS_CSINL = 0xA2D // 2605 ++ SYS___CSINL_B = 0xA2E // 2606 ++ SYS___CSINL_H = 0xA2F // 2607 ++ SYS_CSINH = 0xA30 // 2608 ++ SYS___CSINH_B = 0xA31 // 2609 ++ SYS___CSINH_H = 0xA32 // 2610 ++ SYS_CSINHF = 0xA33 // 2611 ++ SYS___CSINHF_B = 0xA34 // 2612 ++ SYS___CSINHF_H = 0xA35 // 2613 ++ SYS_CSINHL = 0xA36 // 2614 ++ SYS___CSINHL_B = 0xA37 // 2615 ++ SYS___CSINHL_H = 0xA38 // 2616 ++ SYS_CSQRT = 0xA39 // 2617 ++ SYS___CSQRT_B = 0xA3A // 2618 ++ SYS___CSQRT_H = 0xA3B // 2619 ++ SYS_CSQRTF = 0xA3C // 2620 ++ SYS___CSQRTF_B = 0xA3D // 2621 ++ SYS___CSQRTF_H = 0xA3E // 2622 ++ SYS_CSQRTL = 0xA3F // 2623 ++ SYS___CSQRTL_B = 0xA40 // 2624 ++ SYS___CSQRTL_H = 0xA41 // 2625 ++ SYS_CTAN = 0xA42 // 2626 ++ SYS___CTAN_B = 0xA43 // 2627 ++ SYS___CTAN_H = 0xA44 // 2628 ++ SYS_CTANF = 0xA45 // 2629 ++ SYS___CTANF_B = 0xA46 // 2630 ++ SYS___CTANF_H = 0xA47 // 2631 ++ SYS_CTANL = 0xA48 // 2632 ++ SYS___CTANL_B = 0xA49 // 2633 ++ SYS___CTANL_H = 0xA4A // 2634 ++ SYS_CTANH = 0xA4B // 2635 ++ SYS___CTANH_B = 0xA4C // 2636 ++ SYS___CTANH_H = 0xA4D // 2637 ++ SYS_CTANHF = 0xA4E // 2638 ++ SYS___CTANHF_B = 0xA4F // 2639 ++ SYS___CTANHF_H = 0xA50 // 2640 ++ SYS_CTANHL = 0xA51 // 2641 ++ SYS___CTANHL_B = 0xA52 // 2642 ++ SYS___CTANHL_H = 0xA53 // 2643 ++ SYS___ACOSHF_H = 0xA54 // 2644 ++ SYS___ACOSHL_H = 0xA55 // 2645 ++ SYS___ASINHF_H = 0xA56 // 2646 ++ SYS___ASINHL_H = 0xA57 // 2647 ++ SYS___CBRTF_H = 0xA58 // 2648 ++ SYS___CBRTL_H = 0xA59 // 2649 ++ SYS___COPYSIGN_B = 0xA5A // 2650 ++ SYS___EXPM1F_H = 0xA5B // 2651 ++ SYS___EXPM1L_H = 0xA5C // 2652 ++ SYS___EXP2_H = 0xA5D // 2653 ++ SYS___EXP2F_H = 0xA5E // 2654 ++ SYS___EXP2L_H = 0xA5F // 2655 ++ SYS___LOG1PF_H = 0xA60 // 2656 ++ SYS___LOG1PL_H = 0xA61 // 2657 ++ SYS___LGAMMAL_H = 0xA62 // 2658 ++ SYS_FMA = 0xA63 // 2659 ++ SYS___FMA_B = 0xA64 // 2660 ++ SYS___FMA_H = 0xA65 // 2661 ++ SYS_FMAF = 0xA66 // 2662 ++ SYS___FMAF_B = 0xA67 // 2663 ++ SYS___FMAF_H = 0xA68 // 2664 ++ SYS_FMAL = 0xA69 // 2665 ++ SYS___FMAL_B = 0xA6A // 2666 ++ SYS___FMAL_H = 0xA6B // 2667 ++ SYS_FMAX = 0xA6C // 2668 ++ SYS___FMAX_B = 0xA6D // 2669 ++ SYS___FMAX_H = 0xA6E // 2670 ++ SYS_FMAXF = 0xA6F // 2671 ++ SYS___FMAXF_B = 0xA70 // 2672 ++ SYS___FMAXF_H = 0xA71 // 2673 ++ SYS_FMAXL = 0xA72 // 2674 ++ SYS___FMAXL_B = 0xA73 // 2675 ++ SYS___FMAXL_H = 0xA74 // 2676 ++ SYS_FMIN = 0xA75 // 2677 ++ SYS___FMIN_B = 0xA76 // 2678 ++ SYS___FMIN_H = 0xA77 // 2679 ++ SYS_FMINF = 0xA78 // 2680 ++ SYS___FMINF_B = 0xA79 // 2681 ++ SYS___FMINF_H = 0xA7A // 2682 ++ SYS_FMINL = 0xA7B // 2683 ++ SYS___FMINL_B = 0xA7C // 2684 ++ SYS___FMINL_H = 0xA7D // 2685 ++ SYS_ILOGBF = 0xA7E // 2686 ++ SYS___ILOGBF_B = 0xA7F // 2687 ++ SYS___ILOGBF_H = 0xA80 // 2688 ++ SYS_ILOGBL = 0xA81 // 2689 ++ SYS___ILOGBL_B = 0xA82 // 2690 ++ SYS___ILOGBL_H = 0xA83 // 2691 ++ SYS_LLRINT = 0xA84 // 2692 ++ SYS___LLRINT_B = 0xA85 // 2693 ++ SYS___LLRINT_H = 0xA86 // 2694 ++ SYS_LLRINTF = 0xA87 // 2695 ++ SYS___LLRINTF_B = 0xA88 // 2696 ++ SYS___LLRINTF_H = 0xA89 // 2697 ++ SYS_LLRINTL = 0xA8A // 2698 ++ SYS___LLRINTL_B = 0xA8B // 2699 ++ SYS___LLRINTL_H = 0xA8C // 2700 ++ SYS_LLROUND = 0xA8D // 2701 ++ SYS___LLROUND_B = 0xA8E // 2702 ++ SYS___LLROUND_H = 0xA8F // 2703 ++ SYS_LLROUNDF = 0xA90 // 2704 ++ SYS___LLROUNDF_B = 0xA91 // 2705 ++ SYS___LLROUNDF_H = 0xA92 // 2706 ++ SYS_LLROUNDL = 0xA93 // 2707 ++ SYS___LLROUNDL_B = 0xA94 // 2708 ++ SYS___LLROUNDL_H = 0xA95 // 2709 ++ SYS_LOGBF = 0xA96 // 2710 ++ SYS___LOGBF_B = 0xA97 // 2711 ++ SYS___LOGBF_H = 0xA98 // 2712 ++ SYS_LOGBL = 0xA99 // 2713 ++ SYS___LOGBL_B = 0xA9A // 2714 ++ SYS___LOGBL_H = 0xA9B // 2715 ++ SYS_LRINT = 0xA9C // 2716 ++ SYS___LRINT_B = 0xA9D // 2717 ++ SYS___LRINT_H = 0xA9E // 2718 ++ SYS_LRINTF = 0xA9F // 2719 ++ SYS___LRINTF_B = 0xAA0 // 2720 ++ SYS___LRINTF_H = 0xAA1 // 2721 ++ SYS_LRINTL = 0xAA2 // 2722 ++ SYS___LRINTL_B = 0xAA3 // 2723 ++ SYS___LRINTL_H = 0xAA4 // 2724 ++ SYS_LROUNDL = 0xAA5 // 2725 ++ SYS___LROUNDL_B = 0xAA6 // 2726 ++ SYS___LROUNDL_H = 0xAA7 // 2727 ++ SYS_NAN = 0xAA8 // 2728 ++ SYS___NAN_B = 0xAA9 // 2729 ++ SYS_NANF = 0xAAA // 2730 ++ SYS___NANF_B = 0xAAB // 2731 ++ SYS_NANL = 0xAAC // 2732 ++ SYS___NANL_B = 0xAAD // 2733 ++ SYS_NEARBYINT = 0xAAE // 2734 ++ SYS___NEARBYINT_B = 0xAAF // 2735 ++ SYS___NEARBYINT_H = 0xAB0 // 2736 ++ SYS_NEARBYINTF = 0xAB1 // 2737 ++ SYS___NEARBYINTF_B = 0xAB2 // 2738 ++ SYS___NEARBYINTF_H = 0xAB3 // 2739 ++ SYS_NEARBYINTL = 0xAB4 // 2740 ++ SYS___NEARBYINTL_B = 0xAB5 // 2741 ++ SYS___NEARBYINTL_H = 0xAB6 // 2742 ++ SYS_NEXTAFTERF = 0xAB7 // 2743 ++ SYS___NEXTAFTERF_B = 0xAB8 // 2744 ++ SYS___NEXTAFTERF_H = 0xAB9 // 2745 ++ SYS_NEXTAFTERL = 0xABA // 2746 ++ SYS___NEXTAFTERL_B = 0xABB // 2747 ++ SYS___NEXTAFTERL_H = 0xABC // 2748 ++ SYS_NEXTTOWARD = 0xABD // 2749 ++ SYS___NEXTTOWARD_B = 0xABE // 2750 ++ SYS___NEXTTOWARD_H = 0xABF // 2751 ++ SYS_NEXTTOWARDF = 0xAC0 // 2752 ++ SYS___NEXTTOWARDF_B = 0xAC1 // 2753 ++ SYS___NEXTTOWARDF_H = 0xAC2 // 2754 ++ SYS_NEXTTOWARDL = 0xAC3 // 2755 ++ SYS___NEXTTOWARDL_B = 0xAC4 // 2756 ++ SYS___NEXTTOWARDL_H = 0xAC5 // 2757 ++ SYS___REMAINDERF_H = 0xAC6 // 2758 ++ SYS___REMAINDERL_H = 0xAC7 // 2759 ++ SYS___REMQUO_H = 0xAC8 // 2760 ++ SYS___REMQUOF_H = 0xAC9 // 2761 ++ SYS___REMQUOL_H = 0xACA // 2762 ++ SYS_RINTF = 0xACB // 2763 ++ SYS___RINTF_B = 0xACC // 2764 ++ SYS_RINTL = 0xACD // 2765 ++ SYS___RINTL_B = 0xACE // 2766 ++ SYS_ROUND = 0xACF // 2767 ++ SYS___ROUND_B = 0xAD0 // 2768 ++ SYS___ROUND_H = 0xAD1 // 2769 ++ SYS_ROUNDF = 0xAD2 // 2770 ++ SYS___ROUNDF_B = 0xAD3 // 2771 ++ SYS___ROUNDF_H = 0xAD4 // 2772 ++ SYS_ROUNDL = 0xAD5 // 2773 ++ SYS___ROUNDL_B = 0xAD6 // 2774 ++ SYS___ROUNDL_H = 0xAD7 // 2775 ++ SYS_SCALBLN = 0xAD8 // 2776 ++ SYS___SCALBLN_B = 0xAD9 // 2777 ++ SYS___SCALBLN_H = 0xADA // 2778 ++ SYS_SCALBLNF = 0xADB // 2779 ++ SYS___SCALBLNF_B = 0xADC // 2780 ++ SYS___SCALBLNF_H = 0xADD // 2781 ++ SYS_SCALBLNL = 0xADE // 2782 ++ SYS___SCALBLNL_B = 0xADF // 2783 ++ SYS___SCALBLNL_H = 0xAE0 // 2784 ++ SYS___SCALBN_B = 0xAE1 // 2785 ++ SYS___SCALBN_H = 0xAE2 // 2786 ++ SYS_SCALBNF = 0xAE3 // 2787 ++ SYS___SCALBNF_B = 0xAE4 // 2788 ++ SYS___SCALBNF_H = 0xAE5 // 2789 ++ SYS_SCALBNL = 0xAE6 // 2790 ++ SYS___SCALBNL_B = 0xAE7 // 2791 ++ SYS___SCALBNL_H = 0xAE8 // 2792 ++ SYS___TGAMMAL_H = 0xAE9 // 2793 ++ SYS_FECLEAREXCEPT = 0xAEA // 2794 ++ SYS_FEGETENV = 0xAEB // 2795 ++ SYS_FEGETEXCEPTFLAG = 0xAEC // 2796 ++ SYS_FEGETROUND = 0xAED // 2797 ++ SYS_FEHOLDEXCEPT = 0xAEE // 2798 ++ SYS_FERAISEEXCEPT = 0xAEF // 2799 ++ SYS_FESETENV = 0xAF0 // 2800 ++ SYS_FESETEXCEPTFLAG = 0xAF1 // 2801 ++ SYS_FESETROUND = 0xAF2 // 2802 ++ SYS_FETESTEXCEPT = 0xAF3 // 2803 ++ SYS_FEUPDATEENV = 0xAF4 // 2804 ++ SYS___COPYSIGN_H = 0xAF5 // 2805 ++ SYS___HYPOTF_H = 0xAF6 // 2806 ++ SYS___HYPOTL_H = 0xAF7 // 2807 ++ SYS___CLASS = 0xAFA // 2810 ++ SYS___CLASS_B = 0xAFB // 2811 ++ SYS___CLASS_H = 0xAFC // 2812 ++ SYS___ISBLANK_A = 0xB2E // 2862 ++ SYS___ISWBLANK_A = 0xB2F // 2863 ++ SYS___LROUND_FIXUP = 0xB30 // 2864 ++ SYS___LROUNDF_FIXUP = 0xB31 // 2865 ++ SYS_SCHED_YIELD = 0xB32 // 2866 ++ SYS_STRERROR_R = 0xB33 // 2867 ++ SYS_UNSETENV = 0xB34 // 2868 ++ SYS___LGAMMA_H_C99 = 0xB38 // 2872 ++ SYS___LGAMMA_B_C99 = 0xB39 // 2873 ++ SYS___LGAMMA_R_C99 = 0xB3A // 2874 ++ SYS___FTELL2 = 0xB3B // 2875 ++ SYS___FSEEK2 = 0xB3C // 2876 ++ SYS___STATIC_REINIT = 0xB3D // 2877 ++ SYS_PTHREAD_ATTR_GETSTACK = 0xB3E // 2878 ++ SYS_PTHREAD_ATTR_SETSTACK = 0xB3F // 2879 ++ SYS___TGAMMA_H_C99 = 0xB78 // 2936 ++ SYS___TGAMMAF_H_C99 = 0xB79 // 2937 ++ SYS___LE_TRACEBACK = 0xB7A // 2938 ++ SYS___MUST_STAY_CLEAN = 0xB7C // 2940 ++ SYS___O_ENV = 0xB7D // 2941 ++ SYS_ACOSD32 = 0xB7E // 2942 ++ SYS_ACOSD64 = 0xB7F // 2943 ++ SYS_ACOSD128 = 0xB80 // 2944 ++ SYS_ACOSHD32 = 0xB81 // 2945 ++ SYS_ACOSHD64 = 0xB82 // 2946 ++ SYS_ACOSHD128 = 0xB83 // 2947 ++ SYS_ASIND32 = 0xB84 // 2948 ++ SYS_ASIND64 = 0xB85 // 2949 ++ SYS_ASIND128 = 0xB86 // 2950 ++ SYS_ASINHD32 = 0xB87 // 2951 ++ SYS_ASINHD64 = 0xB88 // 2952 ++ SYS_ASINHD128 = 0xB89 // 2953 ++ SYS_ATAND32 = 0xB8A // 2954 ++ SYS_ATAND64 = 0xB8B // 2955 ++ SYS_ATAND128 = 0xB8C // 2956 ++ SYS_ATAN2D32 = 0xB8D // 2957 ++ SYS_ATAN2D64 = 0xB8E // 2958 ++ SYS_ATAN2D128 = 0xB8F // 2959 ++ SYS_ATANHD32 = 0xB90 // 2960 ++ SYS_ATANHD64 = 0xB91 // 2961 ++ SYS_ATANHD128 = 0xB92 // 2962 ++ SYS_CBRTD32 = 0xB93 // 2963 ++ SYS_CBRTD64 = 0xB94 // 2964 ++ SYS_CBRTD128 = 0xB95 // 2965 ++ SYS_CEILD32 = 0xB96 // 2966 ++ SYS_CEILD64 = 0xB97 // 2967 ++ SYS_CEILD128 = 0xB98 // 2968 ++ SYS___CLASS2 = 0xB99 // 2969 ++ SYS___CLASS2_B = 0xB9A // 2970 ++ SYS___CLASS2_H = 0xB9B // 2971 ++ SYS_COPYSIGND32 = 0xB9C // 2972 ++ SYS_COPYSIGND64 = 0xB9D // 2973 ++ SYS_COPYSIGND128 = 0xB9E // 2974 ++ SYS_COSD32 = 0xB9F // 2975 ++ SYS_COSD64 = 0xBA0 // 2976 ++ SYS_COSD128 = 0xBA1 // 2977 ++ SYS_COSHD32 = 0xBA2 // 2978 ++ SYS_COSHD64 = 0xBA3 // 2979 ++ SYS_COSHD128 = 0xBA4 // 2980 ++ SYS_ERFD32 = 0xBA5 // 2981 ++ SYS_ERFD64 = 0xBA6 // 2982 ++ SYS_ERFD128 = 0xBA7 // 2983 ++ SYS_ERFCD32 = 0xBA8 // 2984 ++ SYS_ERFCD64 = 0xBA9 // 2985 ++ SYS_ERFCD128 = 0xBAA // 2986 ++ SYS_EXPD32 = 0xBAB // 2987 ++ SYS_EXPD64 = 0xBAC // 2988 ++ SYS_EXPD128 = 0xBAD // 2989 ++ SYS_EXP2D32 = 0xBAE // 2990 ++ SYS_EXP2D64 = 0xBAF // 2991 ++ SYS_EXP2D128 = 0xBB0 // 2992 ++ SYS_EXPM1D32 = 0xBB1 // 2993 ++ SYS_EXPM1D64 = 0xBB2 // 2994 ++ SYS_EXPM1D128 = 0xBB3 // 2995 ++ SYS_FABSD32 = 0xBB4 // 2996 ++ SYS_FABSD64 = 0xBB5 // 2997 ++ SYS_FABSD128 = 0xBB6 // 2998 ++ SYS_FDIMD32 = 0xBB7 // 2999 ++ SYS_FDIMD64 = 0xBB8 // 3000 ++ SYS_FDIMD128 = 0xBB9 // 3001 ++ SYS_FE_DEC_GETROUND = 0xBBA // 3002 ++ SYS_FE_DEC_SETROUND = 0xBBB // 3003 ++ SYS_FLOORD32 = 0xBBC // 3004 ++ SYS_FLOORD64 = 0xBBD // 3005 ++ SYS_FLOORD128 = 0xBBE // 3006 ++ SYS_FMAD32 = 0xBBF // 3007 ++ SYS_FMAD64 = 0xBC0 // 3008 ++ SYS_FMAD128 = 0xBC1 // 3009 ++ SYS_FMAXD32 = 0xBC2 // 3010 ++ SYS_FMAXD64 = 0xBC3 // 3011 ++ SYS_FMAXD128 = 0xBC4 // 3012 ++ SYS_FMIND32 = 0xBC5 // 3013 ++ SYS_FMIND64 = 0xBC6 // 3014 ++ SYS_FMIND128 = 0xBC7 // 3015 ++ SYS_FMODD32 = 0xBC8 // 3016 ++ SYS_FMODD64 = 0xBC9 // 3017 ++ SYS_FMODD128 = 0xBCA // 3018 ++ SYS___FP_CAST_D = 0xBCB // 3019 ++ SYS_FREXPD32 = 0xBCC // 3020 ++ SYS_FREXPD64 = 0xBCD // 3021 ++ SYS_FREXPD128 = 0xBCE // 3022 ++ SYS_HYPOTD32 = 0xBCF // 3023 ++ SYS_HYPOTD64 = 0xBD0 // 3024 ++ SYS_HYPOTD128 = 0xBD1 // 3025 ++ SYS_ILOGBD32 = 0xBD2 // 3026 ++ SYS_ILOGBD64 = 0xBD3 // 3027 ++ SYS_ILOGBD128 = 0xBD4 // 3028 ++ SYS_LDEXPD32 = 0xBD5 // 3029 ++ SYS_LDEXPD64 = 0xBD6 // 3030 ++ SYS_LDEXPD128 = 0xBD7 // 3031 ++ SYS_LGAMMAD32 = 0xBD8 // 3032 ++ SYS_LGAMMAD64 = 0xBD9 // 3033 ++ SYS_LGAMMAD128 = 0xBDA // 3034 ++ SYS_LLRINTD32 = 0xBDB // 3035 ++ SYS_LLRINTD64 = 0xBDC // 3036 ++ SYS_LLRINTD128 = 0xBDD // 3037 ++ SYS_LLROUNDD32 = 0xBDE // 3038 ++ SYS_LLROUNDD64 = 0xBDF // 3039 ++ SYS_LLROUNDD128 = 0xBE0 // 3040 ++ SYS_LOGD32 = 0xBE1 // 3041 ++ SYS_LOGD64 = 0xBE2 // 3042 ++ SYS_LOGD128 = 0xBE3 // 3043 ++ SYS_LOG10D32 = 0xBE4 // 3044 ++ SYS_LOG10D64 = 0xBE5 // 3045 ++ SYS_LOG10D128 = 0xBE6 // 3046 ++ SYS_LOG1PD32 = 0xBE7 // 3047 ++ SYS_LOG1PD64 = 0xBE8 // 3048 ++ SYS_LOG1PD128 = 0xBE9 // 3049 ++ SYS_LOG2D32 = 0xBEA // 3050 ++ SYS_LOG2D64 = 0xBEB // 3051 ++ SYS_LOG2D128 = 0xBEC // 3052 ++ SYS_LOGBD32 = 0xBED // 3053 ++ SYS_LOGBD64 = 0xBEE // 3054 ++ SYS_LOGBD128 = 0xBEF // 3055 ++ SYS_LRINTD32 = 0xBF0 // 3056 ++ SYS_LRINTD64 = 0xBF1 // 3057 ++ SYS_LRINTD128 = 0xBF2 // 3058 ++ SYS_LROUNDD32 = 0xBF3 // 3059 ++ SYS_LROUNDD64 = 0xBF4 // 3060 ++ SYS_LROUNDD128 = 0xBF5 // 3061 ++ SYS_MODFD32 = 0xBF6 // 3062 ++ SYS_MODFD64 = 0xBF7 // 3063 ++ SYS_MODFD128 = 0xBF8 // 3064 ++ SYS_NAND32 = 0xBF9 // 3065 ++ SYS_NAND64 = 0xBFA // 3066 ++ SYS_NAND128 = 0xBFB // 3067 ++ SYS_NEARBYINTD32 = 0xBFC // 3068 ++ SYS_NEARBYINTD64 = 0xBFD // 3069 ++ SYS_NEARBYINTD128 = 0xBFE // 3070 ++ SYS_NEXTAFTERD32 = 0xBFF // 3071 ++ SYS_NEXTAFTERD64 = 0xC00 // 3072 ++ SYS_NEXTAFTERD128 = 0xC01 // 3073 ++ SYS_NEXTTOWARDD32 = 0xC02 // 3074 ++ SYS_NEXTTOWARDD64 = 0xC03 // 3075 ++ SYS_NEXTTOWARDD128 = 0xC04 // 3076 ++ SYS_POWD32 = 0xC05 // 3077 ++ SYS_POWD64 = 0xC06 // 3078 ++ SYS_POWD128 = 0xC07 // 3079 ++ SYS_QUANTIZED32 = 0xC08 // 3080 ++ SYS_QUANTIZED64 = 0xC09 // 3081 ++ SYS_QUANTIZED128 = 0xC0A // 3082 ++ SYS_REMAINDERD32 = 0xC0B // 3083 ++ SYS_REMAINDERD64 = 0xC0C // 3084 ++ SYS_REMAINDERD128 = 0xC0D // 3085 ++ SYS___REMQUOD32 = 0xC0E // 3086 ++ SYS___REMQUOD64 = 0xC0F // 3087 ++ SYS___REMQUOD128 = 0xC10 // 3088 ++ SYS_RINTD32 = 0xC11 // 3089 ++ SYS_RINTD64 = 0xC12 // 3090 ++ SYS_RINTD128 = 0xC13 // 3091 ++ SYS_ROUNDD32 = 0xC14 // 3092 ++ SYS_ROUNDD64 = 0xC15 // 3093 ++ SYS_ROUNDD128 = 0xC16 // 3094 ++ SYS_SAMEQUANTUMD32 = 0xC17 // 3095 ++ SYS_SAMEQUANTUMD64 = 0xC18 // 3096 ++ SYS_SAMEQUANTUMD128 = 0xC19 // 3097 ++ SYS_SCALBLND32 = 0xC1A // 3098 ++ SYS_SCALBLND64 = 0xC1B // 3099 ++ SYS_SCALBLND128 = 0xC1C // 3100 ++ SYS_SCALBND32 = 0xC1D // 3101 ++ SYS_SCALBND64 = 0xC1E // 3102 ++ SYS_SCALBND128 = 0xC1F // 3103 ++ SYS_SIND32 = 0xC20 // 3104 ++ SYS_SIND64 = 0xC21 // 3105 ++ SYS_SIND128 = 0xC22 // 3106 ++ SYS_SINHD32 = 0xC23 // 3107 ++ SYS_SINHD64 = 0xC24 // 3108 ++ SYS_SINHD128 = 0xC25 // 3109 ++ SYS_SQRTD32 = 0xC26 // 3110 ++ SYS_SQRTD64 = 0xC27 // 3111 ++ SYS_SQRTD128 = 0xC28 // 3112 ++ SYS_STRTOD32 = 0xC29 // 3113 ++ SYS_STRTOD64 = 0xC2A // 3114 ++ SYS_STRTOD128 = 0xC2B // 3115 ++ SYS_TAND32 = 0xC2C // 3116 ++ SYS_TAND64 = 0xC2D // 3117 ++ SYS_TAND128 = 0xC2E // 3118 ++ SYS_TANHD32 = 0xC2F // 3119 ++ SYS_TANHD64 = 0xC30 // 3120 ++ SYS_TANHD128 = 0xC31 // 3121 ++ SYS_TGAMMAD32 = 0xC32 // 3122 ++ SYS_TGAMMAD64 = 0xC33 // 3123 ++ SYS_TGAMMAD128 = 0xC34 // 3124 ++ SYS_TRUNCD32 = 0xC3E // 3134 ++ SYS_TRUNCD64 = 0xC3F // 3135 ++ SYS_TRUNCD128 = 0xC40 // 3136 ++ SYS_WCSTOD32 = 0xC41 // 3137 ++ SYS_WCSTOD64 = 0xC42 // 3138 ++ SYS_WCSTOD128 = 0xC43 // 3139 ++ SYS___CODEPAGE_INFO = 0xC64 // 3172 ++ SYS_POSIX_OPENPT = 0xC66 // 3174 ++ SYS_PSELECT = 0xC67 // 3175 ++ SYS_SOCKATMARK = 0xC68 // 3176 ++ SYS_AIO_FSYNC = 0xC69 // 3177 ++ SYS_LIO_LISTIO = 0xC6A // 3178 ++ SYS___ATANPID32 = 0xC6B // 3179 ++ SYS___ATANPID64 = 0xC6C // 3180 ++ SYS___ATANPID128 = 0xC6D // 3181 ++ SYS___COSPID32 = 0xC6E // 3182 ++ SYS___COSPID64 = 0xC6F // 3183 ++ SYS___COSPID128 = 0xC70 // 3184 ++ SYS___SINPID32 = 0xC71 // 3185 ++ SYS___SINPID64 = 0xC72 // 3186 ++ SYS___SINPID128 = 0xC73 // 3187 ++ SYS_SETIPV4SOURCEFILTER = 0xC76 // 3190 ++ SYS_GETIPV4SOURCEFILTER = 0xC77 // 3191 ++ SYS_SETSOURCEFILTER = 0xC78 // 3192 ++ SYS_GETSOURCEFILTER = 0xC79 // 3193 ++ SYS_FWRITE_UNLOCKED = 0xC7A // 3194 ++ SYS_FREAD_UNLOCKED = 0xC7B // 3195 ++ SYS_FGETS_UNLOCKED = 0xC7C // 3196 ++ SYS_GETS_UNLOCKED = 0xC7D // 3197 ++ SYS_FPUTS_UNLOCKED = 0xC7E // 3198 ++ SYS_PUTS_UNLOCKED = 0xC7F // 3199 ++ SYS_FGETC_UNLOCKED = 0xC80 // 3200 ++ SYS_FPUTC_UNLOCKED = 0xC81 // 3201 ++ SYS_DLADDR = 0xC82 // 3202 ++ SYS_SHM_OPEN = 0xC8C // 3212 ++ SYS_SHM_UNLINK = 0xC8D // 3213 ++ SYS___CLASS2F = 0xC91 // 3217 ++ SYS___CLASS2L = 0xC92 // 3218 ++ SYS___CLASS2F_B = 0xC93 // 3219 ++ SYS___CLASS2F_H = 0xC94 // 3220 ++ SYS___CLASS2L_B = 0xC95 // 3221 ++ SYS___CLASS2L_H = 0xC96 // 3222 ++ SYS___CLASS2D32 = 0xC97 // 3223 ++ SYS___CLASS2D64 = 0xC98 // 3224 ++ SYS___CLASS2D128 = 0xC99 // 3225 ++ SYS___TOCSNAME2 = 0xC9A // 3226 ++ SYS___D1TOP = 0xC9B // 3227 ++ SYS___D2TOP = 0xC9C // 3228 ++ SYS___D4TOP = 0xC9D // 3229 ++ SYS___PTOD1 = 0xC9E // 3230 ++ SYS___PTOD2 = 0xC9F // 3231 ++ SYS___PTOD4 = 0xCA0 // 3232 ++ SYS_CLEARERR_UNLOCKED = 0xCA1 // 3233 ++ SYS_FDELREC_UNLOCKED = 0xCA2 // 3234 ++ SYS_FEOF_UNLOCKED = 0xCA3 // 3235 ++ SYS_FERROR_UNLOCKED = 0xCA4 // 3236 ++ SYS_FFLUSH_UNLOCKED = 0xCA5 // 3237 ++ SYS_FGETPOS_UNLOCKED = 0xCA6 // 3238 ++ SYS_FGETWC_UNLOCKED = 0xCA7 // 3239 ++ SYS_FGETWS_UNLOCKED = 0xCA8 // 3240 ++ SYS_FILENO_UNLOCKED = 0xCA9 // 3241 ++ SYS_FLDATA_UNLOCKED = 0xCAA // 3242 ++ SYS_FLOCATE_UNLOCKED = 0xCAB // 3243 ++ SYS_FPRINTF_UNLOCKED = 0xCAC // 3244 ++ SYS_FPUTWC_UNLOCKED = 0xCAD // 3245 ++ SYS_FPUTWS_UNLOCKED = 0xCAE // 3246 ++ SYS_FSCANF_UNLOCKED = 0xCAF // 3247 ++ SYS_FSEEK_UNLOCKED = 0xCB0 // 3248 ++ SYS_FSEEKO_UNLOCKED = 0xCB1 // 3249 ++ SYS_FSETPOS_UNLOCKED = 0xCB3 // 3251 ++ SYS_FTELL_UNLOCKED = 0xCB4 // 3252 ++ SYS_FTELLO_UNLOCKED = 0xCB5 // 3253 ++ SYS_FUPDATE_UNLOCKED = 0xCB7 // 3255 ++ SYS_FWIDE_UNLOCKED = 0xCB8 // 3256 ++ SYS_FWPRINTF_UNLOCKED = 0xCB9 // 3257 ++ SYS_FWSCANF_UNLOCKED = 0xCBA // 3258 ++ SYS_GETWC_UNLOCKED = 0xCBB // 3259 ++ SYS_GETWCHAR_UNLOCKED = 0xCBC // 3260 ++ SYS_PERROR_UNLOCKED = 0xCBD // 3261 ++ SYS_PRINTF_UNLOCKED = 0xCBE // 3262 ++ SYS_PUTWC_UNLOCKED = 0xCBF // 3263 ++ SYS_PUTWCHAR_UNLOCKED = 0xCC0 // 3264 ++ SYS_REWIND_UNLOCKED = 0xCC1 // 3265 ++ SYS_SCANF_UNLOCKED = 0xCC2 // 3266 ++ SYS_UNGETC_UNLOCKED = 0xCC3 // 3267 ++ SYS_UNGETWC_UNLOCKED = 0xCC4 // 3268 ++ SYS_VFPRINTF_UNLOCKED = 0xCC5 // 3269 ++ SYS_VFSCANF_UNLOCKED = 0xCC7 // 3271 ++ SYS_VFWPRINTF_UNLOCKED = 0xCC9 // 3273 ++ SYS_VFWSCANF_UNLOCKED = 0xCCB // 3275 ++ SYS_VPRINTF_UNLOCKED = 0xCCD // 3277 ++ SYS_VSCANF_UNLOCKED = 0xCCF // 3279 ++ SYS_VWPRINTF_UNLOCKED = 0xCD1 // 3281 ++ SYS_VWSCANF_UNLOCKED = 0xCD3 // 3283 ++ SYS_WPRINTF_UNLOCKED = 0xCD5 // 3285 ++ SYS_WSCANF_UNLOCKED = 0xCD6 // 3286 ++ SYS_ASCTIME64 = 0xCD7 // 3287 ++ SYS_ASCTIME64_R = 0xCD8 // 3288 ++ SYS_CTIME64 = 0xCD9 // 3289 ++ SYS_CTIME64_R = 0xCDA // 3290 ++ SYS_DIFFTIME64 = 0xCDB // 3291 ++ SYS_GMTIME64 = 0xCDC // 3292 ++ SYS_GMTIME64_R = 0xCDD // 3293 ++ SYS_LOCALTIME64 = 0xCDE // 3294 ++ SYS_LOCALTIME64_R = 0xCDF // 3295 ++ SYS_MKTIME64 = 0xCE0 // 3296 ++ SYS_TIME64 = 0xCE1 // 3297 ++ SYS___LOGIN_APPLID = 0xCE2 // 3298 ++ SYS___PASSWD_APPLID = 0xCE3 // 3299 ++ SYS_PTHREAD_SECURITY_APPLID_NP = 0xCE4 // 3300 ++ SYS___GETTHENT = 0xCE5 // 3301 ++ SYS_FREEIFADDRS = 0xCE6 // 3302 ++ SYS_GETIFADDRS = 0xCE7 // 3303 ++ SYS_POSIX_FALLOCATE = 0xCE8 // 3304 ++ SYS_POSIX_MEMALIGN = 0xCE9 // 3305 ++ SYS_SIZEOF_ALLOC = 0xCEA // 3306 ++ SYS_RESIZE_ALLOC = 0xCEB // 3307 ++ SYS_FREAD_NOUPDATE = 0xCEC // 3308 ++ SYS_FREAD_NOUPDATE_UNLOCKED = 0xCED // 3309 ++ SYS_FGETPOS64 = 0xCEE // 3310 ++ SYS_FSEEK64 = 0xCEF // 3311 ++ SYS_FSEEKO64 = 0xCF0 // 3312 ++ SYS_FSETPOS64 = 0xCF1 // 3313 ++ SYS_FTELL64 = 0xCF2 // 3314 ++ SYS_FTELLO64 = 0xCF3 // 3315 ++ SYS_FGETPOS64_UNLOCKED = 0xCF4 // 3316 ++ SYS_FSEEK64_UNLOCKED = 0xCF5 // 3317 ++ SYS_FSEEKO64_UNLOCKED = 0xCF6 // 3318 ++ SYS_FSETPOS64_UNLOCKED = 0xCF7 // 3319 ++ SYS_FTELL64_UNLOCKED = 0xCF8 // 3320 ++ SYS_FTELLO64_UNLOCKED = 0xCF9 // 3321 ++ SYS_FOPEN_UNLOCKED = 0xCFA // 3322 ++ SYS_FREOPEN_UNLOCKED = 0xCFB // 3323 ++ SYS_FDOPEN_UNLOCKED = 0xCFC // 3324 ++ SYS_TMPFILE_UNLOCKED = 0xCFD // 3325 ++ SYS___MOSERVICES = 0xD3D // 3389 ++ SYS___GETTOD = 0xD3E // 3390 ++ SYS_C16RTOMB = 0xD40 // 3392 ++ SYS_C32RTOMB = 0xD41 // 3393 ++ SYS_MBRTOC16 = 0xD42 // 3394 ++ SYS_MBRTOC32 = 0xD43 // 3395 ++ SYS_QUANTEXPD32 = 0xD44 // 3396 ++ SYS_QUANTEXPD64 = 0xD45 // 3397 ++ SYS_QUANTEXPD128 = 0xD46 // 3398 ++ SYS___LOCALE_CTL = 0xD47 // 3399 ++ SYS___SMF_RECORD2 = 0xD48 // 3400 ++ SYS_FOPEN64 = 0xD49 // 3401 ++ SYS_FOPEN64_UNLOCKED = 0xD4A // 3402 ++ SYS_FREOPEN64 = 0xD4B // 3403 ++ SYS_FREOPEN64_UNLOCKED = 0xD4C // 3404 ++ SYS_TMPFILE64 = 0xD4D // 3405 ++ SYS_TMPFILE64_UNLOCKED = 0xD4E // 3406 ++ SYS_GETDATE64 = 0xD4F // 3407 ++ SYS_GETTIMEOFDAY64 = 0xD50 // 3408 ++ SYS_BIND2ADDRSEL = 0xD59 // 3417 ++ SYS_INET6_IS_SRCADDR = 0xD5A // 3418 ++ SYS___GETGRGID1 = 0xD5B // 3419 ++ SYS___GETGRNAM1 = 0xD5C // 3420 ++ SYS___FBUFSIZE = 0xD60 // 3424 ++ SYS___FPENDING = 0xD61 // 3425 ++ SYS___FLBF = 0xD62 // 3426 ++ SYS___FREADABLE = 0xD63 // 3427 ++ SYS___FWRITABLE = 0xD64 // 3428 ++ SYS___FREADING = 0xD65 // 3429 ++ SYS___FWRITING = 0xD66 // 3430 ++ SYS___FSETLOCKING = 0xD67 // 3431 ++ SYS__FLUSHLBF = 0xD68 // 3432 ++ SYS___FPURGE = 0xD69 // 3433 ++ SYS___FREADAHEAD = 0xD6A // 3434 ++ SYS___FSETERR = 0xD6B // 3435 ++ SYS___FPENDING_UNLOCKED = 0xD6C // 3436 ++ SYS___FREADING_UNLOCKED = 0xD6D // 3437 ++ SYS___FWRITING_UNLOCKED = 0xD6E // 3438 ++ SYS__FLUSHLBF_UNLOCKED = 0xD6F // 3439 ++ SYS___FPURGE_UNLOCKED = 0xD70 // 3440 ++ SYS___FREADAHEAD_UNLOCKED = 0xD71 // 3441 ++ SYS___LE_CEEGTJS = 0xD72 // 3442 ++ SYS___LE_RECORD_DUMP = 0xD73 // 3443 ++ SYS_FSTAT64 = 0xD74 // 3444 ++ SYS_LSTAT64 = 0xD75 // 3445 ++ SYS_STAT64 = 0xD76 // 3446 ++ SYS___READDIR2_64 = 0xD77 // 3447 ++ SYS___OPEN_STAT64 = 0xD78 // 3448 ++ SYS_FTW64 = 0xD79 // 3449 ++ SYS_NFTW64 = 0xD7A // 3450 ++ SYS_UTIME64 = 0xD7B // 3451 ++ SYS_UTIMES64 = 0xD7C // 3452 ++ SYS___GETIPC64 = 0xD7D // 3453 ++ SYS_MSGCTL64 = 0xD7E // 3454 ++ SYS_SEMCTL64 = 0xD7F // 3455 ++ SYS_SHMCTL64 = 0xD80 // 3456 ++ SYS_MSGXRCV64 = 0xD81 // 3457 ++ SYS___MGXR64 = 0xD81 // 3457 ++ SYS_W_GETPSENT64 = 0xD82 // 3458 ++ SYS_PTHREAD_COND_TIMEDWAIT64 = 0xD83 // 3459 ++ SYS_FTIME64 = 0xD85 // 3461 ++ SYS_GETUTXENT64 = 0xD86 // 3462 ++ SYS_GETUTXID64 = 0xD87 // 3463 ++ SYS_GETUTXLINE64 = 0xD88 // 3464 ++ SYS_PUTUTXLINE64 = 0xD89 // 3465 ++ SYS_NEWLOCALE = 0xD8A // 3466 ++ SYS_FREELOCALE = 0xD8B // 3467 ++ SYS_USELOCALE = 0xD8C // 3468 ++ SYS_DUPLOCALE = 0xD8D // 3469 ++ SYS___CHATTR64 = 0xD9C // 3484 ++ SYS___LCHATTR64 = 0xD9D // 3485 ++ SYS___FCHATTR64 = 0xD9E // 3486 ++ SYS_____CHATTR64_A = 0xD9F // 3487 ++ SYS_____LCHATTR64_A = 0xDA0 // 3488 ++ SYS___LE_CEEUSGD = 0xDA1 // 3489 ++ SYS___LE_IFAM_CON = 0xDA2 // 3490 ++ SYS___LE_IFAM_DSC = 0xDA3 // 3491 ++ SYS___LE_IFAM_GET = 0xDA4 // 3492 ++ SYS___LE_IFAM_QRY = 0xDA5 // 3493 ++ SYS_ALIGNED_ALLOC = 0xDA6 // 3494 ++ SYS_ACCEPT4 = 0xDA7 // 3495 ++ SYS___ACCEPT4_A = 0xDA8 // 3496 ++ SYS_COPYFILERANGE = 0xDA9 // 3497 ++ SYS_GETLINE = 0xDAA // 3498 ++ SYS___GETLINE_A = 0xDAB // 3499 ++ SYS_DIRFD = 0xDAC // 3500 ++ SYS_CLOCK_GETTIME = 0xDAD // 3501 ++ SYS_DUP3 = 0xDAE // 3502 ++ SYS_EPOLL_CREATE = 0xDAF // 3503 ++ SYS_EPOLL_CREATE1 = 0xDB0 // 3504 ++ SYS_EPOLL_CTL = 0xDB1 // 3505 ++ SYS_EPOLL_WAIT = 0xDB2 // 3506 ++ SYS_EPOLL_PWAIT = 0xDB3 // 3507 ++ SYS_EVENTFD = 0xDB4 // 3508 ++ SYS_STATFS = 0xDB5 // 3509 ++ SYS___STATFS_A = 0xDB6 // 3510 ++ SYS_FSTATFS = 0xDB7 // 3511 ++ SYS_INOTIFY_INIT = 0xDB8 // 3512 ++ SYS_INOTIFY_INIT1 = 0xDB9 // 3513 ++ SYS_INOTIFY_ADD_WATCH = 0xDBA // 3514 ++ SYS___INOTIFY_ADD_WATCH_A = 0xDBB // 3515 ++ SYS_INOTIFY_RM_WATCH = 0xDBC // 3516 ++ SYS_PIPE2 = 0xDBD // 3517 ++ SYS_PIVOT_ROOT = 0xDBE // 3518 ++ SYS___PIVOT_ROOT_A = 0xDBF // 3519 ++ SYS_PRCTL = 0xDC0 // 3520 ++ SYS_PRLIMIT = 0xDC1 // 3521 ++ SYS_SETHOSTNAME = 0xDC2 // 3522 ++ SYS___SETHOSTNAME_A = 0xDC3 // 3523 ++ SYS_SETRESUID = 0xDC4 // 3524 ++ SYS_SETRESGID = 0xDC5 // 3525 ++ SYS_PTHREAD_CONDATTR_GETCLOCK = 0xDC6 // 3526 ++ SYS_FLOCK = 0xDC7 // 3527 ++ SYS_FGETXATTR = 0xDC8 // 3528 ++ SYS___FGETXATTR_A = 0xDC9 // 3529 ++ SYS_FLISTXATTR = 0xDCA // 3530 ++ SYS___FLISTXATTR_A = 0xDCB // 3531 ++ SYS_FREMOVEXATTR = 0xDCC // 3532 ++ SYS___FREMOVEXATTR_A = 0xDCD // 3533 ++ SYS_FSETXATTR = 0xDCE // 3534 ++ SYS___FSETXATTR_A = 0xDCF // 3535 ++ SYS_GETXATTR = 0xDD0 // 3536 ++ SYS___GETXATTR_A = 0xDD1 // 3537 ++ SYS_LGETXATTR = 0xDD2 // 3538 ++ SYS___LGETXATTR_A = 0xDD3 // 3539 ++ SYS_LISTXATTR = 0xDD4 // 3540 ++ SYS___LISTXATTR_A = 0xDD5 // 3541 ++ SYS_LLISTXATTR = 0xDD6 // 3542 ++ SYS___LLISTXATTR_A = 0xDD7 // 3543 ++ SYS_LREMOVEXATTR = 0xDD8 // 3544 ++ SYS___LREMOVEXATTR_A = 0xDD9 // 3545 ++ SYS_LSETXATTR = 0xDDA // 3546 ++ SYS___LSETXATTR_A = 0xDDB // 3547 ++ SYS_REMOVEXATTR = 0xDDC // 3548 ++ SYS___REMOVEXATTR_A = 0xDDD // 3549 ++ SYS_SETXATTR = 0xDDE // 3550 ++ SYS___SETXATTR_A = 0xDDF // 3551 ++ SYS_FDATASYNC = 0xDE0 // 3552 ++ SYS_SYNCFS = 0xDE1 // 3553 ++ SYS_FUTIMES = 0xDE2 // 3554 ++ SYS_FUTIMESAT = 0xDE3 // 3555 ++ SYS___FUTIMESAT_A = 0xDE4 // 3556 ++ SYS_LUTIMES = 0xDE5 // 3557 ++ SYS___LUTIMES_A = 0xDE6 // 3558 ++ SYS_INET_ATON = 0xDE7 // 3559 ++ SYS_GETRANDOM = 0xDE8 // 3560 ++ SYS_GETTID = 0xDE9 // 3561 ++ SYS_MEMFD_CREATE = 0xDEA // 3562 ++ SYS___MEMFD_CREATE_A = 0xDEB // 3563 ++ SYS_FACCESSAT = 0xDEC // 3564 ++ SYS___FACCESSAT_A = 0xDED // 3565 ++ SYS_FCHMODAT = 0xDEE // 3566 ++ SYS___FCHMODAT_A = 0xDEF // 3567 ++ SYS_FCHOWNAT = 0xDF0 // 3568 ++ SYS___FCHOWNAT_A = 0xDF1 // 3569 ++ SYS_FSTATAT = 0xDF2 // 3570 ++ SYS___FSTATAT_A = 0xDF3 // 3571 ++ SYS_LINKAT = 0xDF4 // 3572 ++ SYS___LINKAT_A = 0xDF5 // 3573 ++ SYS_MKDIRAT = 0xDF6 // 3574 ++ SYS___MKDIRAT_A = 0xDF7 // 3575 ++ SYS_MKFIFOAT = 0xDF8 // 3576 ++ SYS___MKFIFOAT_A = 0xDF9 // 3577 ++ SYS_MKNODAT = 0xDFA // 3578 ++ SYS___MKNODAT_A = 0xDFB // 3579 ++ SYS_OPENAT = 0xDFC // 3580 ++ SYS___OPENAT_A = 0xDFD // 3581 ++ SYS_READLINKAT = 0xDFE // 3582 ++ SYS___READLINKAT_A = 0xDFF // 3583 ++ SYS_RENAMEAT = 0xE00 // 3584 ++ SYS___RENAMEAT_A = 0xE01 // 3585 ++ SYS_RENAMEAT2 = 0xE02 // 3586 ++ SYS___RENAMEAT2_A = 0xE03 // 3587 ++ SYS_SYMLINKAT = 0xE04 // 3588 ++ SYS___SYMLINKAT_A = 0xE05 // 3589 ++ SYS_UNLINKAT = 0xE06 // 3590 ++ SYS___UNLINKAT_A = 0xE07 // 3591 ++ SYS_SYSINFO = 0xE08 // 3592 ++ SYS_WAIT4 = 0xE0A // 3594 ++ SYS_CLONE = 0xE0B // 3595 ++ SYS_UNSHARE = 0xE0C // 3596 ++ SYS_SETNS = 0xE0D // 3597 ++ SYS_CAPGET = 0xE0E // 3598 ++ SYS_CAPSET = 0xE0F // 3599 ++ SYS_STRCHRNUL = 0xE10 // 3600 ++ SYS_PTHREAD_CONDATTR_SETCLOCK = 0xE12 // 3602 ++ SYS_OPEN_BY_HANDLE_AT = 0xE13 // 3603 ++ SYS___OPEN_BY_HANDLE_AT_A = 0xE14 // 3604 ++ SYS___INET_ATON_A = 0xE15 // 3605 ++ SYS_MOUNT1 = 0xE16 // 3606 ++ SYS___MOUNT1_A = 0xE17 // 3607 ++ SYS_UMOUNT1 = 0xE18 // 3608 ++ SYS___UMOUNT1_A = 0xE19 // 3609 ++ SYS_UMOUNT2 = 0xE1A // 3610 ++ SYS___UMOUNT2_A = 0xE1B // 3611 ++ SYS___PRCTL_A = 0xE1C // 3612 ++ SYS_LOCALTIME_R2 = 0xE1D // 3613 ++ SYS___LOCALTIME_R2_A = 0xE1E // 3614 ++ SYS_OPENAT2 = 0xE1F // 3615 ++ SYS___OPENAT2_A = 0xE20 // 3616 ++ SYS___LE_CEEMICT = 0xE21 // 3617 ++ SYS_GETENTROPY = 0xE22 // 3618 ++ SYS_NANOSLEEP = 0xE23 // 3619 ++ SYS_UTIMENSAT = 0xE24 // 3620 ++ SYS___UTIMENSAT_A = 0xE25 // 3621 ++ SYS_ASPRINTF = 0xE26 // 3622 ++ SYS___ASPRINTF_A = 0xE27 // 3623 ++ SYS_VASPRINTF = 0xE28 // 3624 ++ SYS___VASPRINTF_A = 0xE29 // 3625 ++ SYS_DPRINTF = 0xE2A // 3626 ++ SYS___DPRINTF_A = 0xE2B // 3627 ++ SYS_GETOPT_LONG = 0xE2C // 3628 ++ SYS___GETOPT_LONG_A = 0xE2D // 3629 ++ SYS_PSIGNAL = 0xE2E // 3630 ++ SYS___PSIGNAL_A = 0xE2F // 3631 ++ SYS_PSIGNAL_UNLOCKED = 0xE30 // 3632 ++ SYS___PSIGNAL_UNLOCKED_A = 0xE31 // 3633 ++ SYS_FSTATAT_O = 0xE32 // 3634 ++ SYS___FSTATAT_O_A = 0xE33 // 3635 ++ SYS_FSTATAT64 = 0xE34 // 3636 ++ SYS___FSTATAT64_A = 0xE35 // 3637 ++ SYS___CHATTRAT = 0xE36 // 3638 ++ SYS_____CHATTRAT_A = 0xE37 // 3639 ++ SYS___CHATTRAT64 = 0xE38 // 3640 ++ SYS_____CHATTRAT64_A = 0xE39 // 3641 ++ SYS_MADVISE = 0xE3A // 3642 ++ SYS___AUTHENTICATE = 0xE3B // 3643 ++ + ) +diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +index 091d107f..17c53bd9 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +@@ -306,6 +306,19 @@ type XVSockPgen struct { + + type _Socklen uint32 + ++type SaeAssocID uint32 ++ ++type SaeConnID uint32 ++ ++type SaEndpoints struct { ++ Srcif uint32 ++ Srcaddr *RawSockaddr ++ Srcaddrlen uint32 ++ Dstaddr *RawSockaddr ++ Dstaddrlen uint32 ++ _ [4]byte ++} ++ + type Xucred struct { + Version uint32 + Uid uint32 +@@ -449,11 +462,14 @@ type FdSet struct { + + const ( + SizeofIfMsghdr = 0x70 ++ SizeofIfMsghdr2 = 0xa0 + SizeofIfData = 0x60 ++ SizeofIfData64 = 0x80 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c ++ SizeofRtMsghdr2 = 0x5c + SizeofRtMetrics = 0x38 + ) + +@@ -467,6 +483,20 @@ type IfMsghdr struct { + Data IfData + } + ++type IfMsghdr2 struct { ++ Msglen uint16 ++ Version uint8 ++ Type uint8 ++ Addrs int32 ++ Flags int32 ++ Index uint16 ++ Snd_len int32 ++ Snd_maxlen int32 ++ Snd_drops int32 ++ Timer int32 ++ Data IfData64 ++} ++ + type IfData struct { + Type uint8 + Typelen uint8 +@@ -499,6 +529,34 @@ type IfData struct { + Reserved2 uint32 + } + ++type IfData64 struct { ++ Type uint8 ++ Typelen uint8 ++ Physical uint8 ++ Addrlen uint8 ++ Hdrlen uint8 ++ Recvquota uint8 ++ Xmitquota uint8 ++ Unused1 uint8 ++ Mtu uint32 ++ Metric uint32 ++ Baudrate uint64 ++ Ipackets uint64 ++ Ierrors uint64 ++ Opackets uint64 ++ Oerrors uint64 ++ Collisions uint64 ++ Ibytes uint64 ++ Obytes uint64 ++ Imcasts uint64 ++ Omcasts uint64 ++ Iqdrops uint64 ++ Noproto uint64 ++ Recvtiming uint32 ++ Xmittiming uint32 ++ Lastchange Timeval32 ++} ++ + type IfaMsghdr struct { + Msglen uint16 + Version uint8 +@@ -544,6 +602,21 @@ type RtMsghdr struct { + Rmx RtMetrics + } + ++type RtMsghdr2 struct { ++ Msglen uint16 ++ Version uint8 ++ Type uint8 ++ Index uint16 ++ Flags int32 ++ Addrs int32 ++ Refcnt int32 ++ Parentflags int32 ++ Reserved int32 ++ Use int32 ++ Inits uint32 ++ Rmx RtMetrics ++} ++ + type RtMetrics struct { + Locks uint32 + Mtu uint32 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +index 28ff4ef7..2392226a 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +@@ -306,6 +306,19 @@ type XVSockPgen struct { + + type _Socklen uint32 + ++type SaeAssocID uint32 ++ ++type SaeConnID uint32 ++ ++type SaEndpoints struct { ++ Srcif uint32 ++ Srcaddr *RawSockaddr ++ Srcaddrlen uint32 ++ Dstaddr *RawSockaddr ++ Dstaddrlen uint32 ++ _ [4]byte ++} ++ + type Xucred struct { + Version uint32 + Uid uint32 +@@ -449,11 +462,14 @@ type FdSet struct { + + const ( + SizeofIfMsghdr = 0x70 ++ SizeofIfMsghdr2 = 0xa0 + SizeofIfData = 0x60 ++ SizeofIfData64 = 0x80 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c ++ SizeofRtMsghdr2 = 0x5c + SizeofRtMetrics = 0x38 + ) + +@@ -467,6 +483,20 @@ type IfMsghdr struct { + Data IfData + } + ++type IfMsghdr2 struct { ++ Msglen uint16 ++ Version uint8 ++ Type uint8 ++ Addrs int32 ++ Flags int32 ++ Index uint16 ++ Snd_len int32 ++ Snd_maxlen int32 ++ Snd_drops int32 ++ Timer int32 ++ Data IfData64 ++} ++ + type IfData struct { + Type uint8 + Typelen uint8 +@@ -499,6 +529,34 @@ type IfData struct { + Reserved2 uint32 + } + ++type IfData64 struct { ++ Type uint8 ++ Typelen uint8 ++ Physical uint8 ++ Addrlen uint8 ++ Hdrlen uint8 ++ Recvquota uint8 ++ Xmitquota uint8 ++ Unused1 uint8 ++ Mtu uint32 ++ Metric uint32 ++ Baudrate uint64 ++ Ipackets uint64 ++ Ierrors uint64 ++ Opackets uint64 ++ Oerrors uint64 ++ Collisions uint64 ++ Ibytes uint64 ++ Obytes uint64 ++ Imcasts uint64 ++ Omcasts uint64 ++ Iqdrops uint64 ++ Noproto uint64 ++ Recvtiming uint32 ++ Xmittiming uint32 ++ Lastchange Timeval32 ++} ++ + type IfaMsghdr struct { + Msglen uint16 + Version uint8 +@@ -544,6 +602,21 @@ type RtMsghdr struct { + Rmx RtMetrics + } + ++type RtMsghdr2 struct { ++ Msglen uint16 ++ Version uint8 ++ Type uint8 ++ Index uint16 ++ Flags int32 ++ Addrs int32 ++ Refcnt int32 ++ Parentflags int32 ++ Reserved int32 ++ Use int32 ++ Inits uint32 ++ Rmx RtMetrics ++} ++ + type RtMetrics struct { + Locks uint32 + Mtu uint32 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +index 6cbd094a..51e13eb0 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +@@ -625,6 +625,7 @@ const ( + POLLRDNORM = 0x40 + POLLWRBAND = 0x100 + POLLWRNORM = 0x4 ++ POLLRDHUP = 0x4000 + ) + + type CapRights struct { +diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +index 7c03b6ee..d002d8ef 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +@@ -630,6 +630,7 @@ const ( + POLLRDNORM = 0x40 + POLLWRBAND = 0x100 + POLLWRNORM = 0x4 ++ POLLRDHUP = 0x4000 + ) + + type CapRights struct { +diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +index 422107ee..3f863d89 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +@@ -616,6 +616,7 @@ const ( + POLLRDNORM = 0x40 + POLLWRBAND = 0x100 + POLLWRNORM = 0x4 ++ POLLRDHUP = 0x4000 + ) + + type CapRights struct { +diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +index 505a12ac..61c72931 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +@@ -610,6 +610,7 @@ const ( + POLLRDNORM = 0x40 + POLLWRBAND = 0x100 + POLLWRNORM = 0x4 ++ POLLRDHUP = 0x4000 + ) + + type CapRights struct { +diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go +index cc986c79..b5d17414 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go +@@ -612,6 +612,7 @@ const ( + POLLRDNORM = 0x40 + POLLWRBAND = 0x100 + POLLWRNORM = 0x4 ++ POLLRDHUP = 0x4000 + ) + + type CapRights struct { +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go +index eff6bcde..5537148d 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go +@@ -87,30 +87,35 @@ type StatxTimestamp struct { + } + + type Statx_t struct { +- Mask uint32 +- Blksize uint32 +- Attributes uint64 +- Nlink uint32 +- Uid uint32 +- Gid uint32 +- Mode uint16 +- _ [1]uint16 +- Ino uint64 +- Size uint64 +- Blocks uint64 +- Attributes_mask uint64 +- Atime StatxTimestamp +- Btime StatxTimestamp +- Ctime StatxTimestamp +- Mtime StatxTimestamp +- Rdev_major uint32 +- Rdev_minor uint32 +- Dev_major uint32 +- Dev_minor uint32 +- Mnt_id uint64 +- Dio_mem_align uint32 +- Dio_offset_align uint32 +- _ [12]uint64 ++ Mask uint32 ++ Blksize uint32 ++ Attributes uint64 ++ Nlink uint32 ++ Uid uint32 ++ Gid uint32 ++ Mode uint16 ++ _ [1]uint16 ++ Ino uint64 ++ Size uint64 ++ Blocks uint64 ++ Attributes_mask uint64 ++ Atime StatxTimestamp ++ Btime StatxTimestamp ++ Ctime StatxTimestamp ++ Mtime StatxTimestamp ++ Rdev_major uint32 ++ Rdev_minor uint32 ++ Dev_major uint32 ++ Dev_minor uint32 ++ Mnt_id uint64 ++ Dio_mem_align uint32 ++ Dio_offset_align uint32 ++ Subvol uint64 ++ Atomic_write_unit_min uint32 ++ Atomic_write_unit_max uint32 ++ Atomic_write_segments_max uint32 ++ _ [1]uint32 ++ _ [9]uint64 + } + + type Fsid struct { +@@ -515,6 +520,29 @@ type TCPInfo struct { + Total_rto_time uint32 + } + ++type TCPVegasInfo struct { ++ Enabled uint32 ++ Rttcnt uint32 ++ Rtt uint32 ++ Minrtt uint32 ++} ++ ++type TCPDCTCPInfo struct { ++ Enabled uint16 ++ Ce_state uint16 ++ Alpha uint32 ++ Ab_ecn uint32 ++ Ab_tot uint32 ++} ++ ++type TCPBBRInfo struct { ++ Bw_lo uint32 ++ Bw_hi uint32 ++ Min_rtt uint32 ++ Pacing_gain uint32 ++ Cwnd_gain uint32 ++} ++ + type CanFilter struct { + Id uint32 + Mask uint32 +@@ -556,6 +584,7 @@ const ( + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0xf8 ++ SizeofTCPCCInfo = 0x14 + SizeofCanFilter = 0x8 + SizeofTCPRepairOpt = 0x8 + ) +@@ -1178,7 +1207,8 @@ const ( + PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 0x10 + PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 0x11 + PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT = 0x12 +- PERF_SAMPLE_BRANCH_MAX_SHIFT = 0x13 ++ PERF_SAMPLE_BRANCH_COUNTERS = 0x80000 ++ PERF_SAMPLE_BRANCH_MAX_SHIFT = 0x14 + PERF_SAMPLE_BRANCH_USER = 0x1 + PERF_SAMPLE_BRANCH_KERNEL = 0x2 + PERF_SAMPLE_BRANCH_HV = 0x4 +@@ -1198,7 +1228,7 @@ const ( + PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 + PERF_SAMPLE_BRANCH_HW_INDEX = 0x20000 + PERF_SAMPLE_BRANCH_PRIV_SAVE = 0x40000 +- PERF_SAMPLE_BRANCH_MAX = 0x80000 ++ PERF_SAMPLE_BRANCH_MAX = 0x100000 + PERF_BR_UNKNOWN = 0x0 + PERF_BR_COND = 0x1 + PERF_BR_UNCOND = 0x2 +@@ -1722,12 +1752,6 @@ const ( + IFLA_IPVLAN_UNSPEC = 0x0 + IFLA_IPVLAN_MODE = 0x1 + IFLA_IPVLAN_FLAGS = 0x2 +- NETKIT_NEXT = -0x1 +- NETKIT_PASS = 0x0 +- NETKIT_DROP = 0x2 +- NETKIT_REDIRECT = 0x7 +- NETKIT_L2 = 0x0 +- NETKIT_L3 = 0x1 + IFLA_NETKIT_UNSPEC = 0x0 + IFLA_NETKIT_PEER_INFO = 0x1 + IFLA_NETKIT_PRIMARY = 0x2 +@@ -1766,6 +1790,7 @@ const ( + IFLA_VXLAN_DF = 0x1d + IFLA_VXLAN_VNIFILTER = 0x1e + IFLA_VXLAN_LOCALBYPASS = 0x1f ++ IFLA_VXLAN_LABEL_POLICY = 0x20 + IFLA_GENEVE_UNSPEC = 0x0 + IFLA_GENEVE_ID = 0x1 + IFLA_GENEVE_REMOTE = 0x2 +@@ -1795,6 +1820,8 @@ const ( + IFLA_GTP_ROLE = 0x4 + IFLA_GTP_CREATE_SOCKETS = 0x5 + IFLA_GTP_RESTART_COUNT = 0x6 ++ IFLA_GTP_LOCAL = 0x7 ++ IFLA_GTP_LOCAL6 = 0x8 + IFLA_BOND_UNSPEC = 0x0 + IFLA_BOND_MODE = 0x1 + IFLA_BOND_ACTIVE_SLAVE = 0x2 +@@ -1827,6 +1854,7 @@ const ( + IFLA_BOND_AD_LACP_ACTIVE = 0x1d + IFLA_BOND_MISSED_MAX = 0x1e + IFLA_BOND_NS_IP6_TARGET = 0x1f ++ IFLA_BOND_COUPLED_CONTROL = 0x20 + IFLA_BOND_AD_INFO_UNSPEC = 0x0 + IFLA_BOND_AD_INFO_AGGREGATOR = 0x1 + IFLA_BOND_AD_INFO_NUM_PORTS = 0x2 +@@ -1895,6 +1923,7 @@ const ( + IFLA_HSR_SEQ_NR = 0x5 + IFLA_HSR_VERSION = 0x6 + IFLA_HSR_PROTOCOL = 0x7 ++ IFLA_HSR_INTERLINK = 0x8 + IFLA_STATS_UNSPEC = 0x0 + IFLA_STATS_LINK_64 = 0x1 + IFLA_STATS_LINK_XSTATS = 0x2 +@@ -1947,6 +1976,15 @@ const ( + IFLA_DSA_MASTER = 0x1 + ) + ++const ( ++ NETKIT_NEXT = -0x1 ++ NETKIT_PASS = 0x0 ++ NETKIT_DROP = 0x2 ++ NETKIT_REDIRECT = 0x7 ++ NETKIT_L2 = 0x0 ++ NETKIT_L3 = 0x1 ++) ++ + const ( + NF_INET_PRE_ROUTING = 0x0 + NF_INET_LOCAL_IN = 0x1 +@@ -2481,6 +2519,15 @@ type XDPMmapOffsets struct { + Cr XDPRingOffset + } + ++type XDPUmemReg struct { ++ Addr uint64 ++ Len uint64 ++ Size uint32 ++ Headroom uint32 ++ Flags uint32 ++ Tx_metadata_len uint32 ++} ++ + type XDPStatistics struct { + Rx_dropped uint64 + Rx_invalid_descs uint64 +@@ -2547,8 +2594,8 @@ const ( + SOF_TIMESTAMPING_BIND_PHC = 0x8000 + SOF_TIMESTAMPING_OPT_ID_TCP = 0x10000 + +- SOF_TIMESTAMPING_LAST = 0x10000 +- SOF_TIMESTAMPING_MASK = 0x1ffff ++ SOF_TIMESTAMPING_LAST = 0x20000 ++ SOF_TIMESTAMPING_MASK = 0x3ffff + + SCM_TSTAMP_SND = 0x0 + SCM_TSTAMP_SCHED = 0x1 +@@ -2935,7 +2982,7 @@ const ( + BPF_TCP_LISTEN = 0xa + BPF_TCP_CLOSING = 0xb + BPF_TCP_NEW_SYN_RECV = 0xc +- BPF_TCP_MAX_STATES = 0xd ++ BPF_TCP_MAX_STATES = 0xe + TCP_BPF_IW = 0x3e9 + TCP_BPF_SNDCWND_CLAMP = 0x3ea + TCP_BPF_DELACK_MAX = 0x3eb +@@ -3211,7 +3258,7 @@ const ( + DEVLINK_CMD_LINECARD_NEW = 0x50 + DEVLINK_CMD_LINECARD_DEL = 0x51 + DEVLINK_CMD_SELFTESTS_GET = 0x52 +- DEVLINK_CMD_MAX = 0x53 ++ DEVLINK_CMD_MAX = 0x54 + DEVLINK_PORT_TYPE_NOTSET = 0x0 + DEVLINK_PORT_TYPE_AUTO = 0x1 + DEVLINK_PORT_TYPE_ETH = 0x2 +@@ -3463,7 +3510,7 @@ const ( + DEVLINK_PORT_FN_ATTR_STATE = 0x2 + DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3 + DEVLINK_PORT_FN_ATTR_CAPS = 0x4 +- DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x5 ++ DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x6 + ) + + type FsverityDigest struct { +@@ -3494,7 +3541,7 @@ type Nhmsg struct { + type NexthopGrp struct { + Id uint32 + Weight uint8 +- Resvd1 uint8 ++ High uint8 + Resvd2 uint16 + } + +@@ -3755,7 +3802,7 @@ const ( + ETHTOOL_MSG_PSE_GET = 0x24 + ETHTOOL_MSG_PSE_SET = 0x25 + ETHTOOL_MSG_RSS_GET = 0x26 +- ETHTOOL_MSG_USER_MAX = 0x2b ++ ETHTOOL_MSG_USER_MAX = 0x2d + ETHTOOL_MSG_KERNEL_NONE = 0x0 + ETHTOOL_MSG_STRSET_GET_REPLY = 0x1 + ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2 +@@ -3795,12 +3842,15 @@ const ( + ETHTOOL_MSG_MODULE_NTF = 0x24 + ETHTOOL_MSG_PSE_GET_REPLY = 0x25 + ETHTOOL_MSG_RSS_GET_REPLY = 0x26 +- ETHTOOL_MSG_KERNEL_MAX = 0x2b ++ ETHTOOL_MSG_KERNEL_MAX = 0x2e ++ ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 ++ ETHTOOL_FLAG_OMIT_REPLY = 0x2 ++ ETHTOOL_FLAG_STATS = 0x4 + ETHTOOL_A_HEADER_UNSPEC = 0x0 + ETHTOOL_A_HEADER_DEV_INDEX = 0x1 + ETHTOOL_A_HEADER_DEV_NAME = 0x2 + ETHTOOL_A_HEADER_FLAGS = 0x3 +- ETHTOOL_A_HEADER_MAX = 0x3 ++ ETHTOOL_A_HEADER_MAX = 0x4 + ETHTOOL_A_BITSET_BIT_UNSPEC = 0x0 + ETHTOOL_A_BITSET_BIT_INDEX = 0x1 + ETHTOOL_A_BITSET_BIT_NAME = 0x2 +@@ -3937,7 +3987,7 @@ const ( + ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17 + ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18 + ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19 +- ETHTOOL_A_COALESCE_MAX = 0x1c ++ ETHTOOL_A_COALESCE_MAX = 0x1e + ETHTOOL_A_PAUSE_UNSPEC = 0x0 + ETHTOOL_A_PAUSE_HEADER = 0x1 + ETHTOOL_A_PAUSE_AUTONEG = 0x2 +@@ -3965,7 +4015,7 @@ const ( + ETHTOOL_A_TSINFO_TX_TYPES = 0x3 + ETHTOOL_A_TSINFO_RX_FILTERS = 0x4 + ETHTOOL_A_TSINFO_PHC_INDEX = 0x5 +- ETHTOOL_A_TSINFO_MAX = 0x5 ++ ETHTOOL_A_TSINFO_MAX = 0x6 + ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0 + ETHTOOL_A_CABLE_TEST_HEADER = 0x1 + ETHTOOL_A_CABLE_TEST_MAX = 0x1 +@@ -3981,11 +4031,11 @@ const ( + ETHTOOL_A_CABLE_RESULT_UNSPEC = 0x0 + ETHTOOL_A_CABLE_RESULT_PAIR = 0x1 + ETHTOOL_A_CABLE_RESULT_CODE = 0x2 +- ETHTOOL_A_CABLE_RESULT_MAX = 0x2 ++ ETHTOOL_A_CABLE_RESULT_MAX = 0x3 + ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC = 0x0 + ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 0x1 + ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 0x2 +- ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x2 ++ ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x3 + ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC = 0x0 + ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED = 0x1 + ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED = 0x2 +@@ -4068,6 +4118,107 @@ type EthtoolDrvinfo struct { + Regdump_len uint32 + } + ++type EthtoolTsInfo struct { ++ Cmd uint32 ++ So_timestamping uint32 ++ Phc_index int32 ++ Tx_types uint32 ++ Tx_reserved [3]uint32 ++ Rx_filters uint32 ++ Rx_reserved [3]uint32 ++} ++ ++type HwTstampConfig struct { ++ Flags int32 ++ Tx_type int32 ++ Rx_filter int32 ++} ++ ++const ( ++ HWTSTAMP_FILTER_NONE = 0x0 ++ HWTSTAMP_FILTER_ALL = 0x1 ++ HWTSTAMP_FILTER_SOME = 0x2 ++ HWTSTAMP_FILTER_PTP_V1_L4_EVENT = 0x3 ++ HWTSTAMP_FILTER_PTP_V2_L4_EVENT = 0x6 ++ HWTSTAMP_FILTER_PTP_V2_L2_EVENT = 0x9 ++ HWTSTAMP_FILTER_PTP_V2_EVENT = 0xc ++) ++ ++const ( ++ HWTSTAMP_TX_OFF = 0x0 ++ HWTSTAMP_TX_ON = 0x1 ++ HWTSTAMP_TX_ONESTEP_SYNC = 0x2 ++) ++ ++type ( ++ PtpClockCaps struct { ++ Max_adj int32 ++ N_alarm int32 ++ N_ext_ts int32 ++ N_per_out int32 ++ Pps int32 ++ N_pins int32 ++ Cross_timestamping int32 ++ Adjust_phase int32 ++ Max_phase_adj int32 ++ Rsv [11]int32 ++ } ++ PtpClockTime struct { ++ Sec int64 ++ Nsec uint32 ++ Reserved uint32 ++ } ++ PtpExttsEvent struct { ++ T PtpClockTime ++ Index uint32 ++ Flags uint32 ++ Rsv [2]uint32 ++ } ++ PtpExttsRequest struct { ++ Index uint32 ++ Flags uint32 ++ Rsv [2]uint32 ++ } ++ PtpPeroutRequest struct { ++ StartOrPhase PtpClockTime ++ Period PtpClockTime ++ Index uint32 ++ Flags uint32 ++ On PtpClockTime ++ } ++ PtpPinDesc struct { ++ Name [64]byte ++ Index uint32 ++ Func uint32 ++ Chan uint32 ++ Rsv [5]uint32 ++ } ++ PtpSysOffset struct { ++ Samples uint32 ++ Rsv [3]uint32 ++ Ts [51]PtpClockTime ++ } ++ PtpSysOffsetExtended struct { ++ Samples uint32 ++ Clockid int32 ++ Rsv [2]uint32 ++ Ts [25][3]PtpClockTime ++ } ++ PtpSysOffsetPrecise struct { ++ Device PtpClockTime ++ Realtime PtpClockTime ++ Monoraw PtpClockTime ++ Rsv [4]uint32 ++ } ++) ++ ++const ( ++ PTP_PF_NONE = 0x0 ++ PTP_PF_EXTTS = 0x1 ++ PTP_PF_PEROUT = 0x2 ++ PTP_PF_PHYSYNC = 0x3 ++) ++ + type ( + HIDRawReportDescriptor struct { + Size uint32 +@@ -4249,6 +4400,7 @@ const ( + type LandlockRulesetAttr struct { + Access_fs uint64 + Access_net uint64 ++ Scoped uint64 + } + + type LandlockPathBeneathAttr struct { +@@ -4595,7 +4747,7 @@ const ( + NL80211_ATTR_MAC_HINT = 0xc8 + NL80211_ATTR_MAC_MASK = 0xd7 + NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca +- NL80211_ATTR_MAX = 0x146 ++ NL80211_ATTR_MAX = 0x14c + NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 + NL80211_ATTR_MAX_CSA_COUNTERS = 0xce + NL80211_ATTR_MAX_MATCH_SETS = 0x85 +@@ -4861,7 +5013,7 @@ const ( + NL80211_BSS_FREQUENCY_OFFSET = 0x14 + NL80211_BSS_INFORMATION_ELEMENTS = 0x6 + NL80211_BSS_LAST_SEEN_BOOTTIME = 0xf +- NL80211_BSS_MAX = 0x16 ++ NL80211_BSS_MAX = 0x18 + NL80211_BSS_MLD_ADDR = 0x16 + NL80211_BSS_MLO_LINK_ID = 0x15 + NL80211_BSS_PAD = 0x10 +@@ -4965,7 +5117,7 @@ const ( + NL80211_CMD_LEAVE_IBSS = 0x2c + NL80211_CMD_LEAVE_MESH = 0x45 + NL80211_CMD_LEAVE_OCB = 0x6d +- NL80211_CMD_MAX = 0x9a ++ NL80211_CMD_MAX = 0x9b + NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29 + NL80211_CMD_MODIFY_LINK_STA = 0x97 + NL80211_CMD_NAN_MATCH = 0x78 +@@ -5199,7 +5351,7 @@ const ( + NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf + NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe + NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf +- NL80211_FREQUENCY_ATTR_MAX = 0x1c ++ NL80211_FREQUENCY_ATTR_MAX = 0x21 + NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 + NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 + NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc +@@ -5693,7 +5845,7 @@ const ( + NL80211_STA_FLAG_ASSOCIATED = 0x7 + NL80211_STA_FLAG_AUTHENTICATED = 0x5 + NL80211_STA_FLAG_AUTHORIZED = 0x1 +- NL80211_STA_FLAG_MAX = 0x7 ++ NL80211_STA_FLAG_MAX = 0x8 + NL80211_STA_FLAG_MAX_OLD_API = 0x6 + NL80211_STA_FLAG_MFP = 0x4 + NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2 +@@ -5991,3 +6143,34 @@ type CachestatRange struct { + Off uint64 + Len uint64 + } ++ ++const ( ++ SK_MEMINFO_RMEM_ALLOC = 0x0 ++ SK_MEMINFO_RCVBUF = 0x1 ++ SK_MEMINFO_WMEM_ALLOC = 0x2 ++ SK_MEMINFO_SNDBUF = 0x3 ++ SK_MEMINFO_FWD_ALLOC = 0x4 ++ SK_MEMINFO_WMEM_QUEUED = 0x5 ++ SK_MEMINFO_OPTMEM = 0x6 ++ SK_MEMINFO_BACKLOG = 0x7 ++ SK_MEMINFO_DROPS = 0x8 ++ SK_MEMINFO_VARS = 0x9 ++ SKNLGRP_NONE = 0x0 ++ SKNLGRP_INET_TCP_DESTROY = 0x1 ++ SKNLGRP_INET_UDP_DESTROY = 0x2 ++ SKNLGRP_INET6_TCP_DESTROY = 0x3 ++ SKNLGRP_INET6_UDP_DESTROY = 0x4 ++ SK_DIAG_BPF_STORAGE_REQ_NONE = 0x0 ++ SK_DIAG_BPF_STORAGE_REQ_MAP_FD = 0x1 ++ SK_DIAG_BPF_STORAGE_REP_NONE = 0x0 ++ SK_DIAG_BPF_STORAGE = 0x1 ++ SK_DIAG_BPF_STORAGE_NONE = 0x0 ++ SK_DIAG_BPF_STORAGE_PAD = 0x1 ++ SK_DIAG_BPF_STORAGE_MAP_ID = 0x2 ++ SK_DIAG_BPF_STORAGE_MAP_VALUE = 0x3 ++) ++ ++type SockDiagReq struct { ++ Family uint8 ++ Protocol uint8 ++} +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +index 438a30af..fd402da4 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +@@ -477,14 +477,6 @@ const ( + BLKPG = 0x1269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +index adceca35..eb7a5e18 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +@@ -492,15 +492,6 @@ const ( + BLKPG = 0x1269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +index eeaa00a3..d78ac108 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +@@ -470,15 +470,6 @@ const ( + BLKPG = 0x1269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]uint8 + Driver_name [64]uint8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +index 6739aa91..cd06d47f 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +@@ -471,15 +471,6 @@ const ( + BLKPG = 0x1269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +index 9920ef63..2f28fe26 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +@@ -472,15 +472,6 @@ const ( + BLKPG = 0x1269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +index 2923b799..71d6cac2 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +@@ -476,15 +476,6 @@ const ( + BLKPG = 0x20001269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +index ce2750ee..8596d453 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +@@ -474,15 +474,6 @@ const ( + BLKPG = 0x20001269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +index 3038811d..cd60ea18 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +@@ -474,15 +474,6 @@ const ( + BLKPG = 0x20001269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +index efc6fed1..b0ae420c 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +@@ -476,15 +476,6 @@ const ( + BLKPG = 0x20001269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +index 9a654b75..83597287 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +@@ -482,15 +482,6 @@ const ( + BLKPG = 0x20001269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]uint8 + Driver_name [64]uint8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +index 40d358e3..69eb6a5c 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +@@ -481,15 +481,6 @@ const ( + BLKPG = 0x20001269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]uint8 + Driver_name [64]uint8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +index 148c6ceb..5f583cb6 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +@@ -481,15 +481,6 @@ const ( + BLKPG = 0x20001269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]uint8 + Driver_name [64]uint8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +index 72ba8154..ad05b51a 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +@@ -499,15 +499,6 @@ const ( + BLKPG = 0x1269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]uint8 + Driver_name [64]uint8 +@@ -736,6 +727,37 @@ const ( + RISCV_HWPROBE_EXT_ZBA = 0x8 + RISCV_HWPROBE_EXT_ZBB = 0x10 + RISCV_HWPROBE_EXT_ZBS = 0x20 ++ RISCV_HWPROBE_EXT_ZICBOZ = 0x40 ++ RISCV_HWPROBE_EXT_ZBC = 0x80 ++ RISCV_HWPROBE_EXT_ZBKB = 0x100 ++ RISCV_HWPROBE_EXT_ZBKC = 0x200 ++ RISCV_HWPROBE_EXT_ZBKX = 0x400 ++ RISCV_HWPROBE_EXT_ZKND = 0x800 ++ RISCV_HWPROBE_EXT_ZKNE = 0x1000 ++ RISCV_HWPROBE_EXT_ZKNH = 0x2000 ++ RISCV_HWPROBE_EXT_ZKSED = 0x4000 ++ RISCV_HWPROBE_EXT_ZKSH = 0x8000 ++ RISCV_HWPROBE_EXT_ZKT = 0x10000 ++ RISCV_HWPROBE_EXT_ZVBB = 0x20000 ++ RISCV_HWPROBE_EXT_ZVBC = 0x40000 ++ RISCV_HWPROBE_EXT_ZVKB = 0x80000 ++ RISCV_HWPROBE_EXT_ZVKG = 0x100000 ++ RISCV_HWPROBE_EXT_ZVKNED = 0x200000 ++ RISCV_HWPROBE_EXT_ZVKNHA = 0x400000 ++ RISCV_HWPROBE_EXT_ZVKNHB = 0x800000 ++ RISCV_HWPROBE_EXT_ZVKSED = 0x1000000 ++ RISCV_HWPROBE_EXT_ZVKSH = 0x2000000 ++ RISCV_HWPROBE_EXT_ZVKT = 0x4000000 ++ RISCV_HWPROBE_EXT_ZFH = 0x8000000 ++ RISCV_HWPROBE_EXT_ZFHMIN = 0x10000000 ++ RISCV_HWPROBE_EXT_ZIHINTNTL = 0x20000000 ++ RISCV_HWPROBE_EXT_ZVFH = 0x40000000 ++ RISCV_HWPROBE_EXT_ZVFHMIN = 0x80000000 ++ RISCV_HWPROBE_EXT_ZFA = 0x100000000 ++ RISCV_HWPROBE_EXT_ZTSO = 0x200000000 ++ RISCV_HWPROBE_EXT_ZACAS = 0x400000000 ++ RISCV_HWPROBE_EXT_ZICOND = 0x800000000 ++ RISCV_HWPROBE_EXT_ZIHINTPAUSE = 0x1000000000 + RISCV_HWPROBE_KEY_CPUPERF_0 = 0x5 + RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0x0 + RISCV_HWPROBE_MISALIGNED_EMULATED = 0x1 +@@ -743,4 +765,6 @@ const ( + RISCV_HWPROBE_MISALIGNED_FAST = 0x3 + RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4 + RISCV_HWPROBE_MISALIGNED_MASK = 0x7 ++ RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE = 0x6 ++ RISCV_HWPROBE_WHICH_CPUS = 0x1 + ) +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +index 71e76550..cf3ce900 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +@@ -495,15 +495,6 @@ const ( + BLKPG = 0x1269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +index 4abbdb9d..590b5673 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +@@ -476,15 +476,6 @@ const ( + BLKPG = 0x20001269 + ) + +-type XDPUmemReg struct { +- Addr uint64 +- Len uint64 +- Size uint32 +- Headroom uint32 +- Flags uint32 +- _ [4]byte +-} +- + type CryptoUserAlg struct { + Name [64]int8 + Driver_name [64]int8 +diff --git a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go +index 54f31be6..2e5d5a44 100644 +--- a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go ++++ b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go +@@ -25,10 +25,13 @@ const ( + SizeofIPv6Mreq = 20 + SizeofICMPv6Filter = 32 + SizeofIPv6MTUInfo = 32 ++ SizeofInet4Pktinfo = 8 ++ SizeofInet6Pktinfo = 20 + SizeofLinger = 8 + SizeofSockaddrInet4 = 16 + SizeofSockaddrInet6 = 28 + SizeofTCPInfo = 0x68 ++ SizeofUcred = 12 + ) + + type ( +@@ -69,12 +72,17 @@ type Utimbuf struct { + } + + type Utsname struct { +- Sysname [65]byte +- Nodename [65]byte +- Release [65]byte +- Version [65]byte +- Machine [65]byte +- Domainname [65]byte ++ Sysname [16]byte ++ Nodename [32]byte ++ Release [8]byte ++ Version [8]byte ++ Machine [16]byte ++} ++ ++type Ucred struct { ++ Pid int32 ++ Uid uint32 ++ Gid uint32 + } + + type RawSockaddrInet4 struct { +@@ -325,7 +333,7 @@ type Statvfs_t struct { + } + + type Statfs_t struct { +- Type uint32 ++ Type uint64 + Bsize uint64 + Blocks uint64 + Bfree uint64 +@@ -336,6 +344,7 @@ type Statfs_t struct { + Namelen uint64 + Frsize uint64 + Flags uint64 ++ _ [4]uint64 + } + + type direntLE struct { +@@ -368,6 +377,12 @@ type Flock_t struct { + Pid int32 + } + ++type F_cnvrt struct { ++ Cvtcmd int32 ++ Pccsid int16 ++ Fccsid int16 ++} ++ + type Termios struct { + Cflag uint32 + Iflag uint32 +@@ -412,3 +427,126 @@ type W_Mntent struct { + Quiesceowner [8]byte + _ [38]byte + } ++ ++type EpollEvent struct { ++ Events uint32 ++ _ int32 ++ Fd int32 ++ Pad int32 ++} ++ ++type InotifyEvent struct { ++ Wd int32 ++ Mask uint32 ++ Cookie uint32 ++ Len uint32 ++ Name string ++} ++ ++const ( ++ SizeofInotifyEvent = 0x10 ++) ++ ++type ConsMsg2 struct { ++ Cm2Format uint16 ++ Cm2R1 uint16 ++ Cm2Msglength uint32 ++ Cm2Msg *byte ++ Cm2R2 [4]byte ++ Cm2R3 [4]byte ++ Cm2Routcde *uint32 ++ Cm2Descr *uint32 ++ Cm2Msgflag uint32 ++ Cm2Token uint32 ++ Cm2Msgid *uint32 ++ Cm2R4 [4]byte ++ Cm2DomToken uint32 ++ Cm2DomMsgid *uint32 ++ Cm2ModCartptr *byte ++ Cm2ModConsidptr *byte ++ Cm2MsgCart [8]byte ++ Cm2MsgConsid [4]byte ++ Cm2R5 [12]byte ++} ++ ++const ( ++ CC_modify = 1 ++ CC_stop = 2 ++ CONSOLE_FORMAT_2 = 2 ++ CONSOLE_FORMAT_3 = 3 ++ CONSOLE_HRDCPY = 0x80000000 ++) ++ ++type OpenHow struct { ++ Flags uint64 ++ Mode uint64 ++ Resolve uint64 ++} ++ ++const SizeofOpenHow = 0x18 ++ ++const ( ++ RESOLVE_CACHED = 0x20 ++ RESOLVE_BENEATH = 0x8 ++ RESOLVE_IN_ROOT = 0x10 ++ RESOLVE_NO_MAGICLINKS = 0x2 ++ RESOLVE_NO_SYMLINKS = 0x4 ++ RESOLVE_NO_XDEV = 0x1 ++) ++ ++type Siginfo struct { ++ Signo int32 ++ Errno int32 ++ Code int32 ++ Pid int32 ++ Uid uint32 ++ _ [44]byte ++} ++ ++type SysvIpcPerm struct { ++ Uid uint32 ++ Gid uint32 ++ Cuid uint32 ++ Cgid uint32 ++ Mode int32 ++} ++ ++type SysvShmDesc struct { ++ Perm SysvIpcPerm ++ _ [4]byte ++ Lpid int32 ++ Cpid int32 ++ Nattch uint32 ++ _ [4]byte ++ _ [4]byte ++ _ [4]byte ++ _ int32 ++ _ uint8 ++ _ uint8 ++ _ uint16 ++ _ *byte ++ Segsz uint64 ++ Atime Time_t ++ Dtime Time_t ++ Ctime Time_t ++} ++ ++type SysvShmDesc64 struct { ++ Perm SysvIpcPerm ++ _ [4]byte ++ Lpid int32 ++ Cpid int32 ++ Nattch uint32 ++ _ [4]byte ++ _ [4]byte ++ _ [4]byte ++ _ int32 ++ _ byte ++ _ uint8 ++ _ uint16 ++ _ *byte ++ Segsz uint64 ++ Atime int64 ++ Dtime int64 ++ Ctime int64 ++} +diff --git a/vendor/golang.org/x/sys/windows/aliases.go b/vendor/golang.org/x/sys/windows/aliases.go +index ce2d713d..16f90560 100644 +--- a/vendor/golang.org/x/sys/windows/aliases.go ++++ b/vendor/golang.org/x/sys/windows/aliases.go +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build windows && go1.9 ++//go:build windows + + package windows + +diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go +index 115341fb..3ca814f5 100644 +--- a/vendor/golang.org/x/sys/windows/dll_windows.go ++++ b/vendor/golang.org/x/sys/windows/dll_windows.go +@@ -43,8 +43,8 @@ type DLL struct { + // LoadDLL loads DLL file into memory. + // + // Warning: using LoadDLL without an absolute path name is subject to +-// DLL preloading attacks. To safely load a system DLL, use LazyDLL +-// with System set to true, or use LoadLibraryEx directly. ++// DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL], ++// or use [LoadLibraryEx] directly. + func LoadDLL(name string) (dll *DLL, err error) { + namep, err := UTF16PtrFromString(name) + if err != nil { +@@ -65,7 +65,7 @@ func LoadDLL(name string) (dll *DLL, err error) { + return d, nil + } + +-// MustLoadDLL is like LoadDLL but panics if load operation failes. ++// MustLoadDLL is like LoadDLL but panics if load operation fails. + func MustLoadDLL(name string) *DLL { + d, e := LoadDLL(name) + if e != nil { +@@ -271,6 +271,9 @@ func (d *LazyDLL) NewProc(name string) *LazyProc { + } + + // NewLazyDLL creates new LazyDLL associated with DLL file. ++// ++// Warning: using NewLazyDLL without an absolute path name is subject to ++// DLL preloading attacks. To safely load a system DLL, use [NewLazySystemDLL]. + func NewLazyDLL(name string) *LazyDLL { + return &LazyDLL{Name: name} + } +@@ -410,7 +413,3 @@ func loadLibraryEx(name string, system bool) (*DLL, error) { + } + return &DLL{Name: name, Handle: h}, nil + } +- +-type errString string +- +-func (s errString) Error() string { return string(s) } +diff --git a/vendor/golang.org/x/sys/windows/empty.s b/vendor/golang.org/x/sys/windows/empty.s +deleted file mode 100644 +index ba64caca..00000000 +--- a/vendor/golang.org/x/sys/windows/empty.s ++++ /dev/null +@@ -1,8 +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.12 +- +-// This file is here to allow bodyless functions with go:linkname for Go 1.11 +-// and earlier (see https://golang.org/issue/23311). +diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go +index 26be94a8..b6e1ab76 100644 +--- a/vendor/golang.org/x/sys/windows/security_windows.go ++++ b/vendor/golang.org/x/sys/windows/security_windows.go +@@ -68,6 +68,7 @@ type UserInfo10 struct { + //sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo + //sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation + //sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree ++//sys NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) = netapi32.NetUserEnum + + const ( + // do not reorder +@@ -893,7 +894,7 @@ type ACL struct { + aclRevision byte + sbz1 byte + aclSize uint16 +- aceCount uint16 ++ AceCount uint16 + sbz2 uint16 + } + +@@ -1086,6 +1087,27 @@ type EXPLICIT_ACCESS struct { + Trustee TRUSTEE + } + ++// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header ++type ACE_HEADER struct { ++ AceType uint8 ++ AceFlags uint8 ++ AceSize uint16 ++} ++ ++// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-access_allowed_ace ++type ACCESS_ALLOWED_ACE struct { ++ Header ACE_HEADER ++ Mask ACCESS_MASK ++ SidStart uint32 ++} ++ ++const ( ++ // Constants for AceType ++ // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header ++ ACCESS_ALLOWED_ACE_TYPE = 0 ++ ACCESS_DENIED_ACE_TYPE = 1 ++) ++ + // This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions. + type TrusteeValue uintptr + +@@ -1157,6 +1179,7 @@ type OBJECTS_AND_NAME struct { + //sys makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) = advapi32.MakeSelfRelativeSD + + //sys setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) = advapi32.SetEntriesInAclW ++//sys GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) = advapi32.GetAce + + // Control returns the security descriptor control bits. + func (sd *SECURITY_DESCRIPTOR) Control() (control SECURITY_DESCRIPTOR_CONTROL, revision uint32, err error) { +diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go +index 6525c62f..4a325438 100644 +--- a/vendor/golang.org/x/sys/windows/syscall_windows.go ++++ b/vendor/golang.org/x/sys/windows/syscall_windows.go +@@ -17,8 +17,10 @@ import ( + "unsafe" + ) + +-type Handle uintptr +-type HWND uintptr ++type ( ++ Handle uintptr ++ HWND uintptr ++) + + const ( + InvalidHandle = ^Handle(0) +@@ -166,6 +168,8 @@ func NewCallbackCDecl(fn interface{}) uintptr { + //sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW + //sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) + //sys DisconnectNamedPipe(pipe Handle) (err error) ++//sys GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) ++//sys GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) + //sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) + //sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW + //sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState +@@ -211,6 +215,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { + //sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) + //sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW + //sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId ++//sys LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) [failretval==0] = user32.LoadKeyboardLayoutW ++//sys UnloadKeyboardLayout(hkl Handle) (err error) = user32.UnloadKeyboardLayout ++//sys GetKeyboardLayout(tid uint32) (hkl Handle) = user32.GetKeyboardLayout ++//sys ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) = user32.ToUnicodeEx + //sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow + //sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW + //sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx +@@ -307,6 +315,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { + //sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode + //sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo + //sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition ++//sys GetConsoleCP() (cp uint32, err error) = kernel32.GetConsoleCP ++//sys GetConsoleOutputCP() (cp uint32, err error) = kernel32.GetConsoleOutputCP ++//sys SetConsoleCP(cp uint32) (err error) = kernel32.SetConsoleCP ++//sys SetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP + //sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW + //sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW + //sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole +@@ -715,20 +727,12 @@ func DurationSinceBoot() time.Duration { + } + + func Ftruncate(fd Handle, length int64) (err error) { +- curoffset, e := Seek(fd, 0, 1) +- if e != nil { +- return e +- } +- defer Seek(fd, curoffset, 0) +- _, e = Seek(fd, length, 0) +- if e != nil { +- return e ++ type _FILE_END_OF_FILE_INFO struct { ++ EndOfFile int64 + } +- e = SetEndOfFile(fd) +- if e != nil { +- return e +- } +- return nil ++ var info _FILE_END_OF_FILE_INFO ++ info.EndOfFile = length ++ return SetFileInformationByHandle(fd, FileEndOfFileInfo, (*byte)(unsafe.Pointer(&info)), uint32(unsafe.Sizeof(info))) + } + + func Gettimeofday(tv *Timeval) (err error) { +@@ -884,6 +888,11 @@ const socket_error = uintptr(^uint32(0)) + //sys GetACP() (acp uint32) = kernel32.GetACP + //sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar + //sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx ++//sys GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) = iphlpapi.GetIfEntry2Ex ++//sys GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) = iphlpapi.GetUnicastIpAddressEntry ++//sys NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyIpInterfaceChange ++//sys NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) = iphlpapi.NotifyUnicastIpAddressChange ++//sys CancelMibChangeNotify2(notificationHandle Handle) (errcode error) = iphlpapi.CancelMibChangeNotify2 + + // For testing: clients can set this flag to force + // creation of IPv6 sockets to return EAFNOSUPPORT. +@@ -1368,9 +1377,11 @@ func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) { + func SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) { + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4) + } ++ + func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) { + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq))) + } ++ + func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) { + return syscall.EWINDOWS + } +@@ -1673,13 +1684,16 @@ func (s NTStatus) Error() string { + // do not use NTUnicodeString, and instead UTF16PtrFromString should be used for + // the more common *uint16 string type. + func NewNTUnicodeString(s string) (*NTUnicodeString, error) { +- var u NTUnicodeString +- s16, err := UTF16PtrFromString(s) ++ s16, err := UTF16FromString(s) + if err != nil { + return nil, err + } +- RtlInitUnicodeString(&u, s16) +- return &u, nil ++ n := uint16(len(s16) * 2) ++ return &NTUnicodeString{ ++ Length: n - 2, // subtract 2 bytes for the NULL terminator ++ MaximumLength: n, ++ Buffer: &s16[0], ++ }, nil + } + + // Slice returns a uint16 slice that aliases the data in the NTUnicodeString. +diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go +index d8cb71db..9d138de5 100644 +--- a/vendor/golang.org/x/sys/windows/types_windows.go ++++ b/vendor/golang.org/x/sys/windows/types_windows.go +@@ -176,6 +176,7 @@ const ( + WAIT_FAILED = 0xFFFFFFFF + + // Access rights for process. ++ PROCESS_ALL_ACCESS = 0xFFFF + PROCESS_CREATE_PROCESS = 0x0080 + PROCESS_CREATE_THREAD = 0x0002 + PROCESS_DUP_HANDLE = 0x0040 +@@ -1060,6 +1061,7 @@ const ( + SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6 + SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4 + SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12 ++ SIO_UDP_NETRESET = IOC_IN | IOC_VENDOR | 15 + + // cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460 + +@@ -2003,7 +2005,21 @@ const ( + MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20 + ) + +-const GAA_FLAG_INCLUDE_PREFIX = 0x00000010 ++// Flags for GetAdaptersAddresses, see ++// https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses. ++const ( ++ GAA_FLAG_SKIP_UNICAST = 0x1 ++ GAA_FLAG_SKIP_ANYCAST = 0x2 ++ GAA_FLAG_SKIP_MULTICAST = 0x4 ++ GAA_FLAG_SKIP_DNS_SERVER = 0x8 ++ GAA_FLAG_INCLUDE_PREFIX = 0x10 ++ GAA_FLAG_SKIP_FRIENDLY_NAME = 0x20 ++ GAA_FLAG_INCLUDE_WINS_INFO = 0x40 ++ GAA_FLAG_INCLUDE_GATEWAYS = 0x80 ++ GAA_FLAG_INCLUDE_ALL_INTERFACES = 0x100 ++ GAA_FLAG_INCLUDE_ALL_COMPARTMENTS = 0x200 ++ GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER = 0x400 ++) + + const ( + IF_TYPE_OTHER = 1 +@@ -2017,6 +2033,50 @@ const ( + IF_TYPE_IEEE1394 = 144 + ) + ++// Enum NL_PREFIX_ORIGIN for [IpAdapterUnicastAddress], see ++// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_prefix_origin ++const ( ++ IpPrefixOriginOther = 0 ++ IpPrefixOriginManual = 1 ++ IpPrefixOriginWellKnown = 2 ++ IpPrefixOriginDhcp = 3 ++ IpPrefixOriginRouterAdvertisement = 4 ++ IpPrefixOriginUnchanged = 1 << 4 ++) ++ ++// Enum NL_SUFFIX_ORIGIN for [IpAdapterUnicastAddress], see ++// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_suffix_origin ++const ( ++ NlsoOther = 0 ++ NlsoManual = 1 ++ NlsoWellKnown = 2 ++ NlsoDhcp = 3 ++ NlsoLinkLayerAddress = 4 ++ NlsoRandom = 5 ++ IpSuffixOriginOther = 0 ++ IpSuffixOriginManual = 1 ++ IpSuffixOriginWellKnown = 2 ++ IpSuffixOriginDhcp = 3 ++ IpSuffixOriginLinkLayerAddress = 4 ++ IpSuffixOriginRandom = 5 ++ IpSuffixOriginUnchanged = 1 << 4 ++) ++ ++// Enum NL_DAD_STATE for [IpAdapterUnicastAddress], see ++// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_dad_state ++const ( ++ NldsInvalid = 0 ++ NldsTentative = 1 ++ NldsDuplicate = 2 ++ NldsDeprecated = 3 ++ NldsPreferred = 4 ++ IpDadStateInvalid = 0 ++ IpDadStateTentative = 1 ++ IpDadStateDuplicate = 2 ++ IpDadStateDeprecated = 3 ++ IpDadStatePreferred = 4 ++) ++ + type SocketAddress struct { + Sockaddr *syscall.RawSockaddrAny + SockaddrLength int32 +@@ -2144,6 +2204,132 @@ const ( + IfOperStatusLowerLayerDown = 7 + ) + ++const ( ++ IF_MAX_PHYS_ADDRESS_LENGTH = 32 ++ IF_MAX_STRING_SIZE = 256 ++) ++ ++// MIB_IF_ENTRY_LEVEL enumeration from netioapi.h or ++// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/nf-netioapi-getifentry2ex. ++const ( ++ MibIfEntryNormal = 0 ++ MibIfEntryNormalWithoutStatistics = 2 ++) ++ ++// MIB_NOTIFICATION_TYPE enumeration from netioapi.h or ++// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ne-netioapi-mib_notification_type. ++const ( ++ MibParameterNotification = 0 ++ MibAddInstance = 1 ++ MibDeleteInstance = 2 ++ MibInitialNotification = 3 ++) ++ ++// MibIfRow2 stores information about a particular interface. See ++// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_if_row2. ++type MibIfRow2 struct { ++ InterfaceLuid uint64 ++ InterfaceIndex uint32 ++ InterfaceGuid GUID ++ Alias [IF_MAX_STRING_SIZE + 1]uint16 ++ Description [IF_MAX_STRING_SIZE + 1]uint16 ++ PhysicalAddressLength uint32 ++ PhysicalAddress [IF_MAX_PHYS_ADDRESS_LENGTH]uint8 ++ PermanentPhysicalAddress [IF_MAX_PHYS_ADDRESS_LENGTH]uint8 ++ Mtu uint32 ++ Type uint32 ++ TunnelType uint32 ++ MediaType uint32 ++ PhysicalMediumType uint32 ++ AccessType uint32 ++ DirectionType uint32 ++ InterfaceAndOperStatusFlags uint8 ++ OperStatus uint32 ++ AdminStatus uint32 ++ MediaConnectState uint32 ++ NetworkGuid GUID ++ ConnectionType uint32 ++ TransmitLinkSpeed uint64 ++ ReceiveLinkSpeed uint64 ++ InOctets uint64 ++ InUcastPkts uint64 ++ InNUcastPkts uint64 ++ InDiscards uint64 ++ InErrors uint64 ++ InUnknownProtos uint64 ++ InUcastOctets uint64 ++ InMulticastOctets uint64 ++ InBroadcastOctets uint64 ++ OutOctets uint64 ++ OutUcastPkts uint64 ++ OutNUcastPkts uint64 ++ OutDiscards uint64 ++ OutErrors uint64 ++ OutUcastOctets uint64 ++ OutMulticastOctets uint64 ++ OutBroadcastOctets uint64 ++ OutQLen uint64 ++} ++ ++// MIB_UNICASTIPADDRESS_ROW stores information about a unicast IP address. See ++// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_unicastipaddress_row. ++type MibUnicastIpAddressRow struct { ++ Address RawSockaddrInet6 // SOCKADDR_INET union ++ InterfaceLuid uint64 ++ InterfaceIndex uint32 ++ PrefixOrigin uint32 ++ SuffixOrigin uint32 ++ ValidLifetime uint32 ++ PreferredLifetime uint32 ++ OnLinkPrefixLength uint8 ++ SkipAsSource uint8 ++ DadState uint32 ++ ScopeId uint32 ++ CreationTimeStamp Filetime ++} ++ ++const ScopeLevelCount = 16 ++ ++// MIB_IPINTERFACE_ROW stores interface management information for a particular IP address family on a network interface. ++// See https://learn.microsoft.com/en-us/windows/win32/api/netioapi/ns-netioapi-mib_ipinterface_row. ++type MibIpInterfaceRow struct { ++ Family uint16 ++ InterfaceLuid uint64 ++ InterfaceIndex uint32 ++ MaxReassemblySize uint32 ++ InterfaceIdentifier uint64 ++ MinRouterAdvertisementInterval uint32 ++ MaxRouterAdvertisementInterval uint32 ++ AdvertisingEnabled uint8 ++ ForwardingEnabled uint8 ++ WeakHostSend uint8 ++ WeakHostReceive uint8 ++ UseAutomaticMetric uint8 ++ UseNeighborUnreachabilityDetection uint8 ++ ManagedAddressConfigurationSupported uint8 ++ OtherStatefulConfigurationSupported uint8 ++ AdvertiseDefaultRoute uint8 ++ RouterDiscoveryBehavior uint32 ++ DadTransmits uint32 ++ BaseReachableTime uint32 ++ RetransmitTime uint32 ++ PathMtuDiscoveryTimeout uint32 ++ LinkLocalAddressBehavior uint32 ++ LinkLocalAddressTimeout uint32 ++ ZoneIndices [ScopeLevelCount]uint32 ++ SitePrefixLength uint32 ++ Metric uint32 ++ NlMtu uint32 ++ Connected uint8 ++ SupportsWakeUpPatterns uint8 ++ SupportsNeighborDiscovery uint8 ++ SupportsRouterDiscovery uint8 ++ ReachableTime uint32 ++ TransmitOffload uint32 ++ ReceiveOffload uint32 ++ DisableDefaultRoutes uint8 ++} ++ + // Console related constants used for the mode parameter to SetConsoleMode. See + // https://docs.microsoft.com/en-us/windows/console/setconsolemode for details. + +@@ -3404,3 +3590,14 @@ type DCB struct { + EvtChar byte + wReserved1 uint16 + } ++ ++// Keyboard Layout Flags. ++// See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadkeyboardlayoutw ++const ( ++ KLF_ACTIVATE = 0x00000001 ++ KLF_SUBSTITUTE_OK = 0x00000002 ++ KLF_REORDER = 0x00000008 ++ KLF_REPLACELANG = 0x00000010 ++ KLF_NOTELLSHELL = 0x00000080 ++ KLF_SETFORPROCESS = 0x00000100 ++) +diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go +index 5c6035dd..01c0716c 100644 +--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go ++++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go +@@ -91,6 +91,7 @@ var ( + procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW") + procEqualSid = modadvapi32.NewProc("EqualSid") + procFreeSid = modadvapi32.NewProc("FreeSid") ++ procGetAce = modadvapi32.NewProc("GetAce") + procGetLengthSid = modadvapi32.NewProc("GetLengthSid") + procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW") + procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl") +@@ -180,10 +181,15 @@ var ( + procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree") + procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute") + procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute") ++ procCancelMibChangeNotify2 = modiphlpapi.NewProc("CancelMibChangeNotify2") + procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses") + procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") + procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx") + procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") ++ procGetIfEntry2Ex = modiphlpapi.NewProc("GetIfEntry2Ex") ++ procGetUnicastIpAddressEntry = modiphlpapi.NewProc("GetUnicastIpAddressEntry") ++ procNotifyIpInterfaceChange = modiphlpapi.NewProc("NotifyIpInterfaceChange") ++ procNotifyUnicastIpAddressChange = modiphlpapi.NewProc("NotifyUnicastIpAddressChange") + procAddDllDirectory = modkernel32.NewProc("AddDllDirectory") + procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject") + procCancelIo = modkernel32.NewProc("CancelIo") +@@ -246,7 +252,9 @@ var ( + procGetCommandLineW = modkernel32.NewProc("GetCommandLineW") + procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") + procGetComputerNameW = modkernel32.NewProc("GetComputerNameW") ++ procGetConsoleCP = modkernel32.NewProc("GetConsoleCP") + procGetConsoleMode = modkernel32.NewProc("GetConsoleMode") ++ procGetConsoleOutputCP = modkernel32.NewProc("GetConsoleOutputCP") + procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo") + procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW") + procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") +@@ -272,8 +280,10 @@ var ( + procGetMaximumProcessorCount = modkernel32.NewProc("GetMaximumProcessorCount") + procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW") + procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW") ++ procGetNamedPipeClientProcessId = modkernel32.NewProc("GetNamedPipeClientProcessId") + procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW") + procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo") ++ procGetNamedPipeServerProcessId = modkernel32.NewProc("GetNamedPipeServerProcessId") + procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult") + procGetPriorityClass = modkernel32.NewProc("GetPriorityClass") + procGetProcAddress = modkernel32.NewProc("GetProcAddress") +@@ -346,8 +356,10 @@ var ( + procSetCommMask = modkernel32.NewProc("SetCommMask") + procSetCommState = modkernel32.NewProc("SetCommState") + procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts") ++ procSetConsoleCP = modkernel32.NewProc("SetConsoleCP") + procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition") + procSetConsoleMode = modkernel32.NewProc("SetConsoleMode") ++ procSetConsoleOutputCP = modkernel32.NewProc("SetConsoleOutputCP") + procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW") + procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories") + procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW") +@@ -401,6 +413,7 @@ var ( + procTransmitFile = modmswsock.NewProc("TransmitFile") + procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree") + procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation") ++ procNetUserEnum = modnetapi32.NewProc("NetUserEnum") + procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo") + procNtCreateFile = modntdll.NewProc("NtCreateFile") + procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile") +@@ -476,12 +489,16 @@ var ( + procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow") + procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow") + procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo") ++ procGetKeyboardLayout = moduser32.NewProc("GetKeyboardLayout") + procGetShellWindow = moduser32.NewProc("GetShellWindow") + procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId") + procIsWindow = moduser32.NewProc("IsWindow") + procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode") + procIsWindowVisible = moduser32.NewProc("IsWindowVisible") ++ procLoadKeyboardLayoutW = moduser32.NewProc("LoadKeyboardLayoutW") + procMessageBoxW = moduser32.NewProc("MessageBoxW") ++ procToUnicodeEx = moduser32.NewProc("ToUnicodeEx") ++ procUnloadKeyboardLayout = moduser32.NewProc("UnloadKeyboardLayout") + procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock") + procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock") + procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW") +@@ -787,6 +804,14 @@ func FreeSid(sid *SID) (err error) { + return + } + ++func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) { ++ r1, _, e1 := syscall.Syscall(procGetAce.Addr(), 3, uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce))) ++ if r1 == 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ + func GetLengthSid(sid *SID) (len uint32) { + r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + len = uint32(r0) +@@ -1588,6 +1613,14 @@ func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si + return + } + ++func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) { ++ r0, _, _ := syscall.Syscall(procCancelMibChangeNotify2.Addr(), 1, uintptr(notificationHandle), 0, 0) ++ if r0 != 0 { ++ errcode = syscall.Errno(r0) ++ } ++ return ++} ++ + func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) { + r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0) + if r0 != 0 { +@@ -1620,6 +1653,46 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) { + return + } + ++func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) { ++ r0, _, _ := syscall.Syscall(procGetIfEntry2Ex.Addr(), 2, uintptr(level), uintptr(unsafe.Pointer(row)), 0) ++ if r0 != 0 { ++ errcode = syscall.Errno(r0) ++ } ++ return ++} ++ ++func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) { ++ r0, _, _ := syscall.Syscall(procGetUnicastIpAddressEntry.Addr(), 1, uintptr(unsafe.Pointer(row)), 0, 0) ++ if r0 != 0 { ++ errcode = syscall.Errno(r0) ++ } ++ return ++} ++ ++func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) { ++ var _p0 uint32 ++ if initialNotification { ++ _p0 = 1 ++ } ++ r0, _, _ := syscall.Syscall6(procNotifyIpInterfaceChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) ++ if r0 != 0 { ++ errcode = syscall.Errno(r0) ++ } ++ return ++} ++ ++func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext unsafe.Pointer, initialNotification bool, notificationHandle *Handle) (errcode error) { ++ var _p0 uint32 ++ if initialNotification { ++ _p0 = 1 ++ } ++ r0, _, _ := syscall.Syscall6(procNotifyUnicastIpAddressChange.Addr(), 5, uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)), 0) ++ if r0 != 0 { ++ errcode = syscall.Errno(r0) ++ } ++ return ++} ++ + func AddDllDirectory(path *uint16) (cookie uintptr, err error) { + r0, _, e1 := syscall.Syscall(procAddDllDirectory.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + cookie = uintptr(r0) +@@ -2148,6 +2221,15 @@ func GetComputerName(buf *uint16, n *uint32) (err error) { + return + } + ++func GetConsoleCP() (cp uint32, err error) { ++ r0, _, e1 := syscall.Syscall(procGetConsoleCP.Addr(), 0, 0, 0, 0) ++ cp = uint32(r0) ++ if cp == 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ + func GetConsoleMode(console Handle, mode *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0) + if r1 == 0 { +@@ -2156,6 +2238,15 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) { + return + } + ++func GetConsoleOutputCP() (cp uint32, err error) { ++ r0, _, e1 := syscall.Syscall(procGetConsoleOutputCP.Addr(), 0, 0, 0, 0) ++ cp = uint32(r0) ++ if cp == 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ + func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) { + r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0) + if r1 == 0 { +@@ -2357,6 +2448,14 @@ func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err er + return + } + ++func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) { ++ r1, _, e1 := syscall.Syscall(procGetNamedPipeClientProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID)), 0) ++ if r1 == 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ + func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) { + r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0) + if r1 == 0 { +@@ -2373,6 +2472,14 @@ func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint3 + return + } + ++func GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) { ++ r1, _, e1 := syscall.Syscall(procGetNamedPipeServerProcessId.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID)), 0) ++ if r1 == 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ + func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) { + var _p0 uint32 + if wait { +@@ -3024,6 +3131,14 @@ func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { + return + } + ++func SetConsoleCP(cp uint32) (err error) { ++ r1, _, e1 := syscall.Syscall(procSetConsoleCP.Addr(), 1, uintptr(cp), 0, 0) ++ if r1 == 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ + func setConsoleCursorPosition(console Handle, position uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0) + if r1 == 0 { +@@ -3040,6 +3155,14 @@ func SetConsoleMode(console Handle, mode uint32) (err error) { + return + } + ++func SetConsoleOutputCP(cp uint32) (err error) { ++ r1, _, e1 := syscall.Syscall(procSetConsoleOutputCP.Addr(), 1, uintptr(cp), 0, 0) ++ if r1 == 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ + func SetCurrentDirectory(path *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + if r1 == 0 { +@@ -3486,6 +3609,14 @@ func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (nete + return + } + ++func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) { ++ r0, _, _ := syscall.Syscall9(procNetUserEnum.Addr(), 8, uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)), 0) ++ if r0 != 0 { ++ neterr = syscall.Errno(r0) ++ } ++ return ++} ++ + func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) { + r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0) + if r0 != 0 { +@@ -4064,6 +4195,12 @@ func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) { + return + } + ++func GetKeyboardLayout(tid uint32) (hkl Handle) { ++ r0, _, _ := syscall.Syscall(procGetKeyboardLayout.Addr(), 1, uintptr(tid), 0, 0) ++ hkl = Handle(r0) ++ return ++} ++ + func GetShellWindow() (shellWindow HWND) { + r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0) + shellWindow = HWND(r0) +@@ -4097,6 +4234,15 @@ func IsWindowVisible(hwnd HWND) (isVisible bool) { + return + } + ++func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) { ++ r0, _, e1 := syscall.Syscall(procLoadKeyboardLayoutW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(flags), 0) ++ hkl = Handle(r0) ++ if hkl == 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ + func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) { + r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0) + ret = int32(r0) +@@ -4106,6 +4252,20 @@ func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret i + return + } + ++func ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) { ++ r0, _, _ := syscall.Syscall9(procToUnicodeEx.Addr(), 7, uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl), 0, 0) ++ ret = int32(r0) ++ return ++} ++ ++func UnloadKeyboardLayout(hkl Handle) (err error) { ++ r1, _, e1 := syscall.Syscall(procUnloadKeyboardLayout.Addr(), 1, uintptr(hkl), 0, 0) ++ if r1 == 0 { ++ err = errnoErr(e1) ++ } ++ return ++} ++ + func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) { + var _p0 uint32 + if inheritExisting { +diff --git a/vendor/golang.org/x/term/LICENSE b/vendor/golang.org/x/term/LICENSE +index 6a66aea5..2a7cf70d 100644 +--- a/vendor/golang.org/x/term/LICENSE ++++ b/vendor/golang.org/x/term/LICENSE +@@ -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 + 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 + in the documentation and/or other materials provided with the + 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 + this software without specific prior written permission. + +diff --git a/vendor/golang.org/x/term/README.md b/vendor/golang.org/x/term/README.md +index d03d0aef..05ff623f 100644 +--- a/vendor/golang.org/x/term/README.md ++++ b/vendor/golang.org/x/term/README.md +@@ -4,16 +4,13 @@ + + This repository provides Go terminal and console support packages. + +-## Download/Install +- +-The easiest way to install is to run `go get -u golang.org/x/term`. You can +-also manually git clone the repository to `$GOPATH/src/golang.org/x/term`. +- + ## Report Issues / Send Patches + + This repository uses Gerrit for code changes. To learn how to submit changes to +-this repository, see https://golang.org/doc/contribute.html. ++this repository, see https://go.dev/doc/contribute. ++ ++The git repository is https://go.googlesource.com/term. + + The main issue tracker for the term repository is located at +-https://github.com/golang/go/issues. Prefix your issue with "x/term:" in the ++https://go.dev/issues. Prefix your issue with "x/term:" in the + subject line, so it is easy to find. +diff --git a/vendor/golang.org/x/term/term_windows.go b/vendor/golang.org/x/term/term_windows.go +index 465f5606..df6bf948 100644 +--- a/vendor/golang.org/x/term/term_windows.go ++++ b/vendor/golang.org/x/term/term_windows.go +@@ -26,6 +26,7 @@ func makeRaw(fd int) (*State, error) { + return nil, err + } + raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) ++ raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT + if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { + return nil, err + } +diff --git a/vendor/golang.org/x/text/LICENSE b/vendor/golang.org/x/text/LICENSE +index 6a66aea5..2a7cf70d 100644 +--- a/vendor/golang.org/x/text/LICENSE ++++ b/vendor/golang.org/x/text/LICENSE +@@ -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 + 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 + in the documentation and/or other materials provided with the + 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 + this software without specific prior written permission. + +diff --git a/vendor/golang.org/x/text/internal/catmsg/codec.go b/vendor/golang.org/x/text/internal/catmsg/codec.go +index 49c9fc97..547802b0 100644 +--- a/vendor/golang.org/x/text/internal/catmsg/codec.go ++++ b/vendor/golang.org/x/text/internal/catmsg/codec.go +@@ -257,7 +257,7 @@ func (d *Decoder) setError(err error) { + // Language returns the language in which the message is being rendered. + // + // The destination language may be a child language of the language used for +-// encoding. For instance, a decoding language of "pt-PT"" is consistent with an ++// encoding. For instance, a decoding language of "pt-PT" is consistent with an + // encoding language of "pt". + func (d *Decoder) Language() language.Tag { return d.tag } + +diff --git a/vendor/golang.org/x/text/message/message.go b/vendor/golang.org/x/text/message/message.go +index 48d76630..91a97264 100644 +--- a/vendor/golang.org/x/text/message/message.go ++++ b/vendor/golang.org/x/text/message/message.go +@@ -138,21 +138,20 @@ func (p *Printer) Printf(key Reference, a ...interface{}) (n int, err error) { + + func lookupAndFormat(p *printer, r Reference, a []interface{}) { + p.fmt.Reset(a) +- var id, msg string + switch v := r.(type) { + case string: +- id, msg = v, v ++ if p.catContext.Execute(v) == catalog.ErrNotFound { ++ p.Render(v) ++ return ++ } + case key: +- id, msg = v.id, v.fallback +- default: +- panic("key argument is not a Reference") +- } +- +- if p.catContext.Execute(id) == catalog.ErrNotFound { +- if p.catContext.Execute(msg) == catalog.ErrNotFound { +- p.Render(msg) ++ if p.catContext.Execute(v.id) == catalog.ErrNotFound && ++ p.catContext.Execute(v.fallback) == catalog.ErrNotFound { ++ p.Render(v.fallback) + return + } ++ default: ++ panic("key argument is not a Reference") + } + } + +diff --git a/vendor/golang.org/x/time/LICENSE b/vendor/golang.org/x/time/LICENSE +index 6a66aea5..2a7cf70d 100644 +--- a/vendor/golang.org/x/time/LICENSE ++++ b/vendor/golang.org/x/time/LICENSE +@@ -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 + 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 + in the documentation and/or other materials provided with the + 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 + this software without specific prior written permission. + +diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go +index f0e0cf3c..93a798ab 100644 +--- a/vendor/golang.org/x/time/rate/rate.go ++++ b/vendor/golang.org/x/time/rate/rate.go +@@ -52,6 +52,8 @@ func Every(interval time.Duration) Limit { + // or its associated context.Context is canceled. + // + // The methods AllowN, ReserveN, and WaitN consume n tokens. ++// ++// Limiter is safe for simultaneous use by multiple goroutines. + type Limiter struct { + mu sync.Mutex + limit Limit +@@ -97,8 +99,9 @@ func (lim *Limiter) Tokens() float64 { + // bursts of at most b tokens. + func NewLimiter(r Limit, b int) *Limiter { + return &Limiter{ +- limit: r, +- burst: b, ++ limit: r, ++ burst: b, ++ tokens: float64(b), + } + } + +@@ -342,18 +345,6 @@ func (lim *Limiter) reserveN(t time.Time, n int, maxFutureReserve time.Duration) + tokens: n, + timeToAct: t, + } +- } else if lim.limit == 0 { +- var ok bool +- if lim.burst >= n { +- ok = true +- lim.burst -= n +- } +- return Reservation{ +- ok: ok, +- lim: lim, +- tokens: lim.burst, +- timeToAct: t, +- } + } + + t, tokens := lim.advance(t) +diff --git a/vendor/golang.org/x/tools/LICENSE b/vendor/golang.org/x/tools/LICENSE +index 6a66aea5..2a7cf70d 100644 +--- a/vendor/golang.org/x/tools/LICENSE ++++ b/vendor/golang.org/x/tools/LICENSE +@@ -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 + 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 + in the documentation and/or other materials provided with the + 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 + this software without specific prior written permission. + +diff --git a/vendor/golang.org/x/tools/go/ast/inspector/inspector.go b/vendor/golang.org/x/tools/go/ast/inspector/inspector.go +index 1fc1de0b..0e0ba4c0 100644 +--- a/vendor/golang.org/x/tools/go/ast/inspector/inspector.go ++++ b/vendor/golang.org/x/tools/go/ast/inspector/inspector.go +@@ -73,6 +73,15 @@ func (in *Inspector) Preorder(types []ast.Node, f func(ast.Node)) { + // check, Preorder is almost twice as fast as Nodes. The two + // features seem to contribute similar slowdowns (~1.4x each). + ++ // This function is equivalent to the PreorderSeq call below, ++ // but to avoid the additional dynamic call (which adds 13-35% ++ // to the benchmarks), we expand it out. ++ // ++ // in.PreorderSeq(types...)(func(n ast.Node) bool { ++ // f(n) ++ // return true ++ // }) ++ + mask := maskOf(types) + for i := 0; i < len(in.events); { + ev := in.events[i] +diff --git a/vendor/golang.org/x/tools/go/ast/inspector/iter.go b/vendor/golang.org/x/tools/go/ast/inspector/iter.go +new file mode 100644 +index 00000000..b7e95911 +--- /dev/null ++++ b/vendor/golang.org/x/tools/go/ast/inspector/iter.go +@@ -0,0 +1,85 @@ ++// 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 go1.23 ++ ++package inspector ++ ++import ( ++ "go/ast" ++ "iter" ++) ++ ++// PreorderSeq returns an iterator that visits all the ++// nodes of the files supplied to New in depth-first order. ++// It visits each node n before n's children. ++// The complete traversal sequence is determined by ast.Inspect. ++// ++// The types argument, if non-empty, enables type-based ++// filtering of events: only nodes whose type matches an ++// element of the types slice are included in the sequence. ++func (in *Inspector) PreorderSeq(types ...ast.Node) iter.Seq[ast.Node] { ++ ++ // This implementation is identical to Preorder, ++ // except that it supports breaking out of the loop. ++ ++ return func(yield func(ast.Node) bool) { ++ mask := maskOf(types) ++ for i := 0; i < len(in.events); { ++ ev := in.events[i] ++ if ev.index > i { ++ // push ++ if ev.typ&mask != 0 { ++ if !yield(ev.node) { ++ break ++ } ++ } ++ pop := ev.index ++ if in.events[pop].typ&mask == 0 { ++ // Subtrees do not contain types: skip them and pop. ++ i = pop + 1 ++ continue ++ } ++ } ++ i++ ++ } ++ } ++} ++ ++// All[N] returns an iterator over all the nodes of type N. ++// N must be a pointer-to-struct type that implements ast.Node. ++// ++// Example: ++// ++// for call := range All[*ast.CallExpr](in) { ... } ++func All[N interface { ++ *S ++ ast.Node ++}, S any](in *Inspector) iter.Seq[N] { ++ ++ // To avoid additional dynamic call overheads, ++ // we duplicate rather than call the logic of PreorderSeq. ++ ++ mask := typeOf((N)(nil)) ++ return func(yield func(N) bool) { ++ for i := 0; i < len(in.events); { ++ ev := in.events[i] ++ if ev.index > i { ++ // push ++ if ev.typ&mask != 0 { ++ if !yield(ev.node.(N)) { ++ break ++ } ++ } ++ pop := ev.index ++ if in.events[pop].typ&mask == 0 { ++ // Subtrees do not contain types: skip them and pop. ++ i = pop + 1 ++ continue ++ } ++ } ++ i++ ++ } ++ } ++} +diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go +index f4790237..8f9e592f 100644 +--- a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go ++++ b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go +@@ -102,7 +102,7 @@ type decoder struct { + } + + // newError returns an error object with position info. +-func (d decoder) newError(pos int, f string, x ...interface{}) error { ++func (d decoder) newError(pos int, f string, x ...any) error { + line, column := d.Position(pos) + head := fmt.Sprintf("(line %d:%d): ", line, column) + return errors.New(head+f, x...) +@@ -114,7 +114,7 @@ func (d decoder) unexpectedTokenError(tok json.Token) error { + } + + // syntaxError returns a syntax error for given position. +-func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { ++func (d decoder) syntaxError(pos int, f string, x ...any) error { + line, column := d.Position(pos) + head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) + return errors.New(head+f, x...) +@@ -351,7 +351,7 @@ func (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect. + panic(fmt.Sprintf("unmarshalScalar: invalid scalar kind %v", kind)) + } + +- return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString()) ++ return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v field %v: %v", kind, fd.JSONName(), tok.RawString()) + } + + func unmarshalInt(tok json.Token, bitSize int) (protoreflect.Value, bool) { +diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/encode.go b/vendor/google.golang.org/protobuf/encoding/protojson/encode.go +index 29846df2..0e72d853 100644 +--- a/vendor/google.golang.org/protobuf/encoding/protojson/encode.go ++++ b/vendor/google.golang.org/protobuf/encoding/protojson/encode.go +@@ -216,9 +216,7 @@ func (m unpopulatedFieldRanger) Range(f func(protoreflect.FieldDescriptor, proto + } + + v := m.Get(fd) +- isProto2Scalar := fd.Syntax() == protoreflect.Proto2 && fd.Default().IsValid() +- isSingularMessage := fd.Cardinality() != protoreflect.Repeated && fd.Message() != nil +- if isProto2Scalar || isSingularMessage { ++ if fd.HasPresence() { + if m.skipNull { + continue + } +diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +index a45f112b..24bc98ac 100644 +--- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go ++++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +@@ -84,7 +84,7 @@ type decoder struct { + } + + // newError returns an error object with position info. +-func (d decoder) newError(pos int, f string, x ...interface{}) error { ++func (d decoder) newError(pos int, f string, x ...any) error { + line, column := d.Position(pos) + head := fmt.Sprintf("(line %d:%d): ", line, column) + return errors.New(head+f, x...) +@@ -96,7 +96,7 @@ func (d decoder) unexpectedTokenError(tok text.Token) error { + } + + // syntaxError returns a syntax error for given position. +-func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { ++func (d decoder) syntaxError(pos int, f string, x ...any) error { + line, column := d.Position(pos) + head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) + return errors.New(head+f, x...) +diff --git a/vendor/google.golang.org/protobuf/internal/descopts/options.go b/vendor/google.golang.org/protobuf/internal/descopts/options.go +index 8401be8c..024ffebd 100644 +--- a/vendor/google.golang.org/protobuf/internal/descopts/options.go ++++ b/vendor/google.golang.org/protobuf/internal/descopts/options.go +@@ -9,7 +9,7 @@ + // dependency on the descriptor proto package). + package descopts + +-import pref "google.golang.org/protobuf/reflect/protoreflect" ++import "google.golang.org/protobuf/reflect/protoreflect" + + // These variables are set by the init function in descriptor.pb.go via logic + // in internal/filetype. In other words, so long as the descriptor proto package +@@ -17,13 +17,13 @@ import pref "google.golang.org/protobuf/reflect/protoreflect" + // + // Each variable is populated with a nil pointer to the options struct. + var ( +- File pref.ProtoMessage +- Enum pref.ProtoMessage +- EnumValue pref.ProtoMessage +- Message pref.ProtoMessage +- Field pref.ProtoMessage +- Oneof pref.ProtoMessage +- ExtensionRange pref.ProtoMessage +- Service pref.ProtoMessage +- Method pref.ProtoMessage ++ File protoreflect.ProtoMessage ++ Enum protoreflect.ProtoMessage ++ EnumValue protoreflect.ProtoMessage ++ Message protoreflect.ProtoMessage ++ Field protoreflect.ProtoMessage ++ Oneof protoreflect.ProtoMessage ++ ExtensionRange protoreflect.ProtoMessage ++ Service protoreflect.ProtoMessage ++ Method protoreflect.ProtoMessage + ) +diff --git a/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +index f691305eb4f73440cd48caba949023eab52ef304..ff6a38360add36f53d48bb0863b701696e0d7b2d 100644 +GIT binary patch +literal 93 +zcmd;*mUzal#C*w)K}(Q>QGiK;Nr72|(SYfa9TNv5m$bxlxFnMRqXeS@6Ht;7B*_4j +Ve8H{+(u69m1u{(G8N0>{b^xZ!4_5#H + +literal 78 +zcmd-Q6B6WL6kw8IQef6#G+?@9$Hc)X@r<1dB+ewjD8Z<}1Qcfki8Dw%hln$xi@#u3 +Kc*d^rf*k;APzzxI + +diff --git a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go +index 029a6a12..08dad769 100644 +--- a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go ++++ b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go +@@ -5,7 +5,7 @@ + // Package editionssupport defines constants for editions that are supported. + package editionssupport + +-import descriptorpb "google.golang.org/protobuf/types/descriptorpb" ++import "google.golang.org/protobuf/types/descriptorpb" + + const ( + Minimum = descriptorpb.Edition_EDITION_PROTO2 +diff --git a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go +index d2b3ac03..ea1d3e65 100644 +--- a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go ++++ b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go +@@ -214,7 +214,7 @@ func (d *Decoder) parseNext() (Token, error) { + + // newSyntaxError returns an error with line and column information useful for + // syntax errors. +-func (d *Decoder) newSyntaxError(pos int, f string, x ...interface{}) error { ++func (d *Decoder) newSyntaxError(pos int, f string, x ...any) error { + e := errors.New(f, x...) + line, column := d.Position(pos) + return errors.New("syntax error (line %d:%d): %v", line, column, e) +diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +index 87853e78..099b2bf4 100644 +--- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go ++++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +@@ -601,7 +601,7 @@ func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token { + + // newSyntaxError returns a syntax error with line and column information for + // current position. +-func (d *Decoder) newSyntaxError(f string, x ...interface{}) error { ++func (d *Decoder) newSyntaxError(f string, x ...any) error { + e := errors.New(f, x...) + line, column := d.Position(len(d.orig) - len(d.in)) + return errors.New("syntax error (line %d:%d): %v", line, column, e) +diff --git a/vendor/google.golang.org/protobuf/internal/errors/errors.go b/vendor/google.golang.org/protobuf/internal/errors/errors.go +index d9671982..c2d6bd52 100644 +--- a/vendor/google.golang.org/protobuf/internal/errors/errors.go ++++ b/vendor/google.golang.org/protobuf/internal/errors/errors.go +@@ -17,7 +17,7 @@ var Error = errors.New("protobuf error") + + // New formats a string according to the format specifier and arguments and + // returns an error that has a "proto" prefix. +-func New(f string, x ...interface{}) error { ++func New(f string, x ...any) error { + return &prefixError{s: format(f, x...)} + } + +@@ -43,7 +43,7 @@ func (e *prefixError) Unwrap() error { + + // Wrap returns an error that has a "proto" prefix, the formatted string described + // by the format specifier and arguments, and a suffix of err. The error wraps err. +-func Wrap(err error, f string, x ...interface{}) error { ++func Wrap(err error, f string, x ...any) error { + return &wrapError{ + s: format(f, x...), + err: err, +@@ -67,7 +67,7 @@ func (e *wrapError) Is(target error) bool { + return target == Error + } + +-func format(f string, x ...interface{}) string { ++func format(f string, x ...any) string { + // avoid "proto: " prefix when chaining + for i := 0; i < len(x); i++ { + switch e := x[i].(type) { +diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +index ece53bea..fa790e0f 100644 +--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go ++++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +@@ -258,6 +258,7 @@ type ( + StringName stringName + IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto + IsWeak bool // promoted from google.protobuf.FieldOptions ++ IsLazy bool // promoted from google.protobuf.FieldOptions + Default defaultValue + ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields + Enum protoreflect.EnumDescriptor +@@ -351,6 +352,7 @@ func (fd *Field) IsPacked() bool { + } + func (fd *Field) IsExtension() bool { return false } + func (fd *Field) IsWeak() bool { return fd.L1.IsWeak } ++func (fd *Field) IsLazy() bool { return fd.L1.IsLazy } + func (fd *Field) IsList() bool { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() } + func (fd *Field) IsMap() bool { return fd.Message() != nil && fd.Message().IsMapEntry() } + func (fd *Field) MapKey() protoreflect.FieldDescriptor { +@@ -383,6 +385,10 @@ func (fd *Field) Message() protoreflect.MessageDescriptor { + } + return fd.L1.Message + } ++func (fd *Field) IsMapEntry() bool { ++ parent, ok := fd.L0.Parent.(protoreflect.MessageDescriptor) ++ return ok && parent.IsMapEntry() ++} + func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } + func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} + +@@ -421,6 +427,7 @@ type ( + Extendee protoreflect.MessageDescriptor + Cardinality protoreflect.Cardinality + Kind protoreflect.Kind ++ IsLazy bool + EditionFeatures EditionFeatures + } + ExtensionL2 struct { +@@ -461,6 +468,7 @@ func (xd *Extension) IsPacked() bool { + } + func (xd *Extension) IsExtension() bool { return true } + func (xd *Extension) IsWeak() bool { return false } ++func (xd *Extension) IsLazy() bool { return xd.L1.IsLazy } + func (xd *Extension) IsList() bool { return xd.Cardinality() == protoreflect.Repeated } + func (xd *Extension) IsMap() bool { return false } + func (xd *Extension) MapKey() protoreflect.FieldDescriptor { return nil } +diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +index 3bc3b1cd..d2f54949 100644 +--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go ++++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +@@ -495,6 +495,8 @@ func (xd *Extension) unmarshalOptions(b []byte) { + switch num { + case genid.FieldOptions_Packed_field_number: + xd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) ++ case genid.FieldOptions_Lazy_field_number: ++ xd.L1.IsLazy = protowire.DecodeBool(v) + } + case protowire.BytesType: + v, m := protowire.ConsumeBytes(b) +@@ -534,7 +536,7 @@ func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor + } + + var nameBuilderPool = sync.Pool{ +- New: func() interface{} { return new(strs.Builder) }, ++ New: func() any { return new(strs.Builder) }, + } + + func getBuilder() *strs.Builder { +diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +index 570181eb..67a51b32 100644 +--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go ++++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +@@ -45,6 +45,11 @@ func (file *File) resolveMessages() { + case protoreflect.MessageKind, protoreflect.GroupKind: + fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx) + depIdx++ ++ if fd.L1.Kind == protoreflect.GroupKind && (fd.IsMap() || fd.IsMapEntry()) { ++ // A map field might inherit delimited encoding from a file-wide default feature. ++ // But maps never actually use delimited encoding. (At least for now...) ++ fd.L1.Kind = protoreflect.MessageKind ++ } + } + + // Default is resolved here since it depends on Enum being resolved. +@@ -499,6 +504,8 @@ func (fd *Field) unmarshalOptions(b []byte) { + fd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) + case genid.FieldOptions_Weak_field_number: + fd.L1.IsWeak = protowire.DecodeBool(v) ++ case genid.FieldOptions_Lazy_field_number: ++ fd.L1.IsLazy = protowire.DecodeBool(v) + case FieldOptions_EnforceUTF8: + fd.L1.EditionFeatures.IsUTF8Validated = protowire.DecodeBool(v) + } +diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go +index 30db19fd..f4107c05 100644 +--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go ++++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_list_gen.go +@@ -8,6 +8,7 @@ package filedesc + + import ( + "fmt" ++ "strings" + "sync" + + "google.golang.org/protobuf/internal/descfmt" +@@ -198,6 +199,16 @@ func (p *Fields) lazyInit() *Fields { + if _, ok := p.byText[d.TextName()]; !ok { + p.byText[d.TextName()] = d + } ++ if isGroupLike(d) { ++ lowerJSONName := strings.ToLower(d.JSONName()) ++ if _, ok := p.byJSON[lowerJSONName]; !ok { ++ p.byJSON[lowerJSONName] = d ++ } ++ lowerTextName := strings.ToLower(d.TextName()) ++ if _, ok := p.byText[lowerTextName]; !ok { ++ p.byText[lowerTextName] = d ++ } ++ } + if _, ok := p.byNum[d.Number()]; !ok { + p.byNum[d.Number()] = d + } +diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +index d1e16a26..fd4d0c83 100644 +--- a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go ++++ b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +@@ -68,7 +68,7 @@ func unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures { + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { +- case genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number: ++ case genid.FeatureSet_Go_ext_number: + parent = unmarshalGoFeature(v, parent) + } + } +@@ -108,7 +108,9 @@ func unmarshalEditionDefault(b []byte) { + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { +- case genid.FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number: ++ case genid.FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_number: ++ fs = unmarshalFeatureSet(v, fs) ++ case genid.FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_number: + fs = unmarshalFeatureSet(v, fs) + } + } +diff --git a/vendor/google.golang.org/protobuf/internal/filetype/build.go b/vendor/google.golang.org/protobuf/internal/filetype/build.go +index f0e38c4e..ba83fea4 100644 +--- a/vendor/google.golang.org/protobuf/internal/filetype/build.go ++++ b/vendor/google.golang.org/protobuf/internal/filetype/build.go +@@ -68,7 +68,7 @@ type Builder struct { + // and for input and output messages referenced by service methods. + // Dependencies must come after declarations, but the ordering of + // dependencies themselves is unspecified. +- GoTypes []interface{} ++ GoTypes []any + + // DependencyIndexes is an ordered list of indexes into GoTypes for the + // dependencies of messages, extensions, or services. +@@ -268,7 +268,7 @@ func (x depIdxs) Get(i, j int32) int32 { + + type ( + resolverByIndex struct { +- goTypes []interface{} ++ goTypes []any + depIdxs depIdxs + fileRegistry + } +diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +index 40272c89..f30ab6b5 100644 +--- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go ++++ b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +@@ -21,6 +21,7 @@ const ( + // Enum values for google.protobuf.Edition. + const ( + Edition_EDITION_UNKNOWN_enum_value = 0 ++ Edition_EDITION_LEGACY_enum_value = 900 + Edition_EDITION_PROTO2_enum_value = 998 + Edition_EDITION_PROTO3_enum_value = 999 + Edition_EDITION_2023_enum_value = 1000 +@@ -653,6 +654,7 @@ const ( + FieldOptions_Targets_field_name protoreflect.Name = "targets" + FieldOptions_EditionDefaults_field_name protoreflect.Name = "edition_defaults" + FieldOptions_Features_field_name protoreflect.Name = "features" ++ FieldOptions_FeatureSupport_field_name protoreflect.Name = "feature_support" + FieldOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" + + FieldOptions_Ctype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.ctype" +@@ -667,6 +669,7 @@ const ( + FieldOptions_Targets_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.targets" + FieldOptions_EditionDefaults_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.edition_defaults" + FieldOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.features" ++ FieldOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.feature_support" + FieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option" + ) + +@@ -684,6 +687,7 @@ const ( + FieldOptions_Targets_field_number protoreflect.FieldNumber = 19 + FieldOptions_EditionDefaults_field_number protoreflect.FieldNumber = 20 + FieldOptions_Features_field_number protoreflect.FieldNumber = 21 ++ FieldOptions_FeatureSupport_field_number protoreflect.FieldNumber = 22 + FieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 + ) + +@@ -767,6 +771,33 @@ const ( + FieldOptions_EditionDefault_Value_field_number protoreflect.FieldNumber = 2 + ) + ++// Names for google.protobuf.FieldOptions.FeatureSupport. ++const ( ++ FieldOptions_FeatureSupport_message_name protoreflect.Name = "FeatureSupport" ++ FieldOptions_FeatureSupport_message_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport" ++) ++ ++// Field names for google.protobuf.FieldOptions.FeatureSupport. ++const ( ++ FieldOptions_FeatureSupport_EditionIntroduced_field_name protoreflect.Name = "edition_introduced" ++ FieldOptions_FeatureSupport_EditionDeprecated_field_name protoreflect.Name = "edition_deprecated" ++ FieldOptions_FeatureSupport_DeprecationWarning_field_name protoreflect.Name = "deprecation_warning" ++ FieldOptions_FeatureSupport_EditionRemoved_field_name protoreflect.Name = "edition_removed" ++ ++ FieldOptions_FeatureSupport_EditionIntroduced_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_introduced" ++ FieldOptions_FeatureSupport_EditionDeprecated_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_deprecated" ++ FieldOptions_FeatureSupport_DeprecationWarning_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.deprecation_warning" ++ FieldOptions_FeatureSupport_EditionRemoved_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.FeatureSupport.edition_removed" ++) ++ ++// Field numbers for google.protobuf.FieldOptions.FeatureSupport. ++const ( ++ FieldOptions_FeatureSupport_EditionIntroduced_field_number protoreflect.FieldNumber = 1 ++ FieldOptions_FeatureSupport_EditionDeprecated_field_number protoreflect.FieldNumber = 2 ++ FieldOptions_FeatureSupport_DeprecationWarning_field_number protoreflect.FieldNumber = 3 ++ FieldOptions_FeatureSupport_EditionRemoved_field_number protoreflect.FieldNumber = 4 ++) ++ + // Names for google.protobuf.OneofOptions. + const ( + OneofOptions_message_name protoreflect.Name = "OneofOptions" +@@ -829,11 +860,13 @@ const ( + EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated" + EnumValueOptions_Features_field_name protoreflect.Name = "features" + EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" ++ EnumValueOptions_FeatureSupport_field_name protoreflect.Name = "feature_support" + EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" + + EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated" + EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features" + EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact" ++ EnumValueOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.feature_support" + EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option" + ) + +@@ -842,6 +875,7 @@ const ( + EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1 + EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2 + EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3 ++ EnumValueOptions_FeatureSupport_field_number protoreflect.FieldNumber = 4 + EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 + ) + +@@ -1110,17 +1144,20 @@ const ( + + // Field names for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. + const ( +- FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_name protoreflect.Name = "edition" +- FeatureSetDefaults_FeatureSetEditionDefault_Features_field_name protoreflect.Name = "features" ++ FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_name protoreflect.Name = "edition" ++ FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_name protoreflect.Name = "overridable_features" ++ FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_name protoreflect.Name = "fixed_features" + +- FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition" +- FeatureSetDefaults_FeatureSetEditionDefault_Features_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features" ++ FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition" ++ FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features" ++ FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_fullname protoreflect.FullName = "google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features" + ) + + // Field numbers for google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault. + const ( +- FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number protoreflect.FieldNumber = 3 +- FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number protoreflect.FieldNumber = 2 ++ FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number protoreflect.FieldNumber = 3 ++ FeatureSetDefaults_FeatureSetEditionDefault_OverridableFeatures_field_number protoreflect.FieldNumber = 4 ++ FeatureSetDefaults_FeatureSetEditionDefault_FixedFeatures_field_number protoreflect.FieldNumber = 5 + ) + + // Names for google.protobuf.SourceCodeInfo. +diff --git a/vendor/google.golang.org/protobuf/internal/genid/doc.go b/vendor/google.golang.org/protobuf/internal/genid/doc.go +index 45ccd012..d9b9d916 100644 +--- a/vendor/google.golang.org/protobuf/internal/genid/doc.go ++++ b/vendor/google.golang.org/protobuf/internal/genid/doc.go +@@ -6,6 +6,6 @@ + // and the well-known types. + package genid + +-import protoreflect "google.golang.org/protobuf/reflect/protoreflect" ++import "google.golang.org/protobuf/reflect/protoreflect" + + const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" +diff --git a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go +index 9a652a2b..7f67cbb6 100644 +--- a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go ++++ b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go +@@ -12,20 +12,25 @@ import ( + + const File_google_protobuf_go_features_proto = "google/protobuf/go_features.proto" + +-// Names for google.protobuf.GoFeatures. ++// Names for pb.GoFeatures. + const ( + GoFeatures_message_name protoreflect.Name = "GoFeatures" +- GoFeatures_message_fullname protoreflect.FullName = "google.protobuf.GoFeatures" ++ GoFeatures_message_fullname protoreflect.FullName = "pb.GoFeatures" + ) + +-// Field names for google.protobuf.GoFeatures. ++// Field names for pb.GoFeatures. + const ( + GoFeatures_LegacyUnmarshalJsonEnum_field_name protoreflect.Name = "legacy_unmarshal_json_enum" + +- GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "google.protobuf.GoFeatures.legacy_unmarshal_json_enum" ++ GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "pb.GoFeatures.legacy_unmarshal_json_enum" + ) + +-// Field numbers for google.protobuf.GoFeatures. ++// Field numbers for pb.GoFeatures. + const ( + GoFeatures_LegacyUnmarshalJsonEnum_field_number protoreflect.FieldNumber = 1 + ) ++ ++// Extension numbers ++const ( ++ FeatureSet_Go_ext_number protoreflect.FieldNumber = 1002 ++) +diff --git a/vendor/google.golang.org/protobuf/internal/genid/map_entry.go b/vendor/google.golang.org/protobuf/internal/genid/map_entry.go +index 8f9ea02f..bef5a25f 100644 +--- a/vendor/google.golang.org/protobuf/internal/genid/map_entry.go ++++ b/vendor/google.golang.org/protobuf/internal/genid/map_entry.go +@@ -4,7 +4,7 @@ + + package genid + +-import protoreflect "google.golang.org/protobuf/reflect/protoreflect" ++import "google.golang.org/protobuf/reflect/protoreflect" + + // Generic field names and numbers for synthetic map entry messages. + const ( +diff --git a/vendor/google.golang.org/protobuf/internal/genid/wrappers.go b/vendor/google.golang.org/protobuf/internal/genid/wrappers.go +index 429384b8..9404270d 100644 +--- a/vendor/google.golang.org/protobuf/internal/genid/wrappers.go ++++ b/vendor/google.golang.org/protobuf/internal/genid/wrappers.go +@@ -4,7 +4,7 @@ + + package genid + +-import protoreflect "google.golang.org/protobuf/reflect/protoreflect" ++import "google.golang.org/protobuf/reflect/protoreflect" + + // Generic field name and number for messages in wrappers.proto. + const ( +diff --git a/vendor/google.golang.org/protobuf/internal/impl/api_export.go b/vendor/google.golang.org/protobuf/internal/impl/api_export.go +index a371f98d..5d5771c2 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/api_export.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/api_export.go +@@ -22,13 +22,13 @@ type Export struct{} + + // NewError formats a string according to the format specifier and arguments and + // returns an error that has a "proto" prefix. +-func (Export) NewError(f string, x ...interface{}) error { ++func (Export) NewError(f string, x ...any) error { + return errors.New(f, x...) + } + + // enum is any enum type generated by protoc-gen-go + // and must be a named int32 type. +-type enum = interface{} ++type enum = any + + // EnumOf returns the protoreflect.Enum interface over e. + // It returns nil if e is nil. +@@ -81,7 +81,7 @@ func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNu + + // message is any message type generated by protoc-gen-go + // and must be a pointer to a named struct type. +-type message = interface{} ++type message = any + + // legacyMessageWrapper wraps a v2 message as a v1 message. + type legacyMessageWrapper struct{ m protoreflect.ProtoMessage } +diff --git a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +index bff041ed..f29e6a8f 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +@@ -68,7 +68,7 @@ func (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) error { + } + for _, x := range *ext { + ei := getExtensionFieldInfo(x.Type()) +- if ei.funcs.isInit == nil { ++ if ei.funcs.isInit == nil || x.isUnexpandedLazy() { + continue + } + v := x.Value() +diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +index 2b8f122c..0d5b546e 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +@@ -67,7 +67,6 @@ type lazyExtensionValue struct { + xi *extensionFieldInfo + value protoreflect.Value + b []byte +- fn func() protoreflect.Value + } + + type ExtensionField struct { +@@ -99,6 +98,28 @@ func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool { + return false + } + ++// isUnexpandedLazy returns true if the ExensionField is lazy and not ++// yet expanded, which means it's present and already checked for ++// initialized required fields. ++func (f *ExtensionField) isUnexpandedLazy() bool { ++ return f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0 ++} ++ ++// lazyBuffer retrieves the buffer for a lazy extension if it's not yet expanded. ++// ++// The returned buffer has to be kept over whatever operation we're planning, ++// as re-retrieving it will fail after the message is lazily decoded. ++func (f *ExtensionField) lazyBuffer() []byte { ++ // This function might be in the critical path, so check the atomic without ++ // taking a look first, then only take the lock if needed. ++ if !f.isUnexpandedLazy() { ++ return nil ++ } ++ f.lazy.mu.Lock() ++ defer f.lazy.mu.Unlock() ++ return f.lazy.b ++} ++ + func (f *ExtensionField) lazyInit() { + f.lazy.mu.Lock() + defer f.lazy.mu.Unlock() +@@ -136,10 +157,9 @@ func (f *ExtensionField) lazyInit() { + } + f.lazy.value = val + } else { +- f.lazy.value = f.lazy.fn() ++ panic("No support for lazy fns for ExtensionField") + } + f.lazy.xi = nil +- f.lazy.fn = nil + f.lazy.b = nil + atomic.StoreUint32(&f.lazy.atomicOnce, 1) + } +@@ -152,13 +172,6 @@ func (f *ExtensionField) Set(t protoreflect.ExtensionType, v protoreflect.Value) + f.lazy = nil + } + +-// SetLazy sets the type and a value that is to be lazily evaluated upon first use. +-// This must not be called concurrently. +-func (f *ExtensionField) SetLazy(t protoreflect.ExtensionType, fn func() protoreflect.Value) { +- f.typ = t +- f.lazy = &lazyExtensionValue{fn: fn} +-} +- + // Value returns the value of the extension field. + // This may be called concurrently. + func (f *ExtensionField) Value() protoreflect.Value { +diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +index 78ee47e4..7c1f66c8 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +@@ -65,6 +65,9 @@ func (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si + if err != nil { + return out, err + } ++ if cf.funcs.isInit == nil { ++ out.initialized = true ++ } + vi.Set(vw) + return out, nil + } +diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +index 6b2fdbb7..78be9df3 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +@@ -189,6 +189,9 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { + if mi.methods.Merge == nil { + mi.methods.Merge = mi.merge + } ++ if mi.methods.Equal == nil { ++ mi.methods.Equal = equal ++ } + } + + // getUnknownBytes returns a *[]byte for the unknown fields. +diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go b/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go +index b7a23faf..7a16ec13 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go +@@ -26,6 +26,15 @@ func sizeMessageSet(mi *MessageInfo, p pointer, opts marshalOptions) (size int) + } + num, _ := protowire.DecodeTag(xi.wiretag) + size += messageset.SizeField(num) ++ if fullyLazyExtensions(opts) { ++ // Don't expand the extension, instead use the buffer to calculate size ++ if lb := x.lazyBuffer(); lb != nil { ++ // We got hold of the buffer, so it's still lazy. ++ // Don't count the tag size in the extension buffer, it's already added. ++ size += protowire.SizeTag(messageset.FieldMessage) + len(lb) - xi.tagsize ++ continue ++ } ++ } + size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts) + } + +@@ -85,6 +94,19 @@ func marshalMessageSetField(mi *MessageInfo, b []byte, x ExtensionField, opts ma + xi := getExtensionFieldInfo(x.Type()) + num, _ := protowire.DecodeTag(xi.wiretag) + b = messageset.AppendFieldStart(b, num) ++ ++ if fullyLazyExtensions(opts) { ++ // Don't expand the extension if it's still in wire format, instead use the buffer content. ++ if lb := x.lazyBuffer(); lb != nil { ++ // The tag inside the lazy buffer is a different tag (the extension ++ // number), but what we need here is the tag for FieldMessage: ++ b = protowire.AppendVarint(b, protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType)) ++ b = append(b, lb[xi.tagsize:]...) ++ b = messageset.AppendFieldEnd(b) ++ return b, nil ++ } ++ } ++ + b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts) + if err != nil { + return b, err +diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go +deleted file mode 100644 +index 145c577b..00000000 +--- a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go ++++ /dev/null +@@ -1,210 +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 purego || appengine +-// +build purego appengine +- +-package impl +- +-import ( +- "reflect" +- +- "google.golang.org/protobuf/encoding/protowire" +-) +- +-func sizeEnum(p pointer, f *coderFieldInfo, _ marshalOptions) (size int) { +- v := p.v.Elem().Int() +- return f.tagsize + protowire.SizeVarint(uint64(v)) +-} +- +-func appendEnum(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { +- v := p.v.Elem().Int() +- b = protowire.AppendVarint(b, f.wiretag) +- b = protowire.AppendVarint(b, uint64(v)) +- return b, nil +-} +- +-func consumeEnum(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, _ unmarshalOptions) (out unmarshalOutput, err error) { +- if wtyp != protowire.VarintType { +- return out, errUnknown +- } +- v, n := protowire.ConsumeVarint(b) +- if n < 0 { +- return out, errDecode +- } +- p.v.Elem().SetInt(int64(v)) +- out.n = n +- return out, nil +-} +- +-func mergeEnum(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { +- dst.v.Elem().Set(src.v.Elem()) +-} +- +-var coderEnum = pointerCoderFuncs{ +- size: sizeEnum, +- marshal: appendEnum, +- unmarshal: consumeEnum, +- merge: mergeEnum, +-} +- +-func sizeEnumNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { +- if p.v.Elem().Int() == 0 { +- return 0 +- } +- return sizeEnum(p, f, opts) +-} +- +-func appendEnumNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { +- if p.v.Elem().Int() == 0 { +- return b, nil +- } +- return appendEnum(b, p, f, opts) +-} +- +-func mergeEnumNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { +- if src.v.Elem().Int() != 0 { +- dst.v.Elem().Set(src.v.Elem()) +- } +-} +- +-var coderEnumNoZero = pointerCoderFuncs{ +- size: sizeEnumNoZero, +- marshal: appendEnumNoZero, +- unmarshal: consumeEnum, +- merge: mergeEnumNoZero, +-} +- +-func sizeEnumPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { +- return sizeEnum(pointer{p.v.Elem()}, f, opts) +-} +- +-func appendEnumPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { +- return appendEnum(b, pointer{p.v.Elem()}, f, opts) +-} +- +-func consumeEnumPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { +- if wtyp != protowire.VarintType { +- return out, errUnknown +- } +- if p.v.Elem().IsNil() { +- p.v.Elem().Set(reflect.New(p.v.Elem().Type().Elem())) +- } +- return consumeEnum(b, pointer{p.v.Elem()}, wtyp, f, opts) +-} +- +-func mergeEnumPtr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { +- if !src.v.Elem().IsNil() { +- v := reflect.New(dst.v.Type().Elem().Elem()) +- v.Elem().Set(src.v.Elem().Elem()) +- dst.v.Elem().Set(v) +- } +-} +- +-var coderEnumPtr = pointerCoderFuncs{ +- size: sizeEnumPtr, +- marshal: appendEnumPtr, +- unmarshal: consumeEnumPtr, +- merge: mergeEnumPtr, +-} +- +-func sizeEnumSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { +- s := p.v.Elem() +- for i, llen := 0, s.Len(); i < llen; i++ { +- size += protowire.SizeVarint(uint64(s.Index(i).Int())) + f.tagsize +- } +- return size +-} +- +-func appendEnumSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { +- s := p.v.Elem() +- for i, llen := 0, s.Len(); i < llen; i++ { +- b = protowire.AppendVarint(b, f.wiretag) +- b = protowire.AppendVarint(b, uint64(s.Index(i).Int())) +- } +- return b, nil +-} +- +-func consumeEnumSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { +- s := p.v.Elem() +- if wtyp == protowire.BytesType { +- b, n := protowire.ConsumeBytes(b) +- if n < 0 { +- return out, errDecode +- } +- for len(b) > 0 { +- v, n := protowire.ConsumeVarint(b) +- if n < 0 { +- return out, errDecode +- } +- rv := reflect.New(s.Type().Elem()).Elem() +- rv.SetInt(int64(v)) +- s.Set(reflect.Append(s, rv)) +- b = b[n:] +- } +- out.n = n +- return out, nil +- } +- if wtyp != protowire.VarintType { +- return out, errUnknown +- } +- v, n := protowire.ConsumeVarint(b) +- if n < 0 { +- return out, errDecode +- } +- rv := reflect.New(s.Type().Elem()).Elem() +- rv.SetInt(int64(v)) +- s.Set(reflect.Append(s, rv)) +- out.n = n +- return out, nil +-} +- +-func mergeEnumSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { +- dst.v.Elem().Set(reflect.AppendSlice(dst.v.Elem(), src.v.Elem())) +-} +- +-var coderEnumSlice = pointerCoderFuncs{ +- size: sizeEnumSlice, +- marshal: appendEnumSlice, +- unmarshal: consumeEnumSlice, +- merge: mergeEnumSlice, +-} +- +-func sizeEnumPackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { +- s := p.v.Elem() +- llen := s.Len() +- if llen == 0 { +- return 0 +- } +- n := 0 +- for i := 0; i < llen; i++ { +- n += protowire.SizeVarint(uint64(s.Index(i).Int())) +- } +- return f.tagsize + protowire.SizeBytes(n) +-} +- +-func appendEnumPackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { +- s := p.v.Elem() +- llen := s.Len() +- if llen == 0 { +- return b, nil +- } +- b = protowire.AppendVarint(b, f.wiretag) +- n := 0 +- for i := 0; i < llen; i++ { +- n += protowire.SizeVarint(uint64(s.Index(i).Int())) +- } +- b = protowire.AppendVarint(b, uint64(n)) +- for i := 0; i < llen; i++ { +- b = protowire.AppendVarint(b, uint64(s.Index(i).Int())) +- } +- return b, nil +-} +- +-var coderEnumPackedSlice = pointerCoderFuncs{ +- size: sizeEnumPackedSlice, +- marshal: appendEnumPackedSlice, +- unmarshal: consumeEnumSlice, +- merge: mergeEnumSlice, +-} +diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go +index 757642e2..077712c2 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go +@@ -2,9 +2,6 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build !purego && !appengine +-// +build !purego,!appengine +- + package impl + + // When using unsafe pointers, we can just treat enum values as int32s. +diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert.go b/vendor/google.golang.org/protobuf/internal/impl/convert.go +index 185ef2ef..f72ddd88 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/convert.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/convert.go +@@ -14,7 +14,7 @@ import ( + // unwrapper unwraps the value to the underlying value. + // This is implemented by List and Map. + type unwrapper interface { +- protoUnwrap() interface{} ++ protoUnwrap() any + } + + // A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types. +@@ -322,7 +322,7 @@ func (c *stringConverter) PBValueOf(v reflect.Value) protoreflect.Value { + return protoreflect.ValueOfString(v.Convert(stringType).String()) + } + func (c *stringConverter) GoValueOf(v protoreflect.Value) reflect.Value { +- // pref.Value.String never panics, so we go through an interface ++ // protoreflect.Value.String never panics, so we go through an interface + // conversion here to check the type. + s := v.Interface().(string) + if c.goType.Kind() == reflect.Slice && s == "" { +diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +index f8913651..18cb96fd 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +@@ -136,6 +136,6 @@ func (ls *listReflect) NewElement() protoreflect.Value { + func (ls *listReflect) IsValid() bool { + return !ls.v.IsNil() + } +-func (ls *listReflect) protoUnwrap() interface{} { ++func (ls *listReflect) protoUnwrap() any { + return ls.v.Interface() + } +diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +index f30b0a05..304244a6 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +@@ -116,6 +116,6 @@ func (ms *mapReflect) NewValue() protoreflect.Value { + func (ms *mapReflect) IsValid() bool { + return !ms.v.IsNil() + } +-func (ms *mapReflect) protoUnwrap() interface{} { ++func (ms *mapReflect) protoUnwrap() any { + return ms.v.Interface() + } +diff --git a/vendor/google.golang.org/protobuf/internal/impl/encode.go b/vendor/google.golang.org/protobuf/internal/impl/encode.go +index 845c67d6..6254f5de 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/encode.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/encode.go +@@ -10,7 +10,7 @@ import ( + "sync/atomic" + + "google.golang.org/protobuf/internal/flags" +- proto "google.golang.org/protobuf/proto" ++ "google.golang.org/protobuf/proto" + piface "google.golang.org/protobuf/runtime/protoiface" + ) + +@@ -49,8 +49,11 @@ func (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) { + return 0 + } + if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() { +- if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size >= 0 { +- return int(size) ++ // The size cache contains the size + 1, to allow the ++ // zero value to be invalid, while also allowing for a ++ // 0 size to be cached. ++ if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size > 0 { ++ return int(size - 1) + } + } + return mi.sizePointerSlow(p, opts) +@@ -60,7 +63,7 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int + if flags.ProtoLegacy && mi.isMessageSet { + size = sizeMessageSet(mi, p, opts) + if mi.sizecacheOffset.IsValid() { +- atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) ++ atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1)) + } + return size + } +@@ -84,13 +87,16 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int + } + } + if mi.sizecacheOffset.IsValid() { +- if size > math.MaxInt32 { ++ if size > (math.MaxInt32 - 1) { + // The size is too large for the int32 sizecache field. + // We will need to recompute the size when encoding; + // unfortunately expensive, but better than invalid output. +- atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), -1) ++ atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), 0) + } else { +- atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) ++ // The size cache contains the size + 1, to allow the ++ // zero value to be invalid, while also allowing for a ++ // 0 size to be cached. ++ atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1)) + } + } + return size +@@ -149,6 +155,14 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt + return b, nil + } + ++// fullyLazyExtensions returns true if we should attempt to keep extensions lazy over size and marshal. ++func fullyLazyExtensions(opts marshalOptions) bool { ++ // When deterministic marshaling is requested, force an unmarshal for lazy ++ // extensions to produce a deterministic result, instead of passing through ++ // bytes lazily that may or may not match what Go Protobuf would produce. ++ return opts.flags&piface.MarshalDeterministic == 0 ++} ++ + func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { + if ext == nil { + return 0 +@@ -158,6 +172,14 @@ func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marsha + if xi.funcs.size == nil { + continue + } ++ if fullyLazyExtensions(opts) { ++ // Don't expand the extension, instead use the buffer to calculate size ++ if lb := x.lazyBuffer(); lb != nil { ++ // We got hold of the buffer, so it's still lazy. ++ n += len(lb) ++ continue ++ } ++ } + n += xi.funcs.size(x.Value(), xi.tagsize, opts) + } + return n +@@ -176,6 +198,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, + var err error + for _, x := range *ext { + xi := getExtensionFieldInfo(x.Type()) ++ if fullyLazyExtensions(opts) { ++ // Don't expand the extension if it's still in wire format, instead use the buffer content. ++ if lb := x.lazyBuffer(); lb != nil { ++ b = append(b, lb...) ++ continue ++ } ++ } + b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) + } + return b, err +@@ -191,6 +220,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, + for _, k := range keys { + x := (*ext)[int32(k)] + xi := getExtensionFieldInfo(x.Type()) ++ if fullyLazyExtensions(opts) { ++ // Don't expand the extension if it's still in wire format, instead use the buffer content. ++ if lb := x.lazyBuffer(); lb != nil { ++ b = append(b, lb...) ++ continue ++ } ++ } + b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) + if err != nil { + return b, err +diff --git a/vendor/google.golang.org/protobuf/internal/impl/equal.go b/vendor/google.golang.org/protobuf/internal/impl/equal.go +new file mode 100644 +index 00000000..9f6c32a7 +--- /dev/null ++++ b/vendor/google.golang.org/protobuf/internal/impl/equal.go +@@ -0,0 +1,224 @@ ++// 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 impl ++ ++import ( ++ "bytes" ++ ++ "google.golang.org/protobuf/encoding/protowire" ++ "google.golang.org/protobuf/reflect/protoreflect" ++ "google.golang.org/protobuf/runtime/protoiface" ++) ++ ++func equal(in protoiface.EqualInput) protoiface.EqualOutput { ++ return protoiface.EqualOutput{Equal: equalMessage(in.MessageA, in.MessageB)} ++} ++ ++// equalMessage is a fast-path variant of protoreflect.equalMessage. ++// It takes advantage of the internal messageState type to avoid ++// unnecessary allocations, type assertions. ++func equalMessage(mx, my protoreflect.Message) bool { ++ if mx == nil || my == nil { ++ return mx == my ++ } ++ if mx.Descriptor() != my.Descriptor() { ++ return false ++ } ++ ++ msx, ok := mx.(*messageState) ++ if !ok { ++ return protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my)) ++ } ++ msy, ok := my.(*messageState) ++ if !ok { ++ return protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my)) ++ } ++ ++ mi := msx.messageInfo() ++ miy := msy.messageInfo() ++ if mi != miy { ++ return protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my)) ++ } ++ mi.init() ++ // Compares regular fields ++ // Modified Message.Range code that compares two messages of the same type ++ // while going over the fields. ++ for _, ri := range mi.rangeInfos { ++ var fd protoreflect.FieldDescriptor ++ var vx, vy protoreflect.Value ++ ++ switch ri := ri.(type) { ++ case *fieldInfo: ++ hx := ri.has(msx.pointer()) ++ hy := ri.has(msy.pointer()) ++ if hx != hy { ++ return false ++ } ++ if !hx { ++ continue ++ } ++ fd = ri.fieldDesc ++ vx = ri.get(msx.pointer()) ++ vy = ri.get(msy.pointer()) ++ case *oneofInfo: ++ fnx := ri.which(msx.pointer()) ++ fny := ri.which(msy.pointer()) ++ if fnx != fny { ++ return false ++ } ++ if fnx <= 0 { ++ continue ++ } ++ fi := mi.fields[fnx] ++ fd = fi.fieldDesc ++ vx = fi.get(msx.pointer()) ++ vy = fi.get(msy.pointer()) ++ } ++ ++ if !equalValue(fd, vx, vy) { ++ return false ++ } ++ } ++ ++ // Compare extensions. ++ // This is more complicated because mx or my could have empty/nil extension maps, ++ // however some populated extension map values are equal to nil extension maps. ++ emx := mi.extensionMap(msx.pointer()) ++ emy := mi.extensionMap(msy.pointer()) ++ if emx != nil { ++ for k, x := range *emx { ++ xd := x.Type().TypeDescriptor() ++ xv := x.Value() ++ var y ExtensionField ++ ok := false ++ if emy != nil { ++ y, ok = (*emy)[k] ++ } ++ // We need to treat empty lists as equal to nil values ++ if emy == nil || !ok { ++ if xd.IsList() && xv.List().Len() == 0 { ++ continue ++ } ++ return false ++ } ++ ++ if !equalValue(xd, xv, y.Value()) { ++ return false ++ } ++ } ++ } ++ if emy != nil { ++ // emy may have extensions emx does not have, need to check them as well ++ for k, y := range *emy { ++ if emx != nil { ++ // emx has the field, so we already checked it ++ if _, ok := (*emx)[k]; ok { ++ continue ++ } ++ } ++ // Empty lists are equal to nil ++ if y.Type().TypeDescriptor().IsList() && y.Value().List().Len() == 0 { ++ continue ++ } ++ ++ // Cant be equal if the extension is populated ++ return false ++ } ++ } ++ ++ return equalUnknown(mx.GetUnknown(), my.GetUnknown()) ++} ++ ++func equalValue(fd protoreflect.FieldDescriptor, vx, vy protoreflect.Value) bool { ++ // slow path ++ if fd.Kind() != protoreflect.MessageKind { ++ return vx.Equal(vy) ++ } ++ ++ // fast path special cases ++ if fd.IsMap() { ++ if fd.MapValue().Kind() == protoreflect.MessageKind { ++ return equalMessageMap(vx.Map(), vy.Map()) ++ } ++ return vx.Equal(vy) ++ } ++ ++ if fd.IsList() { ++ return equalMessageList(vx.List(), vy.List()) ++ } ++ ++ return equalMessage(vx.Message(), vy.Message()) ++} ++ ++// Mostly copied from protoreflect.equalMap. ++// This variant only works for messages as map types. ++// All other map types should be handled via Value.Equal. ++func equalMessageMap(mx, my protoreflect.Map) bool { ++ if mx.Len() != my.Len() { ++ return false ++ } ++ equal := true ++ mx.Range(func(k protoreflect.MapKey, vx protoreflect.Value) bool { ++ if !my.Has(k) { ++ equal = false ++ return false ++ } ++ vy := my.Get(k) ++ equal = equalMessage(vx.Message(), vy.Message()) ++ return equal ++ }) ++ return equal ++} ++ ++// Mostly copied from protoreflect.equalList. ++// The only change is the usage of equalImpl instead of protoreflect.equalValue. ++func equalMessageList(lx, ly protoreflect.List) bool { ++ if lx.Len() != ly.Len() { ++ return false ++ } ++ for i := 0; i < lx.Len(); i++ { ++ // We only operate on messages here since equalImpl will not call us in any other case. ++ if !equalMessage(lx.Get(i).Message(), ly.Get(i).Message()) { ++ return false ++ } ++ } ++ return true ++} ++ ++// equalUnknown compares unknown fields by direct comparison on the raw bytes ++// of each individual field number. ++// Copied from protoreflect.equalUnknown. ++func equalUnknown(x, y protoreflect.RawFields) bool { ++ if len(x) != len(y) { ++ return false ++ } ++ if bytes.Equal([]byte(x), []byte(y)) { ++ return true ++ } ++ ++ mx := make(map[protoreflect.FieldNumber]protoreflect.RawFields) ++ my := make(map[protoreflect.FieldNumber]protoreflect.RawFields) ++ for len(x) > 0 { ++ fnum, _, n := protowire.ConsumeField(x) ++ mx[fnum] = append(mx[fnum], x[:n]...) ++ x = x[n:] ++ } ++ for len(y) > 0 { ++ fnum, _, n := protowire.ConsumeField(y) ++ my[fnum] = append(my[fnum], y[:n]...) ++ y = y[n:] ++ } ++ if len(mx) != len(my) { ++ return false ++ } ++ ++ for k, v1 := range mx { ++ if v2, ok := my[k]; !ok || !bytes.Equal([]byte(v1), []byte(v2)) { ++ return false ++ } ++ } ++ ++ return true ++} +diff --git a/vendor/google.golang.org/protobuf/internal/impl/extension.go b/vendor/google.golang.org/protobuf/internal/impl/extension.go +index cb25b0ba..e31249f6 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/extension.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/extension.go +@@ -53,7 +53,7 @@ type ExtensionInfo struct { + // type returned by InterfaceOf may not be identical. + // + // Deprecated: Use InterfaceOf(xt.Zero()) instead. +- ExtensionType interface{} ++ ExtensionType any + + // Field is the field number of the extension. + // +@@ -95,16 +95,16 @@ func (xi *ExtensionInfo) New() protoreflect.Value { + func (xi *ExtensionInfo) Zero() protoreflect.Value { + return xi.lazyInit().Zero() + } +-func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value { ++func (xi *ExtensionInfo) ValueOf(v any) protoreflect.Value { + return xi.lazyInit().PBValueOf(reflect.ValueOf(v)) + } +-func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} { ++func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) any { + return xi.lazyInit().GoValueOf(v).Interface() + } + func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool { + return xi.lazyInit().IsValidPB(v) + } +-func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool { ++func (xi *ExtensionInfo) IsValidInterface(v any) bool { + return xi.lazyInit().IsValidGo(reflect.ValueOf(v)) + } + func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { +diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +index c1c33d00..81b2b1a7 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +@@ -97,7 +97,7 @@ func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber { + func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum { + return e + } +-func (e *legacyEnumWrapper) protoUnwrap() interface{} { ++func (e *legacyEnumWrapper) protoUnwrap() any { + v := reflect.New(e.goTyp).Elem() + v.SetInt(int64(e.num)) + return v.Interface() +diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +index 6e8677ee..b6849d66 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +@@ -160,6 +160,7 @@ func (x placeholderExtension) HasPresence() bool + func (x placeholderExtension) HasOptionalKeyword() bool { return false } + func (x placeholderExtension) IsExtension() bool { return true } + func (x placeholderExtension) IsWeak() bool { return false } ++func (x placeholderExtension) IsLazy() bool { return false } + func (x placeholderExtension) IsPacked() bool { return false } + func (x placeholderExtension) IsList() bool { return false } + func (x placeholderExtension) IsMap() bool { return false } +diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +index 950e9a1f..bf0b6049 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +@@ -216,7 +216,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName + } + for _, fn := range methods { + for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { +- if vs, ok := v.Interface().([]interface{}); ok { ++ if vs, ok := v.Interface().([]any); ok { + for _, v := range vs { + oneofWrappers = append(oneofWrappers, reflect.TypeOf(v)) + } +@@ -567,6 +567,6 @@ func (m aberrantMessage) IsValid() bool { + func (m aberrantMessage) ProtoMethods() *protoiface.Methods { + return aberrantProtoMethods + } +-func (m aberrantMessage) protoUnwrap() interface{} { ++func (m aberrantMessage) protoUnwrap() any { + return m.v.Interface() + } +diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go +index 629bacdc..741b5ed2 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/message.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/message.go +@@ -30,12 +30,12 @@ type MessageInfo struct { + // Desc is the underlying message descriptor type and must be populated. + Desc protoreflect.MessageDescriptor + +- // Exporter must be provided in a purego environment in order to provide +- // access to unexported fields. ++ // Deprecated: Exporter will be removed the next time we bump ++ // protoimpl.GenVersion. See https://github.com/golang/protobuf/issues/1640 + Exporter exporter + + // OneofWrappers is list of pointers to oneof wrapper struct types. +- OneofWrappers []interface{} ++ OneofWrappers []any + + initMu sync.Mutex // protects all unexported fields + initDone uint32 +@@ -47,7 +47,7 @@ type MessageInfo struct { + // exporter is a function that returns a reference to the ith field of v, + // where v is a pointer to a struct. It returns nil if it does not support + // exporting the requested field (e.g., already exported). +-type exporter func(v interface{}, i int) interface{} ++type exporter func(v any, i int) any + + // getMessageInfo returns the MessageInfo for any message type that + // is generated by our implementation of protoc-gen-go (for v2 and on). +@@ -201,7 +201,7 @@ fieldLoop: + } + for _, fn := range methods { + for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { +- if vs, ok := v.Interface().([]interface{}); ok { ++ if vs, ok := v.Interface().([]any); ok { + oneofWrappers = vs + } + } +@@ -256,7 +256,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType { + + type mapEntryType struct { + desc protoreflect.MessageDescriptor +- valType interface{} // zero value of enum or message type ++ valType any // zero value of enum or message type + } + + func (mt mapEntryType) New() protoreflect.Message { +diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +index a6f0dbda..ecb4623d 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +@@ -20,7 +20,7 @@ type reflectMessageInfo struct { + // fieldTypes contains the zero value of an enum or message field. + // For lists, it contains the element type. + // For maps, it contains the entry value type. +- fieldTypes map[protoreflect.FieldNumber]interface{} ++ fieldTypes map[protoreflect.FieldNumber]any + + // denseFields is a subset of fields where: + // 0 < fieldDesc.Number() < len(denseFields) +@@ -28,7 +28,7 @@ type reflectMessageInfo struct { + denseFields []*fieldInfo + + // rangeInfos is a list of all fields (not belonging to a oneof) and oneofs. +- rangeInfos []interface{} // either *fieldInfo or *oneofInfo ++ rangeInfos []any // either *fieldInfo or *oneofInfo + + getUnknown func(pointer) protoreflect.RawFields + setUnknown func(pointer, protoreflect.RawFields) +@@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { + } + if ft != nil { + if mi.fieldTypes == nil { +- mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{}) ++ mi.fieldTypes = make(map[protoreflect.FieldNumber]any) + } + mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface() + } +@@ -255,6 +255,10 @@ func (m *extensionMap) Has(xd protoreflect.ExtensionTypeDescriptor) (ok bool) { + if !ok { + return false + } ++ if x.isUnexpandedLazy() { ++ // Avoid calling x.Value(), which triggers a lazy unmarshal. ++ return true ++ } + switch { + case xd.IsList(): + return x.Value().List().Len() > 0 +@@ -389,7 +393,7 @@ var ( + // MessageOf returns a reflective view over a message. The input must be a + // pointer to a named Go struct. If the provided type has a ProtoReflect method, + // it must be implemented by calling this method. +-func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message { ++func (mi *MessageInfo) MessageOf(m any) protoreflect.Message { + if reflect.TypeOf(m) != mi.GoReflectType { + panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType)) + } +@@ -417,7 +421,7 @@ func (m *messageIfaceWrapper) Reset() { + func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message { + return (*messageReflectWrapper)(m) + } +-func (m *messageIfaceWrapper) protoUnwrap() interface{} { ++func (m *messageIfaceWrapper) protoUnwrap() any { + return m.p.AsIfaceOf(m.mi.GoReflectType.Elem()) + } + +diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +index 29ba6bd3..99dc23c6 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +@@ -23,7 +23,7 @@ func (m *messageState) New() protoreflect.Message { + func (m *messageState) Interface() protoreflect.ProtoMessage { + return m.protoUnwrap().(protoreflect.ProtoMessage) + } +-func (m *messageState) protoUnwrap() interface{} { ++func (m *messageState) protoUnwrap() any { + return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) + } + func (m *messageState) ProtoMethods() *protoiface.Methods { +@@ -154,7 +154,7 @@ func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage { + } + return (*messageIfaceWrapper)(m) + } +-func (m *messageReflectWrapper) protoUnwrap() interface{} { ++func (m *messageReflectWrapper) protoUnwrap() any { + return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) + } + func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods { +diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +deleted file mode 100644 +index 517e9443..00000000 +--- a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go ++++ /dev/null +@@ -1,215 +0,0 @@ +-// Copyright 2018 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 purego || appengine +-// +build purego appengine +- +-package impl +- +-import ( +- "fmt" +- "reflect" +- "sync" +-) +- +-const UnsafeEnabled = false +- +-// Pointer is an opaque pointer type. +-type Pointer interface{} +- +-// offset represents the offset to a struct field, accessible from a pointer. +-// The offset is the field index into a struct. +-type offset struct { +- index int +- export exporter +-} +- +-// offsetOf returns a field offset for the struct field. +-func offsetOf(f reflect.StructField, x exporter) offset { +- if len(f.Index) != 1 { +- panic("embedded structs are not supported") +- } +- if f.PkgPath == "" { +- return offset{index: f.Index[0]} // field is already exported +- } +- if x == nil { +- panic("exporter must be provided for unexported field") +- } +- return offset{index: f.Index[0], export: x} +-} +- +-// IsValid reports whether the offset is valid. +-func (f offset) IsValid() bool { return f.index >= 0 } +- +-// invalidOffset is an invalid field offset. +-var invalidOffset = offset{index: -1} +- +-// zeroOffset is a noop when calling pointer.Apply. +-var zeroOffset = offset{index: 0} +- +-// pointer is an abstract representation of a pointer to a struct or field. +-type pointer struct{ v reflect.Value } +- +-// pointerOf returns p as a pointer. +-func pointerOf(p Pointer) pointer { +- return pointerOfIface(p) +-} +- +-// pointerOfValue returns v as a pointer. +-func pointerOfValue(v reflect.Value) pointer { +- return pointer{v: v} +-} +- +-// pointerOfIface returns the pointer portion of an interface. +-func pointerOfIface(v interface{}) pointer { +- return pointer{v: reflect.ValueOf(v)} +-} +- +-// IsNil reports whether the pointer is nil. +-func (p pointer) IsNil() bool { +- return p.v.IsNil() +-} +- +-// Apply adds an offset to the pointer to derive a new pointer +-// to a specified field. The current pointer must be pointing at a struct. +-func (p pointer) Apply(f offset) pointer { +- if f.export != nil { +- if v := reflect.ValueOf(f.export(p.v.Interface(), f.index)); v.IsValid() { +- return pointer{v: v} +- } +- } +- return pointer{v: p.v.Elem().Field(f.index).Addr()} +-} +- +-// AsValueOf treats p as a pointer to an object of type t and returns the value. +-// It is equivalent to reflect.ValueOf(p.AsIfaceOf(t)) +-func (p pointer) AsValueOf(t reflect.Type) reflect.Value { +- if got := p.v.Type().Elem(); got != t { +- panic(fmt.Sprintf("invalid type: got %v, want %v", got, t)) +- } +- return p.v +-} +- +-// AsIfaceOf treats p as a pointer to an object of type t and returns the value. +-// It is equivalent to p.AsValueOf(t).Interface() +-func (p pointer) AsIfaceOf(t reflect.Type) interface{} { +- return p.AsValueOf(t).Interface() +-} +- +-func (p pointer) Bool() *bool { return p.v.Interface().(*bool) } +-func (p pointer) BoolPtr() **bool { return p.v.Interface().(**bool) } +-func (p pointer) BoolSlice() *[]bool { return p.v.Interface().(*[]bool) } +-func (p pointer) Int32() *int32 { return p.v.Interface().(*int32) } +-func (p pointer) Int32Ptr() **int32 { return p.v.Interface().(**int32) } +-func (p pointer) Int32Slice() *[]int32 { return p.v.Interface().(*[]int32) } +-func (p pointer) Int64() *int64 { return p.v.Interface().(*int64) } +-func (p pointer) Int64Ptr() **int64 { return p.v.Interface().(**int64) } +-func (p pointer) Int64Slice() *[]int64 { return p.v.Interface().(*[]int64) } +-func (p pointer) Uint32() *uint32 { return p.v.Interface().(*uint32) } +-func (p pointer) Uint32Ptr() **uint32 { return p.v.Interface().(**uint32) } +-func (p pointer) Uint32Slice() *[]uint32 { return p.v.Interface().(*[]uint32) } +-func (p pointer) Uint64() *uint64 { return p.v.Interface().(*uint64) } +-func (p pointer) Uint64Ptr() **uint64 { return p.v.Interface().(**uint64) } +-func (p pointer) Uint64Slice() *[]uint64 { return p.v.Interface().(*[]uint64) } +-func (p pointer) Float32() *float32 { return p.v.Interface().(*float32) } +-func (p pointer) Float32Ptr() **float32 { return p.v.Interface().(**float32) } +-func (p pointer) Float32Slice() *[]float32 { return p.v.Interface().(*[]float32) } +-func (p pointer) Float64() *float64 { return p.v.Interface().(*float64) } +-func (p pointer) Float64Ptr() **float64 { return p.v.Interface().(**float64) } +-func (p pointer) Float64Slice() *[]float64 { return p.v.Interface().(*[]float64) } +-func (p pointer) String() *string { return p.v.Interface().(*string) } +-func (p pointer) StringPtr() **string { return p.v.Interface().(**string) } +-func (p pointer) StringSlice() *[]string { return p.v.Interface().(*[]string) } +-func (p pointer) Bytes() *[]byte { return p.v.Interface().(*[]byte) } +-func (p pointer) BytesPtr() **[]byte { return p.v.Interface().(**[]byte) } +-func (p pointer) BytesSlice() *[][]byte { return p.v.Interface().(*[][]byte) } +-func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.v.Interface().(*WeakFields)) } +-func (p pointer) Extensions() *map[int32]ExtensionField { +- return p.v.Interface().(*map[int32]ExtensionField) +-} +- +-func (p pointer) Elem() pointer { +- return pointer{v: p.v.Elem()} +-} +- +-// PointerSlice copies []*T from p as a new []pointer. +-// This behavior differs from the implementation in pointer_unsafe.go. +-func (p pointer) PointerSlice() []pointer { +- // TODO: reconsider this +- if p.v.IsNil() { +- return nil +- } +- n := p.v.Elem().Len() +- s := make([]pointer, n) +- for i := 0; i < n; i++ { +- s[i] = pointer{v: p.v.Elem().Index(i)} +- } +- return s +-} +- +-// AppendPointerSlice appends v to p, which must be a []*T. +-func (p pointer) AppendPointerSlice(v pointer) { +- sp := p.v.Elem() +- sp.Set(reflect.Append(sp, v.v)) +-} +- +-// SetPointer sets *p to v. +-func (p pointer) SetPointer(v pointer) { +- p.v.Elem().Set(v.v) +-} +- +-func growSlice(p pointer, addCap int) { +- // TODO: Once we only support Go 1.20 and newer, use reflect.Grow. +- in := p.v.Elem() +- out := reflect.MakeSlice(in.Type(), in.Len(), in.Len()+addCap) +- reflect.Copy(out, in) +- p.v.Elem().Set(out) +-} +- +-func (p pointer) growBoolSlice(addCap int) { +- growSlice(p, addCap) +-} +- +-func (p pointer) growInt32Slice(addCap int) { +- growSlice(p, addCap) +-} +- +-func (p pointer) growUint32Slice(addCap int) { +- growSlice(p, addCap) +-} +- +-func (p pointer) growInt64Slice(addCap int) { +- growSlice(p, addCap) +-} +- +-func (p pointer) growUint64Slice(addCap int) { +- growSlice(p, addCap) +-} +- +-func (p pointer) growFloat64Slice(addCap int) { +- growSlice(p, addCap) +-} +- +-func (p pointer) growFloat32Slice(addCap int) { +- growSlice(p, addCap) +-} +- +-func (Export) MessageStateOf(p Pointer) *messageState { panic("not supported") } +-func (ms *messageState) pointer() pointer { panic("not supported") } +-func (ms *messageState) messageInfo() *MessageInfo { panic("not supported") } +-func (ms *messageState) LoadMessageInfo() *MessageInfo { panic("not supported") } +-func (ms *messageState) StoreMessageInfo(mi *MessageInfo) { panic("not supported") } +- +-type atomicNilMessage struct { +- once sync.Once +- m messageReflectWrapper +-} +- +-func (m *atomicNilMessage) Init(mi *MessageInfo) *messageReflectWrapper { +- m.once.Do(func() { +- m.m.p = pointerOfIface(reflect.Zero(mi.GoReflectType).Interface()) +- m.m.mi = mi +- }) +- return &m.m +-} +diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +index 4b020e31..79e18666 100644 +--- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go ++++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +@@ -2,9 +2,6 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build !purego && !appengine +-// +build !purego,!appengine +- + package impl + + import ( +@@ -50,7 +47,7 @@ func pointerOfValue(v reflect.Value) pointer { + } + + // pointerOfIface returns the pointer portion of an interface. +-func pointerOfIface(v interface{}) pointer { ++func pointerOfIface(v any) pointer { + type ifaceHeader struct { + Type unsafe.Pointer + Data unsafe.Pointer +@@ -80,7 +77,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { + + // AsIfaceOf treats p as a pointer to an object of type t and returns the value. + // It is equivalent to p.AsValueOf(t).Interface() +-func (p pointer) AsIfaceOf(t reflect.Type) interface{} { ++func (p pointer) AsIfaceOf(t reflect.Type) any { + // TODO: Use tricky unsafe magic to directly create ifaceHeader. + return p.AsValueOf(t).Interface() + } +diff --git a/vendor/google.golang.org/protobuf/internal/order/range.go b/vendor/google.golang.org/protobuf/internal/order/range.go +index 1665a68e..a1f09162 100644 +--- a/vendor/google.golang.org/protobuf/internal/order/range.go ++++ b/vendor/google.golang.org/protobuf/internal/order/range.go +@@ -18,7 +18,7 @@ type messageField struct { + } + + var messageFieldPool = sync.Pool{ +- New: func() interface{} { return new([]messageField) }, ++ New: func() any { return new([]messageField) }, + } + + type ( +@@ -69,7 +69,7 @@ type mapEntry struct { + } + + var mapEntryPool = sync.Pool{ +- New: func() interface{} { return new([]mapEntry) }, ++ New: func() any { return new([]mapEntry) }, + } + + type ( +diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go b/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go +deleted file mode 100644 +index a1f6f333..00000000 +--- a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go ++++ /dev/null +@@ -1,28 +0,0 @@ +-// Copyright 2018 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 purego || appengine +-// +build purego appengine +- +-package strs +- +-import pref "google.golang.org/protobuf/reflect/protoreflect" +- +-func UnsafeString(b []byte) string { +- return string(b) +-} +- +-func UnsafeBytes(s string) []byte { +- return []byte(s) +-} +- +-type Builder struct{} +- +-func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { +- return prefix.Append(name) +-} +- +-func (*Builder) MakeString(b []byte) string { +- return string(b) +-} +diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +index a008acd0..832a7988 100644 +--- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go ++++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +@@ -2,8 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build !purego && !appengine && !go1.21 +-// +build !purego,!appengine,!go1.21 ++//go:build !go1.21 + + package strs + +diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go +index 60166f2b..1ffddf68 100644 +--- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go ++++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go +@@ -2,8 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build !purego && !appengine && go1.21 +-// +build !purego,!appengine,go1.21 ++//go:build go1.21 + + package strs + +diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go +index fc6bfc39..fb8e15e8 100644 +--- a/vendor/google.golang.org/protobuf/internal/version/version.go ++++ b/vendor/google.golang.org/protobuf/internal/version/version.go +@@ -51,8 +51,8 @@ import ( + // 10. Send out the CL for review and submit it. + const ( + Major = 1 +- Minor = 34 +- Patch = 0 ++ Minor = 35 ++ Patch = 1 + PreRelease = "" + ) + +diff --git a/vendor/google.golang.org/protobuf/proto/equal.go b/vendor/google.golang.org/protobuf/proto/equal.go +index 1a0be1b0..c36d4a9c 100644 +--- a/vendor/google.golang.org/protobuf/proto/equal.go ++++ b/vendor/google.golang.org/protobuf/proto/equal.go +@@ -8,6 +8,7 @@ import ( + "reflect" + + "google.golang.org/protobuf/reflect/protoreflect" ++ "google.golang.org/protobuf/runtime/protoiface" + ) + + // Equal reports whether two messages are equal, +@@ -51,6 +52,14 @@ func Equal(x, y Message) bool { + if mx.IsValid() != my.IsValid() { + return false + } ++ ++ // Only one of the messages needs to implement the fast-path for it to work. ++ pmx := protoMethods(mx) ++ pmy := protoMethods(my) ++ if pmx != nil && pmy != nil && pmx.Equal != nil && pmy.Equal != nil { ++ return pmx.Equal(protoiface.EqualInput{MessageA: mx, MessageB: my}).Equal ++ } ++ + vx := protoreflect.ValueOfMessage(mx) + vy := protoreflect.ValueOfMessage(my) + return vx.Equal(vy) +diff --git a/vendor/google.golang.org/protobuf/proto/extension.go b/vendor/google.golang.org/protobuf/proto/extension.go +index c9c8721a..78445d11 100644 +--- a/vendor/google.golang.org/protobuf/proto/extension.go ++++ b/vendor/google.golang.org/protobuf/proto/extension.go +@@ -39,7 +39,49 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) { + // If the field is unpopulated, it returns the default value for + // scalars and an immutable, empty value for lists or messages. + // It panics if xt does not extend m. +-func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { ++// ++// The type of the value is dependent on the field type of the extension. ++// For extensions generated by protoc-gen-go, the Go type is as follows: ++// ++// ╔═══════════════════╤═════════════════════════╗ ++// ║ Go type │ Protobuf kind ║ ++// ╠═══════════════════╪═════════════════════════╣ ++// ║ bool │ bool ║ ++// ║ int32 │ int32, sint32, sfixed32 ║ ++// ║ int64 │ int64, sint64, sfixed64 ║ ++// ║ uint32 │ uint32, fixed32 ║ ++// ║ uint64 │ uint64, fixed64 ║ ++// ║ float32 │ float ║ ++// ║ float64 │ double ║ ++// ║ string │ string ║ ++// ║ []byte │ bytes ║ ++// ║ protoreflect.Enum │ enum ║ ++// ║ proto.Message │ message, group ║ ++// ╚═══════════════════╧═════════════════════════╝ ++// ++// The protoreflect.Enum and proto.Message types are the concrete Go type ++// associated with the named enum or message. Repeated fields are represented ++// using a Go slice of the base element type. ++// ++// If a generated extension descriptor variable is directly passed to ++// GetExtension, then the call should be followed immediately by a ++// type assertion to the expected output value. For example: ++// ++// mm := proto.GetExtension(m, foopb.E_MyExtension).(*foopb.MyMessage) ++// ++// This pattern enables static analysis tools to verify that the asserted type ++// matches the Go type associated with the extension field and ++// also enables a possible future migration to a type-safe extension API. ++// ++// Since singular messages are the most common extension type, the pattern of ++// calling HasExtension followed by GetExtension may be simplified to: ++// ++// if mm := proto.GetExtension(m, foopb.E_MyExtension).(*foopb.MyMessage); mm != nil { ++// ... // make use of mm ++// } ++// ++// The mm variable is non-nil if and only if HasExtension reports true. ++func GetExtension(m Message, xt protoreflect.ExtensionType) any { + // Treat nil message interface as an empty message; return the default. + if m == nil { + return xt.InterfaceOf(xt.Zero()) +@@ -51,7 +93,36 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { + // SetExtension stores the value of an extension field. + // It panics if m is invalid, xt does not extend m, or if type of v + // is invalid for the specified extension field. +-func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { ++// ++// The type of the value is dependent on the field type of the extension. ++// For extensions generated by protoc-gen-go, the Go type is as follows: ++// ++// ╔═══════════════════╤═════════════════════════╗ ++// ║ Go type │ Protobuf kind ║ ++// ╠═══════════════════╪═════════════════════════╣ ++// ║ bool │ bool ║ ++// ║ int32 │ int32, sint32, sfixed32 ║ ++// ║ int64 │ int64, sint64, sfixed64 ║ ++// ║ uint32 │ uint32, fixed32 ║ ++// ║ uint64 │ uint64, fixed64 ║ ++// ║ float32 │ float ║ ++// ║ float64 │ double ║ ++// ║ string │ string ║ ++// ║ []byte │ bytes ║ ++// ║ protoreflect.Enum │ enum ║ ++// ║ proto.Message │ message, group ║ ++// ╚═══════════════════╧═════════════════════════╝ ++// ++// The protoreflect.Enum and proto.Message types are the concrete Go type ++// associated with the named enum or message. Repeated fields are represented ++// using a Go slice of the base element type. ++// ++// If a generated extension descriptor variable is directly passed to ++// SetExtension (e.g., foopb.E_MyExtension), then the value should be a ++// concrete type that matches the expected Go type for the extension descriptor ++// so that static analysis tools can verify type correctness. ++// This also enables a possible future migration to a type-safe extension API. ++func SetExtension(m Message, xt protoreflect.ExtensionType, v any) { + xd := xt.TypeDescriptor() + pv := xt.ValueOf(v) + +@@ -78,7 +149,7 @@ func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { + // It returns immediately if f returns false. + // While iterating, mutating operations may only be performed + // on the current extension field. +-func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) { ++func RangeExtensions(m Message, f func(protoreflect.ExtensionType, any) bool) { + // Treat nil message interface as an empty message; nothing to range over. + if m == nil { + return +diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +index 85617554..ebcb4a8a 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go ++++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +@@ -150,6 +150,7 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc + opts = proto.Clone(opts).(*descriptorpb.FieldOptions) + f.L1.Options = func() protoreflect.ProtoMessage { return opts } + f.L1.IsWeak = opts.GetWeak() ++ f.L1.IsLazy = opts.GetLazy() + if opts.Packed != nil { + f.L1.EditionFeatures.IsPacked = opts.GetPacked() + } +@@ -214,6 +215,9 @@ func (r descsByName) initExtensionDeclarations(xds []*descriptorpb.FieldDescript + if xd.JsonName != nil { + x.L2.StringName.InitJSON(xd.GetJsonName()) + } ++ if x.L1.Kind == protoreflect.MessageKind && x.L1.EditionFeatures.IsDelimitedEncoded { ++ x.L1.Kind = protoreflect.GroupKind ++ } + } + return xs, nil + } +diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +index 254ca585..f3cebab2 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go ++++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +@@ -46,6 +46,11 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc + if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil { + return errors.New("message field %q cannot resolve type: %v", f.FullName(), err) + } ++ if f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) { ++ // A map field might inherit delimited encoding from a file-wide default feature. ++ // But maps never actually use delimited encoding. (At least for now...) ++ f.L1.Kind = protoreflect.MessageKind ++ } + if fd.DefaultValue != nil { + v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable) + if err != nil { +diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +index c6293086..6de31c2e 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go ++++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +@@ -116,18 +116,6 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds + if m.ExtensionRanges().Len() > 0 { + return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName()) + } +- // Verify that field names in proto3 do not conflict if lowercased +- // with all underscores removed. +- // See protoc v3.8.0: src/google/protobuf/descriptor.cc:5830-5847 +- names := map[string]protoreflect.FieldDescriptor{} +- for i := 0; i < m.Fields().Len(); i++ { +- f1 := m.Fields().Get(i) +- s := strings.Replace(strings.ToLower(string(f1.Name())), "_", "", -1) +- if f2, ok := names[s]; ok { +- return errors.New("message %q using proto3 semantics has conflict: %q with %q", m.FullName(), f1.Name(), f2.Name()) +- } +- names[s] = f1 +- } + } + + for j, fd := range md.GetField() { +diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +index f6a1fec6..002e0047 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go ++++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +@@ -14,7 +14,7 @@ import ( + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/descriptorpb" +- gofeaturespb "google.golang.org/protobuf/types/gofeaturespb" ++ "google.golang.org/protobuf/types/gofeaturespb" + ) + + var defaults = &descriptorpb.FeatureSetDefaults{} +@@ -62,18 +62,20 @@ func getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet { + fmt.Fprintf(os.Stderr, "internal error: unsupported edition %v (did you forget to update the embedded defaults (i.e. the bootstrap descriptor proto)?)\n", edpb) + os.Exit(1) + } +- fs := defaults.GetDefaults()[0].GetFeatures() ++ fsed := defaults.GetDefaults()[0] + // Using a linear search for now. + // Editions are guaranteed to be sorted and thus we could use a binary search. + // Given that there are only a handful of editions (with one more per year) + // there is not much reason to use a binary search. + for _, def := range defaults.GetDefaults() { + if def.GetEdition() <= edpb { +- fs = def.GetFeatures() ++ fsed = def + } else { + break + } + } ++ fs := proto.Clone(fsed.GetFixedFeatures()).(*descriptorpb.FeatureSet) ++ proto.Merge(fs, fsed.GetOverridableFeatures()) + defaultsCache[ed] = fs + return fs + } +diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go +index d5d5af6e..742cb518 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go ++++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go +@@ -23,6 +23,7 @@ type ( + Unmarshal func(unmarshalInput) (unmarshalOutput, error) + Merge func(mergeInput) mergeOutput + CheckInitialized func(checkInitializedInput) (checkInitializedOutput, error) ++ Equal func(equalInput) equalOutput + } + supportFlags = uint64 + sizeInput = struct { +@@ -75,4 +76,13 @@ type ( + checkInitializedOutput = struct { + pragma.NoUnkeyedLiterals + } ++ equalInput = struct { ++ pragma.NoUnkeyedLiterals ++ MessageA Message ++ MessageB Message ++ } ++ equalOutput = struct { ++ pragma.NoUnkeyedLiterals ++ Equal bool ++ } + ) +diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +index 7dcc2ff0..ea154eec 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go ++++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +@@ -373,6 +373,8 @@ func (p *SourcePath) appendFieldOptions(b []byte) []byte { + b = p.appendRepeatedField(b, "edition_defaults", (*SourcePath).appendFieldOptions_EditionDefault) + case 21: + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) ++ case 22: ++ b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport) + case 999: + b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) + } +@@ -483,6 +485,8 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte { + b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) + case 3: + b = p.appendSingularField(b, "debug_redact", nil) ++ case 4: ++ b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport) + case 999: + b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) + } +@@ -519,6 +523,23 @@ func (p *SourcePath) appendFieldOptions_EditionDefault(b []byte) []byte { + return b + } + ++func (p *SourcePath) appendFieldOptions_FeatureSupport(b []byte) []byte { ++ if len(*p) == 0 { ++ return b ++ } ++ switch (*p)[0] { ++ case 1: ++ b = p.appendSingularField(b, "edition_introduced", nil) ++ case 2: ++ b = p.appendSingularField(b, "edition_deprecated", nil) ++ case 3: ++ b = p.appendSingularField(b, "deprecation_warning", nil) ++ case 4: ++ b = p.appendSingularField(b, "edition_removed", nil) ++ } ++ return b ++} ++ + func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte { + if len(*p) == 0 { + return b +diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +index 5b80afe5..cd8fadba 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go ++++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +@@ -510,7 +510,7 @@ type ExtensionType interface { + // + // ValueOf is more extensive than protoreflect.ValueOf for a given field's + // value as it has more type information available. +- ValueOf(interface{}) Value ++ ValueOf(any) Value + + // InterfaceOf completely unwraps the Value to the underlying Go type. + // InterfaceOf panics if the input is nil or does not represent the +@@ -519,13 +519,13 @@ type ExtensionType interface { + // + // InterfaceOf is able to unwrap the Value further than Value.Interface + // as it has more type information available. +- InterfaceOf(Value) interface{} ++ InterfaceOf(Value) any + + // IsValidValue reports whether the Value is valid to assign to the field. + IsValidValue(Value) bool + + // IsValidInterface reports whether the input is valid to assign to the field. +- IsValidInterface(interface{}) bool ++ IsValidInterface(any) bool + } + + // EnumDescriptor describes an enum and +diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +deleted file mode 100644 +index 7ced876f..00000000 +--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go ++++ /dev/null +@@ -1,60 +0,0 @@ +-// Copyright 2018 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 purego || appengine +-// +build purego appengine +- +-package protoreflect +- +-import "google.golang.org/protobuf/internal/pragma" +- +-type valueType int +- +-const ( +- nilType valueType = iota +- boolType +- int32Type +- int64Type +- uint32Type +- uint64Type +- float32Type +- float64Type +- stringType +- bytesType +- enumType +- ifaceType +-) +- +-// value is a union where only one type can be represented at a time. +-// This uses a distinct field for each type. This is type safe in Go, but +-// occupies more memory than necessary (72B). +-type value struct { +- pragma.DoNotCompare // 0B +- +- typ valueType // 8B +- num uint64 // 8B +- str string // 16B +- bin []byte // 24B +- iface interface{} // 16B +-} +- +-func valueOfString(v string) Value { +- return Value{typ: stringType, str: v} +-} +-func valueOfBytes(v []byte) Value { +- return Value{typ: bytesType, bin: v} +-} +-func valueOfIface(v interface{}) Value { +- return Value{typ: ifaceType, iface: v} +-} +- +-func (v Value) getString() string { +- return v.str +-} +-func (v Value) getBytes() []byte { +- return v.bin +-} +-func (v Value) getIface() interface{} { +- return v.iface +-} +diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +index 16030973..9fe83cef 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go ++++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +@@ -69,8 +69,8 @@ import ( + // composite Value. Modifying an empty, read-only value panics. + type Value value + +-// The protoreflect API uses a custom Value union type instead of interface{} +-// to keep the future open for performance optimizations. Using an interface{} ++// The protoreflect API uses a custom Value union type instead of any ++// to keep the future open for performance optimizations. Using an any + // always incurs an allocation for primitives (e.g., int64) since it needs to + // be boxed on the heap (as interfaces can only contain pointers natively). + // Instead, we represent the Value union as a flat struct that internally keeps +@@ -85,7 +85,7 @@ type Value value + // ValueOf returns a Value initialized with the concrete value stored in v. + // This panics if the type does not match one of the allowed types in the + // Value union. +-func ValueOf(v interface{}) Value { ++func ValueOf(v any) Value { + switch v := v.(type) { + case nil: + return Value{} +@@ -192,10 +192,10 @@ func (v Value) IsValid() bool { + return v.typ != nilType + } + +-// Interface returns v as an interface{}. ++// Interface returns v as an any. + // + // Invariant: v == ValueOf(v).Interface() +-func (v Value) Interface() interface{} { ++func (v Value) Interface() any { + switch v.typ { + case nilType: + return nil +@@ -406,8 +406,8 @@ func (k MapKey) IsValid() bool { + return Value(k).IsValid() + } + +-// Interface returns k as an interface{}. +-func (k MapKey) Interface() interface{} { ++// Interface returns k as an any. ++func (k MapKey) Interface() any { + return Value(k).Interface() + } + +diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +index b1fdbe3e..0015fcb3 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go ++++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +@@ -2,8 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build !purego && !appengine && !go1.21 +-// +build !purego,!appengine,!go1.21 ++//go:build !go1.21 + + package protoreflect + +@@ -45,7 +44,7 @@ var ( + + // typeOf returns a pointer to the Go type information. + // The pointer is comparable and equal if and only if the types are identical. +-func typeOf(t interface{}) unsafe.Pointer { ++func typeOf(t any) unsafe.Pointer { + return (*ifaceHeader)(unsafe.Pointer(&t)).Type + } + +@@ -80,7 +79,7 @@ func valueOfBytes(v []byte) Value { + p := (*sliceHeader)(unsafe.Pointer(&v)) + return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))} + } +-func valueOfIface(v interface{}) Value { ++func valueOfIface(v any) Value { + p := (*ifaceHeader)(unsafe.Pointer(&v)) + return Value{typ: p.Type, ptr: p.Data} + } +@@ -93,7 +92,7 @@ func (v Value) getBytes() (x []byte) { + *(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)} + return x + } +-func (v Value) getIface() (x interface{}) { ++func (v Value) getIface() (x any) { + *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} + return x + } +diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go +index 43547011..479527b5 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go ++++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go +@@ -2,8 +2,7 @@ + // Use of this source code is governed by a BSD-style + // license that can be found in the LICENSE file. + +-//go:build !purego && !appengine && go1.21 +-// +build !purego,!appengine,go1.21 ++//go:build go1.21 + + package protoreflect + +@@ -15,7 +14,7 @@ import ( + + type ( + ifaceHeader struct { +- _ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. ++ _ [0]any // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. + Type unsafe.Pointer + Data unsafe.Pointer + } +@@ -37,7 +36,7 @@ var ( + + // typeOf returns a pointer to the Go type information. + // The pointer is comparable and equal if and only if the types are identical. +-func typeOf(t interface{}) unsafe.Pointer { ++func typeOf(t any) unsafe.Pointer { + return (*ifaceHeader)(unsafe.Pointer(&t)).Type + } + +@@ -70,7 +69,7 @@ func valueOfString(v string) Value { + func valueOfBytes(v []byte) Value { + return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))} + } +-func valueOfIface(v interface{}) Value { ++func valueOfIface(v any) Value { + p := (*ifaceHeader)(unsafe.Pointer(&v)) + return Value{typ: p.Type, ptr: p.Data} + } +@@ -81,7 +80,7 @@ func (v Value) getString() string { + func (v Value) getBytes() []byte { + return unsafe.Slice((*byte)(v.ptr), v.num) + } +-func (v Value) getIface() (x interface{}) { ++func (v Value) getIface() (x any) { + *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} + return x + } +diff --git a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +index 6267dc52..de177733 100644 +--- a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go ++++ b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +@@ -95,7 +95,7 @@ type Files struct { + // multiple files. Only top-level declarations are registered. + // Note that enum values are in the top-level since that are in the same + // scope as the parent enum. +- descsByName map[protoreflect.FullName]interface{} ++ descsByName map[protoreflect.FullName]any + filesByPath map[string][]protoreflect.FileDescriptor + numFiles int + } +@@ -117,7 +117,7 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { + defer globalMutex.Unlock() + } + if r.descsByName == nil { +- r.descsByName = map[protoreflect.FullName]interface{}{ ++ r.descsByName = map[protoreflect.FullName]any{ + "": &packageDescriptor{}, + } + r.filesByPath = make(map[string][]protoreflect.FileDescriptor) +@@ -485,7 +485,7 @@ type Types struct { + } + + type ( +- typesByName map[protoreflect.FullName]interface{} ++ typesByName map[protoreflect.FullName]any + extensionsByMessage map[protoreflect.FullName]extensionsByNumber + extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType + ) +@@ -570,7 +570,7 @@ func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error { + return nil + } + +-func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error { ++func (r *Types) register(kind string, desc protoreflect.Descriptor, typ any) error { + name := desc.FullName() + prev := r.typesByName[name] + if prev != nil { +@@ -841,7 +841,7 @@ func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(p + } + } + +-func typeName(t interface{}) string { ++func typeName(t any) string { + switch t.(type) { + case protoreflect.EnumType: + return "enum" +@@ -854,7 +854,7 @@ func typeName(t interface{}) string { + } + } + +-func amendErrorWithCaller(err error, prev, curr interface{}) error { ++func amendErrorWithCaller(err error, prev, curr any) error { + prevPkg := goPackage(prev) + currPkg := goPackage(curr) + if prevPkg == "" || currPkg == "" || prevPkg == currPkg { +@@ -863,7 +863,7 @@ func amendErrorWithCaller(err error, prev, curr interface{}) error { + return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg) + } + +-func goPackage(v interface{}) string { ++func goPackage(v any) string { + switch d := v.(type) { + case protoreflect.EnumType: + v = d.Descriptor() +diff --git a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +index 44cf467d..24615656 100644 +--- a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go ++++ b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +@@ -39,6 +39,9 @@ type Methods = struct { + + // CheckInitialized returns an error if any required fields in the message are not set. + CheckInitialized func(CheckInitializedInput) (CheckInitializedOutput, error) ++ ++ // Equal compares two messages and returns EqualOutput.Equal == true if they are equal. ++ Equal func(EqualInput) EqualOutput + } + + // SupportFlags indicate support for optional features. +@@ -166,3 +169,18 @@ type CheckInitializedInput = struct { + type CheckInitializedOutput = struct { + pragma.NoUnkeyedLiterals + } ++ ++// EqualInput is input to the Equal method. ++type EqualInput = struct { ++ pragma.NoUnkeyedLiterals ++ ++ MessageA protoreflect.Message ++ MessageB protoreflect.Message ++} ++ ++// EqualOutput is output from the Equal method. ++type EqualOutput = struct { ++ pragma.NoUnkeyedLiterals ++ ++ Equal bool ++} +diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +index 78624cf6..6dea75cd 100644 +--- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go ++++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +@@ -54,6 +54,9 @@ type Edition int32 + const ( + // A placeholder for an unknown edition value. + Edition_EDITION_UNKNOWN Edition = 0 ++ // A placeholder edition for specifying default behaviors *before* a feature ++ // was first introduced. This is effectively an "infinite past". ++ Edition_EDITION_LEGACY Edition = 900 + // Legacy syntax "editions". These pre-date editions, but behave much like + // distinct editions. These can't be used to specify the edition of proto + // files, but feature definitions must supply proto2/proto3 defaults for +@@ -82,6 +85,7 @@ const ( + var ( + Edition_name = map[int32]string{ + 0: "EDITION_UNKNOWN", ++ 900: "EDITION_LEGACY", + 998: "EDITION_PROTO2", + 999: "EDITION_PROTO3", + 1000: "EDITION_2023", +@@ -95,6 +99,7 @@ var ( + } + Edition_value = map[string]int32{ + "EDITION_UNKNOWN": 0, ++ "EDITION_LEGACY": 900, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, +@@ -1212,11 +1217,9 @@ type FileDescriptorSet struct { + + func (x *FileDescriptorSet) Reset() { + *x = FileDescriptorSet{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[0] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[0] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FileDescriptorSet) String() string { +@@ -1227,7 +1230,7 @@ func (*FileDescriptorSet) ProtoMessage() {} + + func (x *FileDescriptorSet) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[0] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -1286,11 +1289,9 @@ type FileDescriptorProto struct { + + func (x *FileDescriptorProto) Reset() { + *x = FileDescriptorProto{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[1] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[1] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FileDescriptorProto) String() string { +@@ -1301,7 +1302,7 @@ func (*FileDescriptorProto) ProtoMessage() {} + + func (x *FileDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[1] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -1429,11 +1430,9 @@ type DescriptorProto struct { + + func (x *DescriptorProto) Reset() { + *x = DescriptorProto{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[2] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[2] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *DescriptorProto) String() string { +@@ -1444,7 +1443,7 @@ func (*DescriptorProto) ProtoMessage() {} + + func (x *DescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[2] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -1556,11 +1555,9 @@ const ( + + func (x *ExtensionRangeOptions) Reset() { + *x = ExtensionRangeOptions{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[3] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[3] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *ExtensionRangeOptions) String() string { +@@ -1571,7 +1568,7 @@ func (*ExtensionRangeOptions) ProtoMessage() {} + + func (x *ExtensionRangeOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[3] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -1675,11 +1672,9 @@ type FieldDescriptorProto struct { + + func (x *FieldDescriptorProto) Reset() { + *x = FieldDescriptorProto{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[4] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[4] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FieldDescriptorProto) String() string { +@@ -1690,7 +1685,7 @@ func (*FieldDescriptorProto) ProtoMessage() {} + + func (x *FieldDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[4] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -1794,11 +1789,9 @@ type OneofDescriptorProto struct { + + func (x *OneofDescriptorProto) Reset() { + *x = OneofDescriptorProto{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[5] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[5] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *OneofDescriptorProto) String() string { +@@ -1809,7 +1802,7 @@ func (*OneofDescriptorProto) ProtoMessage() {} + + func (x *OneofDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[5] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -1858,11 +1851,9 @@ type EnumDescriptorProto struct { + + func (x *EnumDescriptorProto) Reset() { + *x = EnumDescriptorProto{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[6] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[6] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *EnumDescriptorProto) String() string { +@@ -1873,7 +1864,7 @@ func (*EnumDescriptorProto) ProtoMessage() {} + + func (x *EnumDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[6] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -1936,11 +1927,9 @@ type EnumValueDescriptorProto struct { + + func (x *EnumValueDescriptorProto) Reset() { + *x = EnumValueDescriptorProto{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[7] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[7] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *EnumValueDescriptorProto) String() string { +@@ -1951,7 +1940,7 @@ func (*EnumValueDescriptorProto) ProtoMessage() {} + + func (x *EnumValueDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[7] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -2000,11 +1989,9 @@ type ServiceDescriptorProto struct { + + func (x *ServiceDescriptorProto) Reset() { + *x = ServiceDescriptorProto{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[8] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[8] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *ServiceDescriptorProto) String() string { +@@ -2015,7 +2002,7 @@ func (*ServiceDescriptorProto) ProtoMessage() {} + + func (x *ServiceDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[8] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -2077,11 +2064,9 @@ const ( + + func (x *MethodDescriptorProto) Reset() { + *x = MethodDescriptorProto{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[9] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[9] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *MethodDescriptorProto) String() string { +@@ -2092,7 +2077,7 @@ func (*MethodDescriptorProto) ProtoMessage() {} + + func (x *MethodDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[9] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -2177,12 +2162,16 @@ type FileOptions struct { + // + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` +- // If set true, then the Java2 code generator will generate code that +- // throws an exception whenever an attempt is made to assign a non-UTF-8 +- // byte sequence to a string field. +- // Message reflection will do the same. +- // However, an extension field still accepts non-UTF-8 byte sequences. +- // This option has no effect on when used with the lite runtime. ++ // A proto2 file can set this to true to opt in to UTF-8 checking for Java, ++ // which will throw an exception if invalid UTF-8 is parsed from the wire or ++ // assigned to a string field. ++ // ++ // TODO: clarify exactly what kinds of field types this option ++ // applies to, and update these docs accordingly. ++ // ++ // Proto3 files already perform these checks. Setting the option explicitly to ++ // false has no effect: it cannot be used to opt proto3 files out of UTF-8 ++ // checks. + JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` + OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` + // Sets the Go package where structs generated from this .proto will be +@@ -2258,11 +2247,9 @@ const ( + + func (x *FileOptions) Reset() { + *x = FileOptions{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[10] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[10] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FileOptions) String() string { +@@ -2273,7 +2260,7 @@ func (*FileOptions) ProtoMessage() {} + + func (x *FileOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[10] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -2525,11 +2512,9 @@ const ( + + func (x *MessageOptions) Reset() { + *x = MessageOptions{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[11] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[11] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *MessageOptions) String() string { +@@ -2540,7 +2525,7 @@ func (*MessageOptions) ProtoMessage() {} + + func (x *MessageOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[11] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -2679,7 +2664,8 @@ type FieldOptions struct { + Targets []FieldOptions_OptionTargetType `protobuf:"varint,19,rep,name=targets,enum=google.protobuf.FieldOptions_OptionTargetType" json:"targets,omitempty"` + EditionDefaults []*FieldOptions_EditionDefault `protobuf:"bytes,20,rep,name=edition_defaults,json=editionDefaults" json:"edition_defaults,omitempty"` + // Any features defined in the specific edition. +- Features *FeatureSet `protobuf:"bytes,21,opt,name=features" json:"features,omitempty"` ++ Features *FeatureSet `protobuf:"bytes,21,opt,name=features" json:"features,omitempty"` ++ FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,22,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + } +@@ -2697,11 +2683,9 @@ const ( + + func (x *FieldOptions) Reset() { + *x = FieldOptions{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[12] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[12] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FieldOptions) String() string { +@@ -2712,7 +2696,7 @@ func (*FieldOptions) ProtoMessage() {} + + func (x *FieldOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[12] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -2811,6 +2795,13 @@ func (x *FieldOptions) GetFeatures() *FeatureSet { + return nil + } + ++func (x *FieldOptions) GetFeatureSupport() *FieldOptions_FeatureSupport { ++ if x != nil { ++ return x.FeatureSupport ++ } ++ return nil ++} ++ + func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption +@@ -2832,11 +2823,9 @@ type OneofOptions struct { + + func (x *OneofOptions) Reset() { + *x = OneofOptions{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[13] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[13] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *OneofOptions) String() string { +@@ -2847,7 +2836,7 @@ func (*OneofOptions) ProtoMessage() {} + + func (x *OneofOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[13] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -2912,11 +2901,9 @@ const ( + + func (x *EnumOptions) Reset() { + *x = EnumOptions{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[14] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[14] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *EnumOptions) String() string { +@@ -2927,7 +2914,7 @@ func (*EnumOptions) ProtoMessage() {} + + func (x *EnumOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[14] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -2995,6 +2982,8 @@ type EnumValueOptions struct { + // out when using debug formats, e.g. when the field contains sensitive + // credentials. + DebugRedact *bool `protobuf:"varint,3,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` ++ // Information about the support window of a feature value. ++ FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,4,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + } +@@ -3007,11 +2996,9 @@ const ( + + func (x *EnumValueOptions) Reset() { + *x = EnumValueOptions{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[15] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[15] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *EnumValueOptions) String() string { +@@ -3022,7 +3009,7 @@ func (*EnumValueOptions) ProtoMessage() {} + + func (x *EnumValueOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[15] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3058,6 +3045,13 @@ func (x *EnumValueOptions) GetDebugRedact() bool { + return Default_EnumValueOptions_DebugRedact + } + ++func (x *EnumValueOptions) GetFeatureSupport() *FieldOptions_FeatureSupport { ++ if x != nil { ++ return x.FeatureSupport ++ } ++ return nil ++} ++ + func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption +@@ -3089,11 +3083,9 @@ const ( + + func (x *ServiceOptions) Reset() { + *x = ServiceOptions{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[16] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[16] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *ServiceOptions) String() string { +@@ -3104,7 +3096,7 @@ func (*ServiceOptions) ProtoMessage() {} + + func (x *ServiceOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[16] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3166,11 +3158,9 @@ const ( + + func (x *MethodOptions) Reset() { + *x = MethodOptions{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[17] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[17] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *MethodOptions) String() string { +@@ -3181,7 +3171,7 @@ func (*MethodOptions) ProtoMessage() {} + + func (x *MethodOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[17] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3248,11 +3238,9 @@ type UninterpretedOption struct { + + func (x *UninterpretedOption) Reset() { + *x = UninterpretedOption{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[18] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[18] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *UninterpretedOption) String() string { +@@ -3263,7 +3251,7 @@ func (*UninterpretedOption) ProtoMessage() {} + + func (x *UninterpretedOption) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[18] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3349,11 +3337,9 @@ type FeatureSet struct { + + func (x *FeatureSet) Reset() { + *x = FeatureSet{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[19] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[19] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FeatureSet) String() string { +@@ -3364,7 +3350,7 @@ func (*FeatureSet) ProtoMessage() {} + + func (x *FeatureSet) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[19] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3441,11 +3427,9 @@ type FeatureSetDefaults struct { + + func (x *FeatureSetDefaults) Reset() { + *x = FeatureSetDefaults{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[20] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[20] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FeatureSetDefaults) String() string { +@@ -3456,7 +3440,7 @@ func (*FeatureSetDefaults) ProtoMessage() {} + + func (x *FeatureSetDefaults) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[20] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3552,11 +3536,9 @@ type SourceCodeInfo struct { + + func (x *SourceCodeInfo) Reset() { + *x = SourceCodeInfo{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[21] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[21] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *SourceCodeInfo) String() string { +@@ -3567,7 +3549,7 @@ func (*SourceCodeInfo) ProtoMessage() {} + + func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[21] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3604,11 +3586,9 @@ type GeneratedCodeInfo struct { + + func (x *GeneratedCodeInfo) Reset() { + *x = GeneratedCodeInfo{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[22] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[22] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *GeneratedCodeInfo) String() string { +@@ -3619,7 +3599,7 @@ func (*GeneratedCodeInfo) ProtoMessage() {} + + func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[22] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3653,11 +3633,9 @@ type DescriptorProto_ExtensionRange struct { + + func (x *DescriptorProto_ExtensionRange) Reset() { + *x = DescriptorProto_ExtensionRange{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[23] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[23] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *DescriptorProto_ExtensionRange) String() string { +@@ -3668,7 +3646,7 @@ func (*DescriptorProto_ExtensionRange) ProtoMessage() {} + + func (x *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[23] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3718,11 +3696,9 @@ type DescriptorProto_ReservedRange struct { + + func (x *DescriptorProto_ReservedRange) Reset() { + *x = DescriptorProto_ReservedRange{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[24] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[24] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *DescriptorProto_ReservedRange) String() string { +@@ -3733,7 +3709,7 @@ func (*DescriptorProto_ReservedRange) ProtoMessage() {} + + func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[24] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3787,11 +3763,9 @@ type ExtensionRangeOptions_Declaration struct { + + func (x *ExtensionRangeOptions_Declaration) Reset() { + *x = ExtensionRangeOptions_Declaration{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[25] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[25] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *ExtensionRangeOptions_Declaration) String() string { +@@ -3802,7 +3776,7 @@ func (*ExtensionRangeOptions_Declaration) ProtoMessage() {} + + func (x *ExtensionRangeOptions_Declaration) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[25] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3869,11 +3843,9 @@ type EnumDescriptorProto_EnumReservedRange struct { + + func (x *EnumDescriptorProto_EnumReservedRange) Reset() { + *x = EnumDescriptorProto_EnumReservedRange{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[26] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[26] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *EnumDescriptorProto_EnumReservedRange) String() string { +@@ -3884,7 +3856,7 @@ func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} + + func (x *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[26] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3924,11 +3896,9 @@ type FieldOptions_EditionDefault struct { + + func (x *FieldOptions_EditionDefault) Reset() { + *x = FieldOptions_EditionDefault{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[27] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[27] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FieldOptions_EditionDefault) String() string { +@@ -3939,7 +3909,7 @@ func (*FieldOptions_EditionDefault) ProtoMessage() {} + + func (x *FieldOptions_EditionDefault) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[27] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -3968,6 +3938,86 @@ func (x *FieldOptions_EditionDefault) GetValue() string { + return "" + } + ++// Information about the support window of a feature. ++type FieldOptions_FeatureSupport struct { ++ state protoimpl.MessageState ++ sizeCache protoimpl.SizeCache ++ unknownFields protoimpl.UnknownFields ++ ++ // The edition that this feature was first available in. In editions ++ // earlier than this one, the default assigned to EDITION_LEGACY will be ++ // used, and proto files will not be able to override it. ++ EditionIntroduced *Edition `protobuf:"varint,1,opt,name=edition_introduced,json=editionIntroduced,enum=google.protobuf.Edition" json:"edition_introduced,omitempty"` ++ // The edition this feature becomes deprecated in. Using this after this ++ // edition may trigger warnings. ++ EditionDeprecated *Edition `protobuf:"varint,2,opt,name=edition_deprecated,json=editionDeprecated,enum=google.protobuf.Edition" json:"edition_deprecated,omitempty"` ++ // The deprecation warning text if this feature is used after the edition it ++ // was marked deprecated in. ++ DeprecationWarning *string `protobuf:"bytes,3,opt,name=deprecation_warning,json=deprecationWarning" json:"deprecation_warning,omitempty"` ++ // The edition this feature is no longer available in. In editions after ++ // this one, the last default assigned will be used, and proto files will ++ // not be able to override it. ++ EditionRemoved *Edition `protobuf:"varint,4,opt,name=edition_removed,json=editionRemoved,enum=google.protobuf.Edition" json:"edition_removed,omitempty"` ++} ++ ++func (x *FieldOptions_FeatureSupport) Reset() { ++ *x = FieldOptions_FeatureSupport{} ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[28] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) ++} ++ ++func (x *FieldOptions_FeatureSupport) String() string { ++ return protoimpl.X.MessageStringOf(x) ++} ++ ++func (*FieldOptions_FeatureSupport) ProtoMessage() {} ++ ++func (x *FieldOptions_FeatureSupport) ProtoReflect() protoreflect.Message { ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[28] ++ if x != nil { ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ if ms.LoadMessageInfo() == nil { ++ ms.StoreMessageInfo(mi) ++ } ++ return ms ++ } ++ return mi.MessageOf(x) ++} ++ ++// Deprecated: Use FieldOptions_FeatureSupport.ProtoReflect.Descriptor instead. ++func (*FieldOptions_FeatureSupport) Descriptor() ([]byte, []int) { ++ return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1} ++} ++ ++func (x *FieldOptions_FeatureSupport) GetEditionIntroduced() Edition { ++ if x != nil && x.EditionIntroduced != nil { ++ return *x.EditionIntroduced ++ } ++ return Edition_EDITION_UNKNOWN ++} ++ ++func (x *FieldOptions_FeatureSupport) GetEditionDeprecated() Edition { ++ if x != nil && x.EditionDeprecated != nil { ++ return *x.EditionDeprecated ++ } ++ return Edition_EDITION_UNKNOWN ++} ++ ++func (x *FieldOptions_FeatureSupport) GetDeprecationWarning() string { ++ if x != nil && x.DeprecationWarning != nil { ++ return *x.DeprecationWarning ++ } ++ return "" ++} ++ ++func (x *FieldOptions_FeatureSupport) GetEditionRemoved() Edition { ++ if x != nil && x.EditionRemoved != nil { ++ return *x.EditionRemoved ++ } ++ return Edition_EDITION_UNKNOWN ++} ++ + // The name of the uninterpreted option. Each string represents a segment in + // a dot-separated name. is_extension is true iff a segment represents an + // extension (denoted with parentheses in options specs in .proto files). +@@ -3984,11 +4034,9 @@ type UninterpretedOption_NamePart struct { + + func (x *UninterpretedOption_NamePart) Reset() { + *x = UninterpretedOption_NamePart{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[28] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[29] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *UninterpretedOption_NamePart) String() string { +@@ -3998,8 +4046,8 @@ func (x *UninterpretedOption_NamePart) String() string { + func (*UninterpretedOption_NamePart) ProtoMessage() {} + + func (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[28] +- if protoimpl.UnsafeEnabled && x != nil { ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[29] ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -4037,17 +4085,18 @@ type FeatureSetDefaults_FeatureSetEditionDefault struct { + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + +- Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` +- Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"` ++ Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` ++ // Defaults of features that can be overridden in this edition. ++ OverridableFeatures *FeatureSet `protobuf:"bytes,4,opt,name=overridable_features,json=overridableFeatures" json:"overridable_features,omitempty"` ++ // Defaults of features that can't be overridden in this edition. ++ FixedFeatures *FeatureSet `protobuf:"bytes,5,opt,name=fixed_features,json=fixedFeatures" json:"fixed_features,omitempty"` + } + + func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() { + *x = FeatureSetDefaults_FeatureSetEditionDefault{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[29] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[30] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string { +@@ -4057,8 +4106,8 @@ func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string { + func (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {} + + func (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[29] +- if protoimpl.UnsafeEnabled && x != nil { ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[30] ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -4080,9 +4129,16 @@ func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetEdition() Edition { + return Edition_EDITION_UNKNOWN + } + +-func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFeatures() *FeatureSet { ++func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetOverridableFeatures() *FeatureSet { + if x != nil { +- return x.Features ++ return x.OverridableFeatures ++ } ++ return nil ++} ++ ++func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFixedFeatures() *FeatureSet { ++ if x != nil { ++ return x.FixedFeatures + } + return nil + } +@@ -4187,11 +4243,9 @@ type SourceCodeInfo_Location struct { + + func (x *SourceCodeInfo_Location) Reset() { + *x = SourceCodeInfo_Location{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[30] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[31] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *SourceCodeInfo_Location) String() string { +@@ -4201,8 +4255,8 @@ func (x *SourceCodeInfo_Location) String() string { + func (*SourceCodeInfo_Location) ProtoMessage() {} + + func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[30] +- if protoimpl.UnsafeEnabled && x != nil { ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[31] ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -4274,11 +4328,9 @@ type GeneratedCodeInfo_Annotation struct { + + func (x *GeneratedCodeInfo_Annotation) Reset() { + *x = GeneratedCodeInfo_Annotation{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[31] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[32] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *GeneratedCodeInfo_Annotation) String() string { +@@ -4288,8 +4340,8 @@ func (x *GeneratedCodeInfo_Annotation) String() string { + func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} + + func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message { +- mi := &file_google_protobuf_descriptor_proto_msgTypes[31] +- if protoimpl.UnsafeEnabled && x != nil { ++ mi := &file_google_protobuf_descriptor_proto_msgTypes[32] ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -4597,7 +4649,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ + 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, +- 0x69, 0x6e, 0x67, 0x22, 0x97, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, ++ 0x69, 0x6e, 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, +@@ -4670,405 +4722,445 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ + 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, + 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, + 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, +- 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03, +- 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, +- 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, +- 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, +- 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, +- 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, +- 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, +- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, +- 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, +- 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, +- 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, +- 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, +- 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, +- 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, +- 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, +- 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, +- 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, +- 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, +- 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, +- 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, +- 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, +- 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, +- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, +- 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, +- 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, +- 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, +- 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, +- 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, +- 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, +- 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, +- 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, +- 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, +- 0x08, 0x09, 0x10, 0x0a, 0x22, 0xad, 0x0a, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, +- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, +- 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, +- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, +- 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, +- 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, +- 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, +- 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, +- 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, +- 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, +- 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, +- 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, +- 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, +- 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, +- 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, +- 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, +- 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, +- 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, +- 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, +- 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, +- 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, +- 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, +- 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, +- 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, +- 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, +- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, +- 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, +- 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, +- 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, +- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, +- 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, +- 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, +- 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, +- 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, +- 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, +- 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, +- 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, +- 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, +- 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, +- 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, +- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, +- 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, +- 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, +- 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, +- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, +- 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, +- 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, +- 0x69, 0x6f, 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, +- 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, +- 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, +- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, +- 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, +- 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, +- 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, +- 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, +- 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, +- 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, +- 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, +- 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, +- 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, +- 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, +- 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, +- 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, +- 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, +- 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, +- 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, +- 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, +- 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, +- 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, +- 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, +- 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, +- 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, +- 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, +- 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, +- 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, +- 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, +- 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, +- 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, +- 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, +- 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, +- 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, +- 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, +- 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, +- 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, +- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, +- 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, +- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, +- 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, +- 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, +- 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, +- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, +- 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, +- 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, +- 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, +- 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, +- 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, +- 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, +- 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, +- 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, +- 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, +- 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, +- 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, +- 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, +- 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, +- 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, +- 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, +- 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, +- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, +- 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, +- 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, +- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, +- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, ++ 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, ++ 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, ++ 0x63, 0x65, 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, ++ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, ++ 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, ++ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, ++ 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, ++ 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, ++ 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, ++ 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, ++ 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, ++ 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, ++ 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, ++ 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, ++ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, ++ 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, ++ 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, ++ 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, ++ 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, ++ 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, ++ 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, ++ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, ++ 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, ++ 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, ++ 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, ++ 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, ++ 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, ++ 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, ++ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, ++ 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, +- 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, +- 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, +- 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, +- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, +- 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, +- 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, +- 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, +- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, +- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, +- 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, +- 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, ++ 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, ++ 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, ++ 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, ++ 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, ++ 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, ++ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, ++ 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, ++ 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, ++ 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, ++ 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, ++ 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, ++ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, ++ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, ++ 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, ++ 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, ++ 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, ++ 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, ++ 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, ++ 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, ++ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, ++ 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, ++ 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, ++ 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, ++ 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, +- 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, ++ 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, ++ 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, ++ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, ++ 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, ++ 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, ++ 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, ++ 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, ++ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, ++ 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, ++ 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, ++ 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, ++ 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, ++ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, ++ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, ++ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, ++ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, ++ 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, ++ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, ++ 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, ++ 0x55, 0x0a, 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, ++ 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, ++ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, ++ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, ++ 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, ++ 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, +- 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, +- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, +- 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, +- 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, +- 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, +- 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, +- 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, +- 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, +- 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, +- 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, ++ 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, ++ 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, ++ 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, ++ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, ++ 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, ++ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, ++ 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, ++ 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, ++ 0x64, 0x75, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, ++ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, ++ 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, ++ 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, ++ 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, ++ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, ++ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, ++ 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, ++ 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, ++ 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, ++ 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, ++ 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, ++ 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, ++ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, ++ 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, ++ 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, ++ 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, ++ 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, ++ 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, ++ 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, ++ 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, ++ 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, ++ 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, ++ 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, ++ 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, ++ 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, ++ 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, ++ 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, ++ 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, ++ 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, ++ 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, ++ 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, ++ 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, ++ 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, ++ 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, ++ 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, ++ 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, ++ 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, ++ 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, ++ 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, ++ 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, ++ 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, ++ 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, ++ 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, ++ 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, ++ 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, ++ 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, ++ 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, +- 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, +- 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, +- 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, +- 0x80, 0x80, 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, +- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, +- 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, +- 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, +- 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, +- 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, +- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, +- 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, +- 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, +- 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, +- 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, +- 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, +- 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, +- 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, +- 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, +- 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, +- 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, +- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, +- 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, +- 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, +- 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, +- 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, +- 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, +- 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, +- 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, +- 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, +- 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, +- 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, +- 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, +- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, +- 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, +- 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, +- 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, +- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, +- 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, +- 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, +- 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, +- 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, +- 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, +- 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, +- 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, +- 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, +- 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, +- 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, +- 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, +- 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, +- 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, +- 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, +- 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, +- 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, +- 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, +- 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8c, 0x0a, 0x0a, +- 0x0a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x0e, +- 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, +- 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, +- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, +- 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, +- 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, +- 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, +- 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, +- 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, +- 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x65, 0x6e, 0x75, +- 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, ++ 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, ++ 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, ++ 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, ++ 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, ++ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, ++ 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, ++ 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, ++ 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, ++ 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, ++ 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, ++ 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, ++ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, ++ 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, ++ 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, ++ 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, ++ 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, ++ 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, ++ 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, ++ 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, ++ 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, ++ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, ++ 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, ++ 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, ++ 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, ++ 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, ++ 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, ++ 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, ++ 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, ++ 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, ++ 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, ++ 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, ++ 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, ++ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, ++ 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, ++ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, ++ 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, ++ 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, ++ 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, ++ 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, ++ 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, ++ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, ++ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, ++ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, ++ 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, ++ 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, ++ 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, ++ 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, ++ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, ++ 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, ++ 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, ++ 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, ++ 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, ++ 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, ++ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, ++ 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, ++ 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, ++ 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, ++ 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, ++ 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, ++ 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, ++ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, ++ 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, ++ 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, ++ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, ++ 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, ++ 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, ++ 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, ++ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, ++ 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, ++ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, ++ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, ++ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, ++ 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, ++ 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, ++ 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, ++ 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, ++ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, ++ 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, ++ 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, ++ 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, ++ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, ++ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, ++ 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, ++ 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, ++ 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, ++ 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, ++ 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, ++ 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, ++ 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, ++ 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, ++ 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, ++ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, ++ 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, ++ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, ++ 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, ++ 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, ++ 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, ++ 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, ++ 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, ++ 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, ++ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, ++ 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, ++ 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, ++ 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, ++ 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, ++ 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, ++ 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, ++ 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, ++ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, ++ 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, ++ 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, ++ 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, ++ 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, ++ 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, ++ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, ++ 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, ++ 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, ++ 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, ++ 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, ++ 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, ++ 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, ++ 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, ++ 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, ++ 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, ++ 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, ++ 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, ++ 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, ++ 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, ++ 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, ++ 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, ++ 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, ++ 0x09, 0x12, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, ++ 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, ++ 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, ++ 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, +- 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, +- 0x70, 0x65, 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b, +- 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04, +- 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, +- 0x65, 0x12, 0x92, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, +- 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, +- 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, +- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, +- 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, +- 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x27, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, +- 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, +- 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0x52, +- 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, +- 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x78, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, +- 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, +- 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, +- 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, +- 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0x88, 0x01, 0x01, +- 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, +- 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, +- 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, +- 0x12, 0x78, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, +- 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, +- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, +- 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, +- 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x20, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, +- 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, +- 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, +- 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7c, 0x0a, 0x0b, 0x6a, 0x73, +- 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, +- 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, +- 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, +- 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x33, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, +- 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, +- 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, +- 0x01, 0x0a, 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0x52, 0x0a, 0x6a, 0x73, +- 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, +- 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, +- 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, +- 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, +- 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, +- 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, +- 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, +- 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, +- 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, +- 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, +- 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, +- 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, +- 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, +- 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, +- 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, +- 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, +- 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, +- 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, +- 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, +- 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x0f, +- 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, +- 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, +- 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, +- 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, +- 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, +- 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, +- 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, +- 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, +- 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, +- 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, +- 0x10, 0xe9, 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, 0x2a, 0x06, 0x08, 0xea, 0x07, +- 0x10, 0xeb, 0x07, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, +- 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xfe, 0x02, 0x0a, 0x12, +- 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, +- 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, +- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, +- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, +- 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, +- 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, +- 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, +- 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, +- 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, +- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, +- 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, +- 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, +- 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, +- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, +- 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, +- 0x6f, 0x6e, 0x1a, 0x87, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, +- 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, +- 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, +- 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, +- 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, +- 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, +- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, +- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, +- 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, +- 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, +- 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, +- 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, +- 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, +- 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, +- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, +- 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, +- 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, +- 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, +- 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, +- 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, +- 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, +- 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, +- 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, +- 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, +- 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, +- 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, +- 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, +- 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, +- 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, +- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, +- 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, +- 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, +- 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, +- 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, +- 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, +- 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, +- 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, +- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, +- 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, +- 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, +- 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, +- 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, ++ 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, ++ 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, ++ 0x2d, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, ++ 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, ++ 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, ++ 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, ++ 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, ++ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, ++ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, ++ 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, ++ 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, ++ 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, ++ 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, ++ 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, ++ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, ++ 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, ++ 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, ++ 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, ++ 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, ++ 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, ++ 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xb2, 0x01, ++ 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, ++ 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, ++ 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, ++ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, ++ 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, ++ 0x6d, 0x61, 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, ++ 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, ++ 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, ++ 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, ++ 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, ++ 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, ++ 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, ++ 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, ++ 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, ++ 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, ++ 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, ++ 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, ++ 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, ++ 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, ++ 0x02, 0x22, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, ++ 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, ++ 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, ++ 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, ++ 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, ++ 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, ++ 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, ++ 0x54, 0x46, 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, ++ 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, ++ 0x46, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, ++ 0x08, 0x01, 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, ++ 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, ++ 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, ++ 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, ++ 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, ++ 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, ++ 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, ++ 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, ++ 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, ++ 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, ++ 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, ++ 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, ++ 0x10, 0xe8, 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, ++ 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, ++ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, ++ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, ++ 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, ++ 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, ++ 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, ++ 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, ++ 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, +- 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, +- 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, +- 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, +- 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, +- 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, +- 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0x92, 0x02, 0x0a, 0x07, 0x45, 0x64, +- 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, +- 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, +- 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, +- 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, +- 0x33, 0x10, 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, +- 0x32, 0x30, 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, +- 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, +- 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, +- 0x59, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, +- 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, +- 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, +- 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, +- 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, +- 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, +- 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, +- 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, +- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, +- 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, +- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, +- 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, +- 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, +- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, +- 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, +- 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, +- 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, ++ 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, ++ 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, ++ 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, ++ 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, ++ 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, ++ 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, ++ 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, ++ 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, ++ 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, ++ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, ++ 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, ++ 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, ++ 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, ++ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, ++ 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, ++ 0x62, 0x6c, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, ++ 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, ++ 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, ++ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, ++ 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, ++ 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, ++ 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, ++ 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, ++ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, ++ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, ++ 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, ++ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, ++ 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, ++ 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, ++ 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, ++ 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, ++ 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, ++ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, ++ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, ++ 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, ++ 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, ++ 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, ++ 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, ++ 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, ++ 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, ++ 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, ++ 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, ++ 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, ++ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, ++ 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, ++ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, ++ 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, ++ 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, ++ 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, ++ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, ++ 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, ++ 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, ++ 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, ++ 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, ++ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, ++ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, ++ 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, ++ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, ++ 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, ++ 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, ++ 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, ++ 0x10, 0x02, 0x2a, 0xa7, 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, ++ 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, ++ 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, ++ 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, ++ 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, ++ 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, ++ 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, ++ 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, ++ 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, ++ 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, ++ 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, ++ 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, ++ 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, ++ 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, ++ 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, ++ 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, ++ 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, ++ 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, ++ 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, ++ 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, ++ 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, ++ 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, ++ 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, ++ 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, ++ 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, ++ 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, ++ 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + } + + var ( +@@ -5084,8 +5176,8 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { + } + + var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 17) +-var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +-var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ ++var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 33) ++var file_google_protobuf_descriptor_proto_goTypes = []any{ + (Edition)(0), // 0: google.protobuf.Edition + (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState + (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type +@@ -5131,10 +5223,11 @@ var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ + (*ExtensionRangeOptions_Declaration)(nil), // 42: google.protobuf.ExtensionRangeOptions.Declaration + (*EnumDescriptorProto_EnumReservedRange)(nil), // 43: google.protobuf.EnumDescriptorProto.EnumReservedRange + (*FieldOptions_EditionDefault)(nil), // 44: google.protobuf.FieldOptions.EditionDefault +- (*UninterpretedOption_NamePart)(nil), // 45: google.protobuf.UninterpretedOption.NamePart +- (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 46: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault +- (*SourceCodeInfo_Location)(nil), // 47: google.protobuf.SourceCodeInfo.Location +- (*GeneratedCodeInfo_Annotation)(nil), // 48: google.protobuf.GeneratedCodeInfo.Annotation ++ (*FieldOptions_FeatureSupport)(nil), // 45: google.protobuf.FieldOptions.FeatureSupport ++ (*UninterpretedOption_NamePart)(nil), // 46: google.protobuf.UninterpretedOption.NamePart ++ (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 47: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault ++ (*SourceCodeInfo_Location)(nil), // 48: google.protobuf.SourceCodeInfo.Location ++ (*GeneratedCodeInfo_Annotation)(nil), // 49: google.protobuf.GeneratedCodeInfo.Annotation + } + var file_google_protobuf_descriptor_proto_depIdxs = []int32{ + 18, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto +@@ -5179,40 +5272,46 @@ var file_google_protobuf_descriptor_proto_depIdxs = []int32{ + 8, // 39: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType + 44, // 40: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault + 36, // 41: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet +- 35, // 42: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption +- 36, // 43: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet +- 35, // 44: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption +- 36, // 45: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet +- 35, // 46: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption +- 36, // 47: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet +- 35, // 48: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption +- 36, // 49: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet +- 35, // 50: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption +- 9, // 51: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel +- 36, // 52: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet +- 35, // 53: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption +- 45, // 54: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart +- 10, // 55: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence +- 11, // 56: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType +- 12, // 57: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding +- 13, // 58: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation +- 14, // 59: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding +- 15, // 60: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat +- 46, // 61: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault +- 0, // 62: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition +- 0, // 63: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition +- 47, // 64: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location +- 48, // 65: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation +- 20, // 66: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions +- 0, // 67: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition +- 0, // 68: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition +- 36, // 69: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features:type_name -> google.protobuf.FeatureSet +- 16, // 70: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic +- 71, // [71:71] is the sub-list for method output_type +- 71, // [71:71] is the sub-list for method input_type +- 71, // [71:71] is the sub-list for extension type_name +- 71, // [71:71] is the sub-list for extension extendee +- 0, // [0:71] is the sub-list for field type_name ++ 45, // 42: google.protobuf.FieldOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport ++ 35, // 43: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption ++ 36, // 44: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet ++ 35, // 45: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption ++ 36, // 46: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet ++ 35, // 47: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption ++ 36, // 48: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet ++ 45, // 49: google.protobuf.EnumValueOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport ++ 35, // 50: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption ++ 36, // 51: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet ++ 35, // 52: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption ++ 9, // 53: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel ++ 36, // 54: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet ++ 35, // 55: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption ++ 46, // 56: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart ++ 10, // 57: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence ++ 11, // 58: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType ++ 12, // 59: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding ++ 13, // 60: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation ++ 14, // 61: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding ++ 15, // 62: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat ++ 47, // 63: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault ++ 0, // 64: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition ++ 0, // 65: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition ++ 48, // 66: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location ++ 49, // 67: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation ++ 20, // 68: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions ++ 0, // 69: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition ++ 0, // 70: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition ++ 0, // 71: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition ++ 0, // 72: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition ++ 0, // 73: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition ++ 36, // 74: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet ++ 36, // 75: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet ++ 16, // 76: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic ++ 77, // [77:77] is the sub-list for method output_type ++ 77, // [77:77] is the sub-list for method input_type ++ 77, // [77:77] is the sub-list for extension type_name ++ 77, // [77:77] is the sub-list for extension extendee ++ 0, // [0:77] is the sub-list for field type_name + } + + func init() { file_google_protobuf_descriptor_proto_init() } +@@ -5220,419 +5319,13 @@ func file_google_protobuf_descriptor_proto_init() { + if File_google_protobuf_descriptor_proto != nil { + return + } +- if !protoimpl.UnsafeEnabled { +- file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FileDescriptorSet); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FileDescriptorProto); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*DescriptorProto); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*ExtensionRangeOptions); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FieldDescriptorProto); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*OneofDescriptorProto); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*EnumDescriptorProto); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*EnumValueDescriptorProto); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*ServiceDescriptorProto); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*MethodDescriptorProto); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FileOptions); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*MessageOptions); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FieldOptions); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*OneofOptions); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*EnumOptions); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*EnumValueOptions); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*ServiceOptions); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*MethodOptions); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*UninterpretedOption); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FeatureSet); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- case 3: +- return &v.extensionFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FeatureSetDefaults); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*SourceCodeInfo); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*GeneratedCodeInfo); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*DescriptorProto_ExtensionRange); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*DescriptorProto_ReservedRange); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*ExtensionRangeOptions_Declaration); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FieldOptions_EditionDefault); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*UninterpretedOption_NamePart); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FeatureSetDefaults_FeatureSetEditionDefault); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*SourceCodeInfo_Location); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*GeneratedCodeInfo_Annotation); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc, + NumEnums: 17, +- NumMessages: 32, ++ NumMessages: 33, + NumExtensions: 0, + NumServices: 0, + }, +diff --git a/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go b/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go +index 39b024b4..1ba1dfa5 100644 +--- a/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go ++++ b/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go +@@ -294,7 +294,7 @@ func (m *Message) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + case fd.IsMap(): + return protoreflect.ValueOfMap(&dynamicMap{ + desc: fd, +- mapv: make(map[interface{}]protoreflect.Value), ++ mapv: make(map[any]protoreflect.Value), + }) + case fd.IsList(): + return protoreflect.ValueOfList(&dynamicList{desc: fd}) +@@ -450,7 +450,7 @@ func (x *dynamicList) IsValid() bool { + + type dynamicMap struct { + desc protoreflect.FieldDescriptor +- mapv map[interface{}]protoreflect.Value ++ mapv map[any]protoreflect.Value + } + + func (x *dynamicMap) Get(k protoreflect.MapKey) protoreflect.Value { return x.mapv[k.Interface()] } +@@ -634,11 +634,11 @@ func newListEntry(fd protoreflect.FieldDescriptor) protoreflect.Value { + // + // The InterfaceOf and ValueOf methods of the extension type are defined as: + // +-// func (xt extensionType) ValueOf(iv interface{}) protoreflect.Value { ++// func (xt extensionType) ValueOf(iv any) protoreflect.Value { + // return protoreflect.ValueOf(iv) + // } + // +-// func (xt extensionType) InterfaceOf(v protoreflect.Value) interface{} { ++// func (xt extensionType) InterfaceOf(v protoreflect.Value) any { + // return v.Interface() + // } + // +@@ -658,7 +658,7 @@ func (xt extensionType) New() protoreflect.Value { + case xt.desc.IsMap(): + return protoreflect.ValueOfMap(&dynamicMap{ + desc: xt.desc, +- mapv: make(map[interface{}]protoreflect.Value), ++ mapv: make(map[any]protoreflect.Value), + }) + case xt.desc.IsList(): + return protoreflect.ValueOfList(&dynamicList{desc: xt.desc}) +@@ -686,18 +686,18 @@ func (xt extensionType) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { + return xt.desc + } + +-func (xt extensionType) ValueOf(iv interface{}) protoreflect.Value { ++func (xt extensionType) ValueOf(iv any) protoreflect.Value { + v := protoreflect.ValueOf(iv) + typecheck(xt.desc, v) + return v + } + +-func (xt extensionType) InterfaceOf(v protoreflect.Value) interface{} { ++func (xt extensionType) InterfaceOf(v protoreflect.Value) any { + typecheck(xt.desc, v) + return v.Interface() + } + +-func (xt extensionType) IsValidInterface(iv interface{}) bool { ++func (xt extensionType) IsValidInterface(iv any) bool { + return typeIsValid(xt.desc, protoreflect.ValueOf(iv)) == nil + } + +diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go +index 9f046f97..c7e860fc 100644 +--- a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go ++++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go +@@ -29,11 +29,9 @@ type GoFeatures struct { + + func (x *GoFeatures) Reset() { + *x = GoFeatures{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_go_features_proto_msgTypes[0] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_go_features_proto_msgTypes[0] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *GoFeatures) String() string { +@@ -44,7 +42,7 @@ func (*GoFeatures) ProtoMessage() {} + + func (x *GoFeatures) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_go_features_proto_msgTypes[0] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -90,21 +88,27 @@ var file_google_protobuf_go_features_proto_rawDesc = []byte{ + 0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, +- 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x0a, 0x47, 0x6f, 0x46, +- 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x1a, 0x6c, 0x65, 0x67, 0x61, 0x63, +- 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, +- 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x1f, 0x88, 0x01, 0x01, +- 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75, 0x65, 0x18, 0xe6, 0x07, 0xa2, +- 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7, 0x07, 0x52, 0x17, 0x6c, 0x65, +- 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x73, 0x6f, +- 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, 0x1b, 0x2e, 0x67, 0x6f, +- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, +- 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, +- 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, +- 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, +- 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, +- 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, +- 0x65, 0x73, 0x70, 0x62, ++ 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x47, 0x6f, ++ 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67, ++ 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73, ++ 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x80, 0x01, ++ 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, ++ 0x75, 0x65, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, ++ 0xe7, 0x07, 0xb2, 0x01, 0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65, ++ 0x20, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, ++ 0x6c, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, ++ 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, ++ 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, ++ 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, ++ 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, ++ 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, ++ 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, ++ 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, ++ 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, ++ 0x72, 0x65, 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, ++ 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, ++ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, ++ 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x62, + } + + var ( +@@ -120,7 +124,7 @@ func file_google_protobuf_go_features_proto_rawDescGZIP() []byte { + } + + var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +-var file_google_protobuf_go_features_proto_goTypes = []interface{}{ ++var file_google_protobuf_go_features_proto_goTypes = []any{ + (*GoFeatures)(nil), // 0: pb.GoFeatures + (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet + } +@@ -139,20 +143,6 @@ func file_google_protobuf_go_features_proto_init() { + if File_google_protobuf_go_features_proto != nil { + return + } +- if !protoimpl.UnsafeEnabled { +- file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*GoFeatures); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ +diff --git a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +index 9de51be5..87da199a 100644 +--- a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go ++++ b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +@@ -368,11 +368,9 @@ func (x *Any) UnmarshalNew() (proto.Message, error) { + + func (x *Any) Reset() { + *x = Any{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_any_proto_msgTypes[0] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_any_proto_msgTypes[0] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *Any) String() string { +@@ -383,7 +381,7 @@ func (*Any) ProtoMessage() {} + + func (x *Any) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_any_proto_msgTypes[0] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -445,7 +443,7 @@ func file_google_protobuf_any_proto_rawDescGZIP() []byte { + } + + var file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +-var file_google_protobuf_any_proto_goTypes = []interface{}{ ++var file_google_protobuf_any_proto_goTypes = []any{ + (*Any)(nil), // 0: google.protobuf.Any + } + var file_google_protobuf_any_proto_depIdxs = []int32{ +@@ -461,20 +459,6 @@ func file_google_protobuf_any_proto_init() { + if File_google_protobuf_any_proto != nil { + return + } +- if !protoimpl.UnsafeEnabled { +- file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*Any); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ +diff --git a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +index df709a8d..b99d4d24 100644 +--- a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go ++++ b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +@@ -245,11 +245,9 @@ func (x *Duration) check() uint { + + func (x *Duration) Reset() { + *x = Duration{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_duration_proto_msgTypes[0] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_duration_proto_msgTypes[0] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *Duration) String() string { +@@ -260,7 +258,7 @@ func (*Duration) ProtoMessage() {} + + func (x *Duration) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_duration_proto_msgTypes[0] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -323,7 +321,7 @@ func file_google_protobuf_duration_proto_rawDescGZIP() []byte { + } + + var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +-var file_google_protobuf_duration_proto_goTypes = []interface{}{ ++var file_google_protobuf_duration_proto_goTypes = []any{ + (*Duration)(nil), // 0: google.protobuf.Duration + } + var file_google_protobuf_duration_proto_depIdxs = []int32{ +@@ -339,20 +337,6 @@ func file_google_protobuf_duration_proto_init() { + if File_google_protobuf_duration_proto != nil { + return + } +- if !protoimpl.UnsafeEnabled { +- file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*Duration); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ +diff --git a/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go b/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go +index 9a7277ba..1761bc9c 100644 +--- a/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go ++++ b/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go +@@ -55,11 +55,9 @@ type Empty struct { + + func (x *Empty) Reset() { + *x = Empty{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_empty_proto_msgTypes[0] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_empty_proto_msgTypes[0] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *Empty) String() string { +@@ -70,7 +68,7 @@ func (*Empty) ProtoMessage() {} + + func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_empty_proto_msgTypes[0] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -115,7 +113,7 @@ func file_google_protobuf_empty_proto_rawDescGZIP() []byte { + } + + var file_google_protobuf_empty_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +-var file_google_protobuf_empty_proto_goTypes = []interface{}{ ++var file_google_protobuf_empty_proto_goTypes = []any{ + (*Empty)(nil), // 0: google.protobuf.Empty + } + var file_google_protobuf_empty_proto_depIdxs = []int32{ +@@ -131,20 +129,6 @@ func file_google_protobuf_empty_proto_init() { + if File_google_protobuf_empty_proto != nil { + return + } +- if !protoimpl.UnsafeEnabled { +- file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*Empty); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ +diff --git a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go +index e8789cb3..19de8d37 100644 +--- a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go ++++ b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go +@@ -467,11 +467,9 @@ func rangeFields(path string, f func(field string) bool) bool { + + func (x *FieldMask) Reset() { + *x = FieldMask{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_field_mask_proto_msgTypes[0] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_field_mask_proto_msgTypes[0] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FieldMask) String() string { +@@ -482,7 +480,7 @@ func (*FieldMask) ProtoMessage() {} + + func (x *FieldMask) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_field_mask_proto_msgTypes[0] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -537,7 +535,7 @@ func file_google_protobuf_field_mask_proto_rawDescGZIP() []byte { + } + + var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +-var file_google_protobuf_field_mask_proto_goTypes = []interface{}{ ++var file_google_protobuf_field_mask_proto_goTypes = []any{ + (*FieldMask)(nil), // 0: google.protobuf.FieldMask + } + var file_google_protobuf_field_mask_proto_depIdxs = []int32{ +@@ -553,20 +551,6 @@ func file_google_protobuf_field_mask_proto_init() { + if File_google_protobuf_field_mask_proto != nil { + return + } +- if !protoimpl.UnsafeEnabled { +- file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FieldMask); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ +diff --git a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go +index d2bac8b8..8f206a66 100644 +--- a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go ++++ b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go +@@ -49,11 +49,11 @@ + // The standard Go "encoding/json" package has functionality to serialize + // arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and + // ListValue.AsSlice methods can convert the protobuf message representation into +-// a form represented by interface{}, map[string]interface{}, and []interface{}. ++// a form represented by any, map[string]any, and []any. + // This form can be used with other packages that operate on such data structures + // and also directly with the standard json package. + // +-// In order to convert the interface{}, map[string]interface{}, and []interface{} ++// In order to convert the any, map[string]any, and []any + // forms back as Value, Struct, and ListValue messages, use the NewStruct, + // NewList, and NewValue constructor functions. + // +@@ -88,28 +88,28 @@ + // + // To construct a Value message representing the above JSON object: + // +-// m, err := structpb.NewValue(map[string]interface{}{ ++// m, err := structpb.NewValue(map[string]any{ + // "firstName": "John", + // "lastName": "Smith", + // "isAlive": true, + // "age": 27, +-// "address": map[string]interface{}{ ++// "address": map[string]any{ + // "streetAddress": "21 2nd Street", + // "city": "New York", + // "state": "NY", + // "postalCode": "10021-3100", + // }, +-// "phoneNumbers": []interface{}{ +-// map[string]interface{}{ ++// "phoneNumbers": []any{ ++// map[string]any{ + // "type": "home", + // "number": "212 555-1234", + // }, +-// map[string]interface{}{ ++// map[string]any{ + // "type": "office", + // "number": "646 555-4567", + // }, + // }, +-// "children": []interface{}{}, ++// "children": []any{}, + // "spouse": nil, + // }) + // if err != nil { +@@ -120,6 +120,7 @@ package structpb + + import ( + base64 "encoding/base64" ++ json "encoding/json" + protojson "google.golang.org/protobuf/encoding/protojson" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +@@ -197,7 +198,7 @@ type Struct struct { + // NewStruct constructs a Struct from a general-purpose Go map. + // The map keys must be valid UTF-8. + // The map values are converted using NewValue. +-func NewStruct(v map[string]interface{}) (*Struct, error) { ++func NewStruct(v map[string]any) (*Struct, error) { + x := &Struct{Fields: make(map[string]*Value, len(v))} + for k, v := range v { + if !utf8.ValidString(k) { +@@ -214,9 +215,9 @@ func NewStruct(v map[string]interface{}) (*Struct, error) { + + // AsMap converts x to a general-purpose Go map. + // The map values are converted by calling Value.AsInterface. +-func (x *Struct) AsMap() map[string]interface{} { ++func (x *Struct) AsMap() map[string]any { + f := x.GetFields() +- vs := make(map[string]interface{}, len(f)) ++ vs := make(map[string]any, len(f)) + for k, v := range f { + vs[k] = v.AsInterface() + } +@@ -233,11 +234,9 @@ func (x *Struct) UnmarshalJSON(b []byte) error { + + func (x *Struct) Reset() { + *x = Struct{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_struct_proto_msgTypes[0] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_struct_proto_msgTypes[0] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *Struct) String() string { +@@ -248,7 +247,7 @@ func (*Struct) ProtoMessage() {} + + func (x *Struct) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_struct_proto_msgTypes[0] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -296,23 +295,24 @@ type Value struct { + + // NewValue constructs a Value from a general-purpose Go interface. + // +-// ╔════════════════════════╤════════════════════════════════════════════╗ +-// ║ Go type │ Conversion ║ +-// ╠════════════════════════╪════════════════════════════════════════════╣ +-// ║ nil │ stored as NullValue ║ +-// ║ bool │ stored as BoolValue ║ +-// ║ int, int32, int64 │ stored as NumberValue ║ +-// ║ uint, uint32, uint64 │ stored as NumberValue ║ +-// ║ float32, float64 │ stored as NumberValue ║ +-// ║ string │ stored as StringValue; must be valid UTF-8 ║ +-// ║ []byte │ stored as StringValue; base64-encoded ║ +-// ║ map[string]interface{} │ stored as StructValue ║ +-// ║ []interface{} │ stored as ListValue ║ +-// ╚════════════════════════╧════════════════════════════════════════════╝ ++// ╔═══════════════════════════════════════╤════════════════════════════════════════════╗ ++// ║ Go type │ Conversion ║ ++// ╠═══════════════════════════════════════╪════════════════════════════════════════════╣ ++// ║ nil │ stored as NullValue ║ ++// ║ bool │ stored as BoolValue ║ ++// ║ int, int8, int16, int32, int64 │ stored as NumberValue ║ ++// ║ uint, uint8, uint16, uint32, uint64 │ stored as NumberValue ║ ++// ║ float32, float64 │ stored as NumberValue ║ ++// ║ json.Number │ stored as NumberValue ║ ++// ║ string │ stored as StringValue; must be valid UTF-8 ║ ++// ║ []byte │ stored as StringValue; base64-encoded ║ ++// ║ map[string]any │ stored as StructValue ║ ++// ║ []any │ stored as ListValue ║ ++// ╚═══════════════════════════════════════╧════════════════════════════════════════════╝ + // + // When converting an int64 or uint64 to a NumberValue, numeric precision loss + // is possible since they are stored as a float64. +-func NewValue(v interface{}) (*Value, error) { ++func NewValue(v any) (*Value, error) { + switch v := v.(type) { + case nil: + return NewNullValue(), nil +@@ -320,12 +320,20 @@ func NewValue(v interface{}) (*Value, error) { + return NewBoolValue(v), nil + case int: + return NewNumberValue(float64(v)), nil ++ case int8: ++ return NewNumberValue(float64(v)), nil ++ case int16: ++ return NewNumberValue(float64(v)), nil + case int32: + return NewNumberValue(float64(v)), nil + case int64: + return NewNumberValue(float64(v)), nil + case uint: + return NewNumberValue(float64(v)), nil ++ case uint8: ++ return NewNumberValue(float64(v)), nil ++ case uint16: ++ return NewNumberValue(float64(v)), nil + case uint32: + return NewNumberValue(float64(v)), nil + case uint64: +@@ -334,6 +342,12 @@ func NewValue(v interface{}) (*Value, error) { + return NewNumberValue(float64(v)), nil + case float64: + return NewNumberValue(float64(v)), nil ++ case json.Number: ++ n, err := v.Float64() ++ if err != nil { ++ return nil, protoimpl.X.NewError("invalid number format %q, expected a float64: %v", v, err) ++ } ++ return NewNumberValue(n), nil + case string: + if !utf8.ValidString(v) { + return nil, protoimpl.X.NewError("invalid UTF-8 in string: %q", v) +@@ -342,13 +356,13 @@ func NewValue(v interface{}) (*Value, error) { + case []byte: + s := base64.StdEncoding.EncodeToString(v) + return NewStringValue(s), nil +- case map[string]interface{}: ++ case map[string]any: + v2, err := NewStruct(v) + if err != nil { + return nil, err + } + return NewStructValue(v2), nil +- case []interface{}: ++ case []any: + v2, err := NewList(v) + if err != nil { + return nil, err +@@ -396,7 +410,7 @@ func NewListValue(v *ListValue) *Value { + // + // Floating-point values (i.e., "NaN", "Infinity", and "-Infinity") are + // converted as strings to remain compatible with MarshalJSON. +-func (x *Value) AsInterface() interface{} { ++func (x *Value) AsInterface() any { + switch v := x.GetKind().(type) { + case *Value_NumberValue: + if v != nil { +@@ -441,11 +455,9 @@ func (x *Value) UnmarshalJSON(b []byte) error { + + func (x *Value) Reset() { + *x = Value{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_struct_proto_msgTypes[1] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_struct_proto_msgTypes[1] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *Value) String() string { +@@ -456,7 +468,7 @@ func (*Value) ProtoMessage() {} + + func (x *Value) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_struct_proto_msgTypes[1] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -580,7 +592,7 @@ type ListValue struct { + + // NewList constructs a ListValue from a general-purpose Go slice. + // The slice elements are converted using NewValue. +-func NewList(v []interface{}) (*ListValue, error) { ++func NewList(v []any) (*ListValue, error) { + x := &ListValue{Values: make([]*Value, len(v))} + for i, v := range v { + var err error +@@ -594,9 +606,9 @@ func NewList(v []interface{}) (*ListValue, error) { + + // AsSlice converts x to a general-purpose Go slice. + // The slice elements are converted by calling Value.AsInterface. +-func (x *ListValue) AsSlice() []interface{} { ++func (x *ListValue) AsSlice() []any { + vals := x.GetValues() +- vs := make([]interface{}, len(vals)) ++ vs := make([]any, len(vals)) + for i, v := range vals { + vs[i] = v.AsInterface() + } +@@ -613,11 +625,9 @@ func (x *ListValue) UnmarshalJSON(b []byte) error { + + func (x *ListValue) Reset() { + *x = ListValue{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_struct_proto_msgTypes[2] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_struct_proto_msgTypes[2] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *ListValue) String() string { +@@ -628,7 +638,7 @@ func (*ListValue) ProtoMessage() {} + + func (x *ListValue) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_struct_proto_msgTypes[2] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -716,7 +726,7 @@ func file_google_protobuf_struct_proto_rawDescGZIP() []byte { + + var file_google_protobuf_struct_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + var file_google_protobuf_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +-var file_google_protobuf_struct_proto_goTypes = []interface{}{ ++var file_google_protobuf_struct_proto_goTypes = []any{ + (NullValue)(0), // 0: google.protobuf.NullValue + (*Struct)(nil), // 1: google.protobuf.Struct + (*Value)(nil), // 2: google.protobuf.Value +@@ -742,45 +752,7 @@ func file_google_protobuf_struct_proto_init() { + if File_google_protobuf_struct_proto != nil { + return + } +- if !protoimpl.UnsafeEnabled { +- file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*Struct); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*Value); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*ListValue); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- } +- file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []interface{}{ ++ file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []any{ + (*Value_NullValue)(nil), + (*Value_NumberValue)(nil), + (*Value_StringValue)(nil), +diff --git a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +index 81511a33..0d20722d 100644 +--- a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go ++++ b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +@@ -254,11 +254,9 @@ func (x *Timestamp) check() uint { + + func (x *Timestamp) Reset() { + *x = Timestamp{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_timestamp_proto_msgTypes[0] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_timestamp_proto_msgTypes[0] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *Timestamp) String() string { +@@ -269,7 +267,7 @@ func (*Timestamp) ProtoMessage() {} + + func (x *Timestamp) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_timestamp_proto_msgTypes[0] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -332,7 +330,7 @@ func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte { + } + + var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +-var file_google_protobuf_timestamp_proto_goTypes = []interface{}{ ++var file_google_protobuf_timestamp_proto_goTypes = []any{ + (*Timestamp)(nil), // 0: google.protobuf.Timestamp + } + var file_google_protobuf_timestamp_proto_depIdxs = []int32{ +@@ -348,20 +346,6 @@ func file_google_protobuf_timestamp_proto_init() { + if File_google_protobuf_timestamp_proto != nil { + return + } +- if !protoimpl.UnsafeEnabled { +- file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*Timestamp); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ +diff --git a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go +index 762a8713..006060e5 100644 +--- a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go ++++ b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go +@@ -69,11 +69,9 @@ func Double(v float64) *DoubleValue { + + func (x *DoubleValue) Reset() { + *x = DoubleValue{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_wrappers_proto_msgTypes[0] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_wrappers_proto_msgTypes[0] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *DoubleValue) String() string { +@@ -84,7 +82,7 @@ func (*DoubleValue) ProtoMessage() {} + + func (x *DoubleValue) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_wrappers_proto_msgTypes[0] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -125,11 +123,9 @@ func Float(v float32) *FloatValue { + + func (x *FloatValue) Reset() { + *x = FloatValue{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_wrappers_proto_msgTypes[1] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_wrappers_proto_msgTypes[1] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *FloatValue) String() string { +@@ -140,7 +136,7 @@ func (*FloatValue) ProtoMessage() {} + + func (x *FloatValue) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_wrappers_proto_msgTypes[1] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -181,11 +177,9 @@ func Int64(v int64) *Int64Value { + + func (x *Int64Value) Reset() { + *x = Int64Value{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_wrappers_proto_msgTypes[2] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_wrappers_proto_msgTypes[2] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *Int64Value) String() string { +@@ -196,7 +190,7 @@ func (*Int64Value) ProtoMessage() {} + + func (x *Int64Value) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_wrappers_proto_msgTypes[2] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -237,11 +231,9 @@ func UInt64(v uint64) *UInt64Value { + + func (x *UInt64Value) Reset() { + *x = UInt64Value{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_wrappers_proto_msgTypes[3] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_wrappers_proto_msgTypes[3] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *UInt64Value) String() string { +@@ -252,7 +244,7 @@ func (*UInt64Value) ProtoMessage() {} + + func (x *UInt64Value) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_wrappers_proto_msgTypes[3] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -293,11 +285,9 @@ func Int32(v int32) *Int32Value { + + func (x *Int32Value) Reset() { + *x = Int32Value{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_wrappers_proto_msgTypes[4] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_wrappers_proto_msgTypes[4] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *Int32Value) String() string { +@@ -308,7 +298,7 @@ func (*Int32Value) ProtoMessage() {} + + func (x *Int32Value) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_wrappers_proto_msgTypes[4] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -349,11 +339,9 @@ func UInt32(v uint32) *UInt32Value { + + func (x *UInt32Value) Reset() { + *x = UInt32Value{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_wrappers_proto_msgTypes[5] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_wrappers_proto_msgTypes[5] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *UInt32Value) String() string { +@@ -364,7 +352,7 @@ func (*UInt32Value) ProtoMessage() {} + + func (x *UInt32Value) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_wrappers_proto_msgTypes[5] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -405,11 +393,9 @@ func Bool(v bool) *BoolValue { + + func (x *BoolValue) Reset() { + *x = BoolValue{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_wrappers_proto_msgTypes[6] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_wrappers_proto_msgTypes[6] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *BoolValue) String() string { +@@ -420,7 +406,7 @@ func (*BoolValue) ProtoMessage() {} + + func (x *BoolValue) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_wrappers_proto_msgTypes[6] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -461,11 +447,9 @@ func String(v string) *StringValue { + + func (x *StringValue) Reset() { + *x = StringValue{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_wrappers_proto_msgTypes[7] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_wrappers_proto_msgTypes[7] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *StringValue) String() string { +@@ -476,7 +460,7 @@ func (*StringValue) ProtoMessage() {} + + func (x *StringValue) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_wrappers_proto_msgTypes[7] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -517,11 +501,9 @@ func Bytes(v []byte) *BytesValue { + + func (x *BytesValue) Reset() { + *x = BytesValue{} +- if protoimpl.UnsafeEnabled { +- mi := &file_google_protobuf_wrappers_proto_msgTypes[8] +- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) +- ms.StoreMessageInfo(mi) +- } ++ mi := &file_google_protobuf_wrappers_proto_msgTypes[8] ++ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ++ ms.StoreMessageInfo(mi) + } + + func (x *BytesValue) String() string { +@@ -532,7 +514,7 @@ func (*BytesValue) ProtoMessage() {} + + func (x *BytesValue) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_wrappers_proto_msgTypes[8] +- if protoimpl.UnsafeEnabled && x != nil { ++ if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) +@@ -605,7 +587,7 @@ func file_google_protobuf_wrappers_proto_rawDescGZIP() []byte { + } + + var file_google_protobuf_wrappers_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +-var file_google_protobuf_wrappers_proto_goTypes = []interface{}{ ++var file_google_protobuf_wrappers_proto_goTypes = []any{ + (*DoubleValue)(nil), // 0: google.protobuf.DoubleValue + (*FloatValue)(nil), // 1: google.protobuf.FloatValue + (*Int64Value)(nil), // 2: google.protobuf.Int64Value +@@ -629,116 +611,6 @@ func file_google_protobuf_wrappers_proto_init() { + if File_google_protobuf_wrappers_proto != nil { + return + } +- if !protoimpl.UnsafeEnabled { +- file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*DoubleValue); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*FloatValue); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*Int64Value); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*UInt64Value); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*Int32Value); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*UInt32Value); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*BoolValue); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*StringValue); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { +- switch v := v.(*BytesValue); i { +- case 0: +- return &v.state +- case 1: +- return &v.sizeCache +- case 2: +- return &v.unknownFields +- default: +- return nil +- } +- } +- } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ +diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go +index 57e0e71f..6a3ab8f2 100644 +--- a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go ++++ b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go +@@ -54,6 +54,7 @@ var knownReasons = map[metav1.StatusReason]struct{}{ + metav1.StatusReasonGone: {}, + metav1.StatusReasonInvalid: {}, + metav1.StatusReasonServerTimeout: {}, ++ metav1.StatusReasonStoreReadError: {}, + metav1.StatusReasonTimeout: {}, + metav1.StatusReasonTooManyRequests: {}, + metav1.StatusReasonBadRequest: {}, +@@ -775,6 +776,12 @@ func IsUnexpectedObjectError(err error) bool { + return err != nil && (ok || errors.As(err, &uoe)) + } + ++// IsStoreReadError determines if err is due to either failure to transform the ++// data from the storage, or failure to decode the object appropriately. ++func IsStoreReadError(err error) bool { ++ return ReasonForError(err) == metav1.StatusReasonStoreReadError ++} ++ + // SuggestsClientDelay returns true if this error suggests a client delay as well as the + // suggested seconds to wait, or false if the error does not imply a wait. It does not + // address whether the error *should* be retried, since some errors (like a 3xx) may +diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS +index 1e1330ff..3bd8bf53 100644 +--- a/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS ++++ b/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS +@@ -10,5 +10,6 @@ reviewers: + - mikedanese + - liggitt + - janetkuo +- - ncdc + - dims ++emeritus_reviewers: ++ - ncdc +diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/conditions.go b/vendor/k8s.io/apimachinery/pkg/api/meta/conditions.go +index 60c8209d..cbdf2eeb 100644 +--- a/vendor/k8s.io/apimachinery/pkg/api/meta/conditions.go ++++ b/vendor/k8s.io/apimachinery/pkg/api/meta/conditions.go +@@ -22,14 +22,15 @@ import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + ) + +-// SetStatusCondition sets the corresponding condition in conditions to newCondition. ++// SetStatusCondition sets the corresponding condition in conditions to newCondition and returns true ++// if the conditions are changed by this call. + // conditions must be non-nil. + // 1. if the condition of the specified type already exists (all fields of the existing condition are updated to + // newCondition, LastTransitionTime is set to now if the new status differs from the old status) + // 2. if a condition of the specified type does not exist (LastTransitionTime is set to now() if unset, and newCondition is appended) +-func SetStatusCondition(conditions *[]metav1.Condition, newCondition metav1.Condition) { ++func SetStatusCondition(conditions *[]metav1.Condition, newCondition metav1.Condition) (changed bool) { + if conditions == nil { +- return ++ return false + } + existingCondition := FindStatusCondition(*conditions, newCondition.Type) + if existingCondition == nil { +@@ -37,7 +38,7 @@ func SetStatusCondition(conditions *[]metav1.Condition, newCondition metav1.Cond + newCondition.LastTransitionTime = metav1.NewTime(time.Now()) + } + *conditions = append(*conditions, newCondition) +- return ++ return true + } + + if existingCondition.Status != newCondition.Status { +@@ -47,18 +48,31 @@ func SetStatusCondition(conditions *[]metav1.Condition, newCondition metav1.Cond + } else { + existingCondition.LastTransitionTime = metav1.NewTime(time.Now()) + } ++ changed = true + } + +- existingCondition.Reason = newCondition.Reason +- existingCondition.Message = newCondition.Message +- existingCondition.ObservedGeneration = newCondition.ObservedGeneration ++ if existingCondition.Reason != newCondition.Reason { ++ existingCondition.Reason = newCondition.Reason ++ changed = true ++ } ++ if existingCondition.Message != newCondition.Message { ++ existingCondition.Message = newCondition.Message ++ changed = true ++ } ++ if existingCondition.ObservedGeneration != newCondition.ObservedGeneration { ++ existingCondition.ObservedGeneration = newCondition.ObservedGeneration ++ changed = true ++ } ++ ++ return changed + } + +-// RemoveStatusCondition removes the corresponding conditionType from conditions. ++// RemoveStatusCondition removes the corresponding conditionType from conditions if present. Returns ++// true if it was present and got removed. + // conditions must be non-nil. +-func RemoveStatusCondition(conditions *[]metav1.Condition, conditionType string) { ++func RemoveStatusCondition(conditions *[]metav1.Condition, conditionType string) (removed bool) { + if conditions == nil || len(*conditions) == 0 { +- return ++ return false + } + newConditions := make([]metav1.Condition, 0, len(*conditions)-1) + for _, condition := range *conditions { +@@ -67,7 +81,10 @@ func RemoveStatusCondition(conditions *[]metav1.Condition, conditionType string) + } + } + ++ removed = len(*conditions) != len(newConditions) + *conditions = newConditions ++ ++ return removed + } + + // FindStatusCondition finds the conditionType in conditions. +diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go b/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go +index a8866a43..2eebec66 100644 +--- a/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go ++++ b/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go +@@ -203,6 +203,44 @@ func (a *int64Amount) Sub(b int64Amount) bool { + return a.Add(int64Amount{value: -b.value, scale: b.scale}) + } + ++// Mul multiplies the provided b to the current amount, or ++// returns false if overflow or underflow would result. ++func (a *int64Amount) Mul(b int64) bool { ++ switch { ++ case a.value == 0: ++ return true ++ case b == 0: ++ a.value = 0 ++ a.scale = 0 ++ return true ++ case a.scale == 0: ++ c, ok := int64Multiply(a.value, b) ++ if !ok { ++ return false ++ } ++ a.value = c ++ case a.scale > 0: ++ c, ok := int64Multiply(a.value, b) ++ if !ok { ++ return false ++ } ++ if _, ok = positiveScaleInt64(c, a.scale); !ok { ++ return false ++ } ++ a.value = c ++ default: ++ c, ok := int64Multiply(a.value, b) ++ if !ok { ++ return false ++ } ++ if _, ok = negativeScaleInt64(c, -a.scale); !ok { ++ return false ++ } ++ a.value = c ++ } ++ return true ++} ++ + // AsScale adjusts this amount to set a minimum scale, rounding up, and returns true iff no precision + // was lost. (1.1e5).AsScale(5) would return 1.1e5, but (1.1e5).AsScale(6) would return 1e6. + func (a int64Amount) AsScale(scale Scale) (int64Amount, bool) { +diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go +index 53a25d34..c3a27216 100644 +--- a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go ++++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go +@@ -15,7 +15,7 @@ limitations under the License. + */ + + // Code generated by protoc-gen-gogo. DO NOT EDIT. +-// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto ++// source: k8s.io/apimachinery/pkg/api/resource/generated.proto + + package resource + +@@ -41,7 +41,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + func (m *Quantity) Reset() { *m = Quantity{} } + func (*Quantity) ProtoMessage() {} + func (*Quantity) Descriptor() ([]byte, []int) { +- return fileDescriptor_612bba87bd70906c, []int{0} ++ return fileDescriptor_7288c78ff45111e9, []int{0} + } + func (m *Quantity) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Quantity.Unmarshal(m, b) +@@ -64,7 +64,7 @@ var xxx_messageInfo_Quantity proto.InternalMessageInfo + func (m *QuantityValue) Reset() { *m = QuantityValue{} } + func (*QuantityValue) ProtoMessage() {} + func (*QuantityValue) Descriptor() ([]byte, []int) { +- return fileDescriptor_612bba87bd70906c, []int{1} ++ return fileDescriptor_7288c78ff45111e9, []int{1} + } + func (m *QuantityValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QuantityValue.Unmarshal(m, b) +@@ -90,25 +90,24 @@ func init() { + } + + func init() { +- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptor_612bba87bd70906c) ++ proto.RegisterFile("k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptor_7288c78ff45111e9) + } + +-var fileDescriptor_612bba87bd70906c = []byte{ +- // 254 bytes of a gzipped FileDescriptorProto +- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0xcd, 0xb6, 0x28, 0xd6, +- 0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0x4b, +- 0xcd, 0x4b, 0xc9, 0x2f, 0xd2, 0x87, 0x4a, 0x24, 0x16, 0x64, 0xe6, 0x26, 0x26, 0x67, 0x64, 0xe6, +- 0xa5, 0x16, 0x55, 0xea, 0x17, 0x64, 0xa7, 0x83, 0x04, 0xf4, 0x8b, 0x52, 0x8b, 0xf3, 0x4b, 0x8b, +- 0x92, 0x53, 0xf5, 0xd3, 0x53, 0xf3, 0x52, 0x8b, 0x12, 0x4b, 0x52, 0x53, 0xf4, 0x0a, 0x8a, 0xf2, +- 0x4b, 0xf2, 0x85, 0x54, 0x20, 0xba, 0xf4, 0x90, 0x75, 0xe9, 0x15, 0x64, 0xa7, 0x83, 0x04, 0xf4, +- 0x60, 0xba, 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, +- 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x9a, 0x93, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x18, +- 0xaa, 0x64, 0xc1, 0xc5, 0x11, 0x58, 0x9a, 0x98, 0x57, 0x92, 0x59, 0x52, 0x29, 0x24, 0xc6, 0xc5, +- 0x56, 0x5c, 0x52, 0x94, 0x99, 0x97, 0x2e, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe5, 0x59, +- 0x89, 0xcc, 0x58, 0x20, 0xcf, 0xd0, 0xb1, 0x50, 0x9e, 0x61, 0xc2, 0x42, 0x79, 0x86, 0x05, 0x0b, +- 0xe5, 0x19, 0x1a, 0xee, 0x28, 0x30, 0x28, 0xd9, 0x72, 0xf1, 0xc2, 0x74, 0x86, 0x25, 0xe6, 0x94, +- 0xa6, 0x92, 0xa6, 0xdd, 0xc9, 0xeb, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, +- 0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37, +- 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x94, 0x0a, 0x31, 0x21, +- 0x05, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x70, 0x98, 0xa3, 0x69, 0x01, 0x00, 0x00, ++var fileDescriptor_7288c78ff45111e9 = []byte{ ++ // 234 bytes of a gzipped FileDescriptorProto ++ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xc9, 0xb6, 0x28, 0xd6, ++ 0xcb, 0xcc, 0xd7, 0x4f, 0x2c, 0xc8, 0xcc, 0x4d, 0x4c, 0xce, 0xc8, 0xcc, 0x4b, 0x2d, 0xaa, 0xd4, ++ 0x2f, 0xc8, 0x4e, 0x07, 0x09, 0xe8, 0x17, 0xa5, 0x16, 0xe7, 0x97, 0x16, 0x25, 0xa7, 0xea, 0xa7, ++ 0xa7, 0xe6, 0xa5, 0x16, 0x25, 0x96, 0xa4, 0xa6, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xa9, ++ 0x40, 0x74, 0xe9, 0x21, 0xeb, 0xd2, 0x2b, 0xc8, 0x4e, 0x07, 0x09, 0xe8, 0xc1, 0x74, 0x49, 0xe9, ++ 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, ++ 0x83, 0x35, 0x27, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0x31, 0x54, 0xc9, 0x82, 0x8b, ++ 0x23, 0xb0, 0x34, 0x31, 0xaf, 0x24, 0xb3, 0xa4, 0x52, 0x48, 0x8c, 0x8b, 0xad, 0xb8, 0xa4, 0x28, ++ 0x33, 0x2f, 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xca, 0xb3, 0x12, 0x99, 0xb1, 0x40, ++ 0x9e, 0xa1, 0x63, 0xa1, 0x3c, 0xc3, 0x84, 0x85, 0xf2, 0x0c, 0x0b, 0x16, 0xca, 0x33, 0x34, 0xdc, ++ 0x51, 0x60, 0x50, 0xb2, 0xe5, 0xe2, 0x85, 0xe9, 0x0c, 0x4b, 0xcc, 0x29, 0x4d, 0x25, 0x4d, 0xbb, ++ 0x93, 0xd7, 0x89, 0x87, 0x72, 0x0c, 0x17, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xd0, 0xf0, ++ 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x6f, 0x3c, 0x92, 0x63, 0x7c, ++ 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x28, 0x15, 0x62, 0x42, 0x0a, 0x10, 0x00, 0x00, ++ 0xff, 0xff, 0x50, 0x91, 0xd0, 0x9c, 0x50, 0x01, 0x00, 0x00, + } +diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go +index b47d554b..d0aada9d 100644 +--- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go ++++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go +@@ -20,11 +20,13 @@ import ( + "bytes" + "errors" + "fmt" +- "math" ++ math "math" + "math/big" + "strconv" + "strings" + ++ cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" ++ + inf "gopkg.in/inf.v0" + ) + +@@ -458,9 +460,10 @@ func (q *Quantity) CanonicalizeBytes(out []byte) (result, suffix []byte) { + } + } + +-// AsApproximateFloat64 returns a float64 representation of the quantity which may +-// lose precision. If the value of the quantity is outside the range of a float64 +-// +Inf/-Inf will be returned. ++// AsApproximateFloat64 returns a float64 representation of the quantity which ++// may lose precision. If precision matter more than performance, see ++// AsFloat64Slow. If the value of the quantity is outside the range of a ++// float64 +Inf/-Inf will be returned. + func (q *Quantity) AsApproximateFloat64() float64 { + var base float64 + var exponent int +@@ -478,6 +481,36 @@ func (q *Quantity) AsApproximateFloat64() float64 { + return base * math.Pow10(exponent) + } + ++// AsFloat64Slow returns a float64 representation of the quantity. This is ++// more precise than AsApproximateFloat64 but significantly slower. If the ++// value of the quantity is outside the range of a float64 +Inf/-Inf will be ++// returned. ++func (q *Quantity) AsFloat64Slow() float64 { ++ infDec := q.AsDec() ++ ++ var absScale int64 ++ if infDec.Scale() < 0 { ++ absScale = int64(-infDec.Scale()) ++ } else { ++ absScale = int64(infDec.Scale()) ++ } ++ pow10AbsScale := big.NewInt(10) ++ pow10AbsScale = pow10AbsScale.Exp(pow10AbsScale, big.NewInt(absScale), nil) ++ ++ var resultBigFloat *big.Float ++ if infDec.Scale() < 0 { ++ resultBigInt := new(big.Int).Mul(infDec.UnscaledBig(), pow10AbsScale) ++ resultBigFloat = new(big.Float).SetInt(resultBigInt) ++ } else { ++ pow10AbsScaleFloat := new(big.Float).SetInt(pow10AbsScale) ++ resultBigFloat = new(big.Float).SetInt(infDec.UnscaledBig()) ++ resultBigFloat = resultBigFloat.Quo(resultBigFloat, pow10AbsScaleFloat) ++ } ++ ++ result, _ := resultBigFloat.Float64() ++ return result ++} ++ + // AsInt64 returns a representation of the current value as an int64 if a fast conversion + // is possible. If false is returned, callers must use the inf.Dec form of this quantity. + func (q *Quantity) AsInt64() (int64, bool) { +@@ -592,6 +625,16 @@ func (q *Quantity) Sub(y Quantity) { + q.ToDec().d.Dec.Sub(q.d.Dec, y.AsDec()) + } + ++// Mul multiplies the provided y to the current value. ++// It will return false if the result is inexact. Otherwise, it will return true. ++func (q *Quantity) Mul(y int64) bool { ++ q.s = "" ++ if q.d.Dec == nil && q.i.Mul(y) { ++ return true ++ } ++ return q.ToDec().d.Dec.Mul(q.d.Dec, inf.NewDec(y, inf.Scale(0))).UnscaledBig().IsInt64() ++} ++ + // Cmp returns 0 if the quantity is equal to y, -1 if the quantity is less than y, or 1 if the + // quantity is greater than y. + func (q *Quantity) Cmp(y Quantity) int { +@@ -673,6 +716,12 @@ func (q Quantity) MarshalJSON() ([]byte, error) { + return result, nil + } + ++func (q Quantity) MarshalCBOR() ([]byte, error) { ++ // The call to String() should never return the string "" because the receiver's ++ // address will never be nil. ++ return cbor.Marshal(q.String()) ++} ++ + // ToUnstructured implements the value.UnstructuredConverter interface. + func (q Quantity) ToUnstructured() interface{} { + return q.String() +@@ -701,6 +750,27 @@ func (q *Quantity) UnmarshalJSON(value []byte) error { + return nil + } + ++func (q *Quantity) UnmarshalCBOR(value []byte) error { ++ var s *string ++ if err := cbor.Unmarshal(value, &s); err != nil { ++ return err ++ } ++ ++ if s == nil { ++ q.d.Dec = nil ++ q.i = int64Amount{} ++ return nil ++ } ++ ++ parsed, err := ParseQuantity(strings.TrimSpace(*s)) ++ if err != nil { ++ return err ++ } ++ ++ *q = parsed ++ return nil ++} ++ + // NewDecimalQuantity returns a new Quantity representing the given + // value in the given format. + func NewDecimalQuantity(b inf.Dec, format Format) *Quantity { +diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS +new file mode 100644 +index 00000000..40237324 +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/api/validation/OWNERS +@@ -0,0 +1,11 @@ ++# See the OWNERS docs at https://go.k8s.io/owners ++ ++# Disable inheritance as this is an api owners file ++options: ++ no_parent_owners: true ++approvers: ++ - api-approvers ++reviewers: ++ - api-reviewers ++labels: ++ - kind/api-change +diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +index 593d7ba8..54a2883a 100644 +--- a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go ++++ b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +@@ -50,7 +50,7 @@ func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) fie + } + } + if err := ValidateAnnotationsSize(annotations); err != nil { +- allErrs = append(allErrs, field.TooLong(fldPath, "", TotalAnnotationSizeLimitB)) ++ allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, TotalAnnotationSizeLimitB)) + } + return allErrs + } +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme/register.go +index 472a9aeb..585d7f44 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme/register.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme/register.go +@@ -24,16 +24,16 @@ import ( + ) + + // Scheme is the registry for any type that adheres to the meta API spec. +-var scheme = runtime.NewScheme() ++var Scheme = runtime.NewScheme() + + // Codecs provides access to encoding and decoding for the scheme. +-var Codecs = serializer.NewCodecFactory(scheme) ++var Codecs = serializer.NewCodecFactory(Scheme) + + // ParameterCodec handles versioning of objects that are converted to query parameters. +-var ParameterCodec = runtime.NewParameterCodec(scheme) ++var ParameterCodec = runtime.NewParameterCodec(Scheme) + + // Unlike other API groups, meta internal knows about all meta external versions, but keeps + // the logic for conversion private. + func init() { +- utilruntime.Must(internalversion.AddToScheme(scheme)) ++ utilruntime.Must(internalversion.AddToScheme(Scheme)) + } +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS +index e7e5c152..ec414a84 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS +@@ -11,6 +11,7 @@ reviewers: + - luxas + - janetkuo + - justinsb +- - ncdc + - soltysh + - dims ++emeritus_reviewers: ++ - ncdc +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go +index 15b45ffa..5005beb1 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go +@@ -18,6 +18,7 @@ package v1 + + import ( + "k8s.io/apimachinery/pkg/runtime/schema" ++ "k8s.io/utils/ptr" + ) + + // IsControlledBy checks if the object has a controllerRef set to the given owner +@@ -36,10 +37,14 @@ func GetControllerOf(controllee Object) *OwnerReference { + return nil + } + cp := *ref ++ cp.Controller = ptr.To(*ref.Controller) ++ if ref.BlockOwnerDeletion != nil { ++ cp.BlockOwnerDeletion = ptr.To(*ref.BlockOwnerDeletion) ++ } + return &cp + } + +-// GetControllerOf returns a pointer to the controllerRef if controllee has a controller ++// GetControllerOfNoCopy returns a pointer to the controllerRef if controllee has a controller + func GetControllerOfNoCopy(controllee Object) *OwnerReference { + refs := controllee.GetOwnerReferences() + for i := range refs { +@@ -52,14 +57,12 @@ func GetControllerOfNoCopy(controllee Object) *OwnerReference { + + // NewControllerRef creates an OwnerReference pointing to the given owner. + func NewControllerRef(owner Object, gvk schema.GroupVersionKind) *OwnerReference { +- blockOwnerDeletion := true +- isController := true + return &OwnerReference{ + APIVersion: gvk.GroupVersion().String(), + Kind: gvk.Kind, + Name: owner.GetName(), + UID: owner.GetUID(), +- BlockOwnerDeletion: &blockOwnerDeletion, +- Controller: &isController, ++ BlockOwnerDeletion: ptr.To(true), ++ Controller: ptr.To(true), + } + } +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +index 1a641e7c..9ee6c059 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +@@ -15,7 +15,7 @@ limitations under the License. + */ + + // Code generated by protoc-gen-gogo. DO NOT EDIT. +-// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto ++// source: k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto + + package v1 + +@@ -52,7 +52,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + func (m *APIGroup) Reset() { *m = APIGroup{} } + func (*APIGroup) ProtoMessage() {} + func (*APIGroup) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{0} ++ return fileDescriptor_a8431b6e0aeeb761, []int{0} + } + func (m *APIGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -80,7 +80,7 @@ var xxx_messageInfo_APIGroup proto.InternalMessageInfo + func (m *APIGroupList) Reset() { *m = APIGroupList{} } + func (*APIGroupList) ProtoMessage() {} + func (*APIGroupList) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{1} ++ return fileDescriptor_a8431b6e0aeeb761, []int{1} + } + func (m *APIGroupList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -108,7 +108,7 @@ var xxx_messageInfo_APIGroupList proto.InternalMessageInfo + func (m *APIResource) Reset() { *m = APIResource{} } + func (*APIResource) ProtoMessage() {} + func (*APIResource) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{2} ++ return fileDescriptor_a8431b6e0aeeb761, []int{2} + } + func (m *APIResource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -136,7 +136,7 @@ var xxx_messageInfo_APIResource proto.InternalMessageInfo + func (m *APIResourceList) Reset() { *m = APIResourceList{} } + func (*APIResourceList) ProtoMessage() {} + func (*APIResourceList) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{3} ++ return fileDescriptor_a8431b6e0aeeb761, []int{3} + } + func (m *APIResourceList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -164,7 +164,7 @@ var xxx_messageInfo_APIResourceList proto.InternalMessageInfo + func (m *APIVersions) Reset() { *m = APIVersions{} } + func (*APIVersions) ProtoMessage() {} + func (*APIVersions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{4} ++ return fileDescriptor_a8431b6e0aeeb761, []int{4} + } + func (m *APIVersions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -192,7 +192,7 @@ var xxx_messageInfo_APIVersions proto.InternalMessageInfo + func (m *ApplyOptions) Reset() { *m = ApplyOptions{} } + func (*ApplyOptions) ProtoMessage() {} + func (*ApplyOptions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{5} ++ return fileDescriptor_a8431b6e0aeeb761, []int{5} + } + func (m *ApplyOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -220,7 +220,7 @@ var xxx_messageInfo_ApplyOptions proto.InternalMessageInfo + func (m *Condition) Reset() { *m = Condition{} } + func (*Condition) ProtoMessage() {} + func (*Condition) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{6} ++ return fileDescriptor_a8431b6e0aeeb761, []int{6} + } + func (m *Condition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -248,7 +248,7 @@ var xxx_messageInfo_Condition proto.InternalMessageInfo + func (m *CreateOptions) Reset() { *m = CreateOptions{} } + func (*CreateOptions) ProtoMessage() {} + func (*CreateOptions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{7} ++ return fileDescriptor_a8431b6e0aeeb761, []int{7} + } + func (m *CreateOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -276,7 +276,7 @@ var xxx_messageInfo_CreateOptions proto.InternalMessageInfo + func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } + func (*DeleteOptions) ProtoMessage() {} + func (*DeleteOptions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{8} ++ return fileDescriptor_a8431b6e0aeeb761, []int{8} + } + func (m *DeleteOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -304,7 +304,7 @@ var xxx_messageInfo_DeleteOptions proto.InternalMessageInfo + func (m *Duration) Reset() { *m = Duration{} } + func (*Duration) ProtoMessage() {} + func (*Duration) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{9} ++ return fileDescriptor_a8431b6e0aeeb761, []int{9} + } + func (m *Duration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -329,10 +329,38 @@ func (m *Duration) XXX_DiscardUnknown() { + + var xxx_messageInfo_Duration proto.InternalMessageInfo + ++func (m *FieldSelectorRequirement) Reset() { *m = FieldSelectorRequirement{} } ++func (*FieldSelectorRequirement) ProtoMessage() {} ++func (*FieldSelectorRequirement) Descriptor() ([]byte, []int) { ++ return fileDescriptor_a8431b6e0aeeb761, []int{10} ++} ++func (m *FieldSelectorRequirement) XXX_Unmarshal(b []byte) error { ++ return m.Unmarshal(b) ++} ++func (m *FieldSelectorRequirement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { ++ b = b[:cap(b)] ++ n, err := m.MarshalToSizedBuffer(b) ++ if err != nil { ++ return nil, err ++ } ++ return b[:n], nil ++} ++func (m *FieldSelectorRequirement) XXX_Merge(src proto.Message) { ++ xxx_messageInfo_FieldSelectorRequirement.Merge(m, src) ++} ++func (m *FieldSelectorRequirement) XXX_Size() int { ++ return m.Size() ++} ++func (m *FieldSelectorRequirement) XXX_DiscardUnknown() { ++ xxx_messageInfo_FieldSelectorRequirement.DiscardUnknown(m) ++} ++ ++var xxx_messageInfo_FieldSelectorRequirement proto.InternalMessageInfo ++ + func (m *FieldsV1) Reset() { *m = FieldsV1{} } + func (*FieldsV1) ProtoMessage() {} + func (*FieldsV1) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{10} ++ return fileDescriptor_a8431b6e0aeeb761, []int{11} + } + func (m *FieldsV1) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -360,7 +388,7 @@ var xxx_messageInfo_FieldsV1 proto.InternalMessageInfo + func (m *GetOptions) Reset() { *m = GetOptions{} } + func (*GetOptions) ProtoMessage() {} + func (*GetOptions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{11} ++ return fileDescriptor_a8431b6e0aeeb761, []int{12} + } + func (m *GetOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -388,7 +416,7 @@ var xxx_messageInfo_GetOptions proto.InternalMessageInfo + func (m *GroupKind) Reset() { *m = GroupKind{} } + func (*GroupKind) ProtoMessage() {} + func (*GroupKind) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{12} ++ return fileDescriptor_a8431b6e0aeeb761, []int{13} + } + func (m *GroupKind) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -416,7 +444,7 @@ var xxx_messageInfo_GroupKind proto.InternalMessageInfo + func (m *GroupResource) Reset() { *m = GroupResource{} } + func (*GroupResource) ProtoMessage() {} + func (*GroupResource) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{13} ++ return fileDescriptor_a8431b6e0aeeb761, []int{14} + } + func (m *GroupResource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -444,7 +472,7 @@ var xxx_messageInfo_GroupResource proto.InternalMessageInfo + func (m *GroupVersion) Reset() { *m = GroupVersion{} } + func (*GroupVersion) ProtoMessage() {} + func (*GroupVersion) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{14} ++ return fileDescriptor_a8431b6e0aeeb761, []int{15} + } + func (m *GroupVersion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -472,7 +500,7 @@ var xxx_messageInfo_GroupVersion proto.InternalMessageInfo + func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } + func (*GroupVersionForDiscovery) ProtoMessage() {} + func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{15} ++ return fileDescriptor_a8431b6e0aeeb761, []int{16} + } + func (m *GroupVersionForDiscovery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -500,7 +528,7 @@ var xxx_messageInfo_GroupVersionForDiscovery proto.InternalMessageInfo + func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } + func (*GroupVersionKind) ProtoMessage() {} + func (*GroupVersionKind) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{16} ++ return fileDescriptor_a8431b6e0aeeb761, []int{17} + } + func (m *GroupVersionKind) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -528,7 +556,7 @@ var xxx_messageInfo_GroupVersionKind proto.InternalMessageInfo + func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } + func (*GroupVersionResource) ProtoMessage() {} + func (*GroupVersionResource) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{17} ++ return fileDescriptor_a8431b6e0aeeb761, []int{18} + } + func (m *GroupVersionResource) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -556,7 +584,7 @@ var xxx_messageInfo_GroupVersionResource proto.InternalMessageInfo + func (m *LabelSelector) Reset() { *m = LabelSelector{} } + func (*LabelSelector) ProtoMessage() {} + func (*LabelSelector) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{18} ++ return fileDescriptor_a8431b6e0aeeb761, []int{19} + } + func (m *LabelSelector) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -584,7 +612,7 @@ var xxx_messageInfo_LabelSelector proto.InternalMessageInfo + func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } + func (*LabelSelectorRequirement) ProtoMessage() {} + func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{19} ++ return fileDescriptor_a8431b6e0aeeb761, []int{20} + } + func (m *LabelSelectorRequirement) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -612,7 +640,7 @@ var xxx_messageInfo_LabelSelectorRequirement proto.InternalMessageInfo + func (m *List) Reset() { *m = List{} } + func (*List) ProtoMessage() {} + func (*List) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{20} ++ return fileDescriptor_a8431b6e0aeeb761, []int{21} + } + func (m *List) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -640,7 +668,7 @@ var xxx_messageInfo_List proto.InternalMessageInfo + func (m *ListMeta) Reset() { *m = ListMeta{} } + func (*ListMeta) ProtoMessage() {} + func (*ListMeta) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{21} ++ return fileDescriptor_a8431b6e0aeeb761, []int{22} + } + func (m *ListMeta) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -668,7 +696,7 @@ var xxx_messageInfo_ListMeta proto.InternalMessageInfo + func (m *ListOptions) Reset() { *m = ListOptions{} } + func (*ListOptions) ProtoMessage() {} + func (*ListOptions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{22} ++ return fileDescriptor_a8431b6e0aeeb761, []int{23} + } + func (m *ListOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -696,7 +724,7 @@ var xxx_messageInfo_ListOptions proto.InternalMessageInfo + func (m *ManagedFieldsEntry) Reset() { *m = ManagedFieldsEntry{} } + func (*ManagedFieldsEntry) ProtoMessage() {} + func (*ManagedFieldsEntry) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{23} ++ return fileDescriptor_a8431b6e0aeeb761, []int{24} + } + func (m *ManagedFieldsEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -724,7 +752,7 @@ var xxx_messageInfo_ManagedFieldsEntry proto.InternalMessageInfo + func (m *MicroTime) Reset() { *m = MicroTime{} } + func (*MicroTime) ProtoMessage() {} + func (*MicroTime) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{24} ++ return fileDescriptor_a8431b6e0aeeb761, []int{25} + } + func (m *MicroTime) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MicroTime.Unmarshal(m, b) +@@ -747,7 +775,7 @@ var xxx_messageInfo_MicroTime proto.InternalMessageInfo + func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } + func (*ObjectMeta) ProtoMessage() {} + func (*ObjectMeta) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{25} ++ return fileDescriptor_a8431b6e0aeeb761, []int{26} + } + func (m *ObjectMeta) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -775,7 +803,7 @@ var xxx_messageInfo_ObjectMeta proto.InternalMessageInfo + func (m *OwnerReference) Reset() { *m = OwnerReference{} } + func (*OwnerReference) ProtoMessage() {} + func (*OwnerReference) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{26} ++ return fileDescriptor_a8431b6e0aeeb761, []int{27} + } + func (m *OwnerReference) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -803,7 +831,7 @@ var xxx_messageInfo_OwnerReference proto.InternalMessageInfo + func (m *PartialObjectMetadata) Reset() { *m = PartialObjectMetadata{} } + func (*PartialObjectMetadata) ProtoMessage() {} + func (*PartialObjectMetadata) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{27} ++ return fileDescriptor_a8431b6e0aeeb761, []int{28} + } + func (m *PartialObjectMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -831,7 +859,7 @@ var xxx_messageInfo_PartialObjectMetadata proto.InternalMessageInfo + func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } + func (*PartialObjectMetadataList) ProtoMessage() {} + func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{28} ++ return fileDescriptor_a8431b6e0aeeb761, []int{29} + } + func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -859,7 +887,7 @@ var xxx_messageInfo_PartialObjectMetadataList proto.InternalMessageInfo + func (m *Patch) Reset() { *m = Patch{} } + func (*Patch) ProtoMessage() {} + func (*Patch) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{29} ++ return fileDescriptor_a8431b6e0aeeb761, []int{30} + } + func (m *Patch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -887,7 +915,7 @@ var xxx_messageInfo_Patch proto.InternalMessageInfo + func (m *PatchOptions) Reset() { *m = PatchOptions{} } + func (*PatchOptions) ProtoMessage() {} + func (*PatchOptions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{30} ++ return fileDescriptor_a8431b6e0aeeb761, []int{31} + } + func (m *PatchOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -915,7 +943,7 @@ var xxx_messageInfo_PatchOptions proto.InternalMessageInfo + func (m *Preconditions) Reset() { *m = Preconditions{} } + func (*Preconditions) ProtoMessage() {} + func (*Preconditions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{31} ++ return fileDescriptor_a8431b6e0aeeb761, []int{32} + } + func (m *Preconditions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -943,7 +971,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo + func (m *RootPaths) Reset() { *m = RootPaths{} } + func (*RootPaths) ProtoMessage() {} + func (*RootPaths) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{32} ++ return fileDescriptor_a8431b6e0aeeb761, []int{33} + } + func (m *RootPaths) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -971,7 +999,7 @@ var xxx_messageInfo_RootPaths proto.InternalMessageInfo + func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } + func (*ServerAddressByClientCIDR) ProtoMessage() {} + func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{33} ++ return fileDescriptor_a8431b6e0aeeb761, []int{34} + } + func (m *ServerAddressByClientCIDR) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -999,7 +1027,7 @@ var xxx_messageInfo_ServerAddressByClientCIDR proto.InternalMessageInfo + func (m *Status) Reset() { *m = Status{} } + func (*Status) ProtoMessage() {} + func (*Status) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{34} ++ return fileDescriptor_a8431b6e0aeeb761, []int{35} + } + func (m *Status) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -1027,7 +1055,7 @@ var xxx_messageInfo_Status proto.InternalMessageInfo + func (m *StatusCause) Reset() { *m = StatusCause{} } + func (*StatusCause) ProtoMessage() {} + func (*StatusCause) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{35} ++ return fileDescriptor_a8431b6e0aeeb761, []int{36} + } + func (m *StatusCause) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -1055,7 +1083,7 @@ var xxx_messageInfo_StatusCause proto.InternalMessageInfo + func (m *StatusDetails) Reset() { *m = StatusDetails{} } + func (*StatusDetails) ProtoMessage() {} + func (*StatusDetails) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{36} ++ return fileDescriptor_a8431b6e0aeeb761, []int{37} + } + func (m *StatusDetails) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -1083,7 +1111,7 @@ var xxx_messageInfo_StatusDetails proto.InternalMessageInfo + func (m *TableOptions) Reset() { *m = TableOptions{} } + func (*TableOptions) ProtoMessage() {} + func (*TableOptions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{37} ++ return fileDescriptor_a8431b6e0aeeb761, []int{38} + } + func (m *TableOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -1111,7 +1139,7 @@ var xxx_messageInfo_TableOptions proto.InternalMessageInfo + func (m *Time) Reset() { *m = Time{} } + func (*Time) ProtoMessage() {} + func (*Time) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{38} ++ return fileDescriptor_a8431b6e0aeeb761, []int{39} + } + func (m *Time) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Time.Unmarshal(m, b) +@@ -1134,7 +1162,7 @@ var xxx_messageInfo_Time proto.InternalMessageInfo + func (m *Timestamp) Reset() { *m = Timestamp{} } + func (*Timestamp) ProtoMessage() {} + func (*Timestamp) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{39} ++ return fileDescriptor_a8431b6e0aeeb761, []int{40} + } + func (m *Timestamp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -1162,7 +1190,7 @@ var xxx_messageInfo_Timestamp proto.InternalMessageInfo + func (m *TypeMeta) Reset() { *m = TypeMeta{} } + func (*TypeMeta) ProtoMessage() {} + func (*TypeMeta) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{40} ++ return fileDescriptor_a8431b6e0aeeb761, []int{41} + } + func (m *TypeMeta) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -1190,7 +1218,7 @@ var xxx_messageInfo_TypeMeta proto.InternalMessageInfo + func (m *UpdateOptions) Reset() { *m = UpdateOptions{} } + func (*UpdateOptions) ProtoMessage() {} + func (*UpdateOptions) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{41} ++ return fileDescriptor_a8431b6e0aeeb761, []int{42} + } + func (m *UpdateOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -1218,7 +1246,7 @@ var xxx_messageInfo_UpdateOptions proto.InternalMessageInfo + func (m *Verbs) Reset() { *m = Verbs{} } + func (*Verbs) ProtoMessage() {} + func (*Verbs) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{42} ++ return fileDescriptor_a8431b6e0aeeb761, []int{43} + } + func (m *Verbs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -1246,7 +1274,7 @@ var xxx_messageInfo_Verbs proto.InternalMessageInfo + func (m *WatchEvent) Reset() { *m = WatchEvent{} } + func (*WatchEvent) ProtoMessage() {} + func (*WatchEvent) Descriptor() ([]byte, []int) { +- return fileDescriptor_cf52fa777ced5367, []int{43} ++ return fileDescriptor_a8431b6e0aeeb761, []int{44} + } + func (m *WatchEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -1282,6 +1310,7 @@ func init() { + proto.RegisterType((*CreateOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.CreateOptions") + proto.RegisterType((*DeleteOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions") + proto.RegisterType((*Duration)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Duration") ++ proto.RegisterType((*FieldSelectorRequirement)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement") + proto.RegisterType((*FieldsV1)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.FieldsV1") + proto.RegisterType((*GetOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GetOptions") + proto.RegisterType((*GroupKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind") +@@ -1322,191 +1351,194 @@ func init() { + } + + func init() { +- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto", fileDescriptor_cf52fa777ced5367) +-} +- +-var fileDescriptor_cf52fa777ced5367 = []byte{ +- // 2867 bytes of a gzipped FileDescriptorProto +- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0x4b, 0x6f, 0x24, 0x47, +- 0xd9, 0x3d, 0x0f, 0x7b, 0xe6, 0x9b, 0x19, 0x3f, 0x6a, 0xbd, 0x30, 0x6b, 0x84, 0xc7, 0xe9, 0x44, +- 0xd1, 0x06, 0x92, 0x71, 0x76, 0x09, 0xd1, 0x66, 0x43, 0x02, 0x1e, 0xcf, 0x7a, 0xe3, 0x64, 0x1d, +- 0x5b, 0xe5, 0xdd, 0x05, 0x42, 0x84, 0xd2, 0x9e, 0x2e, 0x8f, 0x1b, 0xf7, 0x74, 0x4f, 0xaa, 0x7a, +- 0xbc, 0x19, 0x38, 0x90, 0x03, 0x08, 0x90, 0x50, 0x14, 0x6e, 0x9c, 0x50, 0x22, 0xf8, 0x01, 0x88, +- 0x13, 0x77, 0x90, 0xc8, 0x31, 0x88, 0x4b, 0x24, 0xd0, 0x28, 0x31, 0x07, 0x8e, 0x88, 0xab, 0x85, +- 0x04, 0xaa, 0x47, 0x77, 0x57, 0xcf, 0x63, 0xdd, 0x93, 0x5d, 0x22, 0x6e, 0xd3, 0xdf, 0xbb, 0xaa, +- 0xbe, 0xfa, 0xea, 0x7b, 0x0c, 0xec, 0x1c, 0x5f, 0x63, 0x75, 0xc7, 0x5f, 0x3f, 0xee, 0x1d, 0x10, +- 0xea, 0x91, 0x80, 0xb0, 0xf5, 0x13, 0xe2, 0xd9, 0x3e, 0x5d, 0x57, 0x08, 0xab, 0xeb, 0x74, 0xac, +- 0xd6, 0x91, 0xe3, 0x11, 0xda, 0x5f, 0xef, 0x1e, 0xb7, 0x39, 0x80, 0xad, 0x77, 0x48, 0x60, 0xad, +- 0x9f, 0x5c, 0x59, 0x6f, 0x13, 0x8f, 0x50, 0x2b, 0x20, 0x76, 0xbd, 0x4b, 0xfd, 0xc0, 0x47, 0x8f, +- 0x49, 0xae, 0xba, 0xce, 0x55, 0xef, 0x1e, 0xb7, 0x39, 0x80, 0xd5, 0x39, 0x57, 0xfd, 0xe4, 0xca, +- 0xca, 0x53, 0x6d, 0x27, 0x38, 0xea, 0x1d, 0xd4, 0x5b, 0x7e, 0x67, 0xbd, 0xed, 0xb7, 0xfd, 0x75, +- 0xc1, 0x7c, 0xd0, 0x3b, 0x14, 0x5f, 0xe2, 0x43, 0xfc, 0x92, 0x42, 0x57, 0x26, 0x9a, 0x42, 0x7b, +- 0x5e, 0xe0, 0x74, 0xc8, 0xb0, 0x15, 0x2b, 0xcf, 0x9e, 0xc7, 0xc0, 0x5a, 0x47, 0xa4, 0x63, 0x0d, +- 0xf3, 0x99, 0x7f, 0xca, 0x42, 0x61, 0x63, 0x6f, 0xfb, 0x26, 0xf5, 0x7b, 0x5d, 0xb4, 0x06, 0x39, +- 0xcf, 0xea, 0x90, 0xaa, 0xb1, 0x66, 0x5c, 0x2e, 0x36, 0xca, 0x1f, 0x0c, 0x6a, 0x33, 0xa7, 0x83, +- 0x5a, 0xee, 0x55, 0xab, 0x43, 0xb0, 0xc0, 0x20, 0x17, 0x0a, 0x27, 0x84, 0x32, 0xc7, 0xf7, 0x58, +- 0x35, 0xb3, 0x96, 0xbd, 0x5c, 0xba, 0xfa, 0x62, 0x3d, 0xcd, 0xfa, 0xeb, 0x42, 0xc1, 0x5d, 0xc9, +- 0xba, 0xe5, 0xd3, 0xa6, 0xc3, 0x5a, 0xfe, 0x09, 0xa1, 0xfd, 0xc6, 0xa2, 0xd2, 0x52, 0x50, 0x48, +- 0x86, 0x23, 0x0d, 0xe8, 0x47, 0x06, 0x2c, 0x76, 0x29, 0x39, 0x24, 0x94, 0x12, 0x5b, 0xe1, 0xab, +- 0xd9, 0x35, 0xe3, 0x21, 0xa8, 0xad, 0x2a, 0xb5, 0x8b, 0x7b, 0x43, 0xf2, 0xf1, 0x88, 0x46, 0xf4, +- 0x6b, 0x03, 0x56, 0x18, 0xa1, 0x27, 0x84, 0x6e, 0xd8, 0x36, 0x25, 0x8c, 0x35, 0xfa, 0x9b, 0xae, +- 0x43, 0xbc, 0x60, 0x73, 0xbb, 0x89, 0x59, 0x35, 0x27, 0xf6, 0xe1, 0xeb, 0xe9, 0x0c, 0xda, 0x9f, +- 0x24, 0xa7, 0x61, 0x2a, 0x8b, 0x56, 0x26, 0x92, 0x30, 0x7c, 0x1f, 0x33, 0xcc, 0x43, 0x28, 0x87, +- 0x07, 0x79, 0xcb, 0x61, 0x01, 0xba, 0x0b, 0xb3, 0x6d, 0xfe, 0xc1, 0xaa, 0x86, 0x30, 0xb0, 0x9e, +- 0xce, 0xc0, 0x50, 0x46, 0x63, 0x5e, 0xd9, 0x33, 0x2b, 0x3e, 0x19, 0x56, 0xd2, 0xcc, 0x9f, 0xe5, +- 0xa0, 0xb4, 0xb1, 0xb7, 0x8d, 0x09, 0xf3, 0x7b, 0xb4, 0x45, 0x52, 0x38, 0xcd, 0x35, 0x28, 0x33, +- 0xc7, 0x6b, 0xf7, 0x5c, 0x8b, 0x72, 0x68, 0x75, 0x56, 0x50, 0x2e, 0x2b, 0xca, 0xf2, 0xbe, 0x86, +- 0xc3, 0x09, 0x4a, 0x74, 0x15, 0x80, 0x4b, 0x60, 0x5d, 0xab, 0x45, 0xec, 0x6a, 0x66, 0xcd, 0xb8, +- 0x5c, 0x68, 0x20, 0xc5, 0x07, 0xaf, 0x46, 0x18, 0xac, 0x51, 0xa1, 0x47, 0x21, 0x2f, 0x2c, 0xad, +- 0x16, 0x84, 0x9a, 0x8a, 0x22, 0xcf, 0x8b, 0x65, 0x60, 0x89, 0x43, 0x4f, 0xc0, 0x9c, 0xf2, 0xb2, +- 0x6a, 0x51, 0x90, 0x2d, 0x28, 0xb2, 0xb9, 0xd0, 0x0d, 0x42, 0x3c, 0x5f, 0xdf, 0xb1, 0xe3, 0xd9, +- 0xc2, 0xef, 0xb4, 0xf5, 0xbd, 0xe2, 0x78, 0x36, 0x16, 0x18, 0x74, 0x0b, 0xf2, 0x27, 0x84, 0x1e, +- 0x70, 0x4f, 0xe0, 0xae, 0xf9, 0xe5, 0x74, 0x1b, 0x7d, 0x97, 0xb3, 0x34, 0x8a, 0xdc, 0x34, 0xf1, +- 0x13, 0x4b, 0x21, 0xa8, 0x0e, 0xc0, 0x8e, 0x7c, 0x1a, 0x88, 0xe5, 0x55, 0xf3, 0x6b, 0xd9, 0xcb, +- 0xc5, 0xc6, 0x3c, 0x5f, 0xef, 0x7e, 0x04, 0xc5, 0x1a, 0x05, 0xa7, 0x6f, 0x59, 0x01, 0x69, 0xfb, +- 0xd4, 0x21, 0xac, 0x3a, 0x17, 0xd3, 0x6f, 0x46, 0x50, 0xac, 0x51, 0xa0, 0x97, 0x01, 0xb1, 0xc0, +- 0xa7, 0x56, 0x9b, 0xa8, 0xa5, 0xbe, 0x64, 0xb1, 0xa3, 0x2a, 0x88, 0xd5, 0xad, 0xa8, 0xd5, 0xa1, +- 0xfd, 0x11, 0x0a, 0x3c, 0x86, 0xcb, 0xfc, 0x9d, 0x01, 0x0b, 0x9a, 0x2f, 0x08, 0xbf, 0xbb, 0x06, +- 0xe5, 0xb6, 0x76, 0xeb, 0x94, 0x5f, 0x44, 0xa7, 0xad, 0xdf, 0x48, 0x9c, 0xa0, 0x44, 0x04, 0x8a, +- 0x54, 0x49, 0x0a, 0xa3, 0xcb, 0x95, 0xd4, 0x4e, 0x1b, 0xda, 0x10, 0x6b, 0xd2, 0x80, 0x0c, 0xc7, +- 0x92, 0xcd, 0x7f, 0x18, 0xc2, 0x81, 0xc3, 0x78, 0x83, 0x2e, 0x6b, 0x31, 0xcd, 0x10, 0xdb, 0x57, +- 0x9e, 0x10, 0x8f, 0xce, 0x09, 0x04, 0x99, 0xff, 0x8b, 0x40, 0x70, 0xbd, 0xf0, 0xcb, 0xf7, 0x6a, +- 0x33, 0x6f, 0xff, 0x6d, 0x6d, 0xc6, 0xfc, 0x85, 0x01, 0xe5, 0x8d, 0x6e, 0xd7, 0xed, 0xef, 0x76, +- 0x03, 0xb1, 0x00, 0x13, 0x66, 0x6d, 0xda, 0xc7, 0x3d, 0x4f, 0x2d, 0x14, 0xf8, 0xfd, 0x6e, 0x0a, +- 0x08, 0x56, 0x18, 0x7e, 0x7f, 0x0e, 0x7d, 0xda, 0x22, 0xea, 0xba, 0x45, 0xf7, 0x67, 0x8b, 0x03, +- 0xb1, 0xc4, 0xf1, 0x43, 0x3e, 0x74, 0x88, 0x6b, 0xef, 0x58, 0x9e, 0xd5, 0x26, 0x54, 0x5d, 0x8e, +- 0x68, 0xeb, 0xb7, 0x34, 0x1c, 0x4e, 0x50, 0x9a, 0xff, 0xc9, 0x40, 0x71, 0xd3, 0xf7, 0x6c, 0x27, +- 0x50, 0x97, 0x2b, 0xe8, 0x77, 0x47, 0x82, 0xc7, 0xed, 0x7e, 0x97, 0x60, 0x81, 0x41, 0xcf, 0xc1, +- 0x2c, 0x0b, 0xac, 0xa0, 0xc7, 0x84, 0x3d, 0xc5, 0xc6, 0x23, 0x61, 0x58, 0xda, 0x17, 0xd0, 0xb3, +- 0x41, 0x6d, 0x21, 0x12, 0x27, 0x41, 0x58, 0x31, 0x70, 0x4f, 0xf7, 0x0f, 0xc4, 0x46, 0xd9, 0x37, +- 0xe5, 0xb3, 0x17, 0xbe, 0x1f, 0xd9, 0xd8, 0xd3, 0x77, 0x47, 0x28, 0xf0, 0x18, 0x2e, 0x74, 0x02, +- 0xc8, 0xb5, 0x58, 0x70, 0x9b, 0x5a, 0x1e, 0x13, 0xba, 0x6e, 0x3b, 0x1d, 0xa2, 0x2e, 0xfc, 0x97, +- 0xd2, 0x9d, 0x38, 0xe7, 0x88, 0xf5, 0xde, 0x1a, 0x91, 0x86, 0xc7, 0x68, 0x40, 0x8f, 0xc3, 0x2c, +- 0x25, 0x16, 0xf3, 0xbd, 0x6a, 0x5e, 0x2c, 0x3f, 0x8a, 0xca, 0x58, 0x40, 0xb1, 0xc2, 0xf2, 0x80, +- 0xd6, 0x21, 0x8c, 0x59, 0xed, 0x30, 0xbc, 0x46, 0x01, 0x6d, 0x47, 0x82, 0x71, 0x88, 0x37, 0x7f, +- 0x6b, 0x40, 0x65, 0x93, 0x12, 0x2b, 0x20, 0xd3, 0xb8, 0xc5, 0xa7, 0x3e, 0x71, 0xb4, 0x01, 0x0b, +- 0xe2, 0xfb, 0xae, 0xe5, 0x3a, 0xb6, 0x3c, 0x83, 0x9c, 0x60, 0xfe, 0xbc, 0x62, 0x5e, 0xd8, 0x4a, +- 0xa2, 0xf1, 0x30, 0xbd, 0xf9, 0x93, 0x2c, 0x54, 0x9a, 0xc4, 0x25, 0xb1, 0xc9, 0x5b, 0x80, 0xda, +- 0xd4, 0x6a, 0x91, 0x3d, 0x42, 0x1d, 0xdf, 0xde, 0x27, 0x2d, 0xdf, 0xb3, 0x99, 0x70, 0xa3, 0x6c, +- 0xe3, 0x73, 0x7c, 0x7f, 0x6f, 0x8e, 0x60, 0xf1, 0x18, 0x0e, 0xe4, 0x42, 0xa5, 0x4b, 0xc5, 0x6f, +- 0xb1, 0xe7, 0xd2, 0xcb, 0x4a, 0x57, 0xbf, 0x92, 0xee, 0x48, 0xf7, 0x74, 0xd6, 0xc6, 0xd2, 0xe9, +- 0xa0, 0x56, 0x49, 0x80, 0x70, 0x52, 0x38, 0xfa, 0x06, 0x2c, 0xfa, 0xb4, 0x7b, 0x64, 0x79, 0x4d, +- 0xd2, 0x25, 0x9e, 0x4d, 0xbc, 0x80, 0x89, 0x8d, 0x2c, 0x34, 0x96, 0x79, 0x2e, 0xb2, 0x3b, 0x84, +- 0xc3, 0x23, 0xd4, 0xe8, 0x35, 0x58, 0xea, 0x52, 0xbf, 0x6b, 0xb5, 0xc5, 0xc6, 0xec, 0xf9, 0xae, +- 0xd3, 0xea, 0xab, 0xed, 0x7c, 0xf2, 0x74, 0x50, 0x5b, 0xda, 0x1b, 0x46, 0x9e, 0x0d, 0x6a, 0x17, +- 0xc4, 0xd6, 0x71, 0x48, 0x8c, 0xc4, 0xa3, 0x62, 0x34, 0x37, 0xc8, 0x4f, 0x72, 0x03, 0x73, 0x1b, +- 0x0a, 0xcd, 0x9e, 0xba, 0x13, 0x2f, 0x40, 0xc1, 0x56, 0xbf, 0xd5, 0xce, 0x87, 0x97, 0x33, 0xa2, +- 0x39, 0x1b, 0xd4, 0x2a, 0x3c, 0xfd, 0xac, 0x87, 0x00, 0x1c, 0xb1, 0x98, 0x8f, 0x43, 0x41, 0x1c, +- 0x3c, 0xbb, 0x7b, 0x05, 0x2d, 0x42, 0x16, 0x5b, 0xf7, 0x84, 0x94, 0x32, 0xe6, 0x3f, 0xb5, 0x28, +- 0xb6, 0x0b, 0x70, 0x93, 0x04, 0xe1, 0xc1, 0x6f, 0xc0, 0x42, 0x18, 0xca, 0x93, 0x2f, 0x4c, 0xe4, +- 0x4d, 0x38, 0x89, 0xc6, 0xc3, 0xf4, 0xe6, 0xeb, 0x50, 0x14, 0xaf, 0x10, 0x7f, 0xc2, 0xe3, 0x74, +- 0xc1, 0xb8, 0x4f, 0xba, 0x10, 0xe6, 0x00, 0x99, 0x49, 0x39, 0x80, 0x66, 0xae, 0x0b, 0x15, 0xc9, +- 0x1b, 0x26, 0x48, 0xa9, 0x34, 0x3c, 0x09, 0x85, 0xd0, 0x4c, 0xa5, 0x25, 0x4a, 0x8c, 0x43, 0x41, +- 0x38, 0xa2, 0xd0, 0xb4, 0x1d, 0x41, 0xe2, 0x45, 0x4d, 0xa7, 0x4c, 0xcb, 0x7e, 0x32, 0xf7, 0xcf, +- 0x7e, 0x34, 0x4d, 0x3f, 0x84, 0xea, 0xa4, 0x6c, 0xfa, 0x01, 0xde, 0xfc, 0xf4, 0xa6, 0x98, 0xef, +- 0x18, 0xb0, 0xa8, 0x4b, 0x4a, 0x7f, 0x7c, 0xe9, 0x95, 0x9c, 0x9f, 0xed, 0x69, 0x3b, 0xf2, 0x2b, +- 0x03, 0x96, 0x13, 0x4b, 0x9b, 0xea, 0xc4, 0xa7, 0x30, 0x4a, 0x77, 0x8e, 0xec, 0x14, 0xce, 0xf1, +- 0x97, 0x0c, 0x54, 0x6e, 0x59, 0x07, 0xc4, 0xdd, 0x27, 0x2e, 0x69, 0x05, 0x3e, 0x45, 0x3f, 0x80, +- 0x52, 0xc7, 0x0a, 0x5a, 0x47, 0x02, 0x1a, 0x56, 0x06, 0xcd, 0x74, 0xc1, 0x2e, 0x21, 0xa9, 0xbe, +- 0x13, 0x8b, 0xb9, 0xe1, 0x05, 0xb4, 0xdf, 0xb8, 0xa0, 0x4c, 0x2a, 0x69, 0x18, 0xac, 0x6b, 0x13, +- 0xe5, 0x9c, 0xf8, 0xbe, 0xf1, 0x56, 0x97, 0xa7, 0x2d, 0xd3, 0x57, 0x91, 0x09, 0x13, 0x30, 0x79, +- 0xb3, 0xe7, 0x50, 0xd2, 0x21, 0x5e, 0x10, 0x97, 0x73, 0x3b, 0x43, 0xf2, 0xf1, 0x88, 0xc6, 0x95, +- 0x17, 0x61, 0x71, 0xd8, 0x78, 0x1e, 0x7f, 0x8e, 0x49, 0x5f, 0x9e, 0x17, 0xe6, 0x3f, 0xd1, 0x32, +- 0xe4, 0x4f, 0x2c, 0xb7, 0xa7, 0x6e, 0x23, 0x96, 0x1f, 0xd7, 0x33, 0xd7, 0x0c, 0xf3, 0x37, 0x06, +- 0x54, 0x27, 0x19, 0x82, 0xbe, 0xa8, 0x09, 0x6a, 0x94, 0x94, 0x55, 0xd9, 0x57, 0x48, 0x5f, 0x4a, +- 0xbd, 0x01, 0x05, 0xbf, 0xcb, 0x73, 0x0a, 0x9f, 0xaa, 0x53, 0x7f, 0x22, 0x3c, 0xc9, 0x5d, 0x05, +- 0x3f, 0x1b, 0xd4, 0x2e, 0x26, 0xc4, 0x87, 0x08, 0x1c, 0xb1, 0xf2, 0x48, 0x2d, 0xec, 0xe1, 0xaf, +- 0x47, 0x14, 0xa9, 0xef, 0x0a, 0x08, 0x56, 0x18, 0xf3, 0xf7, 0x06, 0xe4, 0x44, 0x42, 0xfe, 0x3a, +- 0x14, 0xf8, 0xfe, 0xd9, 0x56, 0x60, 0x09, 0xbb, 0x52, 0x97, 0x82, 0x9c, 0x7b, 0x87, 0x04, 0x56, +- 0xec, 0x6d, 0x21, 0x04, 0x47, 0x12, 0x11, 0x86, 0xbc, 0x13, 0x90, 0x4e, 0x78, 0x90, 0x4f, 0x4d, +- 0x14, 0xad, 0x1a, 0x11, 0x75, 0x6c, 0xdd, 0xbb, 0xf1, 0x56, 0x40, 0x3c, 0x7e, 0x18, 0xf1, 0xd5, +- 0xd8, 0xe6, 0x32, 0xb0, 0x14, 0x65, 0xfe, 0xcb, 0x80, 0x48, 0x15, 0x77, 0x7e, 0x46, 0xdc, 0xc3, +- 0x5b, 0x8e, 0x77, 0xac, 0xb6, 0x35, 0x32, 0x67, 0x5f, 0xc1, 0x71, 0x44, 0x31, 0xee, 0x79, 0xc8, +- 0x4c, 0xf7, 0x3c, 0x70, 0x85, 0x2d, 0xdf, 0x0b, 0x1c, 0xaf, 0x37, 0x72, 0xdb, 0x36, 0x15, 0x1c, +- 0x47, 0x14, 0x3c, 0x11, 0xa1, 0xa4, 0x63, 0x39, 0x9e, 0xe3, 0xb5, 0xf9, 0x22, 0x36, 0xfd, 0x9e, +- 0x17, 0x88, 0x17, 0x59, 0x25, 0x22, 0x78, 0x04, 0x8b, 0xc7, 0x70, 0x98, 0xff, 0xce, 0x41, 0x89, +- 0xaf, 0x39, 0x7c, 0xe7, 0x9e, 0x87, 0x8a, 0xab, 0x7b, 0x81, 0x5a, 0xfb, 0x45, 0x65, 0x4a, 0xf2, +- 0x5e, 0xe3, 0x24, 0x2d, 0x67, 0x16, 0x29, 0x54, 0xc4, 0x9c, 0x49, 0x32, 0x6f, 0xe9, 0x48, 0x9c, +- 0xa4, 0xe5, 0xd1, 0xeb, 0x1e, 0xbf, 0x1f, 0x2a, 0x33, 0x89, 0x8e, 0xe8, 0x9b, 0x1c, 0x88, 0x25, +- 0x0e, 0xed, 0xc0, 0x05, 0xcb, 0x75, 0xfd, 0x7b, 0x02, 0xd8, 0xf0, 0xfd, 0xe3, 0x8e, 0x45, 0x8f, +- 0x99, 0x28, 0xa6, 0x0b, 0x8d, 0x2f, 0x28, 0x96, 0x0b, 0x1b, 0xa3, 0x24, 0x78, 0x1c, 0xdf, 0xb8, +- 0x63, 0xcb, 0x4d, 0x79, 0x6c, 0x47, 0xb0, 0x3c, 0x04, 0x12, 0xb7, 0x5c, 0x55, 0xb6, 0xcf, 0x28, +- 0x39, 0xcb, 0x78, 0x0c, 0xcd, 0xd9, 0x04, 0x38, 0x1e, 0x2b, 0x11, 0x5d, 0x87, 0x79, 0xee, 0xc9, +- 0x7e, 0x2f, 0x08, 0xf3, 0xce, 0xbc, 0x38, 0x6e, 0x74, 0x3a, 0xa8, 0xcd, 0xdf, 0x4e, 0x60, 0xf0, +- 0x10, 0x25, 0xdf, 0x5c, 0xd7, 0xe9, 0x38, 0x41, 0x75, 0x4e, 0xb0, 0x44, 0x9b, 0x7b, 0x8b, 0x03, +- 0xb1, 0xc4, 0x25, 0x3c, 0xb0, 0x70, 0xae, 0x07, 0x6e, 0xc2, 0x12, 0x23, 0x9e, 0xbd, 0xed, 0x39, +- 0x81, 0x63, 0xb9, 0x37, 0x4e, 0x44, 0x56, 0x59, 0x12, 0x07, 0x71, 0x91, 0xa7, 0x84, 0xfb, 0xc3, +- 0x48, 0x3c, 0x4a, 0x6f, 0xfe, 0x39, 0x0b, 0x48, 0x26, 0xec, 0xb6, 0x4c, 0xca, 0x64, 0x5c, 0xe4, +- 0x65, 0x85, 0x4a, 0xf8, 0x8d, 0xa1, 0xb2, 0x42, 0xe5, 0xfa, 0x21, 0x1e, 0xed, 0x40, 0x51, 0xc6, +- 0xa7, 0xf8, 0xce, 0xad, 0x2b, 0xe2, 0xe2, 0x6e, 0x88, 0x38, 0x1b, 0xd4, 0x56, 0x12, 0x6a, 0x22, +- 0x8c, 0x28, 0xf9, 0x62, 0x09, 0xe8, 0x2a, 0x80, 0xd5, 0x75, 0xf4, 0xa6, 0x5f, 0x31, 0x6e, 0xfd, +- 0xc4, 0xe5, 0x3b, 0xd6, 0xa8, 0xd0, 0x4b, 0x90, 0x0b, 0x3e, 0x5d, 0x59, 0x56, 0x10, 0x55, 0x27, +- 0x2f, 0xc2, 0x84, 0x04, 0xae, 0x5d, 0x5c, 0x0a, 0xc6, 0xcd, 0x52, 0x15, 0x55, 0xa4, 0x7d, 0x2b, +- 0xc2, 0x60, 0x8d, 0x0a, 0x7d, 0x0b, 0x0a, 0x87, 0x2a, 0x9f, 0x15, 0xa7, 0x9b, 0x3a, 0xce, 0x86, +- 0x59, 0xb0, 0xec, 0x3b, 0x84, 0x5f, 0x38, 0x92, 0x86, 0xbe, 0x0a, 0x25, 0xd6, 0x3b, 0x88, 0x52, +- 0x00, 0xe9, 0x12, 0xd1, 0x7b, 0xbb, 0x1f, 0xa3, 0xb0, 0x4e, 0x67, 0xbe, 0x09, 0xc5, 0x1d, 0xa7, +- 0x45, 0x7d, 0x51, 0x48, 0x3e, 0x01, 0x73, 0x2c, 0x51, 0x25, 0x45, 0x27, 0x19, 0xba, 0x6a, 0x88, +- 0xe7, 0x3e, 0xea, 0x59, 0x9e, 0x2f, 0x6b, 0xa1, 0x7c, 0xec, 0xa3, 0xaf, 0x72, 0x20, 0x96, 0xb8, +- 0xeb, 0xcb, 0x3c, 0xcb, 0xf8, 0xe9, 0xfb, 0xb5, 0x99, 0x77, 0xdf, 0xaf, 0xcd, 0xbc, 0xf7, 0xbe, +- 0xca, 0x38, 0xfe, 0x00, 0x00, 0xbb, 0x07, 0xdf, 0x23, 0x2d, 0x19, 0xbb, 0x53, 0xf5, 0x06, 0xc3, +- 0x96, 0xb4, 0xe8, 0x0d, 0x66, 0x86, 0x32, 0x47, 0x0d, 0x87, 0x13, 0x94, 0x68, 0x1d, 0x8a, 0x51, +- 0xd7, 0x4f, 0xf9, 0xc7, 0x52, 0xe8, 0x6f, 0x51, 0x6b, 0x10, 0xc7, 0x34, 0x89, 0x87, 0x24, 0x77, +- 0xee, 0x43, 0xd2, 0x80, 0x6c, 0xcf, 0xb1, 0x55, 0xd5, 0xfd, 0x74, 0xf8, 0x90, 0xdf, 0xd9, 0x6e, +- 0x9e, 0x0d, 0x6a, 0x8f, 0x4c, 0x6a, 0xb6, 0x07, 0xfd, 0x2e, 0x61, 0xf5, 0x3b, 0xdb, 0x4d, 0xcc, +- 0x99, 0xc7, 0x45, 0xb5, 0xd9, 0x29, 0xa3, 0xda, 0x55, 0x80, 0x76, 0xdc, 0xbb, 0x90, 0x41, 0x23, +- 0x72, 0x44, 0xad, 0x67, 0xa1, 0x51, 0x21, 0x06, 0x4b, 0x2d, 0x5e, 0xdf, 0xab, 0x1e, 0x02, 0x0b, +- 0xac, 0x8e, 0xec, 0x86, 0x4e, 0x77, 0x27, 0x2e, 0x29, 0x35, 0x4b, 0x9b, 0xc3, 0xc2, 0xf0, 0xa8, +- 0x7c, 0xe4, 0xc3, 0x92, 0xad, 0xca, 0xcc, 0x58, 0x69, 0x71, 0x6a, 0xa5, 0x22, 0x62, 0x35, 0x87, +- 0x05, 0xe1, 0x51, 0xd9, 0xe8, 0xbb, 0xb0, 0x12, 0x02, 0x47, 0x6b, 0x7d, 0x11, 0xf5, 0xb3, 0x8d, +- 0xd5, 0xd3, 0x41, 0x6d, 0xa5, 0x39, 0x91, 0x0a, 0xdf, 0x47, 0x02, 0xb2, 0x61, 0xd6, 0x95, 0x59, +- 0x72, 0x49, 0x64, 0x36, 0x5f, 0x4b, 0xb7, 0x8a, 0xd8, 0xfb, 0xeb, 0x7a, 0x76, 0x1c, 0xf5, 0x6d, +- 0x54, 0x62, 0xac, 0x64, 0xa3, 0xb7, 0xa0, 0x64, 0x79, 0x9e, 0x1f, 0x58, 0xb2, 0xfb, 0x50, 0x16, +- 0xaa, 0x36, 0xa6, 0x56, 0xb5, 0x11, 0xcb, 0x18, 0xca, 0xc6, 0x35, 0x0c, 0xd6, 0x55, 0xa1, 0x7b, +- 0xb0, 0xe0, 0xdf, 0xf3, 0x08, 0xc5, 0xe4, 0x90, 0x50, 0xe2, 0xb5, 0x08, 0xab, 0x56, 0x84, 0xf6, +- 0x67, 0x52, 0x6a, 0x4f, 0x30, 0xc7, 0x2e, 0x9d, 0x84, 0x33, 0x3c, 0xac, 0x05, 0xd5, 0x79, 0x6c, +- 0xf5, 0x2c, 0xd7, 0xf9, 0x3e, 0xa1, 0xac, 0x3a, 0x1f, 0x37, 0xac, 0xb7, 0x22, 0x28, 0xd6, 0x28, +- 0x50, 0x0f, 0x2a, 0x1d, 0xfd, 0xc9, 0xa8, 0x2e, 0x09, 0x33, 0xaf, 0xa5, 0x33, 0x73, 0xf4, 0x51, +- 0x8b, 0xd3, 0xa0, 0x04, 0x0e, 0x27, 0xb5, 0xac, 0x3c, 0x07, 0xa5, 0x4f, 0x59, 0x21, 0xf0, 0x0a, +- 0x63, 0xf8, 0x40, 0xa6, 0xaa, 0x30, 0xfe, 0x98, 0x81, 0xf9, 0xe4, 0x36, 0x0e, 0x3d, 0x87, 0xf9, +- 0x54, 0xcf, 0x61, 0x58, 0xcb, 0x1a, 0x13, 0x27, 0x17, 0x61, 0x7c, 0xce, 0x4e, 0x8c, 0xcf, 0x2a, +- 0x0c, 0xe6, 0x1e, 0x24, 0x0c, 0xd6, 0x01, 0x78, 0xb2, 0x42, 0x7d, 0xd7, 0x25, 0x54, 0x44, 0xc0, +- 0x82, 0x9a, 0x50, 0x44, 0x50, 0xac, 0x51, 0xf0, 0x94, 0xfa, 0xc0, 0xf5, 0x5b, 0xc7, 0x62, 0x0b, +- 0xc2, 0xdb, 0x2b, 0x62, 0x5f, 0x41, 0xa6, 0xd4, 0x8d, 0x11, 0x2c, 0x1e, 0xc3, 0x61, 0xf6, 0xe1, +- 0xe2, 0x9e, 0x45, 0x79, 0x92, 0x13, 0xdf, 0x14, 0x51, 0xb3, 0xbc, 0x31, 0x52, 0x11, 0x3d, 0x3d, +- 0xed, 0x8d, 0x8b, 0x37, 0x3f, 0x86, 0xc5, 0x55, 0x91, 0xf9, 0x57, 0x03, 0x2e, 0x8d, 0xd5, 0xfd, +- 0x19, 0x54, 0x64, 0x6f, 0x24, 0x2b, 0xb2, 0xe7, 0x53, 0xb6, 0x32, 0xc7, 0x59, 0x3b, 0xa1, 0x3e, +- 0x9b, 0x83, 0xfc, 0x1e, 0xcf, 0x84, 0xcd, 0x0f, 0x0d, 0x28, 0x8b, 0x5f, 0xd3, 0x74, 0x92, 0x6b, +- 0xc9, 0x01, 0x43, 0xf1, 0xe1, 0x0d, 0x17, 0x1e, 0x46, 0xab, 0xf9, 0x1d, 0x03, 0x92, 0x3d, 0x5c, +- 0xf4, 0xa2, 0xbc, 0x02, 0x46, 0xd4, 0x64, 0x9d, 0xd2, 0xfd, 0x5f, 0x98, 0x54, 0x92, 0x5e, 0x48, +- 0xd5, 0xad, 0x7c, 0x12, 0x8a, 0xd8, 0xf7, 0x83, 0x3d, 0x2b, 0x38, 0x62, 0x7c, 0xef, 0xba, 0xfc, +- 0x87, 0xda, 0x5e, 0xb1, 0x77, 0x02, 0x83, 0x25, 0xdc, 0xfc, 0xb9, 0x01, 0x97, 0x26, 0xce, 0x8d, +- 0x78, 0x14, 0x69, 0x45, 0x5f, 0x6a, 0x45, 0x91, 0x23, 0xc7, 0x74, 0x58, 0xa3, 0xe2, 0xb5, 0x64, +- 0x62, 0xd8, 0x34, 0x5c, 0x4b, 0x26, 0xb4, 0xe1, 0x24, 0xad, 0xf9, 0xcf, 0x0c, 0xa8, 0x41, 0xcd, +- 0xff, 0xd8, 0xe9, 0x1f, 0x1f, 0x1a, 0x13, 0xcd, 0x27, 0xc7, 0x44, 0xd1, 0x4c, 0x48, 0x9b, 0x93, +- 0x64, 0xef, 0x3f, 0x27, 0x41, 0xcf, 0x46, 0xa3, 0x17, 0xe9, 0x43, 0xab, 0xc9, 0xd1, 0xcb, 0xd9, +- 0xa0, 0x56, 0x56, 0xc2, 0x93, 0xa3, 0x98, 0xd7, 0x60, 0xce, 0x26, 0x81, 0xe5, 0xb8, 0xb2, 0x2e, +- 0x4c, 0x3d, 0x4c, 0x90, 0xc2, 0x9a, 0x92, 0xb5, 0x51, 0xe2, 0x36, 0xa9, 0x0f, 0x1c, 0x0a, 0xe4, +- 0x01, 0xbb, 0xe5, 0xdb, 0xb2, 0x22, 0xc9, 0xc7, 0x01, 0x7b, 0xd3, 0xb7, 0x09, 0x16, 0x18, 0xf3, +- 0x5d, 0x03, 0x4a, 0x52, 0xd2, 0xa6, 0xd5, 0x63, 0x04, 0x5d, 0x89, 0x56, 0x21, 0x8f, 0xfb, 0x92, +- 0x3e, 0x63, 0x3b, 0x1b, 0xd4, 0x8a, 0x82, 0x4c, 0x14, 0x33, 0x63, 0x66, 0x49, 0x99, 0x73, 0xf6, +- 0xe8, 0x51, 0xc8, 0x8b, 0x0b, 0xa4, 0x36, 0x33, 0x1e, 0x16, 0x72, 0x20, 0x96, 0x38, 0xf3, 0xe3, +- 0x0c, 0x54, 0x12, 0x8b, 0x4b, 0x51, 0x17, 0x44, 0x2d, 0xd4, 0x4c, 0x8a, 0xb6, 0xfc, 0xe4, 0xd1, +- 0xbc, 0x7a, 0xbe, 0x66, 0x1f, 0xe4, 0xf9, 0xfa, 0x36, 0xcc, 0xb6, 0xf8, 0x1e, 0x85, 0xff, 0xf4, +- 0xb8, 0x32, 0xcd, 0x71, 0x8a, 0xdd, 0x8d, 0xbd, 0x51, 0x7c, 0x32, 0xac, 0x04, 0xa2, 0x9b, 0xb0, +- 0x44, 0x49, 0x40, 0xfb, 0x1b, 0x87, 0x01, 0xa1, 0x7a, 0x33, 0x21, 0x1f, 0x67, 0xdf, 0x78, 0x98, +- 0x00, 0x8f, 0xf2, 0x98, 0x07, 0x50, 0xbe, 0x6d, 0x1d, 0xb8, 0xd1, 0x78, 0x0c, 0x43, 0xc5, 0xf1, +- 0x5a, 0x6e, 0xcf, 0x26, 0x32, 0xa0, 0x87, 0xd1, 0x2b, 0xbc, 0xb4, 0xdb, 0x3a, 0xf2, 0x6c, 0x50, +- 0xbb, 0x90, 0x00, 0xc8, 0x79, 0x10, 0x4e, 0x8a, 0x30, 0x5d, 0xc8, 0x7d, 0x86, 0x95, 0xe4, 0x77, +- 0xa0, 0x18, 0xe7, 0xfa, 0x0f, 0x59, 0xa5, 0xf9, 0x06, 0x14, 0xb8, 0xc7, 0x87, 0x35, 0xea, 0x39, +- 0x59, 0x52, 0x32, 0xf7, 0xca, 0xa4, 0xc9, 0xbd, 0xc4, 0x90, 0xf5, 0x4e, 0xd7, 0x7e, 0xc0, 0x21, +- 0x6b, 0xe6, 0x41, 0x5e, 0xbe, 0xec, 0x94, 0x2f, 0xdf, 0x55, 0x90, 0x7f, 0x44, 0xe1, 0x8f, 0x8c, +- 0x4c, 0x20, 0xb4, 0x47, 0x46, 0x7f, 0xff, 0xb5, 0x09, 0xc3, 0x8f, 0x0d, 0x00, 0xd1, 0xca, 0x13, +- 0x6d, 0xa4, 0x14, 0xe3, 0xfc, 0x3b, 0x30, 0xeb, 0x4b, 0x8f, 0x94, 0x83, 0xd6, 0x29, 0xfb, 0xc5, +- 0xd1, 0x45, 0x92, 0x3e, 0x89, 0x95, 0xb0, 0xc6, 0xcb, 0x1f, 0x7c, 0xb2, 0x3a, 0xf3, 0xe1, 0x27, +- 0xab, 0x33, 0x1f, 0x7d, 0xb2, 0x3a, 0xf3, 0xf6, 0xe9, 0xaa, 0xf1, 0xc1, 0xe9, 0xaa, 0xf1, 0xe1, +- 0xe9, 0xaa, 0xf1, 0xd1, 0xe9, 0xaa, 0xf1, 0xf1, 0xe9, 0xaa, 0xf1, 0xee, 0xdf, 0x57, 0x67, 0x5e, +- 0x7b, 0x2c, 0xcd, 0x1f, 0xfc, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x28, 0x27, 0x65, 0xab, 0x20, +- 0x28, 0x00, 0x00, ++ proto.RegisterFile("k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto", fileDescriptor_a8431b6e0aeeb761) ++} ++ ++var fileDescriptor_a8431b6e0aeeb761 = []byte{ ++ // 2928 bytes of a gzipped FileDescriptorProto ++ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3a, 0x4d, 0x6c, 0x24, 0x47, ++ 0xd5, 0xee, 0xf9, 0xb1, 0x67, 0xde, 0x78, 0xfc, 0x53, 0xeb, 0xfd, 0xbe, 0x59, 0x23, 0x3c, 0x4e, ++ 0x27, 0x8a, 0x36, 0x90, 0x8c, 0x77, 0x97, 0x25, 0xda, 0x6c, 0x48, 0xc0, 0xe3, 0x59, 0x6f, 0x9c, ++ 0xac, 0x63, 0xab, 0xbc, 0xbb, 0x81, 0x10, 0xa1, 0x94, 0xa7, 0xcb, 0xe3, 0xc6, 0x3d, 0xdd, 0x93, ++ 0xaa, 0x1e, 0x6f, 0x06, 0x0e, 0xe4, 0x00, 0x12, 0x48, 0x28, 0x0a, 0x37, 0x4e, 0x28, 0x11, 0x9c, ++ 0x38, 0x21, 0x4e, 0xdc, 0x41, 0x22, 0xc7, 0x20, 0x2e, 0x91, 0x40, 0xa3, 0xac, 0x39, 0x70, 0x44, ++ 0x5c, 0x2d, 0x24, 0x50, 0xfd, 0xf4, 0xdf, 0xfc, 0xac, 0x7b, 0x76, 0x97, 0x88, 0xdb, 0xf4, 0xfb, ++ 0xaf, 0xaa, 0xf7, 0x5e, 0xbd, 0xf7, 0x6a, 0xe0, 0xea, 0xd1, 0x35, 0x5e, 0xb3, 0xbd, 0x35, 0xd2, ++ 0xb1, 0xdb, 0xa4, 0x79, 0x68, 0xbb, 0x94, 0xf5, 0xd6, 0x3a, 0x47, 0x2d, 0x01, 0xe0, 0x6b, 0x6d, ++ 0xea, 0x93, 0xb5, 0xe3, 0xcb, 0x6b, 0x2d, 0xea, 0x52, 0x46, 0x7c, 0x6a, 0xd5, 0x3a, 0xcc, 0xf3, ++ 0x3d, 0xf4, 0x94, 0xe2, 0xaa, 0xc5, 0xb9, 0x6a, 0x9d, 0xa3, 0x96, 0x00, 0xf0, 0x9a, 0xe0, 0xaa, ++ 0x1d, 0x5f, 0x5e, 0x7e, 0xae, 0x65, 0xfb, 0x87, 0xdd, 0xfd, 0x5a, 0xd3, 0x6b, 0xaf, 0xb5, 0xbc, ++ 0x96, 0xb7, 0x26, 0x99, 0xf7, 0xbb, 0x07, 0xf2, 0x4b, 0x7e, 0xc8, 0x5f, 0x4a, 0xe8, 0xf2, 0xda, ++ 0x38, 0x53, 0x58, 0xd7, 0xf5, 0xed, 0x36, 0x1d, 0xb4, 0x62, 0xf9, 0xf9, 0xb3, 0x18, 0x78, 0xf3, ++ 0x90, 0xb6, 0xc9, 0x20, 0x9f, 0xf9, 0xc7, 0x2c, 0x14, 0xd6, 0x77, 0xb7, 0x6e, 0x32, 0xaf, 0xdb, ++ 0x41, 0xab, 0x90, 0x73, 0x49, 0x9b, 0x56, 0x8c, 0x55, 0xe3, 0x62, 0xb1, 0x3e, 0xfb, 0x71, 0xbf, ++ 0x3a, 0x75, 0xd2, 0xaf, 0xe6, 0x5e, 0x27, 0x6d, 0x8a, 0x25, 0x06, 0x39, 0x50, 0x38, 0xa6, 0x8c, ++ 0xdb, 0x9e, 0xcb, 0x2b, 0x99, 0xd5, 0xec, 0xc5, 0xd2, 0x95, 0x97, 0x6b, 0x69, 0xd6, 0x5f, 0x93, ++ 0x0a, 0xee, 0x2a, 0xd6, 0x4d, 0x8f, 0x35, 0x6c, 0xde, 0xf4, 0x8e, 0x29, 0xeb, 0xd5, 0x17, 0xb4, ++ 0x96, 0x82, 0x46, 0x72, 0x1c, 0x6a, 0x40, 0x3f, 0x34, 0x60, 0xa1, 0xc3, 0xe8, 0x01, 0x65, 0x8c, ++ 0x5a, 0x1a, 0x5f, 0xc9, 0xae, 0x1a, 0x8f, 0x41, 0x6d, 0x45, 0xab, 0x5d, 0xd8, 0x1d, 0x90, 0x8f, ++ 0x87, 0x34, 0xa2, 0x5f, 0x1a, 0xb0, 0xcc, 0x29, 0x3b, 0xa6, 0x6c, 0xdd, 0xb2, 0x18, 0xe5, 0xbc, ++ 0xde, 0xdb, 0x70, 0x6c, 0xea, 0xfa, 0x1b, 0x5b, 0x0d, 0xcc, 0x2b, 0x39, 0xb9, 0x0f, 0x5f, 0x4f, ++ 0x67, 0xd0, 0xde, 0x38, 0x39, 0x75, 0x53, 0x5b, 0xb4, 0x3c, 0x96, 0x84, 0xe3, 0x07, 0x98, 0x61, ++ 0x1e, 0xc0, 0x6c, 0x70, 0x90, 0xb7, 0x6c, 0xee, 0xa3, 0xbb, 0x30, 0xdd, 0x12, 0x1f, 0xbc, 0x62, ++ 0x48, 0x03, 0x6b, 0xe9, 0x0c, 0x0c, 0x64, 0xd4, 0xe7, 0xb4, 0x3d, 0xd3, 0xf2, 0x93, 0x63, 0x2d, ++ 0xcd, 0xfc, 0x49, 0x0e, 0x4a, 0xeb, 0xbb, 0x5b, 0x98, 0x72, 0xaf, 0xcb, 0x9a, 0x34, 0x85, 0xd3, ++ 0x5c, 0x83, 0x59, 0x6e, 0xbb, 0xad, 0xae, 0x43, 0x98, 0x80, 0x56, 0xa6, 0x25, 0xe5, 0x92, 0xa6, ++ 0x9c, 0xdd, 0x8b, 0xe1, 0x70, 0x82, 0x12, 0x5d, 0x01, 0x10, 0x12, 0x78, 0x87, 0x34, 0xa9, 0x55, ++ 0xc9, 0xac, 0x1a, 0x17, 0x0b, 0x75, 0xa4, 0xf9, 0xe0, 0xf5, 0x10, 0x83, 0x63, 0x54, 0xe8, 0x49, ++ 0xc8, 0x4b, 0x4b, 0x2b, 0x05, 0xa9, 0xa6, 0xac, 0xc9, 0xf3, 0x72, 0x19, 0x58, 0xe1, 0xd0, 0x33, ++ 0x30, 0xa3, 0xbd, 0xac, 0x52, 0x94, 0x64, 0xf3, 0x9a, 0x6c, 0x26, 0x70, 0x83, 0x00, 0x2f, 0xd6, ++ 0x77, 0x64, 0xbb, 0x96, 0xf4, 0xbb, 0xd8, 0xfa, 0x5e, 0xb3, 0x5d, 0x0b, 0x4b, 0x0c, 0xba, 0x05, ++ 0xf9, 0x63, 0xca, 0xf6, 0x85, 0x27, 0x08, 0xd7, 0xfc, 0x72, 0xba, 0x8d, 0xbe, 0x2b, 0x58, 0xea, ++ 0x45, 0x61, 0x9a, 0xfc, 0x89, 0x95, 0x10, 0x54, 0x03, 0xe0, 0x87, 0x1e, 0xf3, 0xe5, 0xf2, 0x2a, ++ 0xf9, 0xd5, 0xec, 0xc5, 0x62, 0x7d, 0x4e, 0xac, 0x77, 0x2f, 0x84, 0xe2, 0x18, 0x85, 0xa0, 0x6f, ++ 0x12, 0x9f, 0xb6, 0x3c, 0x66, 0x53, 0x5e, 0x99, 0x89, 0xe8, 0x37, 0x42, 0x28, 0x8e, 0x51, 0xa0, ++ 0x57, 0x01, 0x71, 0xdf, 0x63, 0xa4, 0x45, 0xf5, 0x52, 0x5f, 0x21, 0xfc, 0xb0, 0x02, 0x72, 0x75, ++ 0xcb, 0x7a, 0x75, 0x68, 0x6f, 0x88, 0x02, 0x8f, 0xe0, 0x32, 0x7f, 0x6b, 0xc0, 0x7c, 0xcc, 0x17, ++ 0xa4, 0xdf, 0x5d, 0x83, 0xd9, 0x56, 0x2c, 0xea, 0xb4, 0x5f, 0x84, 0xa7, 0x1d, 0x8f, 0x48, 0x9c, ++ 0xa0, 0x44, 0x14, 0x8a, 0x4c, 0x4b, 0x0a, 0xb2, 0xcb, 0xe5, 0xd4, 0x4e, 0x1b, 0xd8, 0x10, 0x69, ++ 0x8a, 0x01, 0x39, 0x8e, 0x24, 0x9b, 0x7f, 0x37, 0xa4, 0x03, 0x07, 0xf9, 0x06, 0x5d, 0x8c, 0xe5, ++ 0x34, 0x43, 0x6e, 0xdf, 0xec, 0x98, 0x7c, 0x74, 0x46, 0x22, 0xc8, 0xfc, 0x4f, 0x24, 0x82, 0xeb, ++ 0x85, 0x9f, 0x7f, 0x58, 0x9d, 0x7a, 0xef, 0xaf, 0xab, 0x53, 0xe6, 0xcf, 0x0c, 0x98, 0x5d, 0xef, ++ 0x74, 0x9c, 0xde, 0x4e, 0xc7, 0x97, 0x0b, 0x30, 0x61, 0xda, 0x62, 0x3d, 0xdc, 0x75, 0xf5, 0x42, ++ 0x41, 0xc4, 0x77, 0x43, 0x42, 0xb0, 0xc6, 0x88, 0xf8, 0x39, 0xf0, 0x58, 0x93, 0xea, 0x70, 0x0b, ++ 0xe3, 0x67, 0x53, 0x00, 0xb1, 0xc2, 0x89, 0x43, 0x3e, 0xb0, 0xa9, 0x63, 0x6d, 0x13, 0x97, 0xb4, ++ 0x28, 0xd3, 0xc1, 0x11, 0x6e, 0xfd, 0x66, 0x0c, 0x87, 0x13, 0x94, 0xe6, 0xbf, 0x33, 0x50, 0xdc, ++ 0xf0, 0x5c, 0xcb, 0xf6, 0x75, 0x70, 0xf9, 0xbd, 0xce, 0x50, 0xf2, 0xb8, 0xdd, 0xeb, 0x50, 0x2c, ++ 0x31, 0xe8, 0x05, 0x98, 0xe6, 0x3e, 0xf1, 0xbb, 0x5c, 0xda, 0x53, 0xac, 0x3f, 0x11, 0xa4, 0xa5, ++ 0x3d, 0x09, 0x3d, 0xed, 0x57, 0xe7, 0x43, 0x71, 0x0a, 0x84, 0x35, 0x83, 0xf0, 0x74, 0x6f, 0x5f, ++ 0x6e, 0x94, 0x75, 0x53, 0x5d, 0x7b, 0xc1, 0xfd, 0x91, 0x8d, 0x3c, 0x7d, 0x67, 0x88, 0x02, 0x8f, ++ 0xe0, 0x42, 0xc7, 0x80, 0x1c, 0xc2, 0xfd, 0xdb, 0x8c, 0xb8, 0x5c, 0xea, 0xba, 0x6d, 0xb7, 0xa9, ++ 0x0e, 0xf8, 0x2f, 0xa5, 0x3b, 0x71, 0xc1, 0x11, 0xe9, 0xbd, 0x35, 0x24, 0x0d, 0x8f, 0xd0, 0x80, ++ 0x9e, 0x86, 0x69, 0x46, 0x09, 0xf7, 0xdc, 0x4a, 0x5e, 0x2e, 0x3f, 0xcc, 0xca, 0x58, 0x42, 0xb1, ++ 0xc6, 0x8a, 0x84, 0xd6, 0xa6, 0x9c, 0x93, 0x56, 0x90, 0x5e, 0xc3, 0x84, 0xb6, 0xad, 0xc0, 0x38, ++ 0xc0, 0x9b, 0xbf, 0x31, 0xa0, 0xbc, 0xc1, 0x28, 0xf1, 0xe9, 0x24, 0x6e, 0xf1, 0xd0, 0x27, 0x8e, ++ 0xd6, 0x61, 0x5e, 0x7e, 0xdf, 0x25, 0x8e, 0x6d, 0xa9, 0x33, 0xc8, 0x49, 0xe6, 0xff, 0xd7, 0xcc, ++ 0xf3, 0x9b, 0x49, 0x34, 0x1e, 0xa4, 0x37, 0x7f, 0x9d, 0x83, 0x72, 0x83, 0x3a, 0x34, 0x32, 0x79, ++ 0x13, 0x50, 0x8b, 0x91, 0x26, 0xdd, 0xa5, 0xcc, 0xf6, 0xac, 0x3d, 0xda, 0xf4, 0x5c, 0x8b, 0x4b, ++ 0x37, 0xca, 0xd6, 0xff, 0x4f, 0xec, 0xef, 0xcd, 0x21, 0x2c, 0x1e, 0xc1, 0x81, 0x1c, 0x28, 0x77, ++ 0x98, 0xfc, 0x2d, 0xf7, 0x5c, 0x79, 0x59, 0xe9, 0xca, 0x57, 0xd2, 0x1d, 0xe9, 0x6e, 0x9c, 0xb5, ++ 0xbe, 0x78, 0xd2, 0xaf, 0x96, 0x13, 0x20, 0x9c, 0x14, 0x8e, 0xbe, 0x01, 0x0b, 0x1e, 0xeb, 0x1c, ++ 0x12, 0xb7, 0x41, 0x3b, 0xd4, 0xb5, 0xa8, 0xeb, 0x73, 0xb9, 0x91, 0x85, 0xfa, 0x92, 0xa8, 0x45, ++ 0x76, 0x06, 0x70, 0x78, 0x88, 0x1a, 0xbd, 0x09, 0x8b, 0x1d, 0xe6, 0x75, 0x48, 0x4b, 0x6e, 0xcc, ++ 0xae, 0xe7, 0xd8, 0xcd, 0x9e, 0xde, 0xce, 0x67, 0x4f, 0xfa, 0xd5, 0xc5, 0xdd, 0x41, 0xe4, 0x69, ++ 0xbf, 0x7a, 0x4e, 0x6e, 0x9d, 0x80, 0x44, 0x48, 0x3c, 0x2c, 0x26, 0xe6, 0x06, 0xf9, 0xb1, 0x6e, ++ 0xf0, 0xa1, 0x01, 0x97, 0xec, 0x96, 0xeb, 0x31, 0x2a, 0xae, 0x08, 0x8a, 0x29, 0xb1, 0x6e, 0x30, ++ 0xe6, 0xb1, 0x37, 0x6c, 0xff, 0x70, 0xc3, 0xe9, 0x72, 0x9f, 0xb2, 0x3a, 0xa3, 0xe4, 0xc8, 0x76, ++ 0x5b, 0xbb, 0x9e, 0x4f, 0x5d, 0xdf, 0x26, 0x8e, 0xf4, 0xc8, 0x42, 0xfd, 0xea, 0x49, 0xbf, 0x7a, ++ 0x69, 0x6b, 0x42, 0x5e, 0x3c, 0xb1, 0x36, 0x73, 0x0b, 0x0a, 0x8d, 0xae, 0x0e, 0xdb, 0x97, 0xa0, ++ 0x60, 0xe9, 0xdf, 0xda, 0x39, 0x82, 0xfc, 0x11, 0xd2, 0x9c, 0xf6, 0xab, 0x65, 0x51, 0x21, 0xd7, ++ 0x02, 0x00, 0x0e, 0x59, 0xcc, 0x5f, 0x19, 0x50, 0x91, 0xce, 0xb9, 0x47, 0x1d, 0xda, 0xf4, 0x3d, ++ 0x86, 0xe9, 0x3b, 0x5d, 0x9b, 0xd1, 0x36, 0x75, 0x7d, 0xf4, 0x45, 0xc8, 0x1e, 0xd1, 0x9e, 0x4e, ++ 0x5d, 0x25, 0x2d, 0x36, 0xfb, 0x1a, 0xed, 0x61, 0x01, 0x47, 0x37, 0xa0, 0xe0, 0x75, 0x44, 0xfa, ++ 0xf0, 0x98, 0x4e, 0x5d, 0xcf, 0x04, 0xaa, 0x77, 0x34, 0xfc, 0xb4, 0x5f, 0x3d, 0x9f, 0x10, 0x1f, ++ 0x20, 0x70, 0xc8, 0x2a, 0x0e, 0xe5, 0x98, 0x38, 0x5d, 0x2a, 0x1c, 0x25, 0x3c, 0x94, 0xbb, 0x12, ++ 0x82, 0x35, 0xc6, 0x7c, 0x1a, 0x0a, 0x52, 0x0c, 0xbf, 0x7b, 0x19, 0x2d, 0x40, 0x16, 0x93, 0x7b, ++ 0xd2, 0xaa, 0x59, 0x2c, 0x7e, 0xc6, 0xee, 0x83, 0x1d, 0x80, 0x9b, 0xd4, 0x0f, 0x42, 0x68, 0x1d, ++ 0xe6, 0x83, 0x4b, 0x31, 0x79, 0x57, 0x87, 0x71, 0x89, 0x93, 0x68, 0x3c, 0x48, 0x6f, 0xbe, 0x05, ++ 0x45, 0x79, 0x9f, 0x8b, 0x62, 0x28, 0x2a, 0xbc, 0x8c, 0x07, 0x14, 0x5e, 0x41, 0x35, 0x95, 0x19, ++ 0x57, 0x4d, 0xc5, 0xcc, 0x75, 0xa0, 0xac, 0x78, 0x83, 0x52, 0x33, 0x95, 0x86, 0x67, 0xa1, 0x10, ++ 0x98, 0xa9, 0xb5, 0x84, 0x2d, 0x46, 0x20, 0x08, 0x87, 0x14, 0x31, 0x6d, 0x87, 0x90, 0xa8, 0x4d, ++ 0xd2, 0x29, 0x8b, 0xd5, 0x91, 0x99, 0x07, 0xd7, 0x91, 0x31, 0x4d, 0x3f, 0x80, 0xca, 0xb8, 0xbe, ++ 0xe4, 0x11, 0xaa, 0xa7, 0xf4, 0xa6, 0x98, 0xef, 0x1b, 0xb0, 0x10, 0x97, 0x94, 0xfe, 0xf8, 0xd2, ++ 0x2b, 0x39, 0xbb, 0x6e, 0x8e, 0xed, 0xc8, 0x2f, 0x0c, 0x58, 0x4a, 0x2c, 0x6d, 0xa2, 0x13, 0x9f, ++ 0xc0, 0xa8, 0xb8, 0x73, 0x64, 0x27, 0x70, 0x8e, 0x3f, 0x67, 0xa0, 0x7c, 0x8b, 0xec, 0x53, 0x27, ++ 0x88, 0x54, 0xf4, 0x7d, 0x28, 0xb5, 0x89, 0xdf, 0x3c, 0x94, 0xd0, 0xa0, 0xc7, 0x6a, 0xa4, 0xbb, ++ 0x36, 0x12, 0x92, 0x6a, 0xdb, 0x91, 0x98, 0x1b, 0xae, 0xcf, 0x7a, 0xf5, 0x73, 0xda, 0xa4, 0x52, ++ 0x0c, 0x83, 0xe3, 0xda, 0x64, 0x63, 0x2c, 0xbf, 0x6f, 0xbc, 0xdb, 0x11, 0x05, 0xe0, 0xe4, 0xfd, ++ 0x78, 0xc2, 0x84, 0x58, 0x56, 0x8b, 0x1a, 0xe3, 0xed, 0x01, 0xf9, 0x78, 0x48, 0xe3, 0xf2, 0xcb, ++ 0xb0, 0x30, 0x68, 0xbc, 0xc8, 0x3f, 0x61, 0x56, 0x54, 0x89, 0x70, 0x09, 0xf2, 0x32, 0x4f, 0xa9, ++ 0xc3, 0xc1, 0xea, 0xe3, 0x7a, 0xe6, 0x9a, 0x21, 0xd3, 0xeb, 0x38, 0x43, 0x1e, 0x53, 0x7a, 0x4d, ++ 0x88, 0x7f, 0xc8, 0xf4, 0xfa, 0x3b, 0x03, 0x72, 0xb2, 0xb5, 0x79, 0x0b, 0x0a, 0x62, 0xff, 0x2c, ++ 0xe2, 0x13, 0x69, 0x57, 0xea, 0xa6, 0x5a, 0x70, 0x6f, 0x53, 0x9f, 0x44, 0xde, 0x16, 0x40, 0x70, ++ 0x28, 0x11, 0x61, 0xc8, 0xdb, 0x3e, 0x6d, 0x07, 0x07, 0xf9, 0xdc, 0x58, 0xd1, 0x7a, 0xa4, 0x53, ++ 0xc3, 0xe4, 0xde, 0x8d, 0x77, 0x7d, 0xea, 0x8a, 0xc3, 0x88, 0x42, 0x63, 0x4b, 0xc8, 0xc0, 0x4a, ++ 0x94, 0xf9, 0x4f, 0x03, 0x42, 0x55, 0xc2, 0xf9, 0x39, 0x75, 0x0e, 0x6e, 0xd9, 0xee, 0x91, 0xde, ++ 0xd6, 0xd0, 0x9c, 0x3d, 0x0d, 0xc7, 0x21, 0xc5, 0xa8, 0xeb, 0x21, 0x33, 0xd9, 0xf5, 0x20, 0x14, ++ 0x36, 0x3d, 0xd7, 0xb7, 0xdd, 0xee, 0x50, 0xb4, 0x6d, 0x68, 0x38, 0x0e, 0x29, 0x44, 0x49, 0xc7, ++ 0x68, 0x9b, 0xd8, 0xae, 0xed, 0xb6, 0xc4, 0x22, 0x36, 0xbc, 0xae, 0xeb, 0xcb, 0xda, 0x46, 0x97, ++ 0x74, 0x78, 0x08, 0x8b, 0x47, 0x70, 0x98, 0xff, 0xca, 0x41, 0x49, 0xac, 0x39, 0xb8, 0xe7, 0x5e, ++ 0x84, 0xb2, 0x13, 0xf7, 0x02, 0xbd, 0xf6, 0xf3, 0xda, 0x94, 0x64, 0x5c, 0xe3, 0x24, 0xad, 0x60, ++ 0x3e, 0x88, 0xdf, 0xd0, 0x7a, 0x0f, 0x42, 0xe6, 0x64, 0x75, 0x90, 0xa4, 0x15, 0xd9, 0xeb, 0x9e, ++ 0x88, 0x0f, 0x5d, 0xe3, 0x85, 0x47, 0xf4, 0x86, 0x00, 0x62, 0x85, 0x43, 0xdb, 0x70, 0x8e, 0x38, ++ 0x8e, 0x77, 0x4f, 0x02, 0xeb, 0x9e, 0x77, 0xd4, 0x26, 0xec, 0x88, 0xcb, 0xb1, 0x44, 0xa1, 0xfe, ++ 0x05, 0xcd, 0x72, 0x6e, 0x7d, 0x98, 0x04, 0x8f, 0xe2, 0x1b, 0x75, 0x6c, 0xb9, 0x09, 0x8f, 0xed, ++ 0x10, 0x96, 0x06, 0x40, 0x32, 0xca, 0xf5, 0x8c, 0xe0, 0xaa, 0x96, 0xb3, 0x84, 0x47, 0xd0, 0x9c, ++ 0x8e, 0x81, 0xe3, 0x91, 0x12, 0xd1, 0x75, 0x98, 0x13, 0x9e, 0xec, 0x75, 0xfd, 0xa0, 0x82, 0xcf, ++ 0xcb, 0xe3, 0x46, 0x27, 0xfd, 0xea, 0xdc, 0xed, 0x04, 0x06, 0x0f, 0x50, 0x8a, 0xcd, 0x75, 0xec, ++ 0xb6, 0xed, 0x57, 0x66, 0x24, 0x4b, 0xb8, 0xb9, 0xb7, 0x04, 0x10, 0x2b, 0x5c, 0xc2, 0x03, 0x0b, ++ 0x67, 0x7a, 0xe0, 0x06, 0x2c, 0x72, 0xea, 0x5a, 0x5b, 0xae, 0x2d, 0x0a, 0xc9, 0x1b, 0xc7, 0xb2, ++ 0x3e, 0x2f, 0xc9, 0x83, 0x38, 0x2f, 0x8a, 0xeb, 0xbd, 0x41, 0x24, 0x1e, 0xa6, 0x37, 0xff, 0x94, ++ 0x05, 0xa4, 0x5a, 0x1f, 0x4b, 0x15, 0x65, 0x2a, 0x2f, 0x8a, 0x06, 0x4d, 0xb7, 0x4e, 0xc6, 0x40, ++ 0x83, 0xa6, 0xbb, 0xa6, 0x00, 0x8f, 0xb6, 0xa1, 0xa8, 0xf2, 0x53, 0x14, 0x73, 0x6b, 0x9a, 0xb8, ++ 0xb8, 0x13, 0x20, 0x4e, 0xfb, 0xd5, 0xe5, 0x84, 0x9a, 0x10, 0x23, 0x9b, 0xe7, 0x48, 0x02, 0xba, ++ 0x02, 0x40, 0x3a, 0x76, 0x7c, 0x7c, 0x5a, 0x8c, 0x86, 0x68, 0xd1, 0x20, 0x04, 0xc7, 0xa8, 0xd0, ++ 0x2b, 0x90, 0xf3, 0x1f, 0xae, 0xc1, 0x2d, 0xc8, 0xfe, 0x5d, 0xb4, 0xb3, 0x52, 0x82, 0xd0, 0x2e, ++ 0x83, 0x82, 0x0b, 0xb3, 0x74, 0x6f, 0x1a, 0x6a, 0xdf, 0x0c, 0x31, 0x38, 0x46, 0x85, 0xbe, 0x09, ++ 0x85, 0x03, 0x5d, 0xcf, 0xca, 0xd3, 0x4d, 0x9d, 0x67, 0x83, 0x2a, 0x58, 0x4d, 0x70, 0x82, 0x2f, ++ 0x1c, 0x4a, 0x43, 0x5f, 0x85, 0x12, 0xef, 0xee, 0x87, 0x25, 0x80, 0x72, 0x89, 0xf0, 0xbe, 0xdd, ++ 0x8b, 0x50, 0x38, 0x4e, 0x67, 0xbe, 0x03, 0xc5, 0x6d, 0xbb, 0xc9, 0x3c, 0xd9, 0x92, 0x3f, 0x03, ++ 0x33, 0x3c, 0xd1, 0x6f, 0x86, 0x27, 0x19, 0xb8, 0x6a, 0x80, 0x17, 0x3e, 0xea, 0x12, 0xd7, 0x53, ++ 0x5d, 0x65, 0x3e, 0xf2, 0xd1, 0xd7, 0x05, 0x10, 0x2b, 0xdc, 0xf5, 0x25, 0x51, 0x65, 0xfc, 0xf8, ++ 0xa3, 0xea, 0xd4, 0x07, 0x1f, 0x55, 0xa7, 0x3e, 0xfc, 0x48, 0x57, 0x1c, 0xbf, 0x07, 0x80, 0x9d, ++ 0xfd, 0xef, 0xd2, 0xa6, 0xca, 0xdd, 0xa9, 0xa6, 0xac, 0xc1, 0x70, 0x5f, 0x4e, 0x59, 0x33, 0x03, ++ 0x95, 0x63, 0x0c, 0x87, 0x13, 0x94, 0x68, 0x0d, 0x8a, 0xe1, 0xfc, 0x54, 0xfb, 0xc7, 0x62, 0xe0, ++ 0x6f, 0xe1, 0x90, 0x15, 0x47, 0x34, 0x89, 0x8b, 0x24, 0x77, 0xe6, 0x45, 0x52, 0x87, 0x6c, 0xd7, ++ 0xb6, 0xf4, 0xfc, 0xe2, 0x52, 0x70, 0x91, 0xdf, 0xd9, 0x6a, 0x9c, 0xf6, 0xab, 0x4f, 0x8c, 0x7b, ++ 0xb6, 0xf0, 0x7b, 0x1d, 0xca, 0x6b, 0x77, 0xb6, 0x1a, 0x58, 0x30, 0x8f, 0xca, 0x6a, 0xd3, 0x13, ++ 0x66, 0xb5, 0x2b, 0x00, 0xad, 0x68, 0x0a, 0xa4, 0x92, 0x46, 0xe8, 0x88, 0xb1, 0xe9, 0x4f, 0x8c, ++ 0x0a, 0x71, 0x58, 0x6c, 0x32, 0x4a, 0x82, 0x69, 0x0c, 0xf7, 0x49, 0x5b, 0xcd, 0x95, 0x27, 0x8b, ++ 0x89, 0x0b, 0x5a, 0xcd, 0xe2, 0xc6, 0xa0, 0x30, 0x3c, 0x2c, 0x1f, 0x79, 0xb0, 0x68, 0xe9, 0x86, ++ 0x3d, 0x52, 0x5a, 0x9c, 0x58, 0xa9, 0xcc, 0x58, 0x8d, 0x41, 0x41, 0x78, 0x58, 0x36, 0xfa, 0x0e, ++ 0x2c, 0x07, 0xc0, 0xe1, 0xa9, 0x89, 0xcc, 0xfa, 0xd9, 0xfa, 0xca, 0x49, 0xbf, 0xba, 0xdc, 0x18, ++ 0x4b, 0x85, 0x1f, 0x20, 0x01, 0x59, 0x30, 0xed, 0xa8, 0x2a, 0xb9, 0x24, 0x2b, 0x9b, 0xaf, 0xa5, ++ 0x5b, 0x45, 0xe4, 0xfd, 0xb5, 0x78, 0x75, 0x1c, 0x4e, 0xc0, 0x74, 0x61, 0xac, 0x65, 0xa3, 0x77, ++ 0xa1, 0x44, 0x5c, 0xd7, 0xf3, 0x89, 0x9a, 0xe3, 0xcc, 0x4a, 0x55, 0xeb, 0x13, 0xab, 0x5a, 0x8f, ++ 0x64, 0x0c, 0x54, 0xe3, 0x31, 0x0c, 0x8e, 0xab, 0x42, 0xf7, 0x60, 0xde, 0xbb, 0xe7, 0x52, 0x86, ++ 0xe9, 0x01, 0x65, 0xd4, 0x6d, 0x52, 0x5e, 0x29, 0x4b, 0xed, 0x57, 0x53, 0x6a, 0x4f, 0x30, 0x47, ++ 0x2e, 0x9d, 0x84, 0x73, 0x3c, 0xa8, 0x05, 0xd5, 0x44, 0x6e, 0x75, 0x89, 0x63, 0x7f, 0x8f, 0x32, ++ 0x5e, 0x99, 0x8b, 0x46, 0xff, 0x9b, 0x21, 0x14, 0xc7, 0x28, 0x50, 0x17, 0xca, 0xed, 0xf8, 0x95, ++ 0x51, 0x59, 0x94, 0x66, 0x5e, 0x4b, 0x67, 0xe6, 0xf0, 0xa5, 0x16, 0x95, 0x41, 0x09, 0x1c, 0x4e, ++ 0x6a, 0x59, 0x7e, 0x01, 0x4a, 0x0f, 0xd9, 0x21, 0x88, 0x0e, 0x63, 0xf0, 0x40, 0x26, 0xea, 0x30, ++ 0xfe, 0x90, 0x81, 0xb9, 0xe4, 0x36, 0x0e, 0x5c, 0x87, 0xf9, 0x54, 0xd7, 0x61, 0xd0, 0xcb, 0x1a, ++ 0x63, 0xdf, 0x80, 0x82, 0xfc, 0x9c, 0x1d, 0x9b, 0x9f, 0x75, 0x1a, 0xcc, 0x3d, 0x4a, 0x1a, 0xac, ++ 0x01, 0x88, 0x62, 0x85, 0x79, 0x8e, 0x43, 0x99, 0x1e, 0xab, 0xa9, 0xb7, 0x9e, 0x10, 0x8a, 0x63, ++ 0x14, 0xa2, 0xa4, 0xde, 0x77, 0xbc, 0xe6, 0x91, 0xdc, 0x82, 0x20, 0x7a, 0x65, 0xee, 0x2b, 0xa8, ++ 0x92, 0xba, 0x3e, 0x84, 0xc5, 0x23, 0x38, 0xcc, 0x1e, 0x9c, 0xdf, 0x25, 0x4c, 0x14, 0x39, 0x51, ++ 0xa4, 0xc8, 0x9e, 0xe5, 0xed, 0xa1, 0x8e, 0xe8, 0xd2, 0xa4, 0x11, 0x17, 0x6d, 0x7e, 0x04, 0x8b, ++ 0xba, 0x22, 0xf3, 0x2f, 0x06, 0x5c, 0x18, 0xa9, 0xfb, 0x73, 0xe8, 0xc8, 0xde, 0x4e, 0x76, 0x64, ++ 0x2f, 0xa6, 0x1c, 0x0a, 0x8f, 0xb2, 0x76, 0x4c, 0x7f, 0x36, 0x03, 0xf9, 0x5d, 0x51, 0x09, 0x9b, ++ 0x9f, 0x18, 0x30, 0x2b, 0x7f, 0x4d, 0x32, 0x93, 0xaf, 0x26, 0x9f, 0x6a, 0x8a, 0x8f, 0xef, 0x99, ++ 0xe6, 0x71, 0x0c, 0xed, 0xdf, 0x37, 0x20, 0x39, 0x0d, 0x47, 0x2f, 0xab, 0x10, 0x30, 0xc2, 0x71, ++ 0xf5, 0x84, 0xee, 0xff, 0xd2, 0xb8, 0x96, 0xf4, 0x5c, 0xaa, 0x69, 0xe5, 0xb3, 0x50, 0xc4, 0x9e, ++ 0xe7, 0xef, 0x12, 0xff, 0x90, 0x8b, 0xbd, 0xeb, 0x88, 0x1f, 0x7a, 0x7b, 0xe5, 0xde, 0x49, 0x0c, ++ 0x56, 0x70, 0xf3, 0xa7, 0x06, 0x5c, 0x18, 0xfb, 0x02, 0x27, 0xb2, 0x48, 0x33, 0xfc, 0xd2, 0x2b, ++ 0x0a, 0x1d, 0x39, 0xa2, 0xc3, 0x31, 0x2a, 0xd1, 0x4b, 0x26, 0x9e, 0xed, 0x06, 0x7b, 0xc9, 0x84, ++ 0x36, 0x9c, 0xa4, 0x35, 0xff, 0x91, 0x01, 0xfd, 0xe4, 0xf5, 0x5f, 0x76, 0xfa, 0xa7, 0x07, 0x1e, ++ 0xdc, 0xe6, 0x92, 0x0f, 0x6e, 0xe1, 0xeb, 0x5a, 0xec, 0xc5, 0x29, 0xfb, 0xe0, 0x17, 0x27, 0xf4, ++ 0x7c, 0xf8, 0x88, 0xa5, 0x7c, 0x68, 0x25, 0xf9, 0x88, 0x75, 0xda, 0xaf, 0xce, 0x6a, 0xe1, 0xc9, ++ 0x47, 0xad, 0x37, 0x61, 0xc6, 0xa2, 0x3e, 0xb1, 0x1d, 0xd5, 0x17, 0xa6, 0x7e, 0x96, 0x51, 0xc2, ++ 0x1a, 0x8a, 0xb5, 0x5e, 0x12, 0x36, 0xe9, 0x0f, 0x1c, 0x08, 0x14, 0x09, 0xbb, 0xe9, 0x59, 0xaa, ++ 0x23, 0xc9, 0x47, 0x09, 0x7b, 0xc3, 0xb3, 0x28, 0x96, 0x18, 0xf3, 0x03, 0x03, 0x4a, 0x4a, 0xd2, ++ 0x06, 0xe9, 0x72, 0x8a, 0x2e, 0x87, 0xab, 0x50, 0xc7, 0x7d, 0x21, 0xfe, 0x5a, 0x79, 0xda, 0xaf, ++ 0x16, 0x25, 0x99, 0x6c, 0x66, 0x46, 0xbc, 0xca, 0x65, 0xce, 0xd8, 0xa3, 0x27, 0x21, 0x2f, 0x03, ++ 0x48, 0x6f, 0x66, 0xf4, 0xec, 0x2a, 0x80, 0x58, 0xe1, 0xcc, 0xcf, 0x32, 0x50, 0x4e, 0x2c, 0x2e, ++ 0x45, 0x5f, 0x10, 0x8e, 0x50, 0x33, 0x29, 0xc6, 0xf2, 0xe3, 0xff, 0xe4, 0xa0, 0xaf, 0xaf, 0xe9, ++ 0x47, 0xb9, 0xbe, 0xbe, 0x05, 0xd3, 0x4d, 0xb1, 0x47, 0xc1, 0x7f, 0x66, 0x2e, 0x4f, 0x72, 0x9c, ++ 0x72, 0x77, 0x23, 0x6f, 0x94, 0x9f, 0x1c, 0x6b, 0x81, 0xe8, 0x26, 0x2c, 0x32, 0xea, 0xb3, 0xde, ++ 0xfa, 0x81, 0x4f, 0x59, 0x7c, 0x98, 0x90, 0x8f, 0xaa, 0x6f, 0x3c, 0x48, 0x80, 0x87, 0x79, 0xcc, ++ 0x7d, 0x98, 0xbd, 0x4d, 0xf6, 0x9d, 0xf0, 0xa1, 0x11, 0x43, 0xd9, 0x76, 0x9b, 0x4e, 0xd7, 0xa2, ++ 0x2a, 0xa1, 0x07, 0xd9, 0x2b, 0x08, 0xda, 0xad, 0x38, 0xf2, 0xb4, 0x5f, 0x3d, 0x97, 0x00, 0xa8, ++ 0x97, 0x35, 0x9c, 0x14, 0x61, 0x3a, 0x90, 0xfb, 0x1c, 0x3b, 0xc9, 0x6f, 0x43, 0x31, 0xaa, 0xf5, ++ 0x1f, 0xb3, 0x4a, 0xf3, 0x6d, 0x28, 0x08, 0x8f, 0x0f, 0x7a, 0xd4, 0x33, 0xaa, 0xa4, 0x64, 0xed, ++ 0x95, 0x49, 0x53, 0x7b, 0xc9, 0xe7, 0xea, 0x3b, 0x1d, 0xeb, 0x11, 0x9f, 0xab, 0x33, 0x8f, 0x72, ++ 0xf3, 0x65, 0x27, 0xbc, 0xf9, 0xae, 0x80, 0xfa, 0x4b, 0x8f, 0xb8, 0x64, 0x54, 0x01, 0x11, 0xbb, ++ 0x64, 0xe2, 0xf7, 0x7f, 0xec, 0x85, 0xe1, 0x47, 0x06, 0x80, 0x1c, 0xe5, 0xc9, 0x31, 0x52, 0x8a, ++ 0x3f, 0x46, 0xdc, 0x81, 0x69, 0x4f, 0x79, 0xa4, 0x7a, 0xb2, 0x9e, 0x70, 0x5e, 0x1c, 0x06, 0x92, ++ 0xf2, 0x49, 0xac, 0x85, 0xd5, 0x5f, 0xfd, 0xf8, 0xfe, 0xca, 0xd4, 0x27, 0xf7, 0x57, 0xa6, 0x3e, ++ 0xbd, 0xbf, 0x32, 0xf5, 0xde, 0xc9, 0x8a, 0xf1, 0xf1, 0xc9, 0x8a, 0xf1, 0xc9, 0xc9, 0x8a, 0xf1, ++ 0xe9, 0xc9, 0x8a, 0xf1, 0xd9, 0xc9, 0x8a, 0xf1, 0xc1, 0xdf, 0x56, 0xa6, 0xde, 0x7c, 0x2a, 0xcd, ++ 0x5f, 0x25, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xda, 0x63, 0x4c, 0x51, 0x29, 0x00, 0x00, + } + + func (m *APIGroup) Marshal() (dAtA []byte, err error) { +@@ -1954,6 +1986,16 @@ func (m *DeleteOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + _ = i + var l int + _ = l ++ if m.IgnoreStoreReadErrorWithClusterBreakingPotential != nil { ++ i-- ++ if *m.IgnoreStoreReadErrorWithClusterBreakingPotential { ++ dAtA[i] = 1 ++ } else { ++ dAtA[i] = 0 ++ } ++ i-- ++ dAtA[i] = 0x30 ++ } + if len(m.DryRun) > 0 { + for iNdEx := len(m.DryRun) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DryRun[iNdEx]) +@@ -2026,6 +2068,48 @@ func (m *Duration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + return len(dAtA) - i, nil + } + ++func (m *FieldSelectorRequirement) Marshal() (dAtA []byte, err error) { ++ size := m.Size() ++ dAtA = make([]byte, size) ++ n, err := m.MarshalToSizedBuffer(dAtA[:size]) ++ if err != nil { ++ return nil, err ++ } ++ return dAtA[:n], nil ++} ++ ++func (m *FieldSelectorRequirement) MarshalTo(dAtA []byte) (int, error) { ++ size := m.Size() ++ return m.MarshalToSizedBuffer(dAtA[:size]) ++} ++ ++func (m *FieldSelectorRequirement) MarshalToSizedBuffer(dAtA []byte) (int, error) { ++ i := len(dAtA) ++ _ = i ++ var l int ++ _ = l ++ if len(m.Values) > 0 { ++ for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { ++ i -= len(m.Values[iNdEx]) ++ copy(dAtA[i:], m.Values[iNdEx]) ++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Values[iNdEx]))) ++ i-- ++ dAtA[i] = 0x1a ++ } ++ } ++ i -= len(m.Operator) ++ copy(dAtA[i:], m.Operator) ++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator))) ++ i-- ++ dAtA[i] = 0x12 ++ i -= len(m.Key) ++ copy(dAtA[i:], m.Key) ++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) ++ i-- ++ dAtA[i] = 0xa ++ return len(dAtA) - i, nil ++} ++ + func (m *FieldsV1) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) +@@ -3702,6 +3786,9 @@ func (m *DeleteOptions) Size() (n int) { + n += 1 + l + sovGenerated(uint64(l)) + } + } ++ if m.IgnoreStoreReadErrorWithClusterBreakingPotential != nil { ++ n += 2 ++ } + return n + } + +@@ -3715,6 +3802,25 @@ func (m *Duration) Size() (n int) { + return n + } + ++func (m *FieldSelectorRequirement) Size() (n int) { ++ if m == nil { ++ return 0 ++ } ++ var l int ++ _ = l ++ l = len(m.Key) ++ n += 1 + l + sovGenerated(uint64(l)) ++ l = len(m.Operator) ++ n += 1 + l + sovGenerated(uint64(l)) ++ if len(m.Values) > 0 { ++ for _, s := range m.Values { ++ l = len(s) ++ n += 1 + l + sovGenerated(uint64(l)) ++ } ++ } ++ return n ++} ++ + func (m *FieldsV1) Size() (n int) { + if m == nil { + return 0 +@@ -4416,6 +4522,7 @@ func (this *DeleteOptions) String() string { + `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`, + `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`, + `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, ++ `IgnoreStoreReadErrorWithClusterBreakingPotential:` + valueToStringGenerated(this.IgnoreStoreReadErrorWithClusterBreakingPotential) + `,`, + `}`, + }, "") + return s +@@ -4430,6 +4537,18 @@ func (this *Duration) String() string { + }, "") + return s + } ++func (this *FieldSelectorRequirement) String() string { ++ if this == nil { ++ return "nil" ++ } ++ s := strings.Join([]string{`&FieldSelectorRequirement{`, ++ `Key:` + fmt.Sprintf("%v", this.Key) + `,`, ++ `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`, ++ `Values:` + fmt.Sprintf("%v", this.Values) + `,`, ++ `}`, ++ }, "") ++ return s ++} + func (this *GetOptions) String() string { + if this == nil { + return "nil" +@@ -6354,6 +6473,27 @@ func (m *DeleteOptions) Unmarshal(dAtA []byte) error { + } + m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex ++ case 6: ++ if wireType != 0 { ++ return fmt.Errorf("proto: wrong wireType = %d for field IgnoreStoreReadErrorWithClusterBreakingPotential", wireType) ++ } ++ var v int ++ for shift := uint(0); ; shift += 7 { ++ if shift >= 64 { ++ return ErrIntOverflowGenerated ++ } ++ if iNdEx >= l { ++ return io.ErrUnexpectedEOF ++ } ++ b := dAtA[iNdEx] ++ iNdEx++ ++ v |= int(b&0x7F) << shift ++ if b < 0x80 { ++ break ++ } ++ } ++ b := bool(v != 0) ++ m.IgnoreStoreReadErrorWithClusterBreakingPotential = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) +@@ -6444,6 +6584,152 @@ func (m *Duration) Unmarshal(dAtA []byte) error { + } + return nil + } ++func (m *FieldSelectorRequirement) Unmarshal(dAtA []byte) error { ++ l := len(dAtA) ++ iNdEx := 0 ++ for iNdEx < l { ++ preIndex := iNdEx ++ var wire uint64 ++ for shift := uint(0); ; shift += 7 { ++ if shift >= 64 { ++ return ErrIntOverflowGenerated ++ } ++ if iNdEx >= l { ++ return io.ErrUnexpectedEOF ++ } ++ b := dAtA[iNdEx] ++ iNdEx++ ++ wire |= uint64(b&0x7F) << shift ++ if b < 0x80 { ++ break ++ } ++ } ++ fieldNum := int32(wire >> 3) ++ wireType := int(wire & 0x7) ++ if wireType == 4 { ++ return fmt.Errorf("proto: FieldSelectorRequirement: wiretype end group for non-group") ++ } ++ if fieldNum <= 0 { ++ return fmt.Errorf("proto: FieldSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire) ++ } ++ switch fieldNum { ++ case 1: ++ if wireType != 2 { ++ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) ++ } ++ var stringLen uint64 ++ for shift := uint(0); ; shift += 7 { ++ if shift >= 64 { ++ return ErrIntOverflowGenerated ++ } ++ if iNdEx >= l { ++ return io.ErrUnexpectedEOF ++ } ++ b := dAtA[iNdEx] ++ iNdEx++ ++ stringLen |= uint64(b&0x7F) << shift ++ if b < 0x80 { ++ break ++ } ++ } ++ intStringLen := int(stringLen) ++ if intStringLen < 0 { ++ return ErrInvalidLengthGenerated ++ } ++ postIndex := iNdEx + intStringLen ++ if postIndex < 0 { ++ return ErrInvalidLengthGenerated ++ } ++ if postIndex > l { ++ return io.ErrUnexpectedEOF ++ } ++ m.Key = string(dAtA[iNdEx:postIndex]) ++ iNdEx = postIndex ++ case 2: ++ if wireType != 2 { ++ return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) ++ } ++ var stringLen uint64 ++ for shift := uint(0); ; shift += 7 { ++ if shift >= 64 { ++ return ErrIntOverflowGenerated ++ } ++ if iNdEx >= l { ++ return io.ErrUnexpectedEOF ++ } ++ b := dAtA[iNdEx] ++ iNdEx++ ++ stringLen |= uint64(b&0x7F) << shift ++ if b < 0x80 { ++ break ++ } ++ } ++ intStringLen := int(stringLen) ++ if intStringLen < 0 { ++ return ErrInvalidLengthGenerated ++ } ++ postIndex := iNdEx + intStringLen ++ if postIndex < 0 { ++ return ErrInvalidLengthGenerated ++ } ++ if postIndex > l { ++ return io.ErrUnexpectedEOF ++ } ++ m.Operator = FieldSelectorOperator(dAtA[iNdEx:postIndex]) ++ iNdEx = postIndex ++ case 3: ++ if wireType != 2 { ++ return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) ++ } ++ var stringLen uint64 ++ for shift := uint(0); ; shift += 7 { ++ if shift >= 64 { ++ return ErrIntOverflowGenerated ++ } ++ if iNdEx >= l { ++ return io.ErrUnexpectedEOF ++ } ++ b := dAtA[iNdEx] ++ iNdEx++ ++ stringLen |= uint64(b&0x7F) << shift ++ if b < 0x80 { ++ break ++ } ++ } ++ intStringLen := int(stringLen) ++ if intStringLen < 0 { ++ return ErrInvalidLengthGenerated ++ } ++ postIndex := iNdEx + intStringLen ++ if postIndex < 0 { ++ return ErrInvalidLengthGenerated ++ } ++ if postIndex > l { ++ return io.ErrUnexpectedEOF ++ } ++ m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) ++ iNdEx = postIndex ++ default: ++ iNdEx = preIndex ++ skippy, err := skipGenerated(dAtA[iNdEx:]) ++ if err != nil { ++ return err ++ } ++ if (skippy < 0) || (iNdEx+skippy) < 0 { ++ return ErrInvalidLengthGenerated ++ } ++ if (iNdEx + skippy) > l { ++ return io.ErrUnexpectedEOF ++ } ++ iNdEx += skippy ++ } ++ } ++ ++ if iNdEx > l { ++ return io.ErrUnexpectedEOF ++ } ++ return nil ++} + func (m *FieldsV1) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +index a2cd8015..865d3e7c 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +@@ -34,6 +34,7 @@ message APIGroup { + optional string name = 1; + + // versions are the versions supported in this group. ++ // +listType=atomic + repeated GroupVersionForDiscovery versions = 2; + + // preferredVersion is the version preferred by the API server, which +@@ -49,6 +50,7 @@ message APIGroup { + // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. + // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +optional ++ // +listType=atomic + repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4; + } + +@@ -56,6 +58,7 @@ message APIGroup { + // /apis. + message APIGroupList { + // groups is a list of APIGroup. ++ // +listType=atomic + repeated APIGroup groups = 1; + } + +@@ -88,9 +91,11 @@ message APIResource { + optional Verbs verbs = 4; + + // shortNames is a list of suggested short names of the resource. ++ // +listType=atomic + repeated string shortNames = 5; + + // categories is a list of the grouped resources this resource belongs to (e.g. 'all') ++ // +listType=atomic + repeated string categories = 7; + + // The hash value of the storage version, the version this resource is +@@ -112,6 +117,7 @@ message APIResourceList { + optional string groupVersion = 1; + + // resources contains the name of the resources and if they are namespaced. ++ // +listType=atomic + repeated APIResource resources = 2; + } + +@@ -122,6 +128,7 @@ message APIResourceList { + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + message APIVersions { + // versions are the api versions that are available. ++ // +listType=atomic + repeated string versions = 1; + + // a map of client CIDR to server address that is serving this group. +@@ -131,6 +138,7 @@ message APIVersions { + // The server returns only those CIDRs that it thinks that the client can match. + // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. + // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. ++ // +listType=atomic + repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2; + } + +@@ -145,6 +153,7 @@ message ApplyOptions { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + repeated string dryRun = 1; + + // Force is going to "force" Apply requests. It means user will +@@ -235,6 +244,7 @@ message CreateOptions { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + repeated string dryRun = 1; + + // fieldManager is a name associated with the actor or entity +@@ -303,7 +313,23 @@ message DeleteOptions { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + repeated string dryRun = 5; ++ ++ // if set to true, it will trigger an unsafe deletion of the resource in ++ // case the normal deletion flow fails with a corrupt object error. ++ // A resource is considered corrupt if it can not be retrieved from ++ // the underlying storage successfully because of a) its data can ++ // not be transformed e.g. decryption failure, or b) it fails ++ // to decode into an object. ++ // NOTE: unsafe deletion ignores finalizer constraints, skips ++ // precondition checks, and removes the object from the storage. ++ // WARNING: This may potentially break the cluster if the workload ++ // associated with the resource being unsafe-deleted relies on normal ++ // deletion flow. Use only if you REALLY know what you are doing. ++ // The default value is false, and the user must opt in to enable it ++ // +optional ++ optional bool ignoreStoreReadErrorWithClusterBreakingPotential = 6; + } + + // Duration is a wrapper around time.Duration which supports correct +@@ -313,6 +339,25 @@ message Duration { + optional int64 duration = 1; + } + ++// FieldSelectorRequirement is a selector that contains values, a key, and an operator that ++// relates the key and values. ++message FieldSelectorRequirement { ++ // key is the field selector key that the requirement applies to. ++ optional string key = 1; ++ ++ // operator represents a key's relationship to a set of values. ++ // Valid operators are In, NotIn, Exists, DoesNotExist. ++ // The list of operators may grow in the future. ++ optional string operator = 2; ++ ++ // values is an array of string values. ++ // If the operator is In or NotIn, the values array must be non-empty. ++ // If the operator is Exists or DoesNotExist, the values array must be empty. ++ // +optional ++ // +listType=atomic ++ repeated string values = 3; ++} ++ + // FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. + // + // Each key is either a '.' representing the field itself, and will always map to an empty set, +@@ -418,6 +463,7 @@ message LabelSelector { + + // matchExpressions is a list of label selector requirements. The requirements are ANDed. + // +optional ++ // +listType=atomic + repeated LabelSelectorRequirement matchExpressions = 2; + } + +@@ -436,6 +482,7 @@ message LabelSelectorRequirement { + // the values array must be empty. This array is replaced during a strategic + // merge patch. + // +optional ++ // +listType=atomic + repeated string values = 3; + } + +@@ -447,7 +494,7 @@ message List { + optional ListMeta metadata = 1; + + // List of objects +- repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2; ++ repeated .k8s.io.apimachinery.pkg.runtime.RawExtension items = 2; + } + + // ListMeta describes metadata that synthetic resources must have, including lists and +@@ -788,6 +835,8 @@ message ObjectMeta { + // +optional + // +patchMergeKey=uid + // +patchStrategy=merge ++ // +listType=map ++ // +listMapKey=uid + repeated OwnerReference ownerReferences = 13; + + // Must be empty before the object is deleted from the registry. Each entry +@@ -805,6 +854,7 @@ message ObjectMeta { + // are not vulnerable to ordering changes in the list. + // +optional + // +patchStrategy=merge ++ // +listType=set + repeated string finalizers = 14; + + // ManagedFields maps workflow-id and version to the set of fields +@@ -816,6 +866,7 @@ message ObjectMeta { + // workflow used when modifying the object. + // + // +optional ++ // +listType=atomic + repeated ManagedFieldsEntry managedFields = 17; + } + +@@ -890,6 +941,7 @@ message PatchOptions { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + repeated string dryRun = 1; + + // Force is going to "force" Apply requests. It means user will +@@ -943,6 +995,7 @@ message Preconditions { + // For example: "/healthz", "/apis". + message RootPaths { + // paths are the paths available at root. ++ // +listType=atomic + repeated string paths = 1; + } + +@@ -985,6 +1038,7 @@ message Status { + // is not guaranteed to conform to any schema except that defined by + // the reason type. + // +optional ++ // +listType=atomic + optional StatusDetails details = 5; + + // Suggested HTTP return code for this status, 0 if not set. +@@ -1049,6 +1103,7 @@ message StatusDetails { + // The Causes array includes more details associated with the StatusReason + // failure. Not all StatusReasons may provide detailed causes. + // +optional ++ // +listType=atomic + repeated StatusCause causes = 4; + + // If specified, the time in seconds before the operation should be retried. Some errors may indicate +@@ -1135,6 +1190,7 @@ message UpdateOptions { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + repeated string dryRun = 1; + + // fieldManager is a name associated with the actor or entity +@@ -1187,6 +1243,6 @@ message WatchEvent { + // * If Type is Deleted: the state of the object immediately before deletion. + // * If Type is Error: *Status is recommended; other types may make sense + // depending on context. +- optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2; ++ optional .k8s.io.apimachinery.pkg.runtime.RawExtension object = 2; + } + +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go +index 592dcb8a..c748071e 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go +@@ -24,8 +24,10 @@ import ( + + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" ++ cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/types" ++ utiljson "k8s.io/apimachinery/pkg/util/json" + ) + + // LabelSelectorAsSelector converts the LabelSelector api type into a struct that implements +@@ -280,13 +282,20 @@ func (f FieldsV1) MarshalJSON() ([]byte, error) { + if f.Raw == nil { + return []byte("null"), nil + } ++ if f.getContentType() == fieldsV1InvalidOrValidCBORObject { ++ var u map[string]interface{} ++ if err := cbor.Unmarshal(f.Raw, &u); err != nil { ++ return nil, fmt.Errorf("metav1.FieldsV1 cbor invalid: %w", err) ++ } ++ return utiljson.Marshal(u) ++ } + return f.Raw, nil + } + + // UnmarshalJSON implements json.Unmarshaler + func (f *FieldsV1) UnmarshalJSON(b []byte) error { + if f == nil { +- return errors.New("metav1.Fields: UnmarshalJSON on nil pointer") ++ return errors.New("metav1.FieldsV1: UnmarshalJSON on nil pointer") + } + if !bytes.Equal(b, []byte("null")) { + f.Raw = append(f.Raw[0:0], b...) +@@ -296,3 +305,75 @@ func (f *FieldsV1) UnmarshalJSON(b []byte) error { + + var _ json.Marshaler = FieldsV1{} + var _ json.Unmarshaler = &FieldsV1{} ++ ++func (f FieldsV1) MarshalCBOR() ([]byte, error) { ++ if f.Raw == nil { ++ return cbor.Marshal(nil) ++ } ++ if f.getContentType() == fieldsV1InvalidOrValidJSONObject { ++ var u map[string]interface{} ++ if err := utiljson.Unmarshal(f.Raw, &u); err != nil { ++ return nil, fmt.Errorf("metav1.FieldsV1 json invalid: %w", err) ++ } ++ return cbor.Marshal(u) ++ } ++ return f.Raw, nil ++} ++ ++var cborNull = []byte{0xf6} ++ ++func (f *FieldsV1) UnmarshalCBOR(b []byte) error { ++ if f == nil { ++ return errors.New("metav1.FieldsV1: UnmarshalCBOR on nil pointer") ++ } ++ if !bytes.Equal(b, cborNull) { ++ f.Raw = append(f.Raw[0:0], b...) ++ } ++ return nil ++} ++ ++const ( ++ // fieldsV1InvalidOrEmpty indicates that a FieldsV1 either contains no raw bytes or its raw ++ // bytes don't represent an allowable value in any supported encoding. ++ fieldsV1InvalidOrEmpty = iota ++ ++ // fieldsV1InvalidOrValidJSONObject indicates that a FieldV1 either contains raw bytes that ++ // are a valid JSON encoding of an allowable value or don't represent an allowable value in ++ // any supported encoding. ++ fieldsV1InvalidOrValidJSONObject ++ ++ // fieldsV1InvalidOrValidCBORObject indicates that a FieldV1 either contains raw bytes that ++ // are a valid CBOR encoding of an allowable value or don't represent an allowable value in ++ // any supported encoding. ++ fieldsV1InvalidOrValidCBORObject ++) ++ ++// getContentType returns one of fieldsV1InvalidOrEmpty, fieldsV1InvalidOrValidJSONObject, ++// fieldsV1InvalidOrValidCBORObject based on the value of Raw. ++// ++// Raw can be encoded in JSON or CBOR and is only valid if it is empty, null, or an object (map) ++// value. It is invalid if it contains a JSON string, number, boolean, or array. If Raw is nonempty ++// and represents an allowable value, then the initial byte unambiguously distinguishes a ++// JSON-encoded value from a CBOR-encoded value. ++// ++// A valid JSON-encoded value can begin with any of the four JSON whitespace characters, the first ++// character 'n' of null, or '{' (0x09, 0x0a, 0x0d, 0x20, 0x6e, or 0x7b, respectively). A valid ++// CBOR-encoded value can begin with the null simple value, an initial byte with major type "map", ++// or, if a tag-enclosed map, an initial byte with major type "tag" (0xf6, 0xa0...0xbf, or ++// 0xc6...0xdb). The two sets of valid initial bytes don't intersect. ++func (f FieldsV1) getContentType() int { ++ if len(f.Raw) > 0 { ++ p := f.Raw[0] ++ switch p { ++ case 'n', '{', '\t', '\r', '\n', ' ': ++ return fieldsV1InvalidOrValidJSONObject ++ case 0xf6: // null ++ return fieldsV1InvalidOrValidCBORObject ++ default: ++ if p >= 0xa0 && p <= 0xbf /* map */ || p >= 0xc6 && p <= 0xdb /* tag */ { ++ return fieldsV1InvalidOrValidCBORObject ++ } ++ } ++ } ++ return fieldsV1InvalidOrEmpty ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go +index 8eb37f43..9f302b3f 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go +@@ -19,6 +19,8 @@ package v1 + import ( + "encoding/json" + "time" ++ ++ cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" + ) + + const RFC3339Micro = "2006-01-02T15:04:05.000000Z07:00" +@@ -129,6 +131,25 @@ func (t *MicroTime) UnmarshalJSON(b []byte) error { + return nil + } + ++func (t *MicroTime) UnmarshalCBOR(b []byte) error { ++ var s *string ++ if err := cbor.Unmarshal(b, &s); err != nil { ++ return err ++ } ++ if s == nil { ++ t.Time = time.Time{} ++ return nil ++ } ++ ++ parsed, err := time.Parse(RFC3339Micro, *s) ++ if err != nil { ++ return err ++ } ++ ++ t.Time = parsed.Local() ++ return nil ++} ++ + // UnmarshalQueryParameter converts from a URL query parameter value to an object + func (t *MicroTime) UnmarshalQueryParameter(str string) error { + if len(str) == 0 { +@@ -160,6 +181,13 @@ func (t MicroTime) MarshalJSON() ([]byte, error) { + return json.Marshal(t.UTC().Format(RFC3339Micro)) + } + ++func (t MicroTime) MarshalCBOR() ([]byte, error) { ++ if t.IsZero() { ++ return cbor.Marshal(nil) ++ } ++ return cbor.Marshal(t.UTC().Format(RFC3339Micro)) ++} ++ + // OpenAPISchemaType is used by the kube-openapi generator when constructing + // the OpenAPI spec of this type. + // +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go +index 421770d4..0333cfdb 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go +@@ -19,6 +19,8 @@ package v1 + import ( + "encoding/json" + "time" ++ ++ cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" + ) + + // Time is a wrapper around time.Time which supports correct +@@ -116,6 +118,25 @@ func (t *Time) UnmarshalJSON(b []byte) error { + return nil + } + ++func (t *Time) UnmarshalCBOR(b []byte) error { ++ var s *string ++ if err := cbor.Unmarshal(b, &s); err != nil { ++ return err ++ } ++ if s == nil { ++ t.Time = time.Time{} ++ return nil ++ } ++ ++ parsed, err := time.Parse(time.RFC3339, *s) ++ if err != nil { ++ return err ++ } ++ ++ t.Time = parsed.Local() ++ return nil ++} ++ + // UnmarshalQueryParameter converts from a URL query parameter value to an object + func (t *Time) UnmarshalQueryParameter(str string) error { + if len(str) == 0 { +@@ -151,6 +172,14 @@ func (t Time) MarshalJSON() ([]byte, error) { + return buf, nil + } + ++func (t Time) MarshalCBOR() ([]byte, error) { ++ if t.IsZero() { ++ return cbor.Marshal(nil) ++ } ++ ++ return cbor.Marshal(t.UTC().Format(time.RFC3339)) ++} ++ + // ToUnstructured implements the value.UnstructuredConverter interface. + func (t Time) ToUnstructured() interface{} { + if t.IsZero() { +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +index 8a8ff701..4cf3f479 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +@@ -236,6 +236,8 @@ type ObjectMeta struct { + // +optional + // +patchMergeKey=uid + // +patchStrategy=merge ++ // +listType=map ++ // +listMapKey=uid + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` + + // Must be empty before the object is deleted from the registry. Each entry +@@ -253,6 +255,7 @@ type ObjectMeta struct { + // are not vulnerable to ordering changes in the list. + // +optional + // +patchStrategy=merge ++ // +listType=set + Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` + + // Tombstone: ClusterName was a legacy field that was always cleared by +@@ -268,6 +271,7 @@ type ObjectMeta struct { + // workflow used when modifying the object. + // + // +optional ++ // +listType=atomic + ManagedFields []ManagedFieldsEntry `json:"managedFields,omitempty" protobuf:"bytes,17,rep,name=managedFields"` + } + +@@ -428,6 +432,29 @@ type ListOptions struct { + SendInitialEvents *bool `json:"sendInitialEvents,omitempty" protobuf:"varint,11,opt,name=sendInitialEvents"` + } + ++const ( ++ // InitialEventsAnnotationKey the name of the key ++ // under which an annotation marking the end of ++ // a watchlist stream is stored. ++ // ++ // The annotation is added to a "Bookmark" event. ++ InitialEventsAnnotationKey = "k8s.io/initial-events-end" ++ ++ // InitialEventsListBlueprintAnnotationKey is the name of the key ++ // where an empty, versioned list is encoded in the requested format ++ // (e.g., protobuf, JSON, CBOR), then base64-encoded and stored as a string. ++ // ++ // This encoding matches the request encoding format, which may be ++ // protobuf, JSON, CBOR, or others, depending on what the client requested. ++ // This ensures that the reconstructed list can be processed through the ++ // same decoder chain that would handle a standard LIST call response. ++ // ++ // The annotation is added to a "Bookmark" event and is used by clients ++ // to guarantee the format consistency when reconstructing ++ // the list during WatchList processing. ++ InitialEventsListBlueprintAnnotationKey = "kubernetes.io/initial-events-list-blueprint" ++) ++ + // resourceVersionMatch specifies how the resourceVersion parameter is applied. resourceVersionMatch + // may only be set if resourceVersion is also set. + // +@@ -531,7 +558,23 @@ type DeleteOptions struct { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,5,rep,name=dryRun"` ++ ++ // if set to true, it will trigger an unsafe deletion of the resource in ++ // case the normal deletion flow fails with a corrupt object error. ++ // A resource is considered corrupt if it can not be retrieved from ++ // the underlying storage successfully because of a) its data can ++ // not be transformed e.g. decryption failure, or b) it fails ++ // to decode into an object. ++ // NOTE: unsafe deletion ignores finalizer constraints, skips ++ // precondition checks, and removes the object from the storage. ++ // WARNING: This may potentially break the cluster if the workload ++ // associated with the resource being unsafe-deleted relies on normal ++ // deletion flow. Use only if you REALLY know what you are doing. ++ // The default value is false, and the user must opt in to enable it ++ // +optional ++ IgnoreStoreReadErrorWithClusterBreakingPotential *bool `json:"ignoreStoreReadErrorWithClusterBreakingPotential,omitempty" protobuf:"varint,6,opt,name=ignoreStoreReadErrorWithClusterBreakingPotential"` + } + + const ( +@@ -556,6 +599,7 @@ type CreateOptions struct { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` + // +k8s:deprecated=includeUninitialized,protobuf=2 + +@@ -600,6 +644,7 @@ type PatchOptions struct { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` + + // Force is going to "force" Apply requests. It means user will +@@ -651,6 +696,7 @@ type ApplyOptions struct { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` + + // Force is going to "force" Apply requests. It means user will +@@ -683,6 +729,7 @@ type UpdateOptions struct { + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional ++ // +listType=atomic + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` + + // fieldManager is a name associated with the actor or entity +@@ -751,6 +798,7 @@ type Status struct { + // is not guaranteed to conform to any schema except that defined by + // the reason type. + // +optional ++ // +listType=atomic + Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"` + // Suggested HTTP return code for this status, 0 if not set. + // +optional +@@ -784,6 +832,7 @@ type StatusDetails struct { + // The Causes array includes more details associated with the StatusReason + // failure. Not all StatusReasons may provide detailed causes. + // +optional ++ // +listType=atomic + Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"` + // If specified, the time in seconds before the operation should be retried. Some errors may indicate + // the client must take an alternate action - for those errors this field may indicate how long to wait +@@ -882,6 +931,22 @@ const ( + // Status code 500 + StatusReasonServerTimeout StatusReason = "ServerTimeout" + ++ // StatusReasonStoreReadError means that the server encountered an error while ++ // retrieving resources from the backend object store. ++ // This may be due to backend database error, or because processing of the read ++ // resource failed. ++ // Details: ++ // "kind" string - the kind attribute of the resource being acted on. ++ // "name" string - the prefix where the reading error(s) occurred ++ // "causes" []StatusCause ++ // - (optional): ++ // - "type" CauseType - CauseTypeUnexpectedServerResponse ++ // - "message" string - the error message from the store backend ++ // - "field" string - the full path with the key of the resource that failed reading ++ // ++ // Status code 500 ++ StatusReasonStoreReadError StatusReason = "StorageReadError" ++ + // StatusReasonTimeout means that the request could not be completed within the given time. + // Clients can get this response only when they specified a timeout param in the request, + // or if the server cannot complete the operation within a reasonable amount of time. +@@ -1047,6 +1112,7 @@ type List struct { + type APIVersions struct { + TypeMeta `json:",inline"` + // versions are the api versions that are available. ++ // +listType=atomic + Versions []string `json:"versions" protobuf:"bytes,1,rep,name=versions"` + // a map of client CIDR to server address that is serving this group. + // This is to help clients reach servers in the most network-efficient way possible. +@@ -1055,6 +1121,7 @@ type APIVersions struct { + // The server returns only those CIDRs that it thinks that the client can match. + // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. + // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. ++ // +listType=atomic + ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,2,rep,name=serverAddressByClientCIDRs"` + } + +@@ -1065,6 +1132,7 @@ type APIVersions struct { + type APIGroupList struct { + TypeMeta `json:",inline"` + // groups is a list of APIGroup. ++ // +listType=atomic + Groups []APIGroup `json:"groups" protobuf:"bytes,1,rep,name=groups"` + } + +@@ -1077,6 +1145,7 @@ type APIGroup struct { + // name is the name of the group. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // versions are the versions supported in this group. ++ // +listType=atomic + Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"` + // preferredVersion is the version preferred by the API server, which + // probably is the storage version. +@@ -1090,6 +1159,7 @@ type APIGroup struct { + // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. + // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +optional ++ // +listType=atomic + ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs,omitempty" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` + } + +@@ -1134,8 +1204,10 @@ type APIResource struct { + // update, patch, delete, deletecollection, and proxy) + Verbs Verbs `json:"verbs" protobuf:"bytes,4,opt,name=verbs"` + // shortNames is a list of suggested short names of the resource. ++ // +listType=atomic + ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,5,rep,name=shortNames"` + // categories is a list of the grouped resources this resource belongs to (e.g. 'all') ++ // +listType=atomic + Categories []string `json:"categories,omitempty" protobuf:"bytes,7,rep,name=categories"` + // The hash value of the storage version, the version this resource is + // converted to when written to the data store. Value must be treated +@@ -1168,6 +1240,7 @@ type APIResourceList struct { + // groupVersion is the group and version this APIResourceList is for. + GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"` + // resources contains the name of the resources and if they are namespaced. ++ // +listType=atomic + APIResources []APIResource `json:"resources" protobuf:"bytes,2,rep,name=resources"` + } + +@@ -1175,6 +1248,7 @@ type APIResourceList struct { + // For example: "/healthz", "/apis". + type RootPaths struct { + // paths are the paths available at root. ++ // +listType=atomic + Paths []string `json:"paths" protobuf:"bytes,1,rep,name=paths"` + } + +@@ -1218,6 +1292,7 @@ type LabelSelector struct { + MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` + // matchExpressions is a list of label selector requirements. The requirements are ANDed. + // +optional ++ // +listType=atomic + MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` + } + +@@ -1234,6 +1309,7 @@ type LabelSelectorRequirement struct { + // the values array must be empty. This array is replaced during a strategic + // merge patch. + // +optional ++ // +listType=atomic + Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` + } + +@@ -1247,6 +1323,33 @@ const ( + LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" + ) + ++// FieldSelectorRequirement is a selector that contains values, a key, and an operator that ++// relates the key and values. ++type FieldSelectorRequirement struct { ++ // key is the field selector key that the requirement applies to. ++ Key string `json:"key" protobuf:"bytes,1,opt,name=key"` ++ // operator represents a key's relationship to a set of values. ++ // Valid operators are In, NotIn, Exists, DoesNotExist. ++ // The list of operators may grow in the future. ++ Operator FieldSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=FieldSelectorOperator"` ++ // values is an array of string values. ++ // If the operator is In or NotIn, the values array must be non-empty. ++ // If the operator is Exists or DoesNotExist, the values array must be empty. ++ // +optional ++ // +listType=atomic ++ Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` ++} ++ ++// A field selector operator is the set of operators that can be used in a selector requirement. ++type FieldSelectorOperator string ++ ++const ( ++ FieldSelectorOpIn FieldSelectorOperator = "In" ++ FieldSelectorOpNotIn FieldSelectorOperator = "NotIn" ++ FieldSelectorOpExists FieldSelectorOperator = "Exists" ++ FieldSelectorOpDoesNotExist FieldSelectorOperator = "DoesNotExist" ++) ++ + // ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource + // that the fieldset applies to. + type ManagedFieldsEntry struct { +@@ -1335,8 +1438,10 @@ type Table struct { + + // columnDefinitions describes each column in the returned items array. The number of cells per row + // will always match the number of column definitions. ++ // +listType=atomic + ColumnDefinitions []TableColumnDefinition `json:"columnDefinitions"` + // rows is the list of items in the table. ++ // +listType=atomic + Rows []TableRow `json:"rows"` + } + +@@ -1369,12 +1474,14 @@ type TableRow struct { + // cells will be as wide as the column definitions array and may contain strings, numbers (float64 or + // int64), booleans, simple maps, lists, or null. See the type field of the column definition for a + // more detailed description. ++ // +listType=atomic + Cells []interface{} `json:"cells"` + // conditions describe additional status of a row that are relevant for a human user. These conditions + // apply to the row, not to the object, and will be specific to table output. The only defined + // condition type is 'Completed', for a row that indicates a resource that has run to completion and + // can be given less visual priority. + // +optional ++ // +listType=atomic + Conditions []TableRowCondition `json:"conditions,omitempty"` + // This field contains the requested additional information about each object based on the includeObject + // policy when requesting the Table. If "None", this field is empty, if "Object" this will be the +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +index b736e837..405496d3 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +@@ -129,12 +129,24 @@ var map_DeleteOptions = map[string]string{ + "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "propagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", ++ "ignoreStoreReadErrorWithClusterBreakingPotential": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + } + + func (DeleteOptions) SwaggerDoc() map[string]string { + return map_DeleteOptions + } + ++var map_FieldSelectorRequirement = map[string]string{ ++ "": "FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.", ++ "key": "key is the field selector key that the requirement applies to.", ++ "operator": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future.", ++ "values": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.", ++} ++ ++func (FieldSelectorRequirement) SwaggerDoc() map[string]string { ++ return map_FieldSelectorRequirement ++} ++ + var map_FieldsV1 = map[string]string{ + "": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", + } +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go +index 2e33283e..71f7b163 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go +@@ -20,6 +20,7 @@ import ( + gojson "encoding/json" + "fmt" + "io" ++ "math/big" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +@@ -125,6 +126,29 @@ func NestedInt64(obj map[string]interface{}, fields ...string) (int64, bool, err + return i, true, nil + } + ++// NestedNumberAsFloat64 returns the float64 value of a nested field. If the field's value is a ++// float64, it is returned. If the field's value is an int64 that can be losslessly converted to ++// float64, it will be converted and returned. Returns false if value is not found and an error if ++// not a float64 or an int64 that can be accurately represented as a float64. ++func NestedNumberAsFloat64(obj map[string]interface{}, fields ...string) (float64, bool, error) { ++ val, found, err := NestedFieldNoCopy(obj, fields...) ++ if !found || err != nil { ++ return 0, found, err ++ } ++ switch x := val.(type) { ++ case int64: ++ f, accuracy := big.NewInt(x).Float64() ++ if accuracy != big.Exact { ++ return 0, false, fmt.Errorf("%v accessor error: int64 value %v cannot be losslessly converted to float64", jsonPath(fields), x) ++ } ++ return f, true, nil ++ case float64: ++ return x, true, nil ++ default: ++ return 0, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected float64 or int64", jsonPath(fields), val, val) ++ } ++} ++ + // NestedStringSlice returns a copy of []string value of a nested field. + // Returns false if value is not found and an error if not a []interface{} or contains non-string items in the slice. + func NestedStringSlice(obj map[string]interface{}, fields ...string) ([]string, bool, error) { +@@ -173,7 +197,7 @@ func NestedStringMap(obj map[string]interface{}, fields ...string) (map[string]s + if str, ok := v.(string); ok { + strMap[k] = str + } else { +- return nil, false, fmt.Errorf("%v accessor error: contains non-string key in the map: %v is of the type %T, expected string", jsonPath(fields), v, v) ++ return nil, false, fmt.Errorf("%v accessor error: contains non-string value in the map under key %q: %v is of the type %T, expected string", jsonPath(fields), k, v, v) + } + } + return strMap, true, nil +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go +index 40d289f3..5e36a91e 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go +@@ -450,10 +450,14 @@ func (u *Unstructured) SetFinalizers(finalizers []string) { + } + + func (u *Unstructured) GetManagedFields() []metav1.ManagedFieldsEntry { +- items, found, err := NestedSlice(u.Object, "metadata", "managedFields") ++ v, found, err := NestedFieldNoCopy(u.Object, "metadata", "managedFields") + if !found || err != nil { + return nil + } ++ items, ok := v.([]interface{}) ++ if !ok { ++ return nil ++ } + managedFields := []metav1.ManagedFieldsEntry{} + for _, item := range items { + m, ok := item.(map[string]interface{}) +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go +index a0f709ad..b1eb1bbf 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go +@@ -26,12 +26,18 @@ import ( + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/apimachinery/pkg/util/validation/field" ++ ++ "k8s.io/utils/ptr" + ) + + // LabelSelectorValidationOptions is a struct that can be passed to ValidateLabelSelector to record the validate options + type LabelSelectorValidationOptions struct { + // Allow invalid label value in selector + AllowInvalidLabelValueInSelector bool ++ ++ // Allows an operator that is not interpretable to pass validation. This is useful for cases where a broader check ++ // can be performed, as in a *SubjectAccessReview ++ AllowUnknownOperatorInRequirement bool + } + + // LabelSelectorHasInvalidLabelValue returns true if the given selector contains an invalid label value in a match expression. +@@ -79,7 +85,9 @@ func ValidateLabelSelectorRequirement(sr metav1.LabelSelectorRequirement, opts L + allErrs = append(allErrs, field.Forbidden(fldPath.Child("values"), "may not be specified when `operator` is 'Exists' or 'DoesNotExist'")) + } + default: +- allErrs = append(allErrs, field.Invalid(fldPath.Child("operator"), sr.Operator, "not a valid selector operator")) ++ if !opts.AllowUnknownOperatorInRequirement { ++ allErrs = append(allErrs, field.Invalid(fldPath.Child("operator"), sr.Operator, "not a valid selector operator")) ++ } + } + allErrs = append(allErrs, ValidateLabelName(sr.Key, fldPath.Child("key"))...) + if !opts.AllowInvalidLabelValueInSelector { +@@ -113,6 +121,39 @@ func ValidateLabels(labels map[string]string, fldPath *field.Path) field.ErrorLi + return allErrs + } + ++// FieldSelectorValidationOptions is a struct that can be passed to ValidateFieldSelectorRequirement to record the validate options ++type FieldSelectorValidationOptions struct { ++ // Allows an operator that is not interpretable to pass validation. This is useful for cases where a broader check ++ // can be performed, as in a *SubjectAccessReview ++ AllowUnknownOperatorInRequirement bool ++} ++ ++// ValidateLabelSelectorRequirement validates the requirement according to the opts and returns any validation errors. ++func ValidateFieldSelectorRequirement(requirement metav1.FieldSelectorRequirement, opts FieldSelectorValidationOptions, fldPath *field.Path) field.ErrorList { ++ allErrs := field.ErrorList{} ++ ++ if len(requirement.Key) == 0 { ++ allErrs = append(allErrs, field.Required(fldPath.Child("key"), "must be specified")) ++ } ++ ++ switch requirement.Operator { ++ case metav1.FieldSelectorOpIn, metav1.FieldSelectorOpNotIn: ++ if len(requirement.Values) == 0 { ++ allErrs = append(allErrs, field.Required(fldPath.Child("values"), "must be specified when `operator` is 'In' or 'NotIn'")) ++ } ++ case metav1.FieldSelectorOpExists, metav1.FieldSelectorOpDoesNotExist: ++ if len(requirement.Values) > 0 { ++ allErrs = append(allErrs, field.Forbidden(fldPath.Child("values"), "may not be specified when `operator` is 'Exists' or 'DoesNotExist'")) ++ } ++ default: ++ if !opts.AllowUnknownOperatorInRequirement { ++ allErrs = append(allErrs, field.Invalid(fldPath.Child("operator"), requirement.Operator, "not a valid selector operator")) ++ } ++ } ++ ++ return allErrs ++} ++ + func ValidateDeleteOptions(options *metav1.DeleteOptions) field.ErrorList { + allErrs := field.ErrorList{} + //lint:file-ignore SA1019 Keep validation for deprecated OrphanDependents option until it's being removed +@@ -126,6 +167,7 @@ func ValidateDeleteOptions(options *metav1.DeleteOptions) field.ErrorList { + allErrs = append(allErrs, field.NotSupported(field.NewPath("propagationPolicy"), options.PropagationPolicy, []string{string(metav1.DeletePropagationForeground), string(metav1.DeletePropagationBackground), string(metav1.DeletePropagationOrphan), "nil"})) + } + allErrs = append(allErrs, ValidateDryRun(field.NewPath("dryRun"), options.DryRun)...) ++ allErrs = append(allErrs, ValidateIgnoreStoreReadError(field.NewPath("ignoreStoreReadErrorWithClusterBreakingPotential"), options)...) + return allErrs + } + +@@ -147,15 +189,16 @@ func ValidateUpdateOptions(options *metav1.UpdateOptions) field.ErrorList { + + func ValidatePatchOptions(options *metav1.PatchOptions, patchType types.PatchType) field.ErrorList { + allErrs := field.ErrorList{} +- if patchType != types.ApplyPatchType { +- if options.Force != nil { +- allErrs = append(allErrs, field.Forbidden(field.NewPath("force"), "may not be specified for non-apply patch")) +- } +- } else { ++ switch patchType { ++ case types.ApplyYAMLPatchType, types.ApplyCBORPatchType: + if options.FieldManager == "" { + // This field is defaulted to "kubectl" by kubectl, but HAS TO be explicitly set by controllers. + allErrs = append(allErrs, field.Required(field.NewPath("fieldManager"), "is required for apply patch")) + } ++ default: ++ if options.Force != nil { ++ allErrs = append(allErrs, field.Forbidden(field.NewPath("force"), "may not be specified for non-apply patch")) ++ } + } + allErrs = append(allErrs, ValidateFieldManager(options.FieldManager, field.NewPath("fieldManager"))...) + allErrs = append(allErrs, ValidateDryRun(field.NewPath("dryRun"), options.DryRun)...) +@@ -173,7 +216,7 @@ func ValidateFieldManager(fieldManager string, fldPath *field.Path) field.ErrorL + // considered as not set and is defaulted by the rest of the process + // (unless apply is used, in which case it is required). + if len(fieldManager) > FieldManagerMaxLength { +- allErrs = append(allErrs, field.TooLong(fldPath, fieldManager, FieldManagerMaxLength)) ++ allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, FieldManagerMaxLength)) + } + // Verify that all characters are printable. + for i, r := range fieldManager { +@@ -238,7 +281,7 @@ func ValidateManagedFields(fieldsList []metav1.ManagedFieldsEntry, fldPath *fiel + allErrs = append(allErrs, ValidateFieldManager(fields.Manager, fldPath.Child("manager"))...) + + if len(fields.Subresource) > MaxSubresourceNameLength { +- allErrs = append(allErrs, field.TooLong(fldPath.Child("subresource"), fields.Subresource, MaxSubresourceNameLength)) ++ allErrs = append(allErrs, field.TooLong(fldPath.Child("subresource"), "" /*unused*/, MaxSubresourceNameLength)) + } + } + return allErrs +@@ -295,12 +338,12 @@ func ValidateCondition(condition metav1.Condition, fldPath *field.Path) field.Er + allErrs = append(allErrs, field.Invalid(fldPath.Child("reason"), condition.Reason, currErr)) + } + if len(condition.Reason) > maxReasonLen { +- allErrs = append(allErrs, field.TooLong(fldPath.Child("reason"), condition.Reason, maxReasonLen)) ++ allErrs = append(allErrs, field.TooLong(fldPath.Child("reason"), "" /*unused*/, maxReasonLen)) + } + } + + if len(condition.Message) > maxMessageLen { +- allErrs = append(allErrs, field.TooLong(fldPath.Child("message"), condition.Message, maxMessageLen)) ++ allErrs = append(allErrs, field.TooLong(fldPath.Child("message"), "" /*unused*/, maxMessageLen)) + } + + return allErrs +@@ -318,3 +361,31 @@ func isValidConditionReason(value string) []string { + } + return nil + } ++ ++// ValidateIgnoreStoreReadError validates that delete options are valid when ++// ignoreStoreReadErrorWithClusterBreakingPotential is enabled ++func ValidateIgnoreStoreReadError(fldPath *field.Path, options *metav1.DeleteOptions) field.ErrorList { ++ allErrs := field.ErrorList{} ++ if enabled := ptr.Deref[bool](options.IgnoreStoreReadErrorWithClusterBreakingPotential, false); !enabled { ++ return allErrs ++ } ++ ++ if len(options.DryRun) > 0 { ++ allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .dryRun")) ++ } ++ if options.PropagationPolicy != nil { ++ allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .propagationPolicy")) ++ } ++ //nolint:staticcheck // Keep validation for deprecated OrphanDependents option until it's being removed ++ if options.OrphanDependents != nil { ++ allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .orphanDependents")) ++ } ++ if options.GracePeriodSeconds != nil { ++ allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .gracePeriodSeconds")) ++ } ++ if options.Preconditions != nil { ++ allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .preconditions")) ++ } ++ ++ return allErrs ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go +index afe01ed5..82e27224 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go +@@ -339,6 +339,13 @@ func autoConvert_url_Values_To_v1_DeleteOptions(in *url.Values, out *DeleteOptio + } else { + out.DryRun = nil + } ++ if values, ok := map[string][]string(*in)["ignoreStoreReadErrorWithClusterBreakingPotential"]; ok && len(values) > 0 { ++ if err := runtime.Convert_Slice_string_To_Pointer_bool(&values, &out.IgnoreStoreReadErrorWithClusterBreakingPotential, s); err != nil { ++ return err ++ } ++ } else { ++ out.IgnoreStoreReadErrorWithClusterBreakingPotential = nil ++ } + return nil + } + +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go +index 7d29c504..6b0d0dfe 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go +@@ -290,6 +290,11 @@ func (in *DeleteOptions) DeepCopyInto(out *DeleteOptions) { + *out = make([]string, len(*in)) + copy(*out, *in) + } ++ if in.IgnoreStoreReadErrorWithClusterBreakingPotential != nil { ++ in, out := &in.IgnoreStoreReadErrorWithClusterBreakingPotential, &out.IgnoreStoreReadErrorWithClusterBreakingPotential ++ *out = new(bool) ++ **out = **in ++ } + return + } + +@@ -327,6 +332,27 @@ func (in *Duration) DeepCopy() *Duration { + return out + } + ++// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. ++func (in *FieldSelectorRequirement) DeepCopyInto(out *FieldSelectorRequirement) { ++ *out = *in ++ if in.Values != nil { ++ in, out := &in.Values, &out.Values ++ *out = make([]string, len(*in)) ++ copy(*out, *in) ++ } ++ return ++} ++ ++// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FieldSelectorRequirement. ++func (in *FieldSelectorRequirement) DeepCopy() *FieldSelectorRequirement { ++ if in == nil { ++ return nil ++ } ++ out := new(FieldSelectorRequirement) ++ in.DeepCopyInto(out) ++ return out ++} ++ + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. + func (in *FieldsV1) DeepCopyInto(out *FieldsV1) { + *out = *in +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go +index a2abc67c..819d936f 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go +@@ -15,7 +15,7 @@ limitations under the License. + */ + + // Code generated by protoc-gen-gogo. DO NOT EDIT. +-// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto ++// source: k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto + + package v1beta1 + +@@ -47,7 +47,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} } + func (*PartialObjectMetadataList) ProtoMessage() {} + func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) { +- return fileDescriptor_90ec10f86b91f9a8, []int{0} ++ return fileDescriptor_39237a8d8061b52f, []int{0} + } + func (m *PartialObjectMetadataList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -77,31 +77,30 @@ func init() { + } + + func init() { +- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto", fileDescriptor_90ec10f86b91f9a8) ++ proto.RegisterFile("k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto", fileDescriptor_39237a8d8061b52f) + } + +-var fileDescriptor_90ec10f86b91f9a8 = []byte{ +- // 317 bytes of a gzipped FileDescriptorProto ++var fileDescriptor_39237a8d8061b52f = []byte{ ++ // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x4b, 0xf3, 0x30, + 0x1c, 0xc6, 0x9b, 0xf7, 0x65, 0x30, 0x3a, 0x04, 0xd9, 0x69, 0xee, 0x90, 0x0d, 0x4f, 0xdb, 0xc1, +- 0x84, 0x0d, 0x11, 0xc1, 0xdb, 0x6e, 0x82, 0x32, 0xd9, 0x51, 0x3c, 0x98, 0x76, 0x7f, 0xbb, 0x58, +- 0xd3, 0x94, 0xe4, 0xdf, 0x81, 0x37, 0x3f, 0x82, 0x1f, 0x6b, 0xc7, 0x1d, 0x07, 0xc2, 0x70, 0xf5, +- 0x8b, 0x48, 0xda, 0x2a, 0x32, 0x14, 0x7a, 0xeb, 0xf3, 0x94, 0xdf, 0x2f, 0x4f, 0x20, 0xfe, 0x2c, +- 0x3e, 0xb7, 0x4c, 0x6a, 0x1e, 0x67, 0x01, 0x98, 0x04, 0x10, 0x2c, 0x5f, 0x42, 0x32, 0xd7, 0x86, +- 0x57, 0x3f, 0x44, 0x2a, 0x95, 0x08, 0x17, 0x32, 0x01, 0xf3, 0xcc, 0xd3, 0x38, 0x72, 0x85, 0xe5, +- 0x0a, 0x50, 0xf0, 0xe5, 0x28, 0x00, 0x14, 0x23, 0x1e, 0x41, 0x02, 0x46, 0x20, 0xcc, 0x59, 0x6a, +- 0x34, 0xea, 0xf6, 0xb0, 0x44, 0xd9, 0x4f, 0x94, 0xa5, 0x71, 0xe4, 0x0a, 0xcb, 0x1c, 0xca, 0x2a, +- 0xb4, 0x7b, 0x12, 0x49, 0x5c, 0x64, 0x01, 0x0b, 0xb5, 0xe2, 0x91, 0x8e, 0x34, 0x2f, 0x0c, 0x41, +- 0xf6, 0x50, 0xa4, 0x22, 0x14, 0x5f, 0xa5, 0xb9, 0x7b, 0x5a, 0x67, 0xd4, 0xfe, 0x9e, 0xee, 0xd9, +- 0x5f, 0x94, 0xc9, 0x12, 0x94, 0x0a, 0xb8, 0x0d, 0x17, 0xa0, 0xc4, 0x3e, 0x77, 0xfc, 0x46, 0xfc, +- 0xa3, 0x1b, 0x61, 0x50, 0x8a, 0xa7, 0x69, 0xf0, 0x08, 0x21, 0x5e, 0x03, 0x8a, 0xb9, 0x40, 0x71, +- 0x25, 0x2d, 0xb6, 0xef, 0xfc, 0xa6, 0xaa, 0x72, 0xe7, 0x5f, 0x9f, 0x0c, 0x5a, 0x63, 0xc6, 0xea, +- 0x5c, 0x9c, 0x39, 0xda, 0x99, 0x26, 0x87, 0xab, 0x6d, 0xcf, 0xcb, 0xb7, 0xbd, 0xe6, 0x57, 0x33, +- 0xfb, 0x36, 0xb6, 0xef, 0xfd, 0x86, 0x44, 0x50, 0xb6, 0x43, 0xfa, 0xff, 0x07, 0xad, 0xf1, 0x45, +- 0x3d, 0xf5, 0xaf, 0x6b, 0x27, 0x07, 0xd5, 0x39, 0x8d, 0x4b, 0x67, 0x9c, 0x95, 0xe2, 0xc9, 0x74, +- 0xb5, 0xa3, 0xde, 0x7a, 0x47, 0xbd, 0xcd, 0x8e, 0x7a, 0x2f, 0x39, 0x25, 0xab, 0x9c, 0x92, 0x75, +- 0x4e, 0xc9, 0x26, 0xa7, 0xe4, 0x3d, 0xa7, 0xe4, 0xf5, 0x83, 0x7a, 0xb7, 0xc3, 0xda, 0xcf, 0xe0, +- 0x33, 0x00, 0x00, 0xff, 0xff, 0x30, 0x97, 0x8b, 0x11, 0x4b, 0x02, 0x00, 0x00, ++ 0x84, 0x0d, 0x11, 0xc5, 0xdb, 0x6e, 0x82, 0x32, 0xd9, 0x51, 0x3c, 0x98, 0x76, 0x31, 0x8b, 0x35, ++ 0x4d, 0x69, 0xfe, 0x15, 0xbc, 0xf9, 0x11, 0xfc, 0x58, 0x3d, 0xee, 0x38, 0x10, 0x86, 0x8d, 0x5f, ++ 0x44, 0xd2, 0x56, 0x91, 0xa1, 0xd0, 0x5b, 0x9e, 0x07, 0x7e, 0xbf, 0x3c, 0x81, 0xf8, 0x67, 0xd1, ++ 0xa9, 0x21, 0x52, 0x53, 0x96, 0x48, 0xc5, 0xc2, 0x95, 0x8c, 0x79, 0xfa, 0x4c, 0x93, 0x48, 0xb8, ++ 0xc2, 0x50, 0xc5, 0x81, 0xd1, 0xa7, 0x49, 0xc0, 0x81, 0x4d, 0xa8, 0xe0, 0x31, 0x4f, 0x19, 0xf0, ++ 0x25, 0x49, 0x52, 0x0d, 0xba, 0x3b, 0xae, 0x50, 0xf2, 0x13, 0x25, 0x49, 0x24, 0x5c, 0x61, 0x88, ++ 0x43, 0x49, 0x8d, 0xf6, 0x8f, 0x84, 0x84, 0x55, 0x16, 0x90, 0x50, 0x2b, 0x2a, 0xb4, 0xd0, 0xb4, ++ 0x34, 0x04, 0xd9, 0x7d, 0x99, 0xca, 0x50, 0x9e, 0x2a, 0x73, 0xff, 0xb8, 0xc9, 0xa8, 0xdd, 0x3d, ++ 0xfd, 0x93, 0xbf, 0xa8, 0x34, 0x8b, 0x41, 0x2a, 0x4e, 0x4d, 0xb8, 0xe2, 0x8a, 0xed, 0x72, 0x87, ++ 0x6f, 0xc8, 0x3f, 0xb8, 0x66, 0x29, 0x48, 0xf6, 0x38, 0x0f, 0x1e, 0x78, 0x08, 0x57, 0x1c, 0xd8, ++ 0x92, 0x01, 0xbb, 0x94, 0x06, 0xba, 0xb7, 0x7e, 0x5b, 0xd5, 0xb9, 0xf7, 0x6f, 0x88, 0x46, 0x9d, ++ 0x29, 0x21, 0x4d, 0x1e, 0x4e, 0x1c, 0xed, 0x4c, 0xb3, 0xfd, 0x7c, 0x3b, 0xf0, 0xec, 0x76, 0xd0, ++ 0xfe, 0x6a, 0x16, 0xdf, 0xc6, 0xee, 0x9d, 0xdf, 0x92, 0xc0, 0x95, 0xe9, 0xa1, 0xe1, 0xff, 0x51, ++ 0x67, 0x7a, 0xde, 0x4c, 0xfd, 0xeb, 0xda, 0xd9, 0x5e, 0x7d, 0x4f, 0xeb, 0xc2, 0x19, 0x17, 0x95, ++ 0x78, 0x36, 0xcf, 0x0b, 0xec, 0xad, 0x0b, 0xec, 0x6d, 0x0a, 0xec, 0xbd, 0x58, 0x8c, 0x72, 0x8b, ++ 0xd1, 0xda, 0x62, 0xb4, 0xb1, 0x18, 0xbd, 0x5b, 0x8c, 0x5e, 0x3f, 0xb0, 0x77, 0x33, 0x6e, 0xfc, ++ 0x0d, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x0f, 0xd7, 0x36, 0x32, 0x02, 0x00, 0x00, + } + + func (m *PartialObjectMetadataList) Marshal() (dAtA []byte, err error) { +diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto +index d14d4259..fcec5535 100644 +--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto ++++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto +@@ -33,9 +33,9 @@ message PartialObjectMetadataList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional +- optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 2; ++ optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 2; + + // items contains each of the included items. +- repeated k8s.io.apimachinery.pkg.apis.meta.v1.PartialObjectMetadata items = 1; ++ repeated .k8s.io.apimachinery.pkg.apis.meta.v1.PartialObjectMetadata items = 1; + } + +diff --git a/vendor/k8s.io/apimachinery/pkg/labels/selector.go b/vendor/k8s.io/apimachinery/pkg/labels/selector.go +index 5e601424..fafa81a3 100644 +--- a/vendor/k8s.io/apimachinery/pkg/labels/selector.go ++++ b/vendor/k8s.io/apimachinery/pkg/labels/selector.go +@@ -18,6 +18,7 @@ package labels + + import ( + "fmt" ++ "slices" + "sort" + "strconv" + "strings" +@@ -27,7 +28,6 @@ import ( + "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/klog/v2" +- stringslices "k8s.io/utils/strings/slices" + ) + + var ( +@@ -45,6 +45,19 @@ var ( + // Requirements is AND of all requirements. + type Requirements []Requirement + ++func (r Requirements) String() string { ++ var sb strings.Builder ++ ++ for i, requirement := range r { ++ if i > 0 { ++ sb.WriteString(", ") ++ } ++ sb.WriteString(requirement.String()) ++ } ++ ++ return sb.String() ++} ++ + // Selector represents a label selector. + type Selector interface { + // Matches returns true if this selector matches the given set of labels. +@@ -285,6 +298,13 @@ func (r *Requirement) Values() sets.String { + return ret + } + ++// ValuesUnsorted returns a copy of requirement values as passed to NewRequirement without sorting. ++func (r *Requirement) ValuesUnsorted() []string { ++ ret := make([]string, 0, len(r.strValues)) ++ ret = append(ret, r.strValues...) ++ return ret ++} ++ + // Equal checks the equality of requirement. + func (r Requirement) Equal(x Requirement) bool { + if r.key != x.key { +@@ -293,7 +313,7 @@ func (r Requirement) Equal(x Requirement) bool { + if r.operator != x.operator { + return false + } +- return stringslices.Equal(r.strValues, x.strValues) ++ return slices.Equal(r.strValues, x.strValues) + } + + // Empty returns true if the internalSelector doesn't restrict selection space +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/extension.go b/vendor/k8s.io/apimachinery/pkg/runtime/extension.go +index 9056397f..60c000bc 100644 +--- a/vendor/k8s.io/apimachinery/pkg/runtime/extension.go ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/extension.go +@@ -18,16 +18,77 @@ package runtime + + import ( + "bytes" +- "encoding/json" + "errors" ++ "fmt" ++ ++ cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" ++ "k8s.io/apimachinery/pkg/util/json" + ) + ++// RawExtension intentionally avoids implementing value.UnstructuredConverter for now because the ++// signature of ToUnstructured does not allow returning an error value in cases where the conversion ++// is not possible (content type is unrecognized or bytes don't match content type). ++func rawToUnstructured(raw []byte, contentType string) (interface{}, error) { ++ switch contentType { ++ case ContentTypeJSON: ++ var u interface{} ++ if err := json.Unmarshal(raw, &u); err != nil { ++ return nil, fmt.Errorf("failed to parse RawExtension bytes as JSON: %w", err) ++ } ++ return u, nil ++ case ContentTypeCBOR: ++ var u interface{} ++ if err := cbor.Unmarshal(raw, &u); err != nil { ++ return nil, fmt.Errorf("failed to parse RawExtension bytes as CBOR: %w", err) ++ } ++ return u, nil ++ default: ++ return nil, fmt.Errorf("cannot convert RawExtension with unrecognized content type to unstructured") ++ } ++} ++ ++func (re RawExtension) guessContentType() string { ++ switch { ++ case bytes.HasPrefix(re.Raw, cborSelfDescribed): ++ return ContentTypeCBOR ++ case len(re.Raw) > 0: ++ switch re.Raw[0] { ++ case '\t', '\r', '\n', ' ', '{', '[', 'n', 't', 'f', '"', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': ++ // Prefixes for the four whitespace characters, objects, arrays, strings, numbers, true, false, and null. ++ return ContentTypeJSON ++ } ++ } ++ return "" ++} ++ + func (re *RawExtension) UnmarshalJSON(in []byte) error { + if re == nil { + return errors.New("runtime.RawExtension: UnmarshalJSON on nil pointer") + } +- if !bytes.Equal(in, []byte("null")) { +- re.Raw = append(re.Raw[0:0], in...) ++ if bytes.Equal(in, []byte("null")) { ++ return nil ++ } ++ re.Raw = append(re.Raw[0:0], in...) ++ return nil ++} ++ ++var ( ++ cborNull = []byte{0xf6} ++ cborSelfDescribed = []byte{0xd9, 0xd9, 0xf7} ++) ++ ++func (re *RawExtension) UnmarshalCBOR(in []byte) error { ++ if re == nil { ++ return errors.New("runtime.RawExtension: UnmarshalCBOR on nil pointer") ++ } ++ if !bytes.Equal(in, cborNull) { ++ if !bytes.HasPrefix(in, cborSelfDescribed) { ++ // The self-described CBOR tag doesn't change the interpretation of the data ++ // item it encloses, but it is useful as a magic number. Its encoding is ++ // also what is used to implement the CBOR RecognizingDecoder. ++ re.Raw = append(re.Raw[:0], cborSelfDescribed...) ++ } ++ re.Raw = append(re.Raw, in...) + } + return nil + } +@@ -46,6 +107,35 @@ func (re RawExtension) MarshalJSON() ([]byte, error) { + } + return []byte("null"), nil + } +- // TODO: Check whether ContentType is actually JSON before returning it. +- return re.Raw, nil ++ ++ contentType := re.guessContentType() ++ if contentType == ContentTypeJSON { ++ return re.Raw, nil ++ } ++ ++ u, err := rawToUnstructured(re.Raw, contentType) ++ if err != nil { ++ return nil, err ++ } ++ return json.Marshal(u) ++} ++ ++func (re RawExtension) MarshalCBOR() ([]byte, error) { ++ if re.Raw == nil { ++ if re.Object != nil { ++ return cbor.Marshal(re.Object) ++ } ++ return cbor.Marshal(nil) ++ } ++ ++ contentType := re.guessContentType() ++ if contentType == ContentTypeCBOR { ++ return re.Raw, nil ++ } ++ ++ u, err := rawToUnstructured(re.Raw, contentType) ++ if err != nil { ++ return nil, err ++ } ++ return cbor.Marshal(u) + } +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go +index ec677a7d..2e40e140 100644 +--- a/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go +@@ -15,7 +15,7 @@ limitations under the License. + */ + + // Code generated by protoc-gen-gogo. DO NOT EDIT. +-// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto ++// source: k8s.io/apimachinery/pkg/runtime/generated.proto + + package runtime + +@@ -45,7 +45,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + func (m *RawExtension) Reset() { *m = RawExtension{} } + func (*RawExtension) ProtoMessage() {} + func (*RawExtension) Descriptor() ([]byte, []int) { +- return fileDescriptor_9d3c45d7f546725c, []int{0} ++ return fileDescriptor_2e0e4b920403a48c, []int{0} + } + func (m *RawExtension) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -73,7 +73,7 @@ var xxx_messageInfo_RawExtension proto.InternalMessageInfo + func (m *TypeMeta) Reset() { *m = TypeMeta{} } + func (*TypeMeta) ProtoMessage() {} + func (*TypeMeta) Descriptor() ([]byte, []int) { +- return fileDescriptor_9d3c45d7f546725c, []int{1} ++ return fileDescriptor_2e0e4b920403a48c, []int{1} + } + func (m *TypeMeta) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -101,7 +101,7 @@ var xxx_messageInfo_TypeMeta proto.InternalMessageInfo + func (m *Unknown) Reset() { *m = Unknown{} } + func (*Unknown) ProtoMessage() {} + func (*Unknown) Descriptor() ([]byte, []int) { +- return fileDescriptor_9d3c45d7f546725c, []int{2} ++ return fileDescriptor_2e0e4b920403a48c, []int{2} + } + func (m *Unknown) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -133,35 +133,34 @@ func init() { + } + + func init() { +- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptor_9d3c45d7f546725c) +-} +- +-var fileDescriptor_9d3c45d7f546725c = []byte{ +- // 380 bytes of a gzipped FileDescriptorProto +- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0xaa, 0x13, 0x31, +- 0x14, 0xc6, 0x27, 0xb7, 0x85, 0x7b, 0x4d, 0x0b, 0x57, 0xe2, 0xc2, 0xd1, 0x45, 0xe6, 0xd2, 0x95, +- 0x77, 0x61, 0x02, 0x17, 0x04, 0xb7, 0x9d, 0x52, 0x50, 0x44, 0x90, 0xe0, 0x1f, 0x70, 0x65, 0x3a, +- 0x13, 0xa7, 0x61, 0xe8, 0xc9, 0x90, 0x66, 0x1c, 0xbb, 0xf3, 0x11, 0x7c, 0xac, 0x2e, 0xbb, 0xec, +- 0xaa, 0xd8, 0xf1, 0x21, 0xdc, 0x4a, 0xd3, 0xb4, 0x56, 0x5d, 0x74, 0x97, 0x73, 0xbe, 0xef, 0xf7, +- 0x9d, 0x73, 0x20, 0xf8, 0x45, 0xf9, 0x7c, 0xce, 0xb4, 0xe1, 0x65, 0x3d, 0x51, 0x16, 0x94, 0x53, +- 0x73, 0xfe, 0x45, 0x41, 0x6e, 0x2c, 0x0f, 0x82, 0xac, 0xf4, 0x4c, 0x66, 0x53, 0x0d, 0xca, 0x2e, +- 0x78, 0x55, 0x16, 0xdc, 0xd6, 0xe0, 0xf4, 0x4c, 0xf1, 0x42, 0x81, 0xb2, 0xd2, 0xa9, 0x9c, 0x55, +- 0xd6, 0x38, 0x43, 0x92, 0x3d, 0xc0, 0x4e, 0x01, 0x56, 0x95, 0x05, 0x0b, 0xc0, 0xe3, 0xa7, 0x85, +- 0x76, 0xd3, 0x7a, 0xc2, 0x32, 0x33, 0xe3, 0x85, 0x29, 0x0c, 0xf7, 0xdc, 0xa4, 0xfe, 0xec, 0x2b, +- 0x5f, 0xf8, 0xd7, 0x3e, 0x6f, 0x70, 0x8b, 0xfb, 0x42, 0x36, 0xe3, 0xaf, 0x4e, 0xc1, 0x5c, 0x1b, +- 0x20, 0x8f, 0x70, 0xc7, 0xca, 0x26, 0x46, 0x37, 0xe8, 0x49, 0x3f, 0xbd, 0x6c, 0x37, 0x49, 0x47, +- 0xc8, 0x46, 0xec, 0x7a, 0x83, 0x4f, 0xf8, 0xea, 0xed, 0xa2, 0x52, 0xaf, 0x95, 0x93, 0xe4, 0x0e, +- 0x63, 0x59, 0xe9, 0xf7, 0xca, 0xee, 0x20, 0xef, 0xbe, 0x97, 0x92, 0xe5, 0x26, 0x89, 0xda, 0x4d, +- 0x82, 0x87, 0x6f, 0x5e, 0x06, 0x45, 0x9c, 0xb8, 0xc8, 0x0d, 0xee, 0x96, 0x1a, 0xf2, 0xf8, 0xc2, +- 0xbb, 0xfb, 0xc1, 0xdd, 0x7d, 0xa5, 0x21, 0x17, 0x5e, 0x19, 0xfc, 0x42, 0xf8, 0xf2, 0x1d, 0x94, +- 0x60, 0x1a, 0x20, 0x1f, 0xf0, 0x95, 0x0b, 0xd3, 0x7c, 0x7e, 0xef, 0xee, 0x96, 0x9d, 0xb9, 0x9d, +- 0x1d, 0xd6, 0x4b, 0xef, 0x87, 0xf0, 0xe3, 0xc2, 0xe2, 0x18, 0x76, 0xb8, 0xf0, 0xe2, 0xff, 0x0b, +- 0xc9, 0x10, 0x5f, 0x67, 0x06, 0x9c, 0x02, 0x37, 0x86, 0xcc, 0xe4, 0x1a, 0x8a, 0xb8, 0xe3, 0x97, +- 0x7d, 0x18, 0xf2, 0xae, 0x47, 0x7f, 0xcb, 0xe2, 0x5f, 0x3f, 0x79, 0x86, 0x7b, 0xa1, 0xb5, 0x1b, +- 0x1d, 0x77, 0x3d, 0xfe, 0x20, 0xe0, 0xbd, 0xd1, 0x1f, 0x49, 0x9c, 0xfa, 0xd2, 0xf1, 0x72, 0x4b, +- 0xa3, 0xd5, 0x96, 0x46, 0xeb, 0x2d, 0x8d, 0xbe, 0xb5, 0x14, 0x2d, 0x5b, 0x8a, 0x56, 0x2d, 0x45, +- 0xeb, 0x96, 0xa2, 0x1f, 0x2d, 0x45, 0xdf, 0x7f, 0xd2, 0xe8, 0x63, 0x72, 0xe6, 0xb7, 0xfc, 0x0e, +- 0x00, 0x00, 0xff, 0xff, 0x1f, 0x32, 0xd5, 0x68, 0x68, 0x02, 0x00, 0x00, ++ proto.RegisterFile("k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptor_2e0e4b920403a48c) ++} ++ ++var fileDescriptor_2e0e4b920403a48c = []byte{ ++ // 365 bytes of a gzipped FileDescriptorProto ++ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x6b, 0x22, 0x31, ++ 0x18, 0xc6, 0x27, 0x2a, 0xe8, 0x46, 0xc1, 0x25, 0x7b, 0xd8, 0xd9, 0x3d, 0x64, 0xc4, 0xd3, 0x7a, ++ 0xd8, 0x0c, 0x08, 0x85, 0x5e, 0x1d, 0xf1, 0x50, 0x4a, 0xa1, 0x84, 0xfe, 0x81, 0x9e, 0x1a, 0x67, ++ 0xd2, 0x31, 0x0c, 0x26, 0xc3, 0x18, 0x99, 0x7a, 0xeb, 0x47, 0xe8, 0xc7, 0xf2, 0xe8, 0xd1, 0x93, ++ 0xd4, 0xe9, 0x87, 0xe8, 0xb5, 0x18, 0xa3, 0xb5, 0xed, 0xc1, 0x5b, 0xde, 0xf7, 0x79, 0x7e, 0xcf, ++ 0xfb, 0xbe, 0x10, 0xe8, 0x27, 0xa7, 0x13, 0x22, 0x94, 0xcf, 0x52, 0x31, 0x66, 0xe1, 0x48, 0x48, ++ 0x9e, 0xcd, 0xfc, 0x34, 0x89, 0xfd, 0x6c, 0x2a, 0xb5, 0x18, 0x73, 0x3f, 0xe6, 0x92, 0x67, 0x4c, ++ 0xf3, 0x88, 0xa4, 0x99, 0xd2, 0x0a, 0x79, 0x5b, 0x80, 0x1c, 0x02, 0x24, 0x4d, 0x62, 0x62, 0x81, ++ 0xbf, 0xff, 0x63, 0xa1, 0x47, 0xd3, 0x21, 0x09, 0xd5, 0xd8, 0x8f, 0x55, 0xac, 0x7c, 0xc3, 0x0d, ++ 0xa7, 0x0f, 0xa6, 0x32, 0x85, 0x79, 0x6d, 0xf3, 0xda, 0x1d, 0xd8, 0xa0, 0x2c, 0x1f, 0x3c, 0x6a, ++ 0x2e, 0x27, 0x42, 0x49, 0xf4, 0x07, 0x96, 0x33, 0x96, 0xbb, 0xa0, 0x05, 0xfe, 0x35, 0x82, 0x6a, ++ 0xb1, 0xf2, 0xca, 0x94, 0xe5, 0x74, 0xd3, 0x6b, 0xdf, 0xc3, 0xda, 0xd5, 0x2c, 0xe5, 0x17, 0x5c, ++ 0x33, 0xd4, 0x85, 0x90, 0xa5, 0xe2, 0x86, 0x67, 0x1b, 0xc8, 0xb8, 0x7f, 0x04, 0x68, 0xbe, 0xf2, ++ 0x9c, 0x62, 0xe5, 0xc1, 0xde, 0xe5, 0x99, 0x55, 0xe8, 0x81, 0x0b, 0xb5, 0x60, 0x25, 0x11, 0x32, ++ 0x72, 0x4b, 0xc6, 0xdd, 0xb0, 0xee, 0xca, 0xb9, 0x90, 0x11, 0x35, 0x4a, 0xfb, 0x0d, 0xc0, 0xea, ++ 0xb5, 0x4c, 0xa4, 0xca, 0x25, 0xba, 0x85, 0x35, 0x6d, 0xa7, 0x99, 0xfc, 0x7a, 0xb7, 0x43, 0x8e, ++ 0xdc, 0x4e, 0x76, 0xeb, 0x05, 0x3f, 0x6d, 0xf8, 0x7e, 0x61, 0xba, 0x0f, 0xdb, 0x5d, 0x58, 0xfa, ++ 0x7e, 0x21, 0xea, 0xc1, 0x66, 0xa8, 0xa4, 0xe6, 0x52, 0x0f, 0x64, 0xa8, 0x22, 0x21, 0x63, 0xb7, ++ 0x6c, 0x96, 0xfd, 0x6d, 0xf3, 0x9a, 0xfd, 0xcf, 0x32, 0xfd, 0xea, 0x47, 0x27, 0xb0, 0x6e, 0x5b, ++ 0x9b, 0xd1, 0x6e, 0xc5, 0xe0, 0xbf, 0x2c, 0x5e, 0xef, 0x7f, 0x48, 0xf4, 0xd0, 0x17, 0x0c, 0xe6, ++ 0x6b, 0xec, 0x2c, 0xd6, 0xd8, 0x59, 0xae, 0xb1, 0xf3, 0x54, 0x60, 0x30, 0x2f, 0x30, 0x58, 0x14, ++ 0x18, 0x2c, 0x0b, 0x0c, 0x5e, 0x0a, 0x0c, 0x9e, 0x5f, 0xb1, 0x73, 0xe7, 0x1d, 0xf9, 0x2d, 0xef, ++ 0x01, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x9b, 0x09, 0xb3, 0x4f, 0x02, 0x00, 0x00, + } + + func (m *RawExtension) Marshal() (dAtA []byte, err error) { +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/helper.go b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go +index 7bd1a3a6..395dfdbd 100644 +--- a/vendor/k8s.io/apimachinery/pkg/runtime/helper.go ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go +@@ -236,10 +236,14 @@ func (e WithVersionEncoder) Encode(obj Object, stream io.Writer) error { + gvk = preferredGVK + } + } +- kind.SetGroupVersionKind(gvk) +- err = e.Encoder.Encode(obj, stream) +- kind.SetGroupVersionKind(oldGVK) +- return err ++ ++ // The gvk only needs to be set if not already as desired. ++ if gvk != oldGVK { ++ kind.SetGroupVersionKind(gvk) ++ defer kind.SetGroupVersionKind(oldGVK) ++ } ++ ++ return e.Encoder.Encode(obj, stream) + } + + // WithoutVersionDecoder clears the group version kind of a deserialized object. +@@ -257,3 +261,44 @@ func (d WithoutVersionDecoder) Decode(data []byte, defaults *schema.GroupVersion + } + return obj, gvk, err + } ++ ++type encoderWithAllocator struct { ++ encoder EncoderWithAllocator ++ memAllocator MemoryAllocator ++} ++ ++// NewEncoderWithAllocator returns a new encoder ++func NewEncoderWithAllocator(e EncoderWithAllocator, a MemoryAllocator) Encoder { ++ return &encoderWithAllocator{ ++ encoder: e, ++ memAllocator: a, ++ } ++} ++ ++// Encode writes the provided object to the nested writer ++func (e *encoderWithAllocator) Encode(obj Object, w io.Writer) error { ++ return e.encoder.EncodeWithAllocator(obj, w, e.memAllocator) ++} ++ ++// Identifier returns identifier of this encoder. ++func (e *encoderWithAllocator) Identifier() Identifier { ++ return e.encoder.Identifier() ++} ++ ++type nondeterministicEncoderToEncoderAdapter struct { ++ NondeterministicEncoder ++} ++ ++func (e nondeterministicEncoderToEncoderAdapter) Encode(obj Object, w io.Writer) error { ++ return e.EncodeNondeterministic(obj, w) ++} ++ ++// UseNondeterministicEncoding returns an Encoder that encodes objects using the provided Encoder's ++// EncodeNondeterministic method if it implements NondeterministicEncoder, otherwise it returns the ++// provided Encoder as-is. ++func UseNondeterministicEncoding(encoder Encoder) Encoder { ++ if nondeterministic, ok := encoder.(NondeterministicEncoder); ok { ++ return nondeterministicEncoderToEncoderAdapter{nondeterministic} ++ } ++ return encoder ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go +index e89ea893..2703300c 100644 +--- a/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go +@@ -69,6 +69,19 @@ type Encoder interface { + Identifier() Identifier + } + ++// NondeterministicEncoder is implemented by Encoders that can serialize objects more efficiently in ++// cases where the output does not need to be deterministic. ++type NondeterministicEncoder interface { ++ Encoder ++ ++ // EncodeNondeterministic writes an object to the stream. Unlike the Encode method of ++ // Encoder, EncodeNondeterministic does not guarantee that any two invocations will write ++ // the same sequence of bytes to the io.Writer. Any differences will not be significant to a ++ // generic decoder. For example, map entries and struct fields might be encoded in any ++ // order. ++ EncodeNondeterministic(Object, io.Writer) error ++} ++ + // MemoryAllocator is responsible for allocating memory. + // By encapsulating memory allocation into its own interface, we can reuse the memory + // across many operations in places we know it can significantly improve the performance. +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go +index 46b1e787..7a26d279 100644 +--- a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go +@@ -15,7 +15,7 @@ limitations under the License. + */ + + // Code generated by protoc-gen-gogo. DO NOT EDIT. +-// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto ++// source: k8s.io/apimachinery/pkg/runtime/schema/generated.proto + + package schema + +@@ -39,21 +39,20 @@ var _ = math.Inf + const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + + func init() { +- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptor_0462724132518e0d) ++ proto.RegisterFile("k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptor_25f8f0eed21c6089) + } + +-var fileDescriptor_0462724132518e0d = []byte{ +- // 186 bytes of a gzipped FileDescriptorProto +- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xce, 0xad, 0x8e, 0xc3, 0x30, +- 0x0c, 0xc0, 0xf1, 0x84, 0x1e, 0x3c, 0x78, 0xc0, 0xb0, 0xec, 0x62, 0x7a, 0xf8, 0xf0, 0xa4, 0xf1, +- 0xb1, 0xb4, 0xf5, 0xd2, 0x28, 0xca, 0x87, 0xd2, 0x64, 0xd2, 0xd8, 0x1e, 0x61, 0x8f, 0x55, 0x58, +- 0x58, 0xb8, 0x66, 0x2f, 0x32, 0x29, 0x2d, 0x18, 0x1c, 0xf3, 0x5f, 0xd6, 0xcf, 0xf2, 0xd7, 0xd1, +- 0xfc, 0x8d, 0x42, 0x7b, 0x34, 0xb9, 0xa5, 0xe8, 0x28, 0xd1, 0x88, 0x17, 0x72, 0xbd, 0x8f, 0xb8, +- 0x2f, 0x64, 0xd0, 0x56, 0x76, 0x83, 0x76, 0x14, 0xaf, 0x18, 0x8c, 0xc2, 0x98, 0x5d, 0xd2, 0x96, +- 0x70, 0xec, 0x06, 0xb2, 0x12, 0x15, 0x39, 0x8a, 0x32, 0x51, 0x2f, 0x42, 0xf4, 0xc9, 0x7f, 0x37, +- 0x9b, 0x13, 0xef, 0x4e, 0x04, 0xa3, 0xc4, 0xee, 0xc4, 0xe6, 0x7e, 0x7e, 0x95, 0x4e, 0x43, 0x6e, +- 0x45, 0xe7, 0x2d, 0x2a, 0xaf, 0x3c, 0x56, 0xde, 0xe6, 0x73, 0xad, 0x1a, 0x75, 0xda, 0xce, 0xfe, +- 0x1f, 0xa6, 0x15, 0xd8, 0xbc, 0x02, 0x5b, 0x56, 0x60, 0xb7, 0x02, 0x7c, 0x2a, 0xc0, 0xe7, 0x02, +- 0x7c, 0x29, 0xc0, 0x1f, 0x05, 0xf8, 0xfd, 0x09, 0xec, 0xd4, 0x7c, 0xf6, 0xf4, 0x2b, 0x00, 0x00, +- 0xff, 0xff, 0x12, 0xb4, 0xae, 0x48, 0xf6, 0x00, 0x00, 0x00, ++var fileDescriptor_25f8f0eed21c6089 = []byte{ ++ // 170 bytes of a gzipped FileDescriptorProto ++ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xce, 0xa1, 0x0e, 0xc2, 0x30, ++ 0x10, 0xc6, 0xf1, 0xd6, 0x22, 0x91, 0x88, 0x93, 0x73, 0xdc, 0x39, 0x82, 0x46, 0xf3, 0x04, 0xb8, ++ 0x6e, 0x94, 0xae, 0x59, 0xba, 0x6b, 0xba, 0x4e, 0xe0, 0x78, 0x04, 0x1e, 0x6b, 0x72, 0x72, 0x92, ++ 0x95, 0x17, 0x21, 0x69, 0x11, 0x48, 0xdc, 0xfd, 0xc5, 0xef, 0xf2, 0x6d, 0x0e, 0xdd, 0x71, 0x40, ++ 0xcb, 0xa4, 0xbc, 0x75, 0xaa, 0x69, 0x6d, 0xaf, 0xc3, 0x9d, 0x7c, 0x67, 0x28, 0x8c, 0x7d, 0xb4, ++ 0x4e, 0xd3, 0xd0, 0xb4, 0xda, 0x29, 0x32, 0xba, 0xd7, 0x41, 0x45, 0x7d, 0x45, 0x1f, 0x38, 0xf2, ++ 0xb6, 0x2a, 0x0e, 0x7f, 0x1d, 0xfa, 0xce, 0xe0, 0xd7, 0x61, 0x71, 0xbb, 0xbd, 0xb1, 0xb1, 0x1d, ++ 0x6b, 0x6c, 0xd8, 0x91, 0x61, 0xc3, 0x94, 0x79, 0x3d, 0xde, 0x72, 0xe5, 0xc8, 0x57, 0x79, 0x7b, ++ 0x3a, 0x4f, 0x2b, 0x88, 0x79, 0x05, 0xb1, 0xac, 0x20, 0x1e, 0x09, 0xe4, 0x94, 0x40, 0xce, 0x09, ++ 0xe4, 0x92, 0x40, 0xbe, 0x12, 0xc8, 0xe7, 0x1b, 0xc4, 0xa5, 0xfa, 0x6f, 0xf4, 0x27, 0x00, 0x00, ++ 0xff, 0xff, 0x97, 0xb8, 0x4d, 0x1f, 0xdd, 0x00, 0x00, 0x00, + } +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go +new file mode 100644 +index 00000000..a71a487f +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go +@@ -0,0 +1,61 @@ ++/* ++Copyright 2024 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++// Package direct provides functions for marshaling and unmarshaling between arbitrary Go values and ++// CBOR data, with behavior that is compatible with that of the CBOR serializer. In particular, ++// types that implement cbor.Marshaler and cbor.Unmarshaler should use these functions. ++package direct ++ ++import ( ++ "k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes" ++) ++ ++// Marshal serializes a value to CBOR. If there is more than one way to encode the value, it will ++// make the same choice as the CBOR implementation of runtime.Serializer. ++// ++// Note: Support for CBOR is at an alpha stage. If the value (or, for composite types, any of its ++// nested values) implement any of the interfaces encoding.TextMarshaler, encoding.TextUnmarshaler, ++// encoding/json.Marshaler, or encoding/json.Unmarshaler, a non-nil error will be returned unless ++// the value also implements the corresponding CBOR interfaces. This limitation will ultimately be ++// removed in favor of automatic transcoding to CBOR. ++func Marshal(src interface{}) ([]byte, error) { ++ if err := modes.RejectCustomMarshalers(src); err != nil { ++ return nil, err ++ } ++ return modes.Encode.Marshal(src) ++} ++ ++// Unmarshal deserializes from CBOR into an addressable value. If there is more than one way to ++// unmarshal a value, it will make the same choice as the CBOR implementation of runtime.Serializer. ++// ++// Note: Support for CBOR is at an alpha stage. If the value (or, for composite types, any of its ++// nested values) implement any of the interfaces encoding.TextMarshaler, encoding.TextUnmarshaler, ++// encoding/json.Marshaler, or encoding/json.Unmarshaler, a non-nil error will be returned unless ++// the value also implements the corresponding CBOR interfaces. This limitation will ultimately be ++// removed in favor of automatic transcoding to CBOR. ++func Unmarshal(src []byte, dst interface{}) error { ++ if err := modes.RejectCustomMarshalers(dst); err != nil { ++ return err ++ } ++ return modes.Decode.Unmarshal(src, dst) ++} ++ ++// Diagnose accepts well-formed CBOR bytes and returns a string representing the same data item in ++// human-readable diagnostic notation (RFC 8949 Section 8). The diagnostic notation is not meant to ++// be parsed. ++func Diagnose(src []byte) (string, error) { ++ return modes.Diagnostic.Diagnose(src) ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/buffers.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/buffers.go +new file mode 100644 +index 00000000..f14cbd6b +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/buffers.go +@@ -0,0 +1,65 @@ ++/* ++Copyright 2024 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package modes ++ ++import ( ++ "bytes" ++ "sync" ++) ++ ++var buffers = BufferProvider{p: new(sync.Pool)} ++ ++type buffer struct { ++ bytes.Buffer ++} ++ ++type pool interface { ++ Get() interface{} ++ Put(interface{}) ++} ++ ++type BufferProvider struct { ++ p pool ++} ++ ++func (b *BufferProvider) Get() *buffer { ++ if buf, ok := b.p.Get().(*buffer); ok { ++ return buf ++ } ++ return &buffer{} ++} ++ ++func (b *BufferProvider) Put(buf *buffer) { ++ if buf.Cap() > 3*1024*1024 /* Default MaxRequestBodyBytes */ { ++ // Objects in a sync.Pool are assumed to be fungible. This is not a good assumption ++ // for pools of *bytes.Buffer because a *bytes.Buffer's underlying array grows as ++ // needed to accommodate writes. In Kubernetes, apiservers tend to encode "small" ++ // objects very frequently and much larger objects (especially large lists) only ++ // occasionally. Under steady load, pooled buffers tend to be borrowed frequently ++ // enough to prevent them from being released. Over time, each buffer is used to ++ // encode a large object and its capacity increases accordingly. The result is that ++ // practically all buffers in the pool retain much more capacity than needed to ++ // encode most objects. ++ ++ // As a basic mitigation for the worst case, buffers with more capacity than the ++ // default max request body size are never returned to the pool. ++ // TODO: Optimize for higher buffer utilization. ++ return ++ } ++ buf.Reset() ++ b.p.Put(buf) ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/custom.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/custom.go +new file mode 100644 +index 00000000..858529e9 +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/custom.go +@@ -0,0 +1,422 @@ ++/* ++Copyright 2024 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package modes ++ ++import ( ++ "encoding" ++ "encoding/json" ++ "errors" ++ "fmt" ++ "reflect" ++ "sync" ++ ++ "github.com/fxamacker/cbor/v2" ++) ++ ++// Returns a non-nil error if and only if the argument's type (or one of its component types, for ++// composite types) implements json.Marshaler or encoding.TextMarshaler without also implementing ++// cbor.Marshaler and likewise for the respective Unmarshaler interfaces. ++// ++// This is a temporary, graduation-blocking restriction and will be removed in favor of automatic ++// transcoding between CBOR and JSON/text for these types. This restriction allows CBOR to be ++// exercised for in-tree and unstructured types while mitigating the risk of mangling out-of-tree ++// types in client programs. ++func RejectCustomMarshalers(v interface{}) error { ++ if v == nil { ++ return nil ++ } ++ rv := reflect.ValueOf(v) ++ if err := marshalerCache.getChecker(rv.Type()).check(rv, maxDepth); err != nil { ++ return fmt.Errorf("unable to serialize %T: %w", v, err) ++ } ++ if err := unmarshalerCache.getChecker(rv.Type()).check(rv, maxDepth); err != nil { ++ return fmt.Errorf("unable to serialize %T: %w", v, err) ++ } ++ return nil ++} ++ ++// Recursion depth is limited as a basic mitigation against cyclic objects. Objects created by the ++// decoder shouldn't be able to contain cycles, but practically any object can be passed to the ++// encoder. ++var errMaxDepthExceeded = errors.New("object depth exceeds limit (possible cycle?)") ++ ++// The JSON encoder begins detecting cycles after depth 1000. Use a generous limit here, knowing ++// that it can might deeply nested acyclic objects. The limit will be removed along with the rest of ++// this mechanism. ++const maxDepth = 2048 ++ ++var marshalerCache = checkers{ ++ cborInterface: reflect.TypeFor[cbor.Marshaler](), ++ nonCBORInterfaces: []reflect.Type{ ++ reflect.TypeFor[json.Marshaler](), ++ reflect.TypeFor[encoding.TextMarshaler](), ++ }, ++} ++ ++var unmarshalerCache = checkers{ ++ cborInterface: reflect.TypeFor[cbor.Unmarshaler](), ++ nonCBORInterfaces: []reflect.Type{ ++ reflect.TypeFor[json.Unmarshaler](), ++ reflect.TypeFor[encoding.TextUnmarshaler](), ++ }, ++ assumeAddressableValues: true, ++} ++ ++// checker wraps a function for dynamically checking a value of a specific type for custom JSON ++// behaviors not matched by a custom CBOR behavior. ++type checker struct { ++ // check returns a non-nil error if the given value might be marshalled to or from CBOR ++ // using the default behavior for its kind, but marshalled to or from JSON using custom ++ // behavior. ++ check func(rv reflect.Value, depth int) error ++ ++ // safe returns true if all values of this type are safe from mismatched custom marshalers. ++ safe func() bool ++} ++ ++// TODO: stale ++// Having a single addressable checker for comparisons lets us prune and collapse parts of the ++// object traversal that are statically known to be safe. Depending on the type, it may be ++// unnecessary to inspect each value of that type. For example, no value of the built-in type bool ++// can implement json.Marshaler (a named type whose underlying type is bool could, but it is a ++// distinct type from bool). ++var noop = checker{ ++ safe: func() bool { ++ return true ++ }, ++ check: func(rv reflect.Value, depth int) error { ++ return nil ++ }, ++} ++ ++type checkers struct { ++ m sync.Map // reflect.Type => *checker ++ ++ cborInterface reflect.Type ++ nonCBORInterfaces []reflect.Type ++ ++ assumeAddressableValues bool ++} ++ ++func (cache *checkers) getChecker(rt reflect.Type) checker { ++ if ptr, ok := cache.m.Load(rt); ok { ++ return *ptr.(*checker) ++ } ++ ++ return cache.getCheckerInternal(rt, nil) ++} ++ ++// linked list node representing the path from a composite type to an element type ++type path struct { ++ Type reflect.Type ++ Parent *path ++} ++ ++func (p path) cyclic(rt reflect.Type) bool { ++ for ancestor := &p; ancestor != nil; ancestor = ancestor.Parent { ++ if ancestor.Type == rt { ++ return true ++ } ++ } ++ return false ++} ++ ++func (cache *checkers) getCheckerInternal(rt reflect.Type, parent *path) (c checker) { ++ // Store a placeholder cache entry first to handle cyclic types. ++ var wg sync.WaitGroup ++ wg.Add(1) ++ defer wg.Done() ++ c = checker{ ++ safe: func() bool { ++ wg.Wait() ++ return c.safe() ++ }, ++ check: func(rv reflect.Value, depth int) error { ++ wg.Wait() ++ return c.check(rv, depth) ++ }, ++ } ++ if actual, loaded := cache.m.LoadOrStore(rt, &c); loaded { ++ // Someone else stored an entry for this type, use it. ++ return *actual.(*checker) ++ } ++ ++ // Take a nonreflective path for the unstructured container types. They're common and ++ // usually nested inside one another. ++ switch rt { ++ case reflect.TypeFor[map[string]interface{}](), reflect.TypeFor[[]interface{}](): ++ return checker{ ++ safe: func() bool { ++ return false ++ }, ++ check: func(rv reflect.Value, depth int) error { ++ return checkUnstructuredValue(cache, rv.Interface(), depth) ++ }, ++ } ++ } ++ ++ // It's possible that one of the relevant interfaces is implemented on a type with a pointer ++ // receiver, but that a particular value of that type is not addressable. For example: ++ // ++ // func (Foo) MarshalText() ([]byte, error) { ... } ++ // func (*Foo) MarshalCBOR() ([]byte, error) { ... } ++ // ++ // Both methods are in the method set of *Foo, but the method set of Foo contains only ++ // MarshalText. ++ // ++ // Both the unmarshaler and marshaler checks assume that methods implementing a JSON or text ++ // interface with a pointer receiver are always accessible. Only the unmarshaler check ++ // assumes that CBOR methods with pointer receivers are accessible. ++ ++ if rt.Implements(cache.cborInterface) { ++ return noop ++ } ++ for _, unsafe := range cache.nonCBORInterfaces { ++ if rt.Implements(unsafe) { ++ err := fmt.Errorf("%v implements %v without corresponding cbor interface", rt, unsafe) ++ return checker{ ++ safe: func() bool { ++ return false ++ }, ++ check: func(reflect.Value, int) error { ++ return err ++ }, ++ } ++ } ++ } ++ ++ if cache.assumeAddressableValues && reflect.PointerTo(rt).Implements(cache.cborInterface) { ++ return noop ++ } ++ for _, unsafe := range cache.nonCBORInterfaces { ++ if reflect.PointerTo(rt).Implements(unsafe) { ++ err := fmt.Errorf("%v implements %v without corresponding cbor interface", reflect.PointerTo(rt), unsafe) ++ return checker{ ++ safe: func() bool { ++ return false ++ }, ++ check: func(reflect.Value, int) error { ++ return err ++ }, ++ } ++ } ++ } ++ ++ self := &path{Type: rt, Parent: parent} ++ ++ switch rt.Kind() { ++ case reflect.Array: ++ ce := cache.getCheckerInternal(rt.Elem(), self) ++ rtlen := rt.Len() ++ if rtlen == 0 || (!self.cyclic(rt.Elem()) && ce.safe()) { ++ return noop ++ } ++ return checker{ ++ safe: func() bool { ++ return false ++ }, ++ check: func(rv reflect.Value, depth int) error { ++ if depth <= 0 { ++ return errMaxDepthExceeded ++ } ++ for i := 0; i < rtlen; i++ { ++ if err := ce.check(rv.Index(i), depth-1); err != nil { ++ return err ++ } ++ } ++ return nil ++ }, ++ } ++ ++ case reflect.Interface: ++ // All interface values have to be checked because their dynamic type might ++ // implement one of the interesting interfaces or be composed of another type that ++ // does. ++ return checker{ ++ safe: func() bool { ++ return false ++ }, ++ check: func(rv reflect.Value, depth int) error { ++ if rv.IsNil() { ++ return nil ++ } ++ // Unpacking interfaces must count against recursion depth, ++ // consider this cycle: ++ // > var i interface{} ++ // > var p *interface{} = &i ++ // > i = p ++ // > rv := reflect.ValueOf(i) ++ // > for { ++ // > rv = rv.Elem() ++ // > } ++ if depth <= 0 { ++ return errMaxDepthExceeded ++ } ++ rv = rv.Elem() ++ return cache.getChecker(rv.Type()).check(rv, depth-1) ++ }, ++ } ++ ++ case reflect.Map: ++ rtk := rt.Key() ++ ck := cache.getCheckerInternal(rtk, self) ++ rte := rt.Elem() ++ ce := cache.getCheckerInternal(rte, self) ++ if !self.cyclic(rtk) && !self.cyclic(rte) && ck.safe() && ce.safe() { ++ return noop ++ } ++ return checker{ ++ safe: func() bool { ++ return false ++ }, ++ check: func(rv reflect.Value, depth int) error { ++ if depth <= 0 { ++ return errMaxDepthExceeded ++ } ++ iter := rv.MapRange() ++ rvk := reflect.New(rtk).Elem() ++ rve := reflect.New(rte).Elem() ++ for iter.Next() { ++ rvk.SetIterKey(iter) ++ if err := ck.check(rvk, depth-1); err != nil { ++ return err ++ } ++ rve.SetIterValue(iter) ++ if err := ce.check(rve, depth-1); err != nil { ++ return err ++ } ++ } ++ return nil ++ }, ++ } ++ ++ case reflect.Pointer: ++ ce := cache.getCheckerInternal(rt.Elem(), self) ++ if !self.cyclic(rt.Elem()) && ce.safe() { ++ return noop ++ } ++ return checker{ ++ safe: func() bool { ++ return false ++ }, ++ check: func(rv reflect.Value, depth int) error { ++ if rv.IsNil() { ++ return nil ++ } ++ if depth <= 0 { ++ return errMaxDepthExceeded ++ } ++ return ce.check(rv.Elem(), depth-1) ++ }, ++ } ++ ++ case reflect.Slice: ++ ce := cache.getCheckerInternal(rt.Elem(), self) ++ if !self.cyclic(rt.Elem()) && ce.safe() { ++ return noop ++ } ++ return checker{ ++ safe: func() bool { ++ return false ++ }, ++ check: func(rv reflect.Value, depth int) error { ++ if depth <= 0 { ++ return errMaxDepthExceeded ++ } ++ for i := 0; i < rv.Len(); i++ { ++ if err := ce.check(rv.Index(i), depth-1); err != nil { ++ return err ++ } ++ } ++ return nil ++ }, ++ } ++ ++ case reflect.Struct: ++ type field struct { ++ Index int ++ Checker checker ++ } ++ var fields []field ++ for i := 0; i < rt.NumField(); i++ { ++ f := rt.Field(i) ++ cf := cache.getCheckerInternal(f.Type, self) ++ if !self.cyclic(f.Type) && cf.safe() { ++ continue ++ } ++ fields = append(fields, field{Index: i, Checker: cf}) ++ } ++ if len(fields) == 0 { ++ return noop ++ } ++ return checker{ ++ safe: func() bool { ++ return false ++ }, ++ check: func(rv reflect.Value, depth int) error { ++ if depth <= 0 { ++ return errMaxDepthExceeded ++ } ++ for _, fi := range fields { ++ if err := fi.Checker.check(rv.Field(fi.Index), depth-1); err != nil { ++ return err ++ } ++ } ++ return nil ++ }, ++ } ++ ++ default: ++ // Not a serializable composite type (funcs and channels are composite types but are ++ // rejected by JSON and CBOR serialization). ++ return noop ++ ++ } ++} ++ ++func checkUnstructuredValue(cache *checkers, v interface{}, depth int) error { ++ switch v := v.(type) { ++ case nil, bool, int64, float64, string: ++ return nil ++ case []interface{}: ++ if depth <= 0 { ++ return errMaxDepthExceeded ++ } ++ for _, element := range v { ++ if err := checkUnstructuredValue(cache, element, depth-1); err != nil { ++ return err ++ } ++ } ++ return nil ++ case map[string]interface{}: ++ if depth <= 0 { ++ return errMaxDepthExceeded ++ } ++ for _, element := range v { ++ if err := checkUnstructuredValue(cache, element, depth-1); err != nil { ++ return err ++ } ++ } ++ return nil ++ default: ++ // Unmarshaling an unstructured doesn't use other dynamic types, but nothing ++ // prevents inserting values with arbitrary dynamic types into unstructured content, ++ // as long as they can be marshalled. ++ rv := reflect.ValueOf(v) ++ return cache.getChecker(rv.Type()).check(rv, depth) ++ } ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/decode.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/decode.go +new file mode 100644 +index 00000000..895b0def +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/decode.go +@@ -0,0 +1,158 @@ ++/* ++Copyright 2024 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package modes ++ ++import ( ++ "reflect" ++ ++ "github.com/fxamacker/cbor/v2" ++) ++ ++var simpleValues *cbor.SimpleValueRegistry = func() *cbor.SimpleValueRegistry { ++ var opts []func(*cbor.SimpleValueRegistry) error ++ for sv := 0; sv <= 255; sv++ { ++ // Reject simple values 0-19, 23, and 32-255. The simple values 24-31 are reserved ++ // and considered ill-formed by the CBOR specification. We only accept false (20), ++ // true (21), and null (22). ++ switch sv { ++ case 20: // false ++ case 21: // true ++ case 22: // null ++ case 24, 25, 26, 27, 28, 29, 30, 31: // reserved ++ default: ++ opts = append(opts, cbor.WithRejectedSimpleValue(cbor.SimpleValue(sv))) ++ } ++ } ++ simpleValues, err := cbor.NewSimpleValueRegistryFromDefaults(opts...) ++ if err != nil { ++ panic(err) ++ } ++ return simpleValues ++}() ++ ++var Decode cbor.DecMode = func() cbor.DecMode { ++ decode, err := cbor.DecOptions{ ++ // Maps with duplicate keys are well-formed but invalid according to the CBOR spec ++ // and never acceptable. Unlike the JSON serializer, inputs containing duplicate map ++ // keys are rejected outright and not surfaced as a strict decoding error. ++ DupMapKey: cbor.DupMapKeyEnforcedAPF, ++ ++ // For JSON parity, decoding an RFC3339 string into time.Time needs to be accepted ++ // with or without tagging. If a tag number is present, it must be valid. ++ TimeTag: cbor.DecTagOptional, ++ ++ // Observed depth up to 16 in fuzzed batch/v1 CronJobList. JSON implementation limit ++ // is 10000. ++ MaxNestedLevels: 64, ++ ++ MaxArrayElements: 1024, ++ MaxMapPairs: 1024, ++ ++ // Indefinite-length sequences aren't produced by this serializer, but other ++ // implementations can. ++ IndefLength: cbor.IndefLengthAllowed, ++ ++ // Accept inputs that contain CBOR tags. ++ TagsMd: cbor.TagsAllowed, ++ ++ // Decode type 0 (unsigned integer) as int64. ++ // TODO: IntDecConvertSignedOrFail errors on overflow, JSON will try to fall back to float64. ++ IntDec: cbor.IntDecConvertSignedOrFail, ++ ++ // Disable producing map[cbor.ByteString]interface{}, which is not acceptable for ++ // decodes into interface{}. ++ MapKeyByteString: cbor.MapKeyByteStringForbidden, ++ ++ // Error on map keys that don't map to a field in the destination struct. ++ ExtraReturnErrors: cbor.ExtraDecErrorUnknownField, ++ ++ // Decode maps into concrete type map[string]interface{} when the destination is an ++ // interface{}. ++ DefaultMapType: reflect.TypeOf(map[string]interface{}(nil)), ++ ++ // A CBOR text string whose content is not a valid UTF-8 sequence is well-formed but ++ // invalid according to the CBOR spec. Reject invalid inputs. Encoders are ++ // responsible for ensuring that all text strings they produce contain valid UTF-8 ++ // sequences and may use the byte string major type to encode strings that have not ++ // been validated. ++ UTF8: cbor.UTF8RejectInvalid, ++ ++ // Never make a case-insensitive match between a map key and a struct field. ++ FieldNameMatching: cbor.FieldNameMatchingCaseSensitive, ++ ++ // Produce string concrete values when decoding a CBOR byte string into interface{}. ++ DefaultByteStringType: reflect.TypeOf(""), ++ ++ // Allow CBOR byte strings to be decoded into string destination values. If a byte ++ // string is enclosed in an "expected later encoding" tag ++ // (https://www.rfc-editor.org/rfc/rfc8949.html#section-3.4.5.2), then the text ++ // encoding indicated by that tag (e.g. base64) will be applied to the contents of ++ // the byte string. ++ ByteStringToString: cbor.ByteStringToStringAllowedWithExpectedLaterEncoding, ++ ++ // Allow CBOR byte strings to match struct fields when appearing as a map key. ++ FieldNameByteString: cbor.FieldNameByteStringAllowed, ++ ++ // When decoding an unrecognized tag to interface{}, return the decoded tag content ++ // instead of the default, a cbor.Tag representing a (number, content) pair. ++ UnrecognizedTagToAny: cbor.UnrecognizedTagContentToAny, ++ ++ // Decode time tags to interface{} as strings containing RFC 3339 timestamps. ++ TimeTagToAny: cbor.TimeTagToRFC3339Nano, ++ ++ // For parity with JSON, strings can be decoded into time.Time if they are RFC 3339 ++ // timestamps. ++ ByteStringToTime: cbor.ByteStringToTimeAllowed, ++ ++ // Reject NaN and infinite floating-point values since they don't have a JSON ++ // representation (RFC 8259 Section 6). ++ NaN: cbor.NaNDecodeForbidden, ++ Inf: cbor.InfDecodeForbidden, ++ ++ // When unmarshaling a byte string into a []byte, assume that the byte string ++ // contains base64-encoded bytes, unless explicitly counterindicated by an "expected ++ // later encoding" tag. This is consistent with the because of unmarshaling a JSON ++ // text into a []byte. ++ ByteStringExpectedFormat: cbor.ByteStringExpectedBase64, ++ ++ // Reject the arbitrary-precision integer tags because they can't be faithfully ++ // roundtripped through the allowable Unstructured types. ++ BignumTag: cbor.BignumTagForbidden, ++ ++ // Reject anything other than the simple values true, false, and null. ++ SimpleValues: simpleValues, ++ ++ // Disable default recognition of types implementing encoding.BinaryUnmarshaler, ++ // which is not recognized for JSON decoding. ++ BinaryUnmarshaler: cbor.BinaryUnmarshalerNone, ++ }.DecMode() ++ if err != nil { ++ panic(err) ++ } ++ return decode ++}() ++ ++// DecodeLax is derived from Decode, but does not complain about unknown fields in the input. ++var DecodeLax cbor.DecMode = func() cbor.DecMode { ++ opts := Decode.DecOptions() ++ opts.ExtraReturnErrors &^= cbor.ExtraDecErrorUnknownField // clear bit ++ dm, err := opts.DecMode() ++ if err != nil { ++ panic(err) ++ } ++ return dm ++}() +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/diagnostic.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/diagnostic.go +new file mode 100644 +index 00000000..61f3f145 +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/diagnostic.go +@@ -0,0 +1,36 @@ ++/* ++Copyright 2024 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package modes ++ ++import ( ++ "github.com/fxamacker/cbor/v2" ++) ++ ++var Diagnostic cbor.DiagMode = func() cbor.DiagMode { ++ opts := Decode.DecOptions() ++ diagnostic, err := cbor.DiagOptions{ ++ ByteStringText: true, ++ ++ MaxNestedLevels: opts.MaxNestedLevels, ++ MaxArrayElements: opts.MaxArrayElements, ++ MaxMapPairs: opts.MaxMapPairs, ++ }.DiagMode() ++ if err != nil { ++ panic(err) ++ } ++ return diagnostic ++}() +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode.go +new file mode 100644 +index 00000000..5fae1415 +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode.go +@@ -0,0 +1,155 @@ ++/* ++Copyright 2024 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package modes ++ ++import ( ++ "io" ++ ++ "github.com/fxamacker/cbor/v2" ++) ++ ++var Encode = EncMode{ ++ delegate: func() cbor.UserBufferEncMode { ++ encode, err := cbor.EncOptions{ ++ // Map keys need to be sorted to have deterministic output, and this is the order ++ // defined in RFC 8949 4.2.1 "Core Deterministic Encoding Requirements". ++ Sort: cbor.SortBytewiseLexical, ++ ++ // CBOR supports distinct types for IEEE-754 float16, float32, and float64. Store ++ // floats in the smallest width that preserves value so that equivalent float32 and ++ // float64 values encode to identical bytes, as they do in a JSON ++ // encoding. Satisfies one of the "Core Deterministic Encoding Requirements". ++ ShortestFloat: cbor.ShortestFloat16, ++ ++ // Error on attempt to encode NaN and infinite values. This is what the JSON ++ // serializer does. ++ NaNConvert: cbor.NaNConvertReject, ++ InfConvert: cbor.InfConvertReject, ++ ++ // Error on attempt to encode math/big.Int values, which can't be faithfully ++ // roundtripped through Unstructured in general (the dynamic numeric types allowed ++ // in Unstructured are limited to float64 and int64). ++ BigIntConvert: cbor.BigIntConvertReject, ++ ++ // MarshalJSON for time.Time writes RFC3339 with nanos. ++ Time: cbor.TimeRFC3339Nano, ++ ++ // The decoder must be able to accept RFC3339 strings with or without tag 0 (e.g. by ++ // the end of time.Time -> JSON -> Unstructured -> CBOR, the CBOR encoder has no ++ // reliable way of knowing that a particular string originated from serializing a ++ // time.Time), so producing tag 0 has little use. ++ TimeTag: cbor.EncTagNone, ++ ++ // Indefinite-length items have multiple encodings and aren't being used anyway, so ++ // disable to avoid an opportunity for nondeterminism. ++ IndefLength: cbor.IndefLengthForbidden, ++ ++ // Preserve distinction between nil and empty for slices and maps. ++ NilContainers: cbor.NilContainerAsNull, ++ ++ // OK to produce tags. ++ TagsMd: cbor.TagsAllowed, ++ ++ // Use the same definition of "empty" as encoding/json. ++ OmitEmpty: cbor.OmitEmptyGoValue, ++ ++ // The CBOR types text string and byte string are structurally equivalent, with the ++ // semantic difference that a text string whose content is an invalid UTF-8 sequence ++ // is itself invalid. We reject all invalid text strings at decode time and do not ++ // validate or sanitize all Go strings at encode time. Encoding Go strings to the ++ // byte string type is comparable to the existing Protobuf behavior and cheaply ++ // ensures that the output is valid CBOR. ++ String: cbor.StringToByteString, ++ ++ // Encode struct field names to the byte string type rather than the text string ++ // type. ++ FieldName: cbor.FieldNameToByteString, ++ ++ // Marshal Go byte arrays to CBOR arrays of integers (as in JSON) instead of byte ++ // strings. ++ ByteArray: cbor.ByteArrayToArray, ++ ++ // Marshal []byte to CBOR byte string enclosed in tag 22 (expected later base64 ++ // encoding, https://www.rfc-editor.org/rfc/rfc8949.html#section-3.4.5.2), to ++ // interoperate with the existing JSON behavior. This indicates to the decoder that, ++ // when decoding into a string (or unstructured), the resulting value should be the ++ // base64 encoding of the original bytes. No base64 encoding or decoding needs to be ++ // performed for []byte-to-CBOR-to-[]byte roundtrips. ++ ByteSliceLaterFormat: cbor.ByteSliceLaterFormatBase64, ++ ++ // Disable default recognition of types implementing encoding.BinaryMarshaler, which ++ // is not recognized for JSON encoding. ++ BinaryMarshaler: cbor.BinaryMarshalerNone, ++ }.UserBufferEncMode() ++ if err != nil { ++ panic(err) ++ } ++ return encode ++ }(), ++} ++ ++var EncodeNondeterministic = EncMode{ ++ delegate: func() cbor.UserBufferEncMode { ++ opts := Encode.options() ++ opts.Sort = cbor.SortFastShuffle ++ em, err := opts.UserBufferEncMode() ++ if err != nil { ++ panic(err) ++ } ++ return em ++ }(), ++} ++ ++type EncMode struct { ++ delegate cbor.UserBufferEncMode ++} ++ ++func (em EncMode) options() cbor.EncOptions { ++ return em.delegate.EncOptions() ++} ++ ++func (em EncMode) MarshalTo(v interface{}, w io.Writer) error { ++ if buf, ok := w.(*buffer); ok { ++ return em.delegate.MarshalToBuffer(v, &buf.Buffer) ++ } ++ ++ buf := buffers.Get() ++ defer buffers.Put(buf) ++ if err := em.delegate.MarshalToBuffer(v, &buf.Buffer); err != nil { ++ return err ++ } ++ ++ if _, err := io.Copy(w, buf); err != nil { ++ return err ++ } ++ ++ return nil ++} ++ ++func (em EncMode) Marshal(v interface{}) ([]byte, error) { ++ buf := buffers.Get() ++ defer buffers.Put(buf) ++ ++ if err := em.MarshalTo(v, &buf.Buffer); err != nil { ++ return nil, err ++ } ++ ++ clone := make([]byte, buf.Len()) ++ copy(clone, buf.Bytes()) ++ ++ return clone, nil ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go +index ff982084..77bb3074 100644 +--- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go +@@ -17,9 +17,6 @@ limitations under the License. + package serializer + + import ( +- "mime" +- "strings" +- + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/json" +@@ -28,41 +25,26 @@ import ( + "k8s.io/apimachinery/pkg/runtime/serializer/versioning" + ) + +-// serializerExtensions are for serializers that are conditionally compiled in +-var serializerExtensions = []func(*runtime.Scheme) (serializerType, bool){} +- +-type serializerType struct { +- AcceptContentTypes []string +- ContentType string +- FileExtensions []string +- // EncodesAsText should be true if this content type can be represented safely in UTF-8 +- EncodesAsText bool +- +- Serializer runtime.Serializer +- PrettySerializer runtime.Serializer +- StrictSerializer runtime.Serializer +- +- AcceptStreamContentTypes []string +- StreamContentType string +- +- Framer runtime.Framer +- StreamSerializer runtime.Serializer +-} +- +-func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory, options CodecFactoryOptions) []serializerType { ++func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory, options CodecFactoryOptions) []runtime.SerializerInfo { + jsonSerializer := json.NewSerializerWithOptions( + mf, scheme, scheme, + json.SerializerOptions{Yaml: false, Pretty: false, Strict: options.Strict}, + ) +- jsonSerializerType := serializerType{ +- AcceptContentTypes: []string{runtime.ContentTypeJSON}, +- ContentType: runtime.ContentTypeJSON, +- FileExtensions: []string{"json"}, +- EncodesAsText: true, +- Serializer: jsonSerializer, +- +- Framer: json.Framer, +- StreamSerializer: jsonSerializer, ++ jsonSerializerType := runtime.SerializerInfo{ ++ MediaType: runtime.ContentTypeJSON, ++ MediaTypeType: "application", ++ MediaTypeSubType: "json", ++ EncodesAsText: true, ++ Serializer: jsonSerializer, ++ StrictSerializer: json.NewSerializerWithOptions( ++ mf, scheme, scheme, ++ json.SerializerOptions{Yaml: false, Pretty: false, Strict: true}, ++ ), ++ StreamSerializer: &runtime.StreamSerializerInfo{ ++ EncodesAsText: true, ++ Serializer: jsonSerializer, ++ Framer: json.Framer, ++ }, + } + if options.Pretty { + jsonSerializerType.PrettySerializer = json.NewSerializerWithOptions( +@@ -71,12 +53,6 @@ func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory, option + ) + } + +- strictJSONSerializer := json.NewSerializerWithOptions( +- mf, scheme, scheme, +- json.SerializerOptions{Yaml: false, Pretty: false, Strict: true}, +- ) +- jsonSerializerType.StrictSerializer = strictJSONSerializer +- + yamlSerializer := json.NewSerializerWithOptions( + mf, scheme, scheme, + json.SerializerOptions{Yaml: true, Pretty: false, Strict: options.Strict}, +@@ -88,35 +64,35 @@ func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory, option + protoSerializer := protobuf.NewSerializer(scheme, scheme) + protoRawSerializer := protobuf.NewRawSerializer(scheme, scheme) + +- serializers := []serializerType{ ++ serializers := []runtime.SerializerInfo{ + jsonSerializerType, + { +- AcceptContentTypes: []string{runtime.ContentTypeYAML}, +- ContentType: runtime.ContentTypeYAML, +- FileExtensions: []string{"yaml"}, +- EncodesAsText: true, +- Serializer: yamlSerializer, +- StrictSerializer: strictYAMLSerializer, ++ MediaType: runtime.ContentTypeYAML, ++ MediaTypeType: "application", ++ MediaTypeSubType: "yaml", ++ EncodesAsText: true, ++ Serializer: yamlSerializer, ++ StrictSerializer: strictYAMLSerializer, + }, + { +- AcceptContentTypes: []string{runtime.ContentTypeProtobuf}, +- ContentType: runtime.ContentTypeProtobuf, +- FileExtensions: []string{"pb"}, +- Serializer: protoSerializer, ++ MediaType: runtime.ContentTypeProtobuf, ++ MediaTypeType: "application", ++ MediaTypeSubType: "vnd.kubernetes.protobuf", ++ Serializer: protoSerializer, + // note, strict decoding is unsupported for protobuf, + // fall back to regular serializing + StrictSerializer: protoSerializer, +- +- Framer: protobuf.LengthDelimitedFramer, +- StreamSerializer: protoRawSerializer, ++ StreamSerializer: &runtime.StreamSerializerInfo{ ++ Serializer: protoRawSerializer, ++ Framer: protobuf.LengthDelimitedFramer, ++ }, + }, + } + +- for _, fn := range serializerExtensions { +- if serializer, ok := fn(scheme); ok { +- serializers = append(serializers, serializer) +- } ++ for _, f := range options.serializers { ++ serializers = append(serializers, f(scheme, scheme)) + } ++ + return serializers + } + +@@ -136,6 +112,8 @@ type CodecFactoryOptions struct { + Strict bool + // Pretty includes a pretty serializer along with the non-pretty one + Pretty bool ++ ++ serializers []func(runtime.ObjectCreater, runtime.ObjectTyper) runtime.SerializerInfo + } + + // CodecFactoryOptionsMutator takes a pointer to an options struct and then modifies it. +@@ -162,6 +140,13 @@ func DisableStrict(options *CodecFactoryOptions) { + options.Strict = false + } + ++// WithSerializer configures a serializer to be supported in addition to the default serializers. ++func WithSerializer(f func(runtime.ObjectCreater, runtime.ObjectTyper) runtime.SerializerInfo) CodecFactoryOptionsMutator { ++ return func(options *CodecFactoryOptions) { ++ options.serializers = append(options.serializers, f) ++ } ++} ++ + // NewCodecFactory provides methods for retrieving serializers for the supported wire formats + // and conversion wrappers to define preferred internal and external versions. In the future, + // as the internal version is used less, callers may instead use a defaulting serializer and +@@ -184,7 +169,7 @@ func NewCodecFactory(scheme *runtime.Scheme, mutators ...CodecFactoryOptionsMuta + } + + // newCodecFactory is a helper for testing that allows a different metafactory to be specified. +-func newCodecFactory(scheme *runtime.Scheme, serializers []serializerType) CodecFactory { ++func newCodecFactory(scheme *runtime.Scheme, serializers []runtime.SerializerInfo) CodecFactory { + decoders := make([]runtime.Decoder, 0, len(serializers)) + var accepts []runtime.SerializerInfo + alreadyAccepted := make(map[string]struct{}) +@@ -192,38 +177,20 @@ func newCodecFactory(scheme *runtime.Scheme, serializers []serializerType) Codec + var legacySerializer runtime.Serializer + for _, d := range serializers { + decoders = append(decoders, d.Serializer) +- for _, mediaType := range d.AcceptContentTypes { +- if _, ok := alreadyAccepted[mediaType]; ok { +- continue +- } +- alreadyAccepted[mediaType] = struct{}{} +- info := runtime.SerializerInfo{ +- MediaType: d.ContentType, +- EncodesAsText: d.EncodesAsText, +- Serializer: d.Serializer, +- PrettySerializer: d.PrettySerializer, +- StrictSerializer: d.StrictSerializer, +- } +- +- mediaType, _, err := mime.ParseMediaType(info.MediaType) +- if err != nil { +- panic(err) +- } +- parts := strings.SplitN(mediaType, "/", 2) +- info.MediaTypeType = parts[0] +- info.MediaTypeSubType = parts[1] +- +- if d.StreamSerializer != nil { +- info.StreamSerializer = &runtime.StreamSerializerInfo{ +- Serializer: d.StreamSerializer, +- EncodesAsText: d.EncodesAsText, +- Framer: d.Framer, +- } +- } +- accepts = append(accepts, info) +- if mediaType == runtime.ContentTypeJSON { +- legacySerializer = d.Serializer +- } ++ if _, ok := alreadyAccepted[d.MediaType]; ok { ++ continue ++ } ++ alreadyAccepted[d.MediaType] = struct{}{} ++ ++ acceptedSerializerShallowCopy := d ++ if d.StreamSerializer != nil { ++ cloned := *d.StreamSerializer ++ acceptedSerializerShallowCopy.StreamSerializer = &cloned ++ } ++ accepts = append(accepts, acceptedSerializerShallowCopy) ++ ++ if d.MediaType == runtime.ContentTypeJSON { ++ legacySerializer = d.Serializer + } + } + if legacySerializer == nil { +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go +index 87b3fec3..971c46d4 100644 +--- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go +@@ -134,23 +134,3 @@ func (e *encoder) Encode(obj runtime.Object) error { + e.buf.Reset() + return err + } +- +-type encoderWithAllocator struct { +- writer io.Writer +- encoder runtime.EncoderWithAllocator +- memAllocator runtime.MemoryAllocator +-} +- +-// NewEncoderWithAllocator returns a new streaming encoder +-func NewEncoderWithAllocator(w io.Writer, e runtime.EncoderWithAllocator, a runtime.MemoryAllocator) Encoder { +- return &encoderWithAllocator{ +- writer: w, +- encoder: e, +- memAllocator: a, +- } +-} +- +-// Encode writes the provided object to the nested writer +-func (e *encoderWithAllocator) Encode(obj runtime.Object) error { +- return e.encoder.EncodeWithAllocator(obj, e.writer, e.memAllocator) +-} +diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/types.go b/vendor/k8s.io/apimachinery/pkg/runtime/types.go +index ce77c791..ca7b7cc2 100644 +--- a/vendor/k8s.io/apimachinery/pkg/runtime/types.go ++++ b/vendor/k8s.io/apimachinery/pkg/runtime/types.go +@@ -43,9 +43,11 @@ type TypeMeta struct { + } + + const ( +- ContentTypeJSON string = "application/json" +- ContentTypeYAML string = "application/yaml" +- ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf" ++ ContentTypeJSON string = "application/json" ++ ContentTypeYAML string = "application/yaml" ++ ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf" ++ ContentTypeCBOR string = "application/cbor" // RFC 8949 ++ ContentTypeCBORSequence string = "application/cbor-seq" // RFC 8742 + ) + + // RawExtension is used to hold extensions in external versions. +diff --git a/vendor/k8s.io/apimachinery/pkg/types/patch.go b/vendor/k8s.io/apimachinery/pkg/types/patch.go +index fe8ecaaf..d338cf21 100644 +--- a/vendor/k8s.io/apimachinery/pkg/types/patch.go ++++ b/vendor/k8s.io/apimachinery/pkg/types/patch.go +@@ -25,5 +25,7 @@ const ( + JSONPatchType PatchType = "application/json-patch+json" + MergePatchType PatchType = "application/merge-patch+json" + StrategicMergePatchType PatchType = "application/strategic-merge-patch+json" +- ApplyPatchType PatchType = "application/apply-patch+yaml" ++ ApplyPatchType PatchType = ApplyYAMLPatchType ++ ApplyYAMLPatchType PatchType = "application/apply-patch+yaml" ++ ApplyCBORPatchType PatchType = "application/apply-patch+cbor" + ) +diff --git a/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go b/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go +index 1328dd61..ad486d58 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go +@@ -136,6 +136,19 @@ func (c *LRUExpireCache) Remove(key interface{}) { + delete(c.entries, key) + } + ++// RemoveAll removes all keys that match predicate. ++func (c *LRUExpireCache) RemoveAll(predicate func(key any) bool) { ++ c.lock.Lock() ++ defer c.lock.Unlock() ++ ++ for key, element := range c.entries { ++ if predicate(key) { ++ c.evictionList.Remove(element) ++ delete(c.entries, key) ++ } ++ } ++} ++ + // Keys returns all unexpired keys in the cache. + // + // Keep in mind that subsequent calls to Get() for any of the returned keys +diff --git a/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go b/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go +index 9b3c9c8d..1ab8fd39 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go +@@ -147,7 +147,6 @@ func (r *jsonFrameReader) Read(data []byte) (int, error) { + + // RawMessage#Unmarshal appends to data - we reset the slice down to 0 and will either see + // data written to data, or be larger than data and a different array. +- n := len(data) + m := json.RawMessage(data[:0]) + if err := r.decoder.Decode(&m); err != nil { + return 0, err +@@ -156,12 +155,19 @@ func (r *jsonFrameReader) Read(data []byte) (int, error) { + // If capacity of data is less than length of the message, decoder will allocate a new slice + // and set m to it, which means we need to copy the partial result back into data and preserve + // the remaining result for subsequent reads. +- if len(m) > n { +- //nolint:staticcheck // SA4006,SA4010 underlying array of data is modified here. +- data = append(data[0:0], m[:n]...) +- r.remaining = m[n:] +- return n, io.ErrShortBuffer ++ if len(m) > cap(data) { ++ copy(data, m) ++ r.remaining = m[len(data):] ++ return len(data), io.ErrShortBuffer + } ++ ++ if len(m) > len(data) { ++ // The bytes beyond len(data) were stored in data's underlying array, which we do ++ // not own after this function returns. ++ r.remaining = append([]byte(nil), m[len(data):]...) ++ return len(data), io.ErrShortBuffer ++ } ++ + return len(m), nil + } + +diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go +index 32f07578..8054b986 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go +@@ -17,6 +17,7 @@ limitations under the License. + package httpstream + + import ( ++ "errors" + "fmt" + "io" + "net/http" +@@ -95,6 +96,35 @@ type Stream interface { + Identifier() uint32 + } + ++// UpgradeFailureError encapsulates the cause for why the streaming ++// upgrade request failed. Implements error interface. ++type UpgradeFailureError struct { ++ Cause error ++} ++ ++func (u *UpgradeFailureError) Error() string { ++ return fmt.Sprintf("unable to upgrade streaming request: %s", u.Cause) ++} ++ ++// IsUpgradeFailure returns true if the passed error is (or wrapped error contains) ++// the UpgradeFailureError. ++func IsUpgradeFailure(err error) bool { ++ if err == nil { ++ return false ++ } ++ var upgradeErr *UpgradeFailureError ++ return errors.As(err, &upgradeErr) ++} ++ ++// isHTTPSProxyError returns true if error is Gorilla/Websockets HTTPS Proxy dial error; ++// false otherwise (see https://github.com/kubernetes/kubernetes/issues/126134). ++func IsHTTPSProxyError(err error) bool { ++ if err == nil { ++ return false ++ } ++ return strings.Contains(err.Error(), "proxy: unknown scheme: https") ++} ++ + // IsUpgradeRequest returns true if the given request is a connection upgrade request + func IsUpgradeRequest(req *http.Request) bool { + for _, h := range req.Header[http.CanonicalHeaderKey(HeaderConnection)] { +diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go +index 7fe52ee5..c78326fa 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go +@@ -38,6 +38,7 @@ import ( + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/httpstream" + utilnet "k8s.io/apimachinery/pkg/util/net" ++ apiproxy "k8s.io/apimachinery/pkg/util/proxy" + "k8s.io/apimachinery/third_party/forked/golang/netutil" + ) + +@@ -68,6 +69,10 @@ type SpdyRoundTripper struct { + // pingPeriod is a period for sending Ping frames over established + // connections. + pingPeriod time.Duration ++ ++ // upgradeTransport is an optional substitute for dialing if present. This field is ++ // mutually exclusive with the "tlsConfig", "Dialer", and "proxier". ++ upgradeTransport http.RoundTripper + } + + var _ utilnet.TLSClientConfigHolder = &SpdyRoundTripper{} +@@ -76,43 +81,61 @@ var _ utilnet.Dialer = &SpdyRoundTripper{} + + // NewRoundTripper creates a new SpdyRoundTripper that will use the specified + // tlsConfig. +-func NewRoundTripper(tlsConfig *tls.Config) *SpdyRoundTripper { ++func NewRoundTripper(tlsConfig *tls.Config) (*SpdyRoundTripper, error) { + return NewRoundTripperWithConfig(RoundTripperConfig{ +- TLS: tlsConfig, ++ TLS: tlsConfig, ++ UpgradeTransport: nil, + }) + } + + // NewRoundTripperWithProxy creates a new SpdyRoundTripper that will use the + // specified tlsConfig and proxy func. +-func NewRoundTripperWithProxy(tlsConfig *tls.Config, proxier func(*http.Request) (*url.URL, error)) *SpdyRoundTripper { ++func NewRoundTripperWithProxy(tlsConfig *tls.Config, proxier func(*http.Request) (*url.URL, error)) (*SpdyRoundTripper, error) { + return NewRoundTripperWithConfig(RoundTripperConfig{ +- TLS: tlsConfig, +- Proxier: proxier, ++ TLS: tlsConfig, ++ Proxier: proxier, ++ UpgradeTransport: nil, + }) + } + + // NewRoundTripperWithConfig creates a new SpdyRoundTripper with the specified +-// configuration. +-func NewRoundTripperWithConfig(cfg RoundTripperConfig) *SpdyRoundTripper { ++// configuration. Returns an error if the SpdyRoundTripper is misconfigured. ++func NewRoundTripperWithConfig(cfg RoundTripperConfig) (*SpdyRoundTripper, error) { ++ // Process UpgradeTransport, which is mutually exclusive to TLSConfig and Proxier. ++ if cfg.UpgradeTransport != nil { ++ if cfg.TLS != nil || cfg.Proxier != nil { ++ return nil, fmt.Errorf("SpdyRoundTripper: UpgradeTransport is mutually exclusive to TLSConfig or Proxier") ++ } ++ tlsConfig, err := utilnet.TLSClientConfig(cfg.UpgradeTransport) ++ if err != nil { ++ return nil, fmt.Errorf("SpdyRoundTripper: Unable to retrieve TLSConfig from UpgradeTransport: %v", err) ++ } ++ cfg.TLS = tlsConfig ++ } + if cfg.Proxier == nil { + cfg.Proxier = utilnet.NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment) + } + return &SpdyRoundTripper{ +- tlsConfig: cfg.TLS, +- proxier: cfg.Proxier, +- pingPeriod: cfg.PingPeriod, +- } ++ tlsConfig: cfg.TLS, ++ proxier: cfg.Proxier, ++ pingPeriod: cfg.PingPeriod, ++ upgradeTransport: cfg.UpgradeTransport, ++ }, nil + } + + // RoundTripperConfig is a set of options for an SpdyRoundTripper. + type RoundTripperConfig struct { +- // TLS configuration used by the round tripper. ++ // TLS configuration used by the round tripper if UpgradeTransport not present. + TLS *tls.Config + // Proxier is a proxy function invoked on each request. Optional. + Proxier func(*http.Request) (*url.URL, error) + // PingPeriod is a period for sending SPDY Pings on the connection. + // Optional. + PingPeriod time.Duration ++ // UpgradeTransport is a subtitute transport used for dialing. If set, ++ // this field will be used instead of "TLS" and "Proxier" for connection creation. ++ // Optional. ++ UpgradeTransport http.RoundTripper + } + + // TLSClientConfig implements pkg/util/net.TLSClientConfigHolder for proper TLS checking during +@@ -123,7 +146,13 @@ func (s *SpdyRoundTripper) TLSClientConfig() *tls.Config { + + // Dial implements k8s.io/apimachinery/pkg/util/net.Dialer. + func (s *SpdyRoundTripper) Dial(req *http.Request) (net.Conn, error) { +- conn, err := s.dial(req) ++ var conn net.Conn ++ var err error ++ if s.upgradeTransport != nil { ++ conn, err = apiproxy.DialURL(req.Context(), req.URL, s.upgradeTransport) ++ } else { ++ conn, err = s.dial(req) ++ } + if err != nil { + return nil, err + } +diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go +index 09f54a49..2e477fee 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go +@@ -21,16 +21,20 @@ import ( + "fmt" + "io" + "net/http" +- "regexp" + "strings" + "time" + + "golang.org/x/net/websocket" +- "k8s.io/klog/v2" + ++ "k8s.io/apimachinery/pkg/util/httpstream" ++ "k8s.io/apimachinery/pkg/util/portforward" ++ "k8s.io/apimachinery/pkg/util/remotecommand" + "k8s.io/apimachinery/pkg/util/runtime" ++ "k8s.io/klog/v2" + ) + ++const WebSocketProtocolHeader = "Sec-Websocket-Protocol" ++ + // The Websocket subprotocol "channel.k8s.io" prepends each binary message with a byte indicating + // the channel number (zero indexed) the message was sent on. Messages in both directions should + // prefix their messages with this channel byte. When used for remote execution, the channel numbers +@@ -77,18 +81,47 @@ const ( + ReadWriteChannel + ) + +-var ( +- // connectionUpgradeRegex matches any Connection header value that includes upgrade +- connectionUpgradeRegex = regexp.MustCompile("(^|.*,\\s*)upgrade($|\\s*,)") +-) +- + // IsWebSocketRequest returns true if the incoming request contains connection upgrade headers + // for WebSockets. + func IsWebSocketRequest(req *http.Request) bool { + if !strings.EqualFold(req.Header.Get("Upgrade"), "websocket") { + return false + } +- return connectionUpgradeRegex.MatchString(strings.ToLower(req.Header.Get("Connection"))) ++ return httpstream.IsUpgradeRequest(req) ++} ++ ++// IsWebSocketRequestWithStreamCloseProtocol returns true if the request contains headers ++// identifying that it is requesting a websocket upgrade with a remotecommand protocol ++// version that supports the "CLOSE" signal; false otherwise. ++func IsWebSocketRequestWithStreamCloseProtocol(req *http.Request) bool { ++ if !IsWebSocketRequest(req) { ++ return false ++ } ++ requestedProtocols := strings.TrimSpace(req.Header.Get(WebSocketProtocolHeader)) ++ for _, requestedProtocol := range strings.Split(requestedProtocols, ",") { ++ if protocolSupportsStreamClose(strings.TrimSpace(requestedProtocol)) { ++ return true ++ } ++ } ++ ++ return false ++} ++ ++// IsWebSocketRequestWithTunnelingProtocol returns true if the request contains headers ++// identifying that it is requesting a websocket upgrade with a tunneling protocol; ++// false otherwise. ++func IsWebSocketRequestWithTunnelingProtocol(req *http.Request) bool { ++ if !IsWebSocketRequest(req) { ++ return false ++ } ++ requestedProtocols := strings.TrimSpace(req.Header.Get(WebSocketProtocolHeader)) ++ for _, requestedProtocol := range strings.Split(requestedProtocols, ",") { ++ if protocolSupportsWebsocketTunneling(strings.TrimSpace(requestedProtocol)) { ++ return true ++ } ++ } ++ ++ return false + } + + // IgnoreReceives reads from a WebSocket until it is closed, then returns. If timeout is set, the +@@ -172,15 +205,46 @@ func (conn *Conn) SetIdleTimeout(duration time.Duration) { + conn.timeout = duration + } + ++// SetWriteDeadline sets a timeout on writing to the websocket connection. The ++// passed "duration" identifies how far into the future the write must complete ++// by before the timeout fires. ++func (conn *Conn) SetWriteDeadline(duration time.Duration) { ++ conn.ws.SetWriteDeadline(time.Now().Add(duration)) //nolint:errcheck ++} ++ + // Open the connection and create channels for reading and writing. It returns + // the selected subprotocol, a slice of channels and an error. + func (conn *Conn) Open(w http.ResponseWriter, req *http.Request) (string, []io.ReadWriteCloser, error) { ++ // serveHTTPComplete is channel that is closed/selected when "websocket#ServeHTTP" finishes. ++ serveHTTPComplete := make(chan struct{}) ++ // Ensure panic in spawned goroutine is propagated into the parent goroutine. ++ panicChan := make(chan any, 1) + go func() { +- defer runtime.HandleCrash() +- defer conn.Close() ++ // If websocket server returns, propagate panic if necessary. Otherwise, ++ // signal HTTPServe finished by closing "serveHTTPComplete". ++ defer func() { ++ if p := recover(); p != nil { ++ panicChan <- p ++ } else { ++ close(serveHTTPComplete) ++ } ++ }() + websocket.Server{Handshake: conn.handshake, Handler: conn.handle}.ServeHTTP(w, req) + }() +- <-conn.ready ++ ++ // In normal circumstances, "websocket.Server#ServeHTTP" calls "initialize" which closes ++ // "conn.ready" and then blocks until serving is complete. ++ select { ++ case <-conn.ready: ++ klog.V(8).Infof("websocket server initialized--serving") ++ case <-serveHTTPComplete: ++ // websocket server returned before completing initialization; cleanup and return error. ++ conn.closeNonThreadSafe() //nolint:errcheck ++ return "", nil, fmt.Errorf("websocket server finished before becoming ready") ++ case p := <-panicChan: ++ panic(p) ++ } ++ + rwc := make([]io.ReadWriteCloser, len(conn.channels)) + for i := range conn.channels { + rwc[i] = conn.channels[i] +@@ -229,20 +293,43 @@ func (conn *Conn) resetTimeout() { + } + } + +-// Close is only valid after Open has been called +-func (conn *Conn) Close() error { +- <-conn.ready ++// closeNonThreadSafe cleans up by closing streams and the websocket ++// connection *without* waiting for the "ready" channel. ++func (conn *Conn) closeNonThreadSafe() error { + for _, s := range conn.channels { + s.Close() + } +- conn.ws.Close() +- return nil ++ var err error ++ if conn.ws != nil { ++ err = conn.ws.Close() ++ } ++ return err ++} ++ ++// Close is only valid after Open has been called ++func (conn *Conn) Close() error { ++ <-conn.ready ++ return conn.closeNonThreadSafe() ++} ++ ++// protocolSupportsStreamClose returns true if the passed protocol ++// supports the stream close signal (currently only V5 remotecommand); ++// false otherwise. ++func protocolSupportsStreamClose(protocol string) bool { ++ return protocol == remotecommand.StreamProtocolV5Name ++} ++ ++// protocolSupportsWebsocketTunneling returns true if the passed protocol ++// is a tunneled Kubernetes spdy protocol; false otherwise. ++func protocolSupportsWebsocketTunneling(protocol string) bool { ++ return strings.HasPrefix(protocol, portforward.WebsocketsSPDYTunnelingPrefix) && strings.HasSuffix(protocol, portforward.KubernetesSuffix) + } + + // handle implements a websocket handler. + func (conn *Conn) handle(ws *websocket.Conn) { +- defer conn.Close() + conn.initialize(ws) ++ defer conn.Close() ++ supportsStreamClose := protocolSupportsStreamClose(conn.selectedProtocol) + + for { + conn.resetTimeout() +@@ -256,6 +343,21 @@ func (conn *Conn) handle(ws *websocket.Conn) { + if len(data) == 0 { + continue + } ++ if supportsStreamClose && data[0] == remotecommand.StreamClose { ++ if len(data) != 2 { ++ klog.Errorf("Single channel byte should follow stream close signal. Got %d bytes", len(data)-1) ++ break ++ } else { ++ channel := data[1] ++ if int(channel) >= len(conn.channels) { ++ klog.Errorf("Close is targeted for a channel %d that is not valid, possible protocol error", channel) ++ break ++ } ++ klog.V(4).Infof("Received half-close signal from client; close %d stream", channel) ++ conn.channels[channel].Close() // After first Close, other closes are noop. ++ } ++ continue ++ } + channel := data[0] + if conn.codec == base64Codec { + channel = channel - '0' +@@ -266,7 +368,7 @@ func (conn *Conn) handle(ws *websocket.Conn) { + continue + } + if _, err := conn.channels[channel].DataFromSocket(data); err != nil { +- klog.Errorf("Unable to write frame to %d: %v\n%s", channel, err, string(data)) ++ klog.Errorf("Unable to write frame (%d bytes) to %d: %v", len(data), channel, err) + continue + } + } +diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/doc.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/doc.go +index a1aa1688..3dd6f828 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/doc.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/wsstream/doc.go +@@ -16,6 +16,54 @@ limitations under the License. + + // Package wsstream contains utilities for streaming content over WebSockets. + // The Conn type allows callers to multiplex multiple read/write channels over +-// a single websocket. The Reader type allows an io.Reader to be copied over +-// a websocket channel as binary content. ++// a single websocket. ++// ++// "channel.k8s.io" ++// ++// The Websocket RemoteCommand subprotocol "channel.k8s.io" prepends each binary message with a ++// byte indicating the channel number (zero indexed) the message was sent on. Messages in both ++// directions should prefix their messages with this channel byte. Used for remote execution, ++// the channel numbers are by convention defined to match the POSIX file-descriptors assigned ++// to STDIN, STDOUT, and STDERR (0, 1, and 2). No other conversion is performed on the raw ++// subprotocol - writes are sent as they are received by the server. ++// ++// Example client session: ++// ++// CONNECT http://server.com with subprotocol "channel.k8s.io" ++// WRITE []byte{0, 102, 111, 111, 10} # send "foo\n" on channel 0 (STDIN) ++// READ []byte{1, 10} # receive "\n" on channel 1 (STDOUT) ++// CLOSE ++// ++// "v2.channel.k8s.io" ++// ++// The second Websocket subprotocol version "v2.channel.k8s.io" is the same as version 1, ++// but it is the first "versioned" subprotocol. ++// ++// "v3.channel.k8s.io" ++// ++// The third version of the Websocket RemoteCommand subprotocol adds another channel ++// for terminal resizing events. This channel is prepended with the byte '3', and it ++// transmits two window sizes (encoding TerminalSize struct) with integers in the range ++// (0,65536]. ++// ++// "v4.channel.k8s.io" ++// ++// The fourth version of the Websocket RemoteCommand subprotocol adds a channel for ++// errors. This channel returns structured errors containing process exit codes. The ++// error is "apierrors.StatusError{}". ++// ++// "v5.channel.k8s.io" ++// ++// The fifth version of the Websocket RemoteCommand subprotocol adds a CLOSE signal, ++// which is sent as the first byte of the message. The second byte is the channel ++// id. This CLOSE signal is handled by the websocket server by closing the stream, ++// allowing the other streams to complete transmission if necessary, and gracefully ++// shutdown the connection. ++// ++// Example client session: ++// ++// CONNECT http://server.com with subprotocol "v5.channel.k8s.io" ++// WRITE []byte{0, 102, 111, 111, 10} # send "foo\n" on channel 0 (STDIN) ++// WRITE []byte{255, 0} # send CLOSE signal (STDIN) ++// CLOSE + package wsstream // import "k8s.io/apimachinery/pkg/util/httpstream/wsstream" +diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go +index 8f9ced93..1f287739 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go +@@ -15,7 +15,7 @@ limitations under the License. + */ + + // Code generated by protoc-gen-gogo. DO NOT EDIT. +-// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto ++// source: k8s.io/apimachinery/pkg/util/intstr/generated.proto + + package intstr + +@@ -43,7 +43,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + func (m *IntOrString) Reset() { *m = IntOrString{} } + func (*IntOrString) ProtoMessage() {} + func (*IntOrString) Descriptor() ([]byte, []int) { +- return fileDescriptor_94e046ae3ce6121c, []int{0} ++ return fileDescriptor_771bacc35a5ec189, []int{0} + } + func (m *IntOrString) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +@@ -73,30 +73,29 @@ func init() { + } + + func init() { +- proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptor_94e046ae3ce6121c) ++ proto.RegisterFile("k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptor_771bacc35a5ec189) + } + +-var fileDescriptor_94e046ae3ce6121c = []byte{ +- // 292 bytes of a gzipped FileDescriptorProto +- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xb1, 0x4a, 0x03, 0x31, +- 0x1c, 0xc6, 0x13, 0x5b, 0x8b, 0x9e, 0xe0, 0x50, 0x1c, 0x8a, 0x43, 0x7a, 0x58, 0x90, 0x5b, 0x4c, +- 0x56, 0x71, 0xec, 0x56, 0x10, 0x84, 0x56, 0x1c, 0xdc, 0xee, 0xda, 0x98, 0x86, 0x6b, 0x93, 0x90, +- 0xfb, 0x9f, 0x70, 0x5b, 0x1f, 0x41, 0x37, 0x47, 0x1f, 0xe7, 0xc6, 0x8e, 0x1d, 0xa4, 0x78, 0xf1, +- 0x2d, 0x9c, 0xe4, 0x72, 0x07, 0x3a, 0x3a, 0x25, 0xdf, 0xf7, 0xfd, 0x7e, 0x19, 0x12, 0xdc, 0xa6, +- 0xd7, 0x19, 0x95, 0x9a, 0xa5, 0x79, 0xc2, 0xad, 0xe2, 0xc0, 0x33, 0xf6, 0xcc, 0xd5, 0x42, 0x5b, +- 0xd6, 0x0e, 0xb1, 0x91, 0xeb, 0x78, 0xbe, 0x94, 0x8a, 0xdb, 0x82, 0x99, 0x54, 0xb0, 0x1c, 0xe4, +- 0x8a, 0x49, 0x05, 0x19, 0x58, 0x26, 0xb8, 0xe2, 0x36, 0x06, 0xbe, 0xa0, 0xc6, 0x6a, 0xd0, 0xfd, +- 0x51, 0x23, 0xd1, 0xbf, 0x12, 0x35, 0xa9, 0xa0, 0xb5, 0x44, 0x1b, 0xe9, 0xfc, 0x4a, 0x48, 0x58, +- 0xe6, 0x09, 0x9d, 0xeb, 0x35, 0x13, 0x5a, 0x68, 0xe6, 0xdd, 0x24, 0x7f, 0xf2, 0xc9, 0x07, 0x7f, +- 0x6b, 0xde, 0xbc, 0x78, 0xc5, 0xc1, 0xc9, 0x44, 0xc1, 0x9d, 0x9d, 0x81, 0x95, 0x4a, 0xf4, 0xa3, +- 0xa0, 0x0b, 0x85, 0xe1, 0x03, 0x1c, 0xe2, 0xa8, 0x33, 0x3e, 0x2b, 0xf7, 0x43, 0xe4, 0xf6, 0xc3, +- 0xee, 0x7d, 0x61, 0xf8, 0x77, 0x7b, 0x4e, 0x3d, 0xd1, 0xbf, 0x0c, 0x7a, 0x52, 0xc1, 0x43, 0xbc, +- 0x1a, 0x1c, 0x84, 0x38, 0x3a, 0x1c, 0x9f, 0xb6, 0x6c, 0x6f, 0xe2, 0xdb, 0x69, 0xbb, 0xd6, 0x5c, +- 0x06, 0xb6, 0xe6, 0x3a, 0x21, 0x8e, 0x8e, 0x7f, 0xb9, 0x99, 0x6f, 0xa7, 0xed, 0x7a, 0x73, 0xf4, +- 0xf6, 0x3e, 0x44, 0x9b, 0x8f, 0x10, 0x8d, 0x27, 0x65, 0x45, 0xd0, 0xb6, 0x22, 0x68, 0x57, 0x11, +- 0xb4, 0x71, 0x04, 0x97, 0x8e, 0xe0, 0xad, 0x23, 0x78, 0xe7, 0x08, 0xfe, 0x74, 0x04, 0xbf, 0x7c, +- 0x11, 0xf4, 0x38, 0xfa, 0xc7, 0x17, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xc4, 0xf0, 0xa0, +- 0x81, 0x01, 0x00, 0x00, ++var fileDescriptor_771bacc35a5ec189 = []byte{ ++ // 277 bytes of a gzipped FileDescriptorProto ++ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xce, 0xb6, 0x28, 0xd6, ++ 0xcb, 0xcc, 0xd7, 0x4f, 0x2c, 0xc8, 0xcc, 0x4d, 0x4c, 0xce, 0xc8, 0xcc, 0x4b, 0x2d, 0xaa, 0xd4, ++ 0x2f, 0xc8, 0x4e, 0xd7, 0x2f, 0x2d, 0xc9, 0xcc, 0xd1, 0xcf, 0xcc, 0x2b, 0x29, 0x2e, 0x29, 0xd2, ++ 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, ++ 0x52, 0x86, 0x68, 0xd2, 0x43, 0xd6, 0xa4, 0x57, 0x90, 0x9d, 0xae, 0x07, 0xd2, 0xa4, 0x07, 0xd1, ++ 0x24, 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, ++ 0x9e, 0xaf, 0x0f, 0xd6, 0x9b, 0x54, 0x9a, 0x06, 0xe6, 0x81, 0x39, 0x60, 0x16, 0xc4, 0x4c, 0xa5, ++ 0x89, 0x8c, 0x5c, 0xdc, 0x9e, 0x79, 0x25, 0xfe, 0x45, 0xc1, 0x25, 0x45, 0x99, 0x79, 0xe9, 0x42, ++ 0x1a, 0x5c, 0x2c, 0x25, 0x95, 0x05, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x4e, 0x22, 0x27, ++ 0xee, 0xc9, 0x33, 0x3c, 0xba, 0x27, 0xcf, 0x12, 0x52, 0x59, 0x90, 0xfa, 0x0b, 0x4a, 0x07, 0x81, ++ 0x55, 0x08, 0xa9, 0x71, 0xb1, 0x65, 0xe6, 0x95, 0x84, 0x25, 0xe6, 0x48, 0x30, 0x29, 0x30, 0x6a, ++ 0xb0, 0x3a, 0xf1, 0x41, 0xd5, 0xb2, 0x79, 0x82, 0x45, 0x83, 0xa0, 0xb2, 0x20, 0x75, 0xc5, 0x25, ++ 0x45, 0x20, 0x75, 0xcc, 0x0a, 0x8c, 0x1a, 0x9c, 0x08, 0x75, 0xc1, 0x60, 0xd1, 0x20, 0xa8, 0xac, ++ 0x15, 0xc7, 0x8c, 0x05, 0xf2, 0x0c, 0x0d, 0x77, 0x14, 0x18, 0x9c, 0x3c, 0x4f, 0x3c, 0x94, 0x63, ++ 0xb8, 0xf0, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, ++ 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x78, 0xe3, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, ++ 0xcb, 0x31, 0x44, 0x29, 0x13, 0x11, 0x84, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0xa1, 0x0b, ++ 0x1e, 0x68, 0x01, 0x00, 0x00, + } + + func (m *IntOrString) Marshal() (dAtA []byte, err error) { +diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go +index 0ea88156..5fd2e16c 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go +@@ -25,6 +25,7 @@ import ( + "strconv" + "strings" + ++ cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" + "k8s.io/klog/v2" + ) + +@@ -72,14 +73,14 @@ func FromString(val string) IntOrString { + return IntOrString{Type: String, StrVal: val} + } + +-// Parse the given string and try to convert it to an integer before ++// Parse the given string and try to convert it to an int32 integer before + // setting it as a string value. + func Parse(val string) IntOrString { +- i, err := strconv.Atoi(val) ++ i, err := strconv.ParseInt(val, 10, 32) + if err != nil { + return FromString(val) + } +- return FromInt(i) ++ return FromInt32(int32(i)) + } + + // UnmarshalJSON implements the json.Unmarshaller interface. +@@ -92,6 +93,20 @@ func (intstr *IntOrString) UnmarshalJSON(value []byte) error { + return json.Unmarshal(value, &intstr.IntVal) + } + ++func (intstr *IntOrString) UnmarshalCBOR(value []byte) error { ++ if err := cbor.Unmarshal(value, &intstr.StrVal); err == nil { ++ intstr.Type = String ++ return nil ++ } ++ ++ if err := cbor.Unmarshal(value, &intstr.IntVal); err != nil { ++ return err ++ } ++ ++ intstr.Type = Int ++ return nil ++} ++ + // String returns the string value, or the Itoa of the int value. + func (intstr *IntOrString) String() string { + if intstr == nil { +@@ -126,6 +141,17 @@ func (intstr IntOrString) MarshalJSON() ([]byte, error) { + } + } + ++func (intstr IntOrString) MarshalCBOR() ([]byte, error) { ++ switch intstr.Type { ++ case Int: ++ return cbor.Marshal(intstr.IntVal) ++ case String: ++ return cbor.Marshal(intstr.StrVal) ++ default: ++ return nil, fmt.Errorf("impossible IntOrString.Type") ++ } ++} ++ + // OpenAPISchemaType is used by the kube-openapi generator when constructing + // the OpenAPI spec of this type. + // +diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go +index 978ffb3c..de540c82 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go +@@ -19,11 +19,12 @@ package managedfields + import ( + "fmt" + ++ "sigs.k8s.io/structured-merge-diff/v4/fieldpath" ++ + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/managedfields/internal" +- "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + ) + + // FieldManager updates the managed fields and merges applied +@@ -32,7 +33,7 @@ type FieldManager = internal.FieldManager + + // NewDefaultFieldManager creates a new FieldManager that merges apply requests + // and update managed fields for other types of requests. +-func NewDefaultFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (*FieldManager, error) { ++func NewDefaultFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]fieldpath.Filter) (*FieldManager, error) { + f, err := internal.NewStructuredMergeManager(typeConverter, objectConverter, objectDefaulter, kind.GroupVersion(), hub, resetFields) + if err != nil { + return nil, fmt.Errorf("failed to create field manager: %v", err) +@@ -43,7 +44,7 @@ func NewDefaultFieldManager(typeConverter TypeConverter, objectConverter runtime + // NewDefaultCRDFieldManager creates a new FieldManager specifically for + // CRDs. This allows for the possibility of fields which are not defined + // in models, as well as having no models defined at all. +-func NewDefaultCRDFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (_ *FieldManager, err error) { ++func NewDefaultCRDFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]fieldpath.Filter) (_ *FieldManager, err error) { + f, err := internal.NewCRDStructuredMergeManager(typeConverter, objectConverter, objectDefaulter, kind.GroupVersion(), hub, resetFields) + if err != nil { + return nil, fmt.Errorf("failed to create field manager: %v", err) +diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go +index 2112c9ab..3fe36edc 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go +@@ -19,12 +19,14 @@ package internal + import ( + "fmt" + ++ "sigs.k8s.io/structured-merge-diff/v4/fieldpath" ++ "sigs.k8s.io/structured-merge-diff/v4/merge" ++ "sigs.k8s.io/structured-merge-diff/v4/typed" ++ + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +- "sigs.k8s.io/structured-merge-diff/v4/fieldpath" +- "sigs.k8s.io/structured-merge-diff/v4/merge" + ) + + type structuredMergeManager struct { +@@ -40,7 +42,7 @@ var _ Manager = &structuredMergeManager{} + + // NewStructuredMergeManager creates a new Manager that merges apply requests + // and update managed fields for other types of requests. +-func NewStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (Manager, error) { ++func NewStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]fieldpath.Filter) (Manager, error) { + if typeConverter == nil { + return nil, fmt.Errorf("typeconverter must not be nil") + } +@@ -51,8 +53,8 @@ func NewStructuredMergeManager(typeConverter TypeConverter, objectConverter runt + groupVersion: gv, + hubVersion: hub, + updater: merge.Updater{ +- Converter: newVersionConverter(typeConverter, objectConverter, hub), // This is the converter provided to SMD from k8s +- IgnoredFields: resetFields, ++ Converter: newVersionConverter(typeConverter, objectConverter, hub), // This is the converter provided to SMD from k8s ++ IgnoreFilter: resetFields, + }, + }, nil + } +@@ -60,7 +62,7 @@ func NewStructuredMergeManager(typeConverter TypeConverter, objectConverter runt + // NewCRDStructuredMergeManager creates a new Manager specifically for + // CRDs. This allows for the possibility of fields which are not defined + // in models, as well as having no models defined at all. +-func NewCRDStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (_ Manager, err error) { ++func NewCRDStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]fieldpath.Filter) (_ Manager, err error) { + return &structuredMergeManager{ + typeConverter: typeConverter, + objectConverter: objectConverter, +@@ -68,8 +70,8 @@ func NewCRDStructuredMergeManager(typeConverter TypeConverter, objectConverter r + groupVersion: gv, + hubVersion: hub, + updater: merge.Updater{ +- Converter: newCRDVersionConverter(typeConverter, objectConverter, hub), +- IgnoredFields: resetFields, ++ Converter: newCRDVersionConverter(typeConverter, objectConverter, hub), ++ IgnoreFilter: resetFields, + }, + }, nil + } +@@ -95,11 +97,11 @@ func (f *structuredMergeManager) Update(liveObj, newObj runtime.Object, managed + if err != nil { + return nil, nil, fmt.Errorf("failed to convert live object (%v) to proper version: %v", objectGVKNN(liveObj), err) + } +- newObjTyped, err := f.typeConverter.ObjectToTyped(newObjVersioned) ++ newObjTyped, err := f.typeConverter.ObjectToTyped(newObjVersioned, typed.AllowDuplicates) + if err != nil { + return nil, nil, fmt.Errorf("failed to convert new object (%v) to smd typed: %v", objectGVKNN(newObjVersioned), err) + } +- liveObjTyped, err := f.typeConverter.ObjectToTyped(liveObjVersioned) ++ liveObjTyped, err := f.typeConverter.ObjectToTyped(liveObjVersioned, typed.AllowDuplicates) + if err != nil { + return nil, nil, fmt.Errorf("failed to convert live object (%v) to smd typed: %v", objectGVKNN(liveObjVersioned), err) + } +@@ -139,11 +141,13 @@ func (f *structuredMergeManager) Apply(liveObj, patchObj runtime.Object, managed + return nil, nil, fmt.Errorf("failed to convert live object (%v) to proper version: %v", objectGVKNN(liveObj), err) + } + ++ // Don't allow duplicates in the applied object. + patchObjTyped, err := f.typeConverter.ObjectToTyped(patchObj) + if err != nil { + return nil, nil, fmt.Errorf("failed to create typed patch object (%v): %v", objectGVKNN(patchObj), err) + } +- liveObjTyped, err := f.typeConverter.ObjectToTyped(liveObjVersioned) ++ ++ liveObjTyped, err := f.typeConverter.ObjectToTyped(liveObjVersioned, typed.AllowDuplicates) + if err != nil { + return nil, nil, fmt.Errorf("failed to create typed live object (%v): %v", objectGVKNN(liveObjVersioned), err) + } +diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/typeconverter.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/typeconverter.go +index 1ac96d7f..c6449467 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/typeconverter.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/typeconverter.go +@@ -32,7 +32,7 @@ import ( + // TypeConverter allows you to convert from runtime.Object to + // typed.TypedValue and the other way around. + type TypeConverter interface { +- ObjectToTyped(runtime.Object) (*typed.TypedValue, error) ++ ObjectToTyped(runtime.Object, ...typed.ValidationOptions) (*typed.TypedValue, error) + TypedToObject(*typed.TypedValue) (runtime.Object, error) + } + +@@ -54,7 +54,7 @@ func NewTypeConverter(openapiSpec map[string]*spec.Schema, preserveUnknownFields + return &typeConverter{parser: tr}, nil + } + +-func (c *typeConverter) ObjectToTyped(obj runtime.Object) (*typed.TypedValue, error) { ++func (c *typeConverter) ObjectToTyped(obj runtime.Object, opts ...typed.ValidationOptions) (*typed.TypedValue, error) { + gvk := obj.GetObjectKind().GroupVersionKind() + t := c.parser[gvk] + if t == nil { +@@ -62,9 +62,9 @@ func (c *typeConverter) ObjectToTyped(obj runtime.Object) (*typed.TypedValue, er + } + switch o := obj.(type) { + case *unstructured.Unstructured: +- return t.FromUnstructured(o.UnstructuredContent()) ++ return t.FromUnstructured(o.UnstructuredContent(), opts...) + default: +- return t.FromStructured(obj) ++ return t.FromStructured(obj, opts...) + } + } + +@@ -84,12 +84,12 @@ func NewDeducedTypeConverter() TypeConverter { + } + + // ObjectToTyped converts an object into a TypedValue with a "deduced type". +-func (deducedTypeConverter) ObjectToTyped(obj runtime.Object) (*typed.TypedValue, error) { ++func (deducedTypeConverter) ObjectToTyped(obj runtime.Object, opts ...typed.ValidationOptions) (*typed.TypedValue, error) { + switch o := obj.(type) { + case *unstructured.Unstructured: +- return typed.DeducedParseableType.FromUnstructured(o.UnstructuredContent()) ++ return typed.DeducedParseableType.FromUnstructured(o.UnstructuredContent(), opts...) + default: +- return typed.DeducedParseableType.FromStructured(obj) ++ return typed.DeducedParseableType.FromStructured(obj, opts...) + } + } + +diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml b/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml +index 66e849f2..a7f2d54f 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml ++++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml +@@ -120,7 +120,7 @@ status: + type: PIDPressure + - lastHeartbeatTime: "2019-09-20T19:32:50Z" + lastTransitionTime: "2019-07-09T16:17:49Z" +- message: kubelet is posting ready status. AppArmor enabled ++ message: kubelet is posting ready status + reason: KubeletReady + status: "True" + type: Ready +diff --git a/vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go b/vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go +new file mode 100644 +index 00000000..68532881 +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/util/portforward/constants.go +@@ -0,0 +1,24 @@ ++/* ++Copyright 2016 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package portforward ++ ++const ( ++ PortForwardV1Name = "portforward.k8s.io" ++ WebsocketsSPDYTunnelingPrefix = "SPDY/3.1+" ++ KubernetesSuffix = ".k8s.io" ++ WebsocketsSPDYTunnelingPortForwardV1 = WebsocketsSPDYTunnelingPrefix + PortForwardV1Name ++) +diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go +new file mode 100644 +index 00000000..e5196d1e +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/dial.go +@@ -0,0 +1,122 @@ ++/* ++Copyright 2015 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package proxy ++ ++import ( ++ "context" ++ "crypto/tls" ++ "fmt" ++ "net" ++ "net/http" ++ "net/url" ++ ++ utilnet "k8s.io/apimachinery/pkg/util/net" ++ "k8s.io/apimachinery/third_party/forked/golang/netutil" ++ "k8s.io/klog/v2" ++) ++ ++// DialURL will dial the specified URL using the underlying dialer held by the passed ++// RoundTripper. The primary use of this method is to support proxying upgradable connections. ++// For this reason this method will prefer to negotiate http/1.1 if the URL scheme is https. ++// If you wish to ensure ALPN negotiates http2 then set NextProto=[]string{"http2"} in the ++// TLSConfig of the http.Transport ++func DialURL(ctx context.Context, url *url.URL, transport http.RoundTripper) (net.Conn, error) { ++ dialAddr := netutil.CanonicalAddr(url) ++ ++ dialer, err := utilnet.DialerFor(transport) ++ if err != nil { ++ klog.V(5).Infof("Unable to unwrap transport %T to get dialer: %v", transport, err) ++ } ++ ++ switch url.Scheme { ++ case "http": ++ if dialer != nil { ++ return dialer(ctx, "tcp", dialAddr) ++ } ++ var d net.Dialer ++ return d.DialContext(ctx, "tcp", dialAddr) ++ case "https": ++ // Get the tls config from the transport if we recognize it ++ tlsConfig, err := utilnet.TLSClientConfig(transport) ++ if err != nil { ++ klog.V(5).Infof("Unable to unwrap transport %T to get at TLS config: %v", transport, err) ++ } ++ ++ if dialer != nil { ++ // We have a dialer; use it to open the connection, then ++ // create a tls client using the connection. ++ netConn, err := dialer(ctx, "tcp", dialAddr) ++ if err != nil { ++ return nil, err ++ } ++ if tlsConfig == nil { ++ // tls.Client requires non-nil config ++ klog.Warning("using custom dialer with no TLSClientConfig. Defaulting to InsecureSkipVerify") ++ // tls.Handshake() requires ServerName or InsecureSkipVerify ++ tlsConfig = &tls.Config{ ++ InsecureSkipVerify: true, ++ } ++ } else if len(tlsConfig.ServerName) == 0 && !tlsConfig.InsecureSkipVerify { ++ // tls.HandshakeContext() requires ServerName or InsecureSkipVerify ++ // infer the ServerName from the hostname we're connecting to. ++ inferredHost := dialAddr ++ if host, _, err := net.SplitHostPort(dialAddr); err == nil { ++ inferredHost = host ++ } ++ // Make a copy to avoid polluting the provided config ++ tlsConfigCopy := tlsConfig.Clone() ++ tlsConfigCopy.ServerName = inferredHost ++ tlsConfig = tlsConfigCopy ++ } ++ ++ // Since this method is primarily used within a "Connection: Upgrade" call we assume the caller is ++ // going to write HTTP/1.1 request to the wire. http2 should not be allowed in the TLSConfig.NextProtos, ++ // so we explicitly set that here. We only do this check if the TLSConfig support http/1.1. ++ if supportsHTTP11(tlsConfig.NextProtos) { ++ tlsConfig = tlsConfig.Clone() ++ tlsConfig.NextProtos = []string{"http/1.1"} ++ } ++ ++ tlsConn := tls.Client(netConn, tlsConfig) ++ if err := tlsConn.HandshakeContext(ctx); err != nil { ++ netConn.Close() ++ return nil, err ++ } ++ return tlsConn, nil ++ } else { ++ // Dial. ++ tlsDialer := tls.Dialer{ ++ Config: tlsConfig, ++ } ++ return tlsDialer.DialContext(ctx, "tcp", dialAddr) ++ } ++ default: ++ return nil, fmt.Errorf("unknown scheme: %s", url.Scheme) ++ } ++} ++ ++func supportsHTTP11(nextProtos []string) bool { ++ if len(nextProtos) == 0 { ++ return true ++ } ++ for _, proto := range nextProtos { ++ if proto == "http/1.1" { ++ return true ++ } ++ } ++ return false ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/doc.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/doc.go +new file mode 100644 +index 00000000..d14ecfad +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/doc.go +@@ -0,0 +1,18 @@ ++/* ++Copyright 2014 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++// Package proxy provides transport and upgrade support for proxies. ++package proxy // import "k8s.io/apimachinery/pkg/util/proxy" +diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go +new file mode 100644 +index 00000000..5a2dd6e1 +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go +@@ -0,0 +1,272 @@ ++/* ++Copyright 2014 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package proxy ++ ++import ( ++ "bytes" ++ "compress/flate" ++ "compress/gzip" ++ "fmt" ++ "io" ++ "net/http" ++ "net/url" ++ "path" ++ "strings" ++ ++ "golang.org/x/net/html" ++ "golang.org/x/net/html/atom" ++ "k8s.io/klog/v2" ++ ++ "k8s.io/apimachinery/pkg/api/errors" ++ "k8s.io/apimachinery/pkg/util/net" ++ "k8s.io/apimachinery/pkg/util/sets" ++) ++ ++// atomsToAttrs states which attributes of which tags require URL substitution. ++// Sources: http://www.w3.org/TR/REC-html40/index/attributes.html ++// ++// http://www.w3.org/html/wg/drafts/html/master/index.html#attributes-1 ++var atomsToAttrs = map[atom.Atom]sets.String{ ++ atom.A: sets.NewString("href"), ++ atom.Applet: sets.NewString("codebase"), ++ atom.Area: sets.NewString("href"), ++ atom.Audio: sets.NewString("src"), ++ atom.Base: sets.NewString("href"), ++ atom.Blockquote: sets.NewString("cite"), ++ atom.Body: sets.NewString("background"), ++ atom.Button: sets.NewString("formaction"), ++ atom.Command: sets.NewString("icon"), ++ atom.Del: sets.NewString("cite"), ++ atom.Embed: sets.NewString("src"), ++ atom.Form: sets.NewString("action"), ++ atom.Frame: sets.NewString("longdesc", "src"), ++ atom.Head: sets.NewString("profile"), ++ atom.Html: sets.NewString("manifest"), ++ atom.Iframe: sets.NewString("longdesc", "src"), ++ atom.Img: sets.NewString("longdesc", "src", "usemap"), ++ atom.Input: sets.NewString("src", "usemap", "formaction"), ++ atom.Ins: sets.NewString("cite"), ++ atom.Link: sets.NewString("href"), ++ atom.Object: sets.NewString("classid", "codebase", "data", "usemap"), ++ atom.Q: sets.NewString("cite"), ++ atom.Script: sets.NewString("src"), ++ atom.Source: sets.NewString("src"), ++ atom.Video: sets.NewString("poster", "src"), ++ ++ // TODO: css URLs hidden in style elements. ++} ++ ++// Transport is a transport for text/html content that replaces URLs in html ++// content with the prefix of the proxy server ++type Transport struct { ++ Scheme string ++ Host string ++ PathPrepend string ++ ++ http.RoundTripper ++} ++ ++// RoundTrip implements the http.RoundTripper interface ++func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { ++ // Add reverse proxy headers. ++ forwardedURI := path.Join(t.PathPrepend, req.URL.EscapedPath()) ++ if strings.HasSuffix(req.URL.Path, "/") { ++ forwardedURI = forwardedURI + "/" ++ } ++ req.Header.Set("X-Forwarded-Uri", forwardedURI) ++ if len(t.Host) > 0 { ++ req.Header.Set("X-Forwarded-Host", t.Host) ++ } ++ if len(t.Scheme) > 0 { ++ req.Header.Set("X-Forwarded-Proto", t.Scheme) ++ } ++ ++ rt := t.RoundTripper ++ if rt == nil { ++ rt = http.DefaultTransport ++ } ++ resp, err := rt.RoundTrip(req) ++ ++ if err != nil { ++ return nil, errors.NewServiceUnavailable(fmt.Sprintf("error trying to reach service: %v", err)) ++ } ++ ++ if redirect := resp.Header.Get("Location"); redirect != "" { ++ targetURL, err := url.Parse(redirect) ++ if err != nil { ++ return nil, errors.NewInternalError(fmt.Errorf("error trying to parse Location header: %v", err)) ++ } ++ resp.Header.Set("Location", t.rewriteURL(targetURL, req.URL, req.Host)) ++ return resp, nil ++ } ++ ++ cType := resp.Header.Get("Content-Type") ++ cType = strings.TrimSpace(strings.SplitN(cType, ";", 2)[0]) ++ if cType != "text/html" { ++ // Do nothing, simply pass through ++ return resp, nil ++ } ++ ++ return t.rewriteResponse(req, resp) ++} ++ ++var _ = net.RoundTripperWrapper(&Transport{}) ++ ++func (rt *Transport) WrappedRoundTripper() http.RoundTripper { ++ return rt.RoundTripper ++} ++ ++// rewriteURL rewrites a single URL to go through the proxy, if the URL refers ++// to the same host as sourceURL, which is the page on which the target URL ++// occurred, or if the URL matches the sourceRequestHost. ++func (t *Transport) rewriteURL(url *url.URL, sourceURL *url.URL, sourceRequestHost string) string { ++ // Example: ++ // When API server processes a proxy request to a service (e.g. /api/v1/namespace/foo/service/bar/proxy/), ++ // the sourceURL.Host (i.e. req.URL.Host) is the endpoint IP address of the service. The ++ // sourceRequestHost (i.e. req.Host) is the Host header that specifies the host on which the ++ // URL is sought, which can be different from sourceURL.Host. For example, if user sends the ++ // request through "kubectl proxy" locally (i.e. localhost:8001/api/v1/namespace/foo/service/bar/proxy/), ++ // sourceRequestHost is "localhost:8001". ++ // ++ // If the service's response URL contains non-empty host, and url.Host is equal to either sourceURL.Host ++ // or sourceRequestHost, we should not consider the returned URL to be a completely different host. ++ // It's the API server's responsibility to rewrite a same-host-and-absolute-path URL and append the ++ // necessary URL prefix (i.e. /api/v1/namespace/foo/service/bar/proxy/). ++ isDifferentHost := url.Host != "" && url.Host != sourceURL.Host && url.Host != sourceRequestHost ++ isRelative := !strings.HasPrefix(url.Path, "/") ++ if isDifferentHost || isRelative { ++ return url.String() ++ } ++ ++ // Do not rewrite scheme and host if the Transport has empty scheme and host ++ // when targetURL already contains the sourceRequestHost ++ if !(url.Host == sourceRequestHost && t.Scheme == "" && t.Host == "") { ++ url.Scheme = t.Scheme ++ url.Host = t.Host ++ } ++ ++ origPath := url.Path ++ // Do not rewrite URL if the sourceURL already contains the necessary prefix. ++ if strings.HasPrefix(url.Path, t.PathPrepend) { ++ return url.String() ++ } ++ url.Path = path.Join(t.PathPrepend, url.Path) ++ if strings.HasSuffix(origPath, "/") { ++ // Add back the trailing slash, which was stripped by path.Join(). ++ url.Path += "/" ++ } ++ ++ return url.String() ++} ++ ++// rewriteHTML scans the HTML for tags with url-valued attributes, and updates ++// those values with the urlRewriter function. The updated HTML is output to the ++// writer. ++func rewriteHTML(reader io.Reader, writer io.Writer, urlRewriter func(*url.URL) string) error { ++ // Note: This assumes the content is UTF-8. ++ tokenizer := html.NewTokenizer(reader) ++ ++ var err error ++ for err == nil { ++ tokenType := tokenizer.Next() ++ switch tokenType { ++ case html.ErrorToken: ++ err = tokenizer.Err() ++ case html.StartTagToken, html.SelfClosingTagToken: ++ token := tokenizer.Token() ++ if urlAttrs, ok := atomsToAttrs[token.DataAtom]; ok { ++ for i, attr := range token.Attr { ++ if urlAttrs.Has(attr.Key) { ++ url, err := url.Parse(attr.Val) ++ if err != nil { ++ // Do not rewrite the URL if it isn't valid. It is intended not ++ // to error here to prevent the inability to understand the ++ // content of the body to cause a fatal error. ++ continue ++ } ++ token.Attr[i].Val = urlRewriter(url) ++ } ++ } ++ } ++ _, err = writer.Write([]byte(token.String())) ++ default: ++ _, err = writer.Write(tokenizer.Raw()) ++ } ++ } ++ if err != io.EOF { ++ return err ++ } ++ return nil ++} ++ ++// rewriteResponse modifies an HTML response by updating absolute links referring ++// to the original host to instead refer to the proxy transport. ++func (t *Transport) rewriteResponse(req *http.Request, resp *http.Response) (*http.Response, error) { ++ origBody := resp.Body ++ defer origBody.Close() ++ ++ newContent := &bytes.Buffer{} ++ var reader io.Reader = origBody ++ var writer io.Writer = newContent ++ encoding := resp.Header.Get("Content-Encoding") ++ switch encoding { ++ case "gzip": ++ var err error ++ reader, err = gzip.NewReader(reader) ++ if err != nil { ++ return nil, fmt.Errorf("errorf making gzip reader: %v", err) ++ } ++ gzw := gzip.NewWriter(writer) ++ defer gzw.Close() ++ writer = gzw ++ case "deflate": ++ var err error ++ reader = flate.NewReader(reader) ++ flw, err := flate.NewWriter(writer, flate.BestCompression) ++ if err != nil { ++ return nil, fmt.Errorf("errorf making flate writer: %v", err) ++ } ++ defer func() { ++ flw.Close() ++ flw.Flush() ++ }() ++ writer = flw ++ case "": ++ // This is fine ++ default: ++ // Some encoding we don't understand-- don't try to parse this ++ klog.Errorf("Proxy encountered encoding %v for text/html; can't understand this so not fixing links.", encoding) ++ return resp, nil ++ } ++ ++ urlRewriter := func(targetUrl *url.URL) string { ++ return t.rewriteURL(targetUrl, req.URL, req.Host) ++ } ++ err := rewriteHTML(reader, writer, urlRewriter) ++ if err != nil { ++ klog.Errorf("Failed to rewrite URLs: %v", err) ++ return resp, err ++ } ++ ++ resp.Body = io.NopCloser(newContent) ++ // Update header node with new content-length ++ // TODO: Remove any hash/signature headers here? ++ resp.Header.Del("Content-Length") ++ resp.ContentLength = int64(newContent.Len()) ++ ++ return resp, err ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go b/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go +new file mode 100644 +index 00000000..8c30a366 +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go +@@ -0,0 +1,558 @@ ++/* ++Copyright 2017 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package proxy ++ ++import ( ++ "bufio" ++ "bytes" ++ "fmt" ++ "io" ++ "log" ++ "net" ++ "net/http" ++ "net/http/httputil" ++ "net/url" ++ "os" ++ "strings" ++ "time" ++ ++ "k8s.io/apimachinery/pkg/api/errors" ++ "k8s.io/apimachinery/pkg/util/httpstream" ++ utilnet "k8s.io/apimachinery/pkg/util/net" ++ utilruntime "k8s.io/apimachinery/pkg/util/runtime" ++ ++ "github.com/mxk/go-flowrate/flowrate" ++ ++ "k8s.io/klog/v2" ++) ++ ++// UpgradeRequestRoundTripper provides an additional method to decorate a request ++// with any authentication or other protocol level information prior to performing ++// an upgrade on the server. Any response will be handled by the intercepting ++// proxy. ++type UpgradeRequestRoundTripper interface { ++ http.RoundTripper ++ // WrapRequest takes a valid HTTP request and returns a suitably altered version ++ // of request with any HTTP level values required to complete the request half of ++ // an upgrade on the server. It does not get a chance to see the response and ++ // should bypass any request side logic that expects to see the response. ++ WrapRequest(*http.Request) (*http.Request, error) ++} ++ ++// UpgradeAwareHandler is a handler for proxy requests that may require an upgrade ++type UpgradeAwareHandler struct { ++ // UpgradeRequired will reject non-upgrade connections if true. ++ UpgradeRequired bool ++ // Location is the location of the upstream proxy. It is used as the location to Dial on the upstream server ++ // for upgrade requests unless UseRequestLocationOnUpgrade is true. ++ Location *url.URL ++ // AppendLocationPath determines if the original path of the Location should be appended to the upstream proxy request path ++ AppendLocationPath bool ++ // Transport provides an optional round tripper to use to proxy. If nil, the default proxy transport is used ++ Transport http.RoundTripper ++ // UpgradeTransport, if specified, will be used as the backend transport when upgrade requests are provided. ++ // This allows clients to disable HTTP/2. ++ UpgradeTransport UpgradeRequestRoundTripper ++ // WrapTransport indicates whether the provided Transport should be wrapped with default proxy transport behavior (URL rewriting, X-Forwarded-* header setting) ++ WrapTransport bool ++ // UseRequestLocation will use the incoming request URL when talking to the backend server. ++ UseRequestLocation bool ++ // UseLocationHost overrides the HTTP host header in requests to the backend server to use the Host from Location. ++ // This will override the req.Host field of a request, while UseRequestLocation will override the req.URL field ++ // of a request. The req.URL.Host specifies the server to connect to, while the req.Host field ++ // specifies the Host header value to send in the HTTP request. If this is false, the incoming req.Host header will ++ // just be forwarded to the backend server. ++ UseLocationHost bool ++ // FlushInterval controls how often the standard HTTP proxy will flush content from the upstream. ++ FlushInterval time.Duration ++ // MaxBytesPerSec controls the maximum rate for an upstream connection. No rate is imposed if the value is zero. ++ MaxBytesPerSec int64 ++ // Responder is passed errors that occur while setting up proxying. ++ Responder ErrorResponder ++ // Reject to forward redirect response ++ RejectForwardingRedirects bool ++} ++ ++const defaultFlushInterval = 200 * time.Millisecond ++ ++// ErrorResponder abstracts error reporting to the proxy handler to remove the need to hardcode a particular ++// error format. ++type ErrorResponder interface { ++ Error(w http.ResponseWriter, req *http.Request, err error) ++} ++ ++// SimpleErrorResponder is the legacy implementation of ErrorResponder for callers that only ++// service a single request/response per proxy. ++type SimpleErrorResponder interface { ++ Error(err error) ++} ++ ++func NewErrorResponder(r SimpleErrorResponder) ErrorResponder { ++ return simpleResponder{r} ++} ++ ++type simpleResponder struct { ++ responder SimpleErrorResponder ++} ++ ++func (r simpleResponder) Error(w http.ResponseWriter, req *http.Request, err error) { ++ r.responder.Error(err) ++} ++ ++// upgradeRequestRoundTripper implements proxy.UpgradeRequestRoundTripper. ++type upgradeRequestRoundTripper struct { ++ http.RoundTripper ++ upgrader http.RoundTripper ++} ++ ++var ( ++ _ UpgradeRequestRoundTripper = &upgradeRequestRoundTripper{} ++ _ utilnet.RoundTripperWrapper = &upgradeRequestRoundTripper{} ++) ++ ++// WrappedRoundTripper returns the round tripper that a caller would use. ++func (rt *upgradeRequestRoundTripper) WrappedRoundTripper() http.RoundTripper { ++ return rt.RoundTripper ++} ++ ++// WriteToRequest calls the nested upgrader and then copies the returned request ++// fields onto the passed request. ++func (rt *upgradeRequestRoundTripper) WrapRequest(req *http.Request) (*http.Request, error) { ++ resp, err := rt.upgrader.RoundTrip(req) ++ if err != nil { ++ return nil, err ++ } ++ return resp.Request, nil ++} ++ ++// onewayRoundTripper captures the provided request - which is assumed to have ++// been modified by other round trippers - and then returns a fake response. ++type onewayRoundTripper struct{} ++ ++// RoundTrip returns a simple 200 OK response that captures the provided request. ++func (onewayRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { ++ return &http.Response{ ++ Status: "200 OK", ++ StatusCode: http.StatusOK, ++ Body: io.NopCloser(&bytes.Buffer{}), ++ Request: req, ++ }, nil ++} ++ ++// MirrorRequest is a round tripper that can be called to get back the calling request as ++// the core round tripper in a chain. ++var MirrorRequest http.RoundTripper = onewayRoundTripper{} ++ ++// NewUpgradeRequestRoundTripper takes two round trippers - one for the underlying TCP connection, and ++// one that is able to write headers to an HTTP request. The request rt is used to set the request headers ++// and that is written to the underlying connection rt. ++func NewUpgradeRequestRoundTripper(connection, request http.RoundTripper) UpgradeRequestRoundTripper { ++ return &upgradeRequestRoundTripper{ ++ RoundTripper: connection, ++ upgrader: request, ++ } ++} ++ ++// normalizeLocation returns the result of parsing the full URL, with scheme set to http if missing ++func normalizeLocation(location *url.URL) *url.URL { ++ normalized, _ := url.Parse(location.String()) ++ if len(normalized.Scheme) == 0 { ++ normalized.Scheme = "http" ++ } ++ return normalized ++} ++ ++// NewUpgradeAwareHandler creates a new proxy handler with a default flush interval. Responder is required for returning ++// errors to the caller. ++func NewUpgradeAwareHandler(location *url.URL, transport http.RoundTripper, wrapTransport, upgradeRequired bool, responder ErrorResponder) *UpgradeAwareHandler { ++ return &UpgradeAwareHandler{ ++ Location: normalizeLocation(location), ++ Transport: transport, ++ WrapTransport: wrapTransport, ++ UpgradeRequired: upgradeRequired, ++ FlushInterval: defaultFlushInterval, ++ Responder: responder, ++ } ++} ++ ++func proxyRedirectsforRootPath(path string, w http.ResponseWriter, req *http.Request) bool { ++ redirect := false ++ method := req.Method ++ ++ // From pkg/genericapiserver/endpoints/handlers/proxy.go#ServeHTTP: ++ // Redirect requests with an empty path to a location that ends with a '/' ++ // This is essentially a hack for https://issue.k8s.io/4958. ++ // Note: Keep this code after tryUpgrade to not break that flow. ++ if len(path) == 0 && (method == http.MethodGet || method == http.MethodHead) { ++ var queryPart string ++ if len(req.URL.RawQuery) > 0 { ++ queryPart = "?" + req.URL.RawQuery ++ } ++ w.Header().Set("Location", req.URL.Path+"/"+queryPart) ++ w.WriteHeader(http.StatusMovedPermanently) ++ redirect = true ++ } ++ return redirect ++} ++ ++// ServeHTTP handles the proxy request ++func (h *UpgradeAwareHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { ++ if h.tryUpgrade(w, req) { ++ return ++ } ++ if h.UpgradeRequired { ++ h.Responder.Error(w, req, errors.NewBadRequest("Upgrade request required")) ++ return ++ } ++ ++ loc := *h.Location ++ loc.RawQuery = req.URL.RawQuery ++ ++ // If original request URL ended in '/', append a '/' at the end of the ++ // of the proxy URL ++ if !strings.HasSuffix(loc.Path, "/") && strings.HasSuffix(req.URL.Path, "/") { ++ loc.Path += "/" ++ } ++ ++ proxyRedirect := proxyRedirectsforRootPath(loc.Path, w, req) ++ if proxyRedirect { ++ return ++ } ++ ++ if h.Transport == nil || h.WrapTransport { ++ h.Transport = h.defaultProxyTransport(req.URL, h.Transport) ++ } ++ ++ // WithContext creates a shallow clone of the request with the same context. ++ newReq := req.WithContext(req.Context()) ++ newReq.Header = utilnet.CloneHeader(req.Header) ++ if !h.UseRequestLocation { ++ newReq.URL = &loc ++ } ++ if h.UseLocationHost { ++ // exchanging req.Host with the backend location is necessary for backends that act on the HTTP host header (e.g. API gateways), ++ // because req.Host has preference over req.URL.Host in filling this header field ++ newReq.Host = h.Location.Host ++ } ++ ++ // create the target location to use for the reverse proxy ++ reverseProxyLocation := &url.URL{Scheme: h.Location.Scheme, Host: h.Location.Host} ++ if h.AppendLocationPath { ++ reverseProxyLocation.Path = h.Location.Path ++ } ++ ++ proxy := httputil.NewSingleHostReverseProxy(reverseProxyLocation) ++ proxy.Transport = h.Transport ++ proxy.FlushInterval = h.FlushInterval ++ proxy.ErrorLog = log.New(noSuppressPanicError{}, "", log.LstdFlags) ++ if h.RejectForwardingRedirects { ++ oldModifyResponse := proxy.ModifyResponse ++ proxy.ModifyResponse = func(response *http.Response) error { ++ code := response.StatusCode ++ if code >= 300 && code <= 399 && len(response.Header.Get("Location")) > 0 { ++ // close the original response ++ response.Body.Close() ++ msg := "the backend attempted to redirect this request, which is not permitted" ++ // replace the response ++ *response = http.Response{ ++ StatusCode: http.StatusBadGateway, ++ Status: fmt.Sprintf("%d %s", response.StatusCode, http.StatusText(response.StatusCode)), ++ Body: io.NopCloser(strings.NewReader(msg)), ++ ContentLength: int64(len(msg)), ++ } ++ } else { ++ if oldModifyResponse != nil { ++ if err := oldModifyResponse(response); err != nil { ++ return err ++ } ++ } ++ } ++ return nil ++ } ++ } ++ if h.Responder != nil { ++ // if an optional error interceptor/responder was provided wire it ++ // the custom responder might be used for providing a unified error reporting ++ // or supporting retry mechanisms by not sending non-fatal errors to the clients ++ proxy.ErrorHandler = h.Responder.Error ++ } ++ proxy.ServeHTTP(w, newReq) ++} ++ ++type noSuppressPanicError struct{} ++ ++func (noSuppressPanicError) Write(p []byte) (n int, err error) { ++ // skip "suppressing panic for copyResponse error in test; copy error" error message ++ // that ends up in CI tests on each kube-apiserver termination as noise and ++ // everybody thinks this is fatal. ++ if strings.Contains(string(p), "suppressing panic") { ++ return len(p), nil ++ } ++ return os.Stderr.Write(p) ++} ++ ++// tryUpgrade returns true if the request was handled. ++func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Request) bool { ++ if !httpstream.IsUpgradeRequest(req) { ++ klog.V(6).Infof("Request was not an upgrade") ++ return false ++ } ++ ++ var ( ++ backendConn net.Conn ++ rawResponse []byte ++ err error ++ ) ++ ++ location := *h.Location ++ if h.UseRequestLocation { ++ location = *req.URL ++ location.Scheme = h.Location.Scheme ++ location.Host = h.Location.Host ++ if h.AppendLocationPath { ++ location.Path = singleJoiningSlash(h.Location.Path, location.Path) ++ } ++ } ++ ++ clone := utilnet.CloneRequest(req) ++ // Only append X-Forwarded-For in the upgrade path, since httputil.NewSingleHostReverseProxy ++ // handles this in the non-upgrade path. ++ utilnet.AppendForwardedForHeader(clone) ++ klog.V(6).Infof("Connecting to backend proxy (direct dial) %s\n Headers: %v", &location, clone.Header) ++ if h.UseLocationHost { ++ clone.Host = h.Location.Host ++ } ++ clone.URL = &location ++ klog.V(6).Infof("UpgradeAwareProxy: dialing for SPDY upgrade with headers: %v", clone.Header) ++ backendConn, err = h.DialForUpgrade(clone) ++ if err != nil { ++ klog.V(6).Infof("Proxy connection error: %v", err) ++ h.Responder.Error(w, req, err) ++ return true ++ } ++ defer backendConn.Close() ++ ++ // determine the http response code from the backend by reading from rawResponse+backendConn ++ backendHTTPResponse, headerBytes, err := getResponse(io.MultiReader(bytes.NewReader(rawResponse), backendConn)) ++ if err != nil { ++ klog.V(6).Infof("Proxy connection error: %v", err) ++ h.Responder.Error(w, req, err) ++ return true ++ } ++ if len(headerBytes) > len(rawResponse) { ++ // we read beyond the bytes stored in rawResponse, update rawResponse to the full set of bytes read from the backend ++ rawResponse = headerBytes ++ } ++ ++ // If the backend did not upgrade the request, return an error to the client. If the response was ++ // an error, the error is forwarded directly after the connection is hijacked. Otherwise, just ++ // return a generic error here. ++ if backendHTTPResponse.StatusCode != http.StatusSwitchingProtocols && backendHTTPResponse.StatusCode < 400 { ++ err := fmt.Errorf("invalid upgrade response: status code %d", backendHTTPResponse.StatusCode) ++ klog.Errorf("Proxy upgrade error: %v", err) ++ h.Responder.Error(w, req, err) ++ return true ++ } ++ ++ // Once the connection is hijacked, the ErrorResponder will no longer work, so ++ // hijacking should be the last step in the upgrade. ++ requestHijacker, ok := w.(http.Hijacker) ++ if !ok { ++ klog.Errorf("Unable to hijack response writer: %T", w) ++ h.Responder.Error(w, req, fmt.Errorf("request connection cannot be hijacked: %T", w)) ++ return true ++ } ++ requestHijackedConn, _, err := requestHijacker.Hijack() ++ if err != nil { ++ klog.Errorf("Unable to hijack response: %v", err) ++ h.Responder.Error(w, req, fmt.Errorf("error hijacking connection: %v", err)) ++ return true ++ } ++ defer requestHijackedConn.Close() ++ ++ if backendHTTPResponse.StatusCode != http.StatusSwitchingProtocols { ++ // If the backend did not upgrade the request, echo the response from the backend to the client and return, closing the connection. ++ klog.V(6).Infof("Proxy upgrade error, status code %d", backendHTTPResponse.StatusCode) ++ // set read/write deadlines ++ deadline := time.Now().Add(10 * time.Second) ++ backendConn.SetReadDeadline(deadline) ++ requestHijackedConn.SetWriteDeadline(deadline) ++ // write the response to the client ++ err := backendHTTPResponse.Write(requestHijackedConn) ++ if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { ++ klog.Errorf("Error proxying data from backend to client: %v", err) ++ } ++ // Indicate we handled the request ++ return true ++ } ++ ++ // Forward raw response bytes back to client. ++ if len(rawResponse) > 0 { ++ klog.V(6).Infof("Writing %d bytes to hijacked connection", len(rawResponse)) ++ if _, err = requestHijackedConn.Write(rawResponse); err != nil { ++ utilruntime.HandleError(fmt.Errorf("Error proxying response from backend to client: %v", err)) ++ } ++ } ++ ++ // Proxy the connection. This is bidirectional, so we need a goroutine ++ // to copy in each direction. Once one side of the connection exits, we ++ // exit the function which performs cleanup and in the process closes ++ // the other half of the connection in the defer. ++ writerComplete := make(chan struct{}) ++ readerComplete := make(chan struct{}) ++ ++ go func() { ++ var writer io.WriteCloser ++ if h.MaxBytesPerSec > 0 { ++ writer = flowrate.NewWriter(backendConn, h.MaxBytesPerSec) ++ } else { ++ writer = backendConn ++ } ++ _, err := io.Copy(writer, requestHijackedConn) ++ if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { ++ klog.Errorf("Error proxying data from client to backend: %v", err) ++ } ++ close(writerComplete) ++ }() ++ ++ go func() { ++ var reader io.ReadCloser ++ if h.MaxBytesPerSec > 0 { ++ reader = flowrate.NewReader(backendConn, h.MaxBytesPerSec) ++ } else { ++ reader = backendConn ++ } ++ _, err := io.Copy(requestHijackedConn, reader) ++ if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { ++ klog.Errorf("Error proxying data from backend to client: %v", err) ++ } ++ close(readerComplete) ++ }() ++ ++ // Wait for one half the connection to exit. Once it does the defer will ++ // clean up the other half of the connection. ++ select { ++ case <-writerComplete: ++ case <-readerComplete: ++ } ++ klog.V(6).Infof("Disconnecting from backend proxy %s\n Headers: %v", &location, clone.Header) ++ ++ return true ++} ++ ++// FIXME: Taken from net/http/httputil/reverseproxy.go as singleJoiningSlash is not exported to be re-used. ++// See-also: https://github.com/golang/go/issues/44290 ++func singleJoiningSlash(a, b string) string { ++ aslash := strings.HasSuffix(a, "/") ++ bslash := strings.HasPrefix(b, "/") ++ switch { ++ case aslash && bslash: ++ return a + b[1:] ++ case !aslash && !bslash: ++ return a + "/" + b ++ } ++ return a + b ++} ++ ++func (h *UpgradeAwareHandler) DialForUpgrade(req *http.Request) (net.Conn, error) { ++ if h.UpgradeTransport == nil { ++ return dial(req, h.Transport) ++ } ++ updatedReq, err := h.UpgradeTransport.WrapRequest(req) ++ if err != nil { ++ return nil, err ++ } ++ return dial(updatedReq, h.UpgradeTransport) ++} ++ ++// getResponseCode reads a http response from the given reader, returns the response, ++// the bytes read from the reader, and any error encountered ++func getResponse(r io.Reader) (*http.Response, []byte, error) { ++ rawResponse := bytes.NewBuffer(make([]byte, 0, 256)) ++ // Save the bytes read while reading the response headers into the rawResponse buffer ++ resp, err := http.ReadResponse(bufio.NewReader(io.TeeReader(r, rawResponse)), nil) ++ if err != nil { ++ return nil, nil, err ++ } ++ // return the http response and the raw bytes consumed from the reader in the process ++ return resp, rawResponse.Bytes(), nil ++} ++ ++// dial dials the backend at req.URL and writes req to it. ++func dial(req *http.Request, transport http.RoundTripper) (net.Conn, error) { ++ conn, err := DialURL(req.Context(), req.URL, transport) ++ if err != nil { ++ return nil, fmt.Errorf("error dialing backend: %v", err) ++ } ++ ++ if err = req.Write(conn); err != nil { ++ conn.Close() ++ return nil, fmt.Errorf("error sending request: %v", err) ++ } ++ ++ return conn, err ++} ++ ++func (h *UpgradeAwareHandler) defaultProxyTransport(url *url.URL, internalTransport http.RoundTripper) http.RoundTripper { ++ scheme := url.Scheme ++ host := url.Host ++ suffix := h.Location.Path ++ if strings.HasSuffix(url.Path, "/") && !strings.HasSuffix(suffix, "/") { ++ suffix += "/" ++ } ++ pathPrepend := strings.TrimSuffix(url.Path, suffix) ++ rewritingTransport := &Transport{ ++ Scheme: scheme, ++ Host: host, ++ PathPrepend: pathPrepend, ++ RoundTripper: internalTransport, ++ } ++ return &corsRemovingTransport{ ++ RoundTripper: rewritingTransport, ++ } ++} ++ ++// corsRemovingTransport is a wrapper for an internal transport. It removes CORS headers ++// from the internal response. ++// Implements pkg/util/net.RoundTripperWrapper ++type corsRemovingTransport struct { ++ http.RoundTripper ++} ++ ++var _ = utilnet.RoundTripperWrapper(&corsRemovingTransport{}) ++ ++func (rt *corsRemovingTransport) RoundTrip(req *http.Request) (*http.Response, error) { ++ resp, err := rt.RoundTripper.RoundTrip(req) ++ if err != nil { ++ return nil, err ++ } ++ removeCORSHeaders(resp) ++ return resp, nil ++} ++ ++func (rt *corsRemovingTransport) WrappedRoundTripper() http.RoundTripper { ++ return rt.RoundTripper ++} ++ ++// removeCORSHeaders strip CORS headers sent from the backend ++// This should be called on all responses before returning ++func removeCORSHeaders(resp *http.Response) { ++ resp.Header.Del("Access-Control-Allow-Credentials") ++ resp.Header.Del("Access-Control-Allow-Headers") ++ resp.Header.Del("Access-Control-Allow-Methods") ++ resp.Header.Del("Access-Control-Allow-Origin") ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go b/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go +index 237ebaef..ba153ee2 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go +@@ -46,8 +46,22 @@ const ( + // adds support for exit codes. + StreamProtocolV4Name = "v4.channel.k8s.io" + ++ // The subprotocol "v5.channel.k8s.io" is used for remote command ++ // attachment/execution. It is the 5th version of the subprotocol and ++ // adds support for a CLOSE signal. ++ StreamProtocolV5Name = "v5.channel.k8s.io" ++ + NonZeroExitCodeReason = metav1.StatusReason("NonZeroExitCode") + ExitCodeCauseType = metav1.CauseType("ExitCode") ++ ++ // RemoteCommand stream identifiers. The first three identifiers (for STDIN, ++ // STDOUT, STDERR) are the same as their file descriptors. ++ StreamStdIn = 0 ++ StreamStdOut = 1 ++ StreamStdErr = 2 ++ StreamErr = 3 ++ StreamResize = 4 ++ StreamClose = 255 + ) + + var SupportedStreamingProtocols = []string{StreamProtocolV4Name, StreamProtocolV3Name, StreamProtocolV2Name, StreamProtocolV1Name} +diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go +index 3674914f..df374949 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go +@@ -17,6 +17,7 @@ limitations under the License. + package runtime + + import ( ++ "context" + "fmt" + "net/http" + "runtime" +@@ -35,7 +36,7 @@ var ( + ) + + // PanicHandlers is a list of functions which will be invoked when a panic happens. +-var PanicHandlers = []func(interface{}){logPanic} ++var PanicHandlers = []func(context.Context, interface{}){logPanic} + + // HandleCrash simply catches a crash and logs an error. Meant to be called via + // defer. Additional context-specific handlers can be provided, and will be +@@ -43,23 +44,54 @@ var PanicHandlers = []func(interface{}){logPanic} + // handlers and logging the panic message. + // + // E.g., you can provide one or more additional handlers for something like shutting down go routines gracefully. ++// ++// Contextual logging: HandleCrashWithContext should be used instead of HandleCrash in code which supports contextual logging. + func HandleCrash(additionalHandlers ...func(interface{})) { + if r := recover(); r != nil { +- for _, fn := range PanicHandlers { +- fn(r) +- } +- for _, fn := range additionalHandlers { +- fn(r) +- } +- if ReallyCrash { +- // Actually proceed to panic. +- panic(r) ++ additionalHandlersWithContext := make([]func(context.Context, interface{}), len(additionalHandlers)) ++ for i, handler := range additionalHandlers { ++ handler := handler // capture loop variable ++ additionalHandlersWithContext[i] = func(_ context.Context, r interface{}) { ++ handler(r) ++ } + } ++ ++ handleCrash(context.Background(), r, additionalHandlersWithContext...) ++ } ++} ++ ++// HandleCrashWithContext simply catches a crash and logs an error. Meant to be called via ++// defer. Additional context-specific handlers can be provided, and will be ++// called in case of panic. HandleCrash actually crashes, after calling the ++// handlers and logging the panic message. ++// ++// E.g., you can provide one or more additional handlers for something like shutting down go routines gracefully. ++// ++// The context is used to determine how to log. ++func HandleCrashWithContext(ctx context.Context, additionalHandlers ...func(context.Context, interface{})) { ++ if r := recover(); r != nil { ++ handleCrash(ctx, r, additionalHandlers...) ++ } ++} ++ ++// handleCrash is the common implementation of HandleCrash and HandleCrash. ++// Having those call a common implementation ensures that the stack depth ++// is the same regardless through which path the handlers get invoked. ++func handleCrash(ctx context.Context, r any, additionalHandlers ...func(context.Context, interface{})) { ++ for _, fn := range PanicHandlers { ++ fn(ctx, r) ++ } ++ for _, fn := range additionalHandlers { ++ fn(ctx, r) ++ } ++ if ReallyCrash { ++ // Actually proceed to panic. ++ panic(r) + } + } + + // logPanic logs the caller tree when a panic occurs (except in the special case of http.ErrAbortHandler). +-func logPanic(r interface{}) { ++func logPanic(ctx context.Context, r interface{}) { + if r == http.ErrAbortHandler { + // honor the http.ErrAbortHandler sentinel panic value: + // ErrAbortHandler is a sentinel panic value to abort a handler. +@@ -73,10 +105,20 @@ func logPanic(r interface{}) { + const size = 64 << 10 + stacktrace := make([]byte, size) + stacktrace = stacktrace[:runtime.Stack(stacktrace, false)] ++ ++ // We don't really know how many call frames to skip because the Go ++ // panic handler is between us and the code where the panic occurred. ++ // If it's one function (as in Go 1.21), then skipping four levels ++ // gets us to the function which called the `defer HandleCrashWithontext(...)`. ++ logger := klog.FromContext(ctx).WithCallDepth(4) ++ ++ // For backwards compatibility, conversion to string ++ // is handled here instead of defering to the logging ++ // backend. + if _, ok := r.(string); ok { +- klog.Errorf("Observed a panic: %s\n%s", r, stacktrace) ++ logger.Error(nil, "Observed a panic", "panic", r, "stacktrace", string(stacktrace)) + } else { +- klog.Errorf("Observed a panic: %#v (%v)\n%s", r, r, stacktrace) ++ logger.Error(nil, "Observed a panic", "panic", fmt.Sprintf("%v", r), "panicGoValue", fmt.Sprintf("%#v", r), "stacktrace", string(stacktrace)) + } + } + +@@ -84,35 +126,76 @@ func logPanic(r interface{}) { + // error occurs. + // TODO(lavalamp): for testability, this and the below HandleError function + // should be packaged up into a testable and reusable object. +-var ErrorHandlers = []func(error){ ++var ErrorHandlers = []ErrorHandler{ + logError, +- (&rudimentaryErrorBackoff{ +- lastErrorTime: time.Now(), +- // 1ms was the number folks were able to stomach as a global rate limit. +- // If you need to log errors more than 1000 times a second you +- // should probably consider fixing your code instead. :) +- minPeriod: time.Millisecond, +- }).OnError, ++ func(_ context.Context, _ error, _ string, _ ...interface{}) { ++ (&rudimentaryErrorBackoff{ ++ lastErrorTime: time.Now(), ++ // 1ms was the number folks were able to stomach as a global rate limit. ++ // If you need to log errors more than 1000 times a second you ++ // should probably consider fixing your code instead. :) ++ minPeriod: time.Millisecond, ++ }).OnError() ++ }, + } + ++type ErrorHandler func(ctx context.Context, err error, msg string, keysAndValues ...interface{}) ++ + // HandlerError is a method to invoke when a non-user facing piece of code cannot + // return an error and needs to indicate it has been ignored. Invoking this method + // is preferable to logging the error - the default behavior is to log but the + // errors may be sent to a remote server for analysis. ++// ++// Contextual logging: HandleErrorWithContext should be used instead of HandleError in code which supports contextual logging. + func HandleError(err error) { + // this is sometimes called with a nil error. We probably shouldn't fail and should do nothing instead + if err == nil { + return + } + ++ handleError(context.Background(), err, "Unhandled Error") ++} ++ ++// HandlerErrorWithContext is a method to invoke when a non-user facing piece of code cannot ++// return an error and needs to indicate it has been ignored. Invoking this method ++// is preferable to logging the error - the default behavior is to log but the ++// errors may be sent to a remote server for analysis. The context is used to ++// determine how to log the error. ++// ++// If contextual logging is enabled, the default log output is equivalent to ++// ++// logr.FromContext(ctx).WithName("UnhandledError").Error(err, msg, keysAndValues...) ++// ++// Without contextual logging, it is equivalent to: ++// ++// klog.ErrorS(err, msg, keysAndValues...) ++// ++// In contrast to HandleError, passing nil for the error is still going to ++// trigger a log entry. Don't construct a new error or wrap an error ++// with fmt.Errorf. Instead, add additional information via the mssage ++// and key/value pairs. ++// ++// This variant should be used instead of HandleError because it supports ++// structured, contextual logging. ++func HandleErrorWithContext(ctx context.Context, err error, msg string, keysAndValues ...interface{}) { ++ handleError(ctx, err, msg, keysAndValues...) ++} ++ ++// handleError is the common implementation of HandleError and HandleErrorWithContext. ++// Using this common implementation ensures that the stack depth ++// is the same regardless through which path the handlers get invoked. ++func handleError(ctx context.Context, err error, msg string, keysAndValues ...interface{}) { + for _, fn := range ErrorHandlers { +- fn(err) ++ fn(ctx, err, msg, keysAndValues...) + } + } + +-// logError prints an error with the call stack of the location it was reported +-func logError(err error) { +- klog.ErrorDepth(2, err) ++// logError prints an error with the call stack of the location it was reported. ++// It expects to be called as -> HandleError[WithContext] -> handleError -> logError. ++func logError(ctx context.Context, err error, msg string, keysAndValues ...interface{}) { ++ logger := klog.FromContext(ctx).WithCallDepth(3) ++ logger = klog.LoggerWithName(logger, "UnhandledError") ++ logger.Error(err, msg, keysAndValues...) //nolint:logcheck // logcheck complains about unknown key/value pairs. + } + + type rudimentaryErrorBackoff struct { +@@ -125,7 +208,7 @@ type rudimentaryErrorBackoff struct { + + // OnError will block if it is called more often than the embedded period time. + // This will prevent overly tight hot error loops. +-func (r *rudimentaryErrorBackoff) OnError(error) { ++func (r *rudimentaryErrorBackoff) OnError() { + now := time.Now() // start the timer before acquiring the lock + r.lastErrorTimeLock.Lock() + d := now.Sub(r.lastErrorTime) +diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go +index 19488339..fd281bdb 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go +@@ -16,4 +16,4 @@ limitations under the License. + + // Package sets has generic set and specified sets. Generic set will + // replace specified ones over time. And specific ones are deprecated. +-package sets ++package sets // import "k8s.io/apimachinery/pkg/util/sets" +diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go b/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go +deleted file mode 100644 +index 443dac62..00000000 +--- a/vendor/k8s.io/apimachinery/pkg/util/sets/ordered.go ++++ /dev/null +@@ -1,53 +0,0 @@ +-/* +-Copyright 2022 The Kubernetes Authors. +- +-Licensed under the Apache License, Version 2.0 (the "License"); +-you may not use this file except in compliance with the License. +-You may obtain a copy of the License at +- +- http://www.apache.org/licenses/LICENSE-2.0 +- +-Unless required by applicable law or agreed to in writing, software +-distributed under the License is distributed on an "AS IS" BASIS, +-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-See the License for the specific language governing permissions and +-limitations under the License. +-*/ +- +-package sets +- +-// ordered is a constraint that permits any ordered type: any type +-// that supports the operators < <= >= >. +-// If future releases of Go add new ordered types, +-// this constraint will be modified to include them. +-type ordered interface { +- integer | float | ~string +-} +- +-// integer is a constraint that permits any integer type. +-// If future releases of Go add new predeclared integer types, +-// this constraint will be modified to include them. +-type integer interface { +- signed | unsigned +-} +- +-// float is a constraint that permits any floating-point type. +-// If future releases of Go add new predeclared floating-point types, +-// this constraint will be modified to include them. +-type float interface { +- ~float32 | ~float64 +-} +- +-// signed is a constraint that permits any signed integer type. +-// If future releases of Go add new predeclared signed integer types, +-// this constraint will be modified to include them. +-type signed interface { +- ~int | ~int8 | ~int16 | ~int32 | ~int64 +-} +- +-// unsigned is a constraint that permits any unsigned integer type. +-// If future releases of Go add new predeclared unsigned integer types, +-// this constraint will be modified to include them. +-type unsigned interface { +- ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr +-} +diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/set.go b/vendor/k8s.io/apimachinery/pkg/util/sets/set.go +index d50526f4..cd961c8c 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/sets/set.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/sets/set.go +@@ -17,6 +17,7 @@ limitations under the License. + package sets + + import ( ++ "cmp" + "sort" + ) + +@@ -37,7 +38,7 @@ func New[T comparable](items ...T) Set[T] { + // KeySet creates a Set from a keys of a map[comparable](? extends interface{}). + // If the value passed in is not actually a map, this will panic. + func KeySet[T comparable, V any](theMap map[T]V) Set[T] { +- ret := Set[T]{} ++ ret := make(Set[T], len(theMap)) + for keyValue := range theMap { + ret.Insert(keyValue) + } +@@ -67,14 +68,8 @@ func (s Set[T]) Delete(items ...T) Set[T] { + // Clear empties the set. + // It is preferable to replace the set with a newly constructed set, + // but not all callers can do that (when there are other references to the map). +-// In some cases the set *won't* be fully cleared, e.g. a Set[float32] containing NaN +-// can't be cleared because NaN can't be removed. +-// For sets containing items of a type that is reflexive for ==, +-// this is optimized to a single call to runtime.mapclear(). + func (s Set[T]) Clear() Set[T] { +- for key := range s { +- delete(s, key) +- } ++ clear(s) + return s + } + +@@ -193,7 +188,7 @@ func (s1 Set[T]) Equal(s2 Set[T]) bool { + return len(s1) == len(s2) && s1.IsSuperset(s2) + } + +-type sortableSliceOfGeneric[T ordered] []T ++type sortableSliceOfGeneric[T cmp.Ordered] []T + + func (g sortableSliceOfGeneric[T]) Len() int { return len(g) } + func (g sortableSliceOfGeneric[T]) Less(i, j int) bool { return less[T](g[i], g[j]) } +@@ -203,7 +198,7 @@ func (g sortableSliceOfGeneric[T]) Swap(i, j int) { g[i], g[j] = g[j], g[i] + // + // This is a separate function and not a method because not all types supported + // by Generic are ordered and only those can be sorted. +-func List[T ordered](s Set[T]) []T { ++func List[T cmp.Ordered](s Set[T]) []T { + res := make(sortableSliceOfGeneric[T], 0, len(s)) + for key := range s { + res = append(res, key) +@@ -236,6 +231,6 @@ func (s Set[T]) Len() int { + return len(s) + } + +-func less[T ordered](lhs, rhs T) bool { ++func less[T cmp.Ordered](lhs, rhs T) bool { + return lhs < rhs + } +diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go +index df305b71..85b0cfc0 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/meta.go +@@ -20,12 +20,17 @@ import ( + "errors" + "fmt" + "reflect" ++ "strings" + + "k8s.io/apimachinery/pkg/util/mergepatch" + forkedjson "k8s.io/apimachinery/third_party/forked/golang/json" + openapi "k8s.io/kube-openapi/pkg/util/proto" ++ "k8s.io/kube-openapi/pkg/validation/spec" + ) + ++const patchMergeKey = "x-kubernetes-patch-merge-key" ++const patchStrategy = "x-kubernetes-patch-strategy" ++ + type PatchMeta struct { + patchStrategies []string + patchMergeKey string +@@ -148,6 +153,90 @@ func GetTagStructTypeOrDie(dataStruct interface{}) reflect.Type { + return t + } + ++type PatchMetaFromOpenAPIV3 struct { ++ // SchemaList is required to resolve OpenAPI V3 references ++ SchemaList map[string]*spec.Schema ++ Schema *spec.Schema ++} ++ ++func (s PatchMetaFromOpenAPIV3) traverse(key string) (PatchMetaFromOpenAPIV3, error) { ++ if s.Schema == nil { ++ return PatchMetaFromOpenAPIV3{}, nil ++ } ++ if len(s.Schema.Properties) == 0 { ++ return PatchMetaFromOpenAPIV3{}, fmt.Errorf("unable to find api field \"%s\"", key) ++ } ++ subschema, ok := s.Schema.Properties[key] ++ if !ok { ++ return PatchMetaFromOpenAPIV3{}, fmt.Errorf("unable to find api field \"%s\"", key) ++ } ++ return PatchMetaFromOpenAPIV3{SchemaList: s.SchemaList, Schema: &subschema}, nil ++} ++ ++func resolve(l *PatchMetaFromOpenAPIV3) error { ++ if len(l.Schema.AllOf) > 0 { ++ l.Schema = &l.Schema.AllOf[0] ++ } ++ if refString := l.Schema.Ref.String(); refString != "" { ++ str := strings.TrimPrefix(refString, "#/components/schemas/") ++ sch, ok := l.SchemaList[str] ++ if ok { ++ l.Schema = sch ++ } else { ++ return fmt.Errorf("unable to resolve %s in OpenAPI V3", refString) ++ } ++ } ++ return nil ++} ++ ++func (s PatchMetaFromOpenAPIV3) LookupPatchMetadataForStruct(key string) (LookupPatchMeta, PatchMeta, error) { ++ l, err := s.traverse(key) ++ if err != nil { ++ return l, PatchMeta{}, err ++ } ++ p := PatchMeta{} ++ f, ok := l.Schema.Extensions[patchMergeKey] ++ if ok { ++ p.SetPatchMergeKey(f.(string)) ++ } ++ g, ok := l.Schema.Extensions[patchStrategy] ++ if ok { ++ p.SetPatchStrategies(strings.Split(g.(string), ",")) ++ } ++ ++ err = resolve(&l) ++ return l, p, err ++} ++ ++func (s PatchMetaFromOpenAPIV3) LookupPatchMetadataForSlice(key string) (LookupPatchMeta, PatchMeta, error) { ++ l, err := s.traverse(key) ++ if err != nil { ++ return l, PatchMeta{}, err ++ } ++ p := PatchMeta{} ++ f, ok := l.Schema.Extensions[patchMergeKey] ++ if ok { ++ p.SetPatchMergeKey(f.(string)) ++ } ++ g, ok := l.Schema.Extensions[patchStrategy] ++ if ok { ++ p.SetPatchStrategies(strings.Split(g.(string), ",")) ++ } ++ if l.Schema.Items != nil { ++ l.Schema = l.Schema.Items.Schema ++ } ++ err = resolve(&l) ++ return l, p, err ++} ++ ++func (s PatchMetaFromOpenAPIV3) Name() string { ++ schema := s.Schema ++ if len(schema.Type) > 0 { ++ return strings.Join(schema.Type, "") ++ } ++ return "Struct" ++} ++ + type PatchMetaFromOpenAPI struct { + Schema openapi.Schema + } +diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go +index 920c113b..6825a808 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go +@@ -1361,6 +1361,10 @@ func mergeMap(original, patch map[string]interface{}, schema LookupPatchMeta, me + // original. Otherwise, check if we want to preserve it or skip it. + // Preserving the null value is useful when we want to send an explicit + // delete to the API server. ++ // In some cases, this may lead to inconsistent behavior with create. ++ // ref: https://github.com/kubernetes/kubernetes/issues/123304 ++ // To avoid breaking compatibility, ++ // we made corresponding changes on the client side to ensure that the create and patch behaviors are idempotent. + if patchV == nil { + delete(original, k) + if mergeOptions.IgnoreUnmatchedNulls { +diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS b/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS +new file mode 100644 +index 00000000..40237324 +--- /dev/null ++++ b/vendor/k8s.io/apimachinery/pkg/util/validation/OWNERS +@@ -0,0 +1,11 @@ ++# See the OWNERS docs at https://go.k8s.io/owners ++ ++# Disable inheritance as this is an api owners file ++options: ++ no_parent_owners: true ++approvers: ++ - api-approvers ++reviewers: ++ - api-reviewers ++labels: ++ - kind/api-change +diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go +index ae73bda9..f1634bc0 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go +@@ -200,12 +200,12 @@ func Invalid(field *Path, value interface{}, detail string) *Error { + // NotSupported returns a *Error indicating "unsupported value". + // This is used to report unknown values for enumerated fields (e.g. a list of + // valid values). +-func NotSupported(field *Path, value interface{}, validValues []string) *Error { ++func NotSupported[T ~string](field *Path, value interface{}, validValues []T) *Error { + detail := "" + if len(validValues) > 0 { + quotedValues := make([]string, len(validValues)) + for i, v := range validValues { +- quotedValues[i] = strconv.Quote(v) ++ quotedValues[i] = strconv.Quote(fmt.Sprint(v)) + } + detail = "supported values: " + strings.Join(quotedValues, ", ") + } +@@ -220,26 +220,24 @@ func Forbidden(field *Path, detail string) *Error { + return &Error{ErrorTypeForbidden, field.String(), "", detail} + } + +-// TooLong returns a *Error indicating "too long". This is used to +-// report that the given value is too long. This is similar to +-// Invalid, but the returned error will not include the too-long +-// value. ++// TooLong returns a *Error indicating "too long". This is used to report that ++// the given value is too long. This is similar to Invalid, but the returned ++// error will not include the too-long value. If maxLength is negative, it will ++// be included in the message. The value argument is not used. + func TooLong(field *Path, value interface{}, maxLength int) *Error { +- return &Error{ErrorTypeTooLong, field.String(), value, fmt.Sprintf("must have at most %d bytes", maxLength)} +-} +- +-// TooLongMaxLength returns a *Error indicating "too long". This is used to +-// report that the given value is too long. This is similar to +-// Invalid, but the returned error will not include the too-long +-// value. If maxLength is negative, no max length will be included in the message. +-func TooLongMaxLength(field *Path, value interface{}, maxLength int) *Error { + var msg string + if maxLength >= 0 { +- msg = fmt.Sprintf("may not be longer than %d", maxLength) ++ msg = fmt.Sprintf("may not be more than %d bytes", maxLength) + } else { + msg = "value is too long" + } +- return &Error{ErrorTypeTooLong, field.String(), value, msg} ++ return &Error{ErrorTypeTooLong, field.String(), "", msg} ++} ++ ++// TooLongMaxLength returns a *Error indicating "too long". ++// Deprecated: Use TooLong instead. ++func TooLongMaxLength(field *Path, value interface{}, maxLength int) *Error { ++ return TooLong(field, "", maxLength) + } + + // TooMany returns a *Error indicating "too many". This is used to +diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go +index 0b8a6cb3..9bc393cf 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go +@@ -19,10 +19,9 @@ package validation + import ( + "fmt" + "math" +- "net" + "regexp" +- "strconv" + "strings" ++ "unicode" + + "k8s.io/apimachinery/pkg/util/validation/field" + netutils "k8s.io/utils/net" +@@ -176,6 +175,8 @@ func IsValidLabelValue(value string) []string { + } + + const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?" ++const dns1123LabelFmtWithUnderscore string = "_?[a-z0-9]([-_a-z0-9]*[a-z0-9])?" ++ + const dns1123LabelErrMsg string = "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" + + // DNS1123LabelMaxLength is a label's max length in DNS (RFC 1123) +@@ -205,10 +206,14 @@ func IsDNS1123Label(value string) []string { + const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*" + const dns1123SubdomainErrorMsg string = "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" + ++const dns1123SubdomainFmtWithUnderscore string = dns1123LabelFmtWithUnderscore + "(\\." + dns1123LabelFmtWithUnderscore + ")*" ++const dns1123SubdomainErrorMsgFG string = "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '_', '-' or '.', and must start and end with an alphanumeric character" ++ + // DNS1123SubdomainMaxLength is a subdomain's max length in DNS (RFC 1123) + const DNS1123SubdomainMaxLength int = 253 + + var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$") ++var dns1123SubdomainRegexpWithUnderscore = regexp.MustCompile("^" + dns1123SubdomainFmtWithUnderscore + "$") + + // IsDNS1123Subdomain tests for a string that conforms to the definition of a + // subdomain in DNS (RFC 1123). +@@ -223,6 +228,19 @@ func IsDNS1123Subdomain(value string) []string { + return errs + } + ++// IsDNS1123SubdomainWithUnderscore tests for a string that conforms to the definition of a ++// subdomain in DNS (RFC 1123), but allows the use of an underscore in the string ++func IsDNS1123SubdomainWithUnderscore(value string) []string { ++ var errs []string ++ if len(value) > DNS1123SubdomainMaxLength { ++ errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) ++ } ++ if !dns1123SubdomainRegexpWithUnderscore.MatchString(value) { ++ errs = append(errs, RegexError(dns1123SubdomainErrorMsgFG, dns1123SubdomainFmt, "example.com")) ++ } ++ return errs ++} ++ + const dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?" + const dns1035LabelErrMsg string = "a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character" + +@@ -352,11 +370,12 @@ func IsValidPortName(port string) []string { + } + + // IsValidIP tests that the argument is a valid IP address. +-func IsValidIP(value string) []string { ++func IsValidIP(fldPath *field.Path, value string) field.ErrorList { ++ var allErrors field.ErrorList + if netutils.ParseIPSloppy(value) == nil { +- return []string{"must be a valid IP address, (e.g. 10.9.8.7 or 2001:db8::ffff)"} ++ allErrors = append(allErrors, field.Invalid(fldPath, value, "must be a valid IP address, (e.g. 10.9.8.7 or 2001:db8::ffff)")) + } +- return nil ++ return allErrors + } + + // IsValidIPv4Address tests that the argument is a valid IPv4 address. +@@ -379,6 +398,16 @@ func IsValidIPv6Address(fldPath *field.Path, value string) field.ErrorList { + return allErrors + } + ++// IsValidCIDR tests that the argument is a valid CIDR value. ++func IsValidCIDR(fldPath *field.Path, value string) field.ErrorList { ++ var allErrors field.ErrorList ++ _, _, err := netutils.ParseCIDRSloppy(value) ++ if err != nil { ++ allErrors = append(allErrors, field.Invalid(fldPath, value, "must be a valid CIDR value, (e.g. 10.9.8.0/24 or 2001:db8::/64)")) ++ } ++ return allErrors ++} ++ + const percentFmt string = "[0-9]+%" + const percentErrMsg string = "a valid percent string must be a numeric string followed by an ending '%'" + +@@ -409,6 +438,9 @@ func IsHTTPHeaderName(value string) []string { + const envVarNameFmt = "[-._a-zA-Z][-._a-zA-Z0-9]*" + const envVarNameFmtErrMsg string = "a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit" + ++// TODO(hirazawaui): Rename this when the RelaxedEnvironmentVariableValidation gate is removed. ++const relaxedEnvVarNameFmtErrMsg string = "a valid environment variable name must consist only of printable ASCII characters other than '='" ++ + var envVarNameRegexp = regexp.MustCompile("^" + envVarNameFmt + "$") + + // IsEnvVarName tests if a string is a valid environment variable name. +@@ -422,6 +454,24 @@ func IsEnvVarName(value string) []string { + return errs + } + ++// IsRelaxedEnvVarName tests if a string is a valid environment variable name. ++func IsRelaxedEnvVarName(value string) []string { ++ var errs []string ++ ++ if len(value) == 0 { ++ errs = append(errs, "environment variable name "+EmptyError()) ++ } ++ ++ for _, r := range value { ++ if r > unicode.MaxASCII || !unicode.IsPrint(r) || r == '=' { ++ errs = append(errs, relaxedEnvVarNameFmtErrMsg) ++ break ++ } ++ } ++ ++ return errs ++} ++ + const configMapKeyFmt = `[-._a-zA-Z0-9]+` + const configMapKeyErrMsg string = "a valid config key must consist of alphanumeric characters, '-', '_' or '.'" + +@@ -493,18 +543,3 @@ func hasChDirPrefix(value string) []string { + } + return errs + } +- +-// IsValidSocketAddr checks that string represents a valid socket address +-// as defined in RFC 789. (e.g 0.0.0.0:10254 or [::]:10254)) +-func IsValidSocketAddr(value string) []string { +- var errs []string +- ip, port, err := net.SplitHostPort(value) +- if err != nil { +- errs = append(errs, "must be a valid socket address format, (e.g. 0.0.0.0:10254 or [::]:10254)") +- return errs +- } +- portInt, _ := strconv.Atoi(port) +- errs = append(errs, IsValidPortNum(portInt)...) +- errs = append(errs, IsValidIP(ip)...) +- return errs +-} +diff --git a/vendor/k8s.io/apimachinery/pkg/util/version/version.go b/vendor/k8s.io/apimachinery/pkg/util/version/version.go +index 4c619569..b7812ff2 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/version/version.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/version/version.go +@@ -18,10 +18,13 @@ package version + + import ( + "bytes" ++ "errors" + "fmt" + "regexp" + "strconv" + "strings" ++ ++ apimachineryversion "k8s.io/apimachinery/pkg/version" + ) + + // Version is an opaque representation of a version number +@@ -30,6 +33,7 @@ type Version struct { + semver bool + preRelease string + buildMetadata string ++ info apimachineryversion.Info + } + + var ( +@@ -85,6 +89,47 @@ func parse(str string, semver bool) (*Version, error) { + return v, nil + } + ++// HighestSupportedVersion returns the highest supported version ++// This function assumes that the highest supported version must be v1.x. ++func HighestSupportedVersion(versions []string) (*Version, error) { ++ if len(versions) == 0 { ++ return nil, errors.New("empty array for supported versions") ++ } ++ ++ var ( ++ highestSupportedVersion *Version ++ theErr error ++ ) ++ ++ for i := len(versions) - 1; i >= 0; i-- { ++ currentHighestVer, err := ParseGeneric(versions[i]) ++ if err != nil { ++ theErr = err ++ continue ++ } ++ ++ if currentHighestVer.Major() > 1 { ++ continue ++ } ++ ++ if highestSupportedVersion == nil || highestSupportedVersion.LessThan(currentHighestVer) { ++ highestSupportedVersion = currentHighestVer ++ } ++ } ++ ++ if highestSupportedVersion == nil { ++ return nil, fmt.Errorf( ++ "could not find a highest supported version from versions (%v) reported: %+v", ++ versions, theErr) ++ } ++ ++ if highestSupportedVersion.Major() != 1 { ++ return nil, fmt.Errorf("highest supported version reported is %v, must be v1.x", highestSupportedVersion) ++ } ++ ++ return highestSupportedVersion, nil ++} ++ + // ParseGeneric parses a "generic" version string. The version string must consist of two + // or more dot-separated numeric fields (the first of which can't have leading zeroes), + // followed by arbitrary uninterpreted data (which need not be separated from the final +@@ -103,6 +148,43 @@ func MustParseGeneric(str string) *Version { + return v + } + ++// Parse tries to do ParseSemantic first to keep more information. ++// If ParseSemantic fails, it would just do ParseGeneric. ++func Parse(str string) (*Version, error) { ++ v, err := parse(str, true) ++ if err != nil { ++ return parse(str, false) ++ } ++ return v, err ++} ++ ++// MustParse is like Parse except that it panics on error ++func MustParse(str string) *Version { ++ v, err := Parse(str) ++ if err != nil { ++ panic(err) ++ } ++ return v ++} ++ ++// ParseMajorMinor parses a "generic" version string and returns a version with the major and minor version. ++func ParseMajorMinor(str string) (*Version, error) { ++ v, err := ParseGeneric(str) ++ if err != nil { ++ return nil, err ++ } ++ return MajorMinor(v.Major(), v.Minor()), nil ++} ++ ++// MustParseMajorMinor is like ParseMajorMinor except that it panics on error ++func MustParseMajorMinor(str string) *Version { ++ v, err := ParseMajorMinor(str) ++ if err != nil { ++ panic(err) ++ } ++ return v ++} ++ + // ParseSemantic parses a version string that exactly obeys the syntax and semantics of + // the "Semantic Versioning" specification (http://semver.org/) (although it ignores + // leading and trailing whitespace, and allows the version to be preceded by "v"). For +@@ -173,6 +255,32 @@ func (v *Version) WithMinor(minor uint) *Version { + return &result + } + ++// SubtractMinor returns the version with offset from the original minor, with the same major and no patch. ++// If -offset >= current minor, the minor would be 0. ++func (v *Version) OffsetMinor(offset int) *Version { ++ var minor uint ++ if offset >= 0 { ++ minor = v.Minor() + uint(offset) ++ } else { ++ diff := uint(-offset) ++ if diff < v.Minor() { ++ minor = v.Minor() - diff ++ } ++ } ++ return MajorMinor(v.Major(), minor) ++} ++ ++// SubtractMinor returns the version diff minor versions back, with the same major and no patch. ++// If diff >= current minor, the minor would be 0. ++func (v *Version) SubtractMinor(diff uint) *Version { ++ return v.OffsetMinor(-int(diff)) ++} ++ ++// AddMinor returns the version diff minor versions forward, with the same major and no patch. ++func (v *Version) AddMinor(diff uint) *Version { ++ return v.OffsetMinor(int(diff)) ++} ++ + // WithPatch returns copy of the version object with requested patch number + func (v *Version) WithPatch(patch uint) *Version { + result := *v +@@ -182,6 +290,9 @@ func (v *Version) WithPatch(patch uint) *Version { + + // WithPreRelease returns copy of the version object with requested prerelease + func (v *Version) WithPreRelease(preRelease string) *Version { ++ if len(preRelease) == 0 { ++ return v ++ } + result := *v + result.components = []uint{v.Major(), v.Minor(), v.Patch()} + result.preRelease = preRelease +@@ -303,6 +414,17 @@ func onlyZeros(array []uint) bool { + return true + } + ++// EqualTo tests if a version is equal to a given version. ++func (v *Version) EqualTo(other *Version) bool { ++ if v == nil { ++ return other == nil ++ } ++ if other == nil { ++ return false ++ } ++ return v.compareInternal(other) == 0 ++} ++ + // AtLeast tests if a version is at least equal to a given minimum version. If both + // Versions are Semantic Versions, this will use the Semantic Version comparison + // algorithm. Otherwise, it will compare only the numeric components, with non-present +@@ -318,6 +440,11 @@ func (v *Version) LessThan(other *Version) bool { + return v.compareInternal(other) == -1 + } + ++// GreaterThan tests if a version is greater than a given version. ++func (v *Version) GreaterThan(other *Version) bool { ++ return v.compareInternal(other) == 1 ++} ++ + // Compare compares v against a version string (which will be parsed as either Semantic + // or non-Semantic depending on v). On success it returns -1 if v is less than other, 1 if + // it is greater than other, or 0 if they are equal. +@@ -328,3 +455,30 @@ func (v *Version) Compare(other string) (int, error) { + } + return v.compareInternal(ov), nil + } ++ ++// WithInfo returns copy of the version object with requested info ++func (v *Version) WithInfo(info apimachineryversion.Info) *Version { ++ result := *v ++ result.info = info ++ return &result ++} ++ ++func (v *Version) Info() *apimachineryversion.Info { ++ if v == nil { ++ return nil ++ } ++ // in case info is empty, or the major and minor in info is different from the actual major and minor ++ v.info.Major = itoa(v.Major()) ++ v.info.Minor = itoa(v.Minor()) ++ if v.info.GitVersion == "" { ++ v.info.GitVersion = v.String() ++ } ++ return &v.info ++} ++ ++func itoa(i uint) string { ++ if i == 0 { ++ return "" ++ } ++ return strconv.Itoa(int(i)) ++} +diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/loop.go b/vendor/k8s.io/apimachinery/pkg/util/wait/loop.go +index 0dd13c62..107bfc13 100644 +--- a/vendor/k8s.io/apimachinery/pkg/util/wait/loop.go ++++ b/vendor/k8s.io/apimachinery/pkg/util/wait/loop.go +@@ -40,6 +40,10 @@ func loopConditionUntilContext(ctx context.Context, t Timer, immediate, sliding + var timeCh <-chan time.Time + doneCh := ctx.Done() + ++ if !sliding { ++ timeCh = t.C() ++ } ++ + // if immediate is true the condition is + // guaranteed to be executed at least once, + // if we haven't requested immediate execution, delay once +@@ -50,17 +54,27 @@ func loopConditionUntilContext(ctx context.Context, t Timer, immediate, sliding + }(); err != nil || ok { + return err + } +- } else { ++ } ++ ++ if sliding { + timeCh = t.C() ++ } ++ ++ for { ++ ++ // Wait for either the context to be cancelled or the next invocation be called + select { + case <-doneCh: + return ctx.Err() + case <-timeCh: + } +- } + +- for { +- // checking ctx.Err() is slightly faster than checking a select ++ // IMPORTANT: Because there is no channel priority selection in golang ++ // it is possible for very short timers to "win" the race in the previous select ++ // repeatedly even when the context has been canceled. We therefore must ++ // explicitly check for context cancellation on every loop and exit if true to ++ // guarantee that we don't invoke condition more than once after context has ++ // been cancelled. + if err := ctx.Err(); err != nil { + return err + } +@@ -77,21 +91,5 @@ func loopConditionUntilContext(ctx context.Context, t Timer, immediate, sliding + if sliding { + t.Next() + } +- +- if timeCh == nil { +- timeCh = t.C() +- } +- +- // NOTE: b/c there is no priority selection in golang +- // it is possible for this to race, meaning we could +- // trigger t.C and doneCh, and t.C select falls through. +- // In order to mitigate we re-check doneCh at the beginning +- // of every loop to guarantee at-most one extra execution +- // of condition. +- select { +- case <-doneCh: +- return ctx.Err() +- case <-timeCh: +- } + } + } +diff --git a/vendor/k8s.io/apimachinery/pkg/watch/watch.go b/vendor/k8s.io/apimachinery/pkg/watch/watch.go +index b6c7bbfa..ce37fd8c 100644 +--- a/vendor/k8s.io/apimachinery/pkg/watch/watch.go ++++ b/vendor/k8s.io/apimachinery/pkg/watch/watch.go +@@ -27,13 +27,25 @@ import ( + + // Interface can be implemented by anything that knows how to watch and report changes. + type Interface interface { +- // Stop stops watching. Will close the channel returned by ResultChan(). Releases +- // any resources used by the watch. ++ // Stop tells the producer that the consumer is done watching, so the ++ // producer should stop sending events and close the result channel. The ++ // consumer should keep watching for events until the result channel is ++ // closed. ++ // ++ // Because some implementations may create channels when constructed, Stop ++ // must always be called, even if the consumer has not yet called ++ // ResultChan(). ++ // ++ // Only the consumer should call Stop(), not the producer. If the producer ++ // errors and needs to stop the watch prematurely, it should instead send ++ // an error event and close the result channel. + Stop() + +- // ResultChan returns a chan which will receive all the events. If an error occurs +- // or Stop() is called, the implementation will close this channel and +- // release any resources used by the watch. ++ // ResultChan returns a channel which will receive events from the event ++ // producer. If an error occurs or Stop() is called, the producer must ++ // close this channel and release any resources used by the watch. ++ // Closing the result channel tells the consumer that no more events will be ++ // sent. + ResultChan() <-chan Event + } + +@@ -322,3 +334,21 @@ func (pw *ProxyWatcher) ResultChan() <-chan Event { + func (pw *ProxyWatcher) StopChan() <-chan struct{} { + return pw.stopCh + } ++ ++// MockWatcher implements watch.Interface with mockable functions. ++type MockWatcher struct { ++ StopFunc func() ++ ResultChanFunc func() <-chan Event ++} ++ ++var _ Interface = &MockWatcher{} ++ ++// Stop calls StopFunc ++func (mw MockWatcher) Stop() { ++ mw.StopFunc() ++} ++ ++// ResultChan calls ResultChanFunc ++func (mw MockWatcher) ResultChan() <-chan Event { ++ return mw.ResultChanFunc() ++} +diff --git a/vendor/k8s.io/klog/v2/klog.go b/vendor/k8s.io/klog/v2/klog.go +index 026be9e3..47ec9466 100644 +--- a/vendor/k8s.io/klog/v2/klog.go ++++ b/vendor/k8s.io/klog/v2/klog.go +@@ -404,13 +404,6 @@ func (t *traceLocation) Set(value string) error { + return nil + } + +-// flushSyncWriter is the interface satisfied by logging destinations. +-type flushSyncWriter interface { +- Flush() error +- Sync() error +- io.Writer +-} +- + var logging loggingT + var commandLine flag.FlagSet + +@@ -486,7 +479,7 @@ type settings struct { + // Access to all of the following fields must be protected via a mutex. + + // file holds writer for each of the log types. +- file [severity.NumSeverity]flushSyncWriter ++ file [severity.NumSeverity]io.Writer + // flushInterval is the interval for periodic flushing. If zero, + // the global default will be used. + flushInterval time.Duration +@@ -831,32 +824,12 @@ func (l *loggingT) printS(err error, s severity.Severity, depth int, msg string, + buffer.PutBuffer(b) + } + +-// redirectBuffer is used to set an alternate destination for the logs +-type redirectBuffer struct { +- w io.Writer +-} +- +-func (rb *redirectBuffer) Sync() error { +- return nil +-} +- +-func (rb *redirectBuffer) Flush() error { +- return nil +-} +- +-func (rb *redirectBuffer) Write(bytes []byte) (n int, err error) { +- return rb.w.Write(bytes) +-} +- + // SetOutput sets the output destination for all severities + func SetOutput(w io.Writer) { + logging.mu.Lock() + defer logging.mu.Unlock() + for s := severity.FatalLog; s >= severity.InfoLog; s-- { +- rb := &redirectBuffer{ +- w: w, +- } +- logging.file[s] = rb ++ logging.file[s] = w + } + } + +@@ -868,10 +841,7 @@ func SetOutputBySeverity(name string, w io.Writer) { + if !ok { + panic(fmt.Sprintf("SetOutputBySeverity(%q): unrecognized severity name", name)) + } +- rb := &redirectBuffer{ +- w: w, +- } +- logging.file[sev] = rb ++ logging.file[sev] = w + } + + // LogToStderr sets whether to log exclusively to stderr, bypassing outputs +@@ -1011,7 +981,8 @@ func (l *loggingT) exit(err error) { + logExitFunc(err) + return + } +- l.flushAll() ++ needToSync := l.flushAll() ++ l.syncAll(needToSync) + OsExit(2) + } + +@@ -1028,10 +999,6 @@ type syncBuffer struct { + maxbytes uint64 // The max number of bytes this syncBuffer.file can hold before cleaning up. + } + +-func (sb *syncBuffer) Sync() error { +- return sb.file.Sync() +-} +- + // CalculateMaxSize returns the real max size in bytes after considering the default max size and the flag options. + func CalculateMaxSize() uint64 { + if logging.logFile != "" { +@@ -1223,24 +1190,45 @@ func StartFlushDaemon(interval time.Duration) { + // lockAndFlushAll is like flushAll but locks l.mu first. + func (l *loggingT) lockAndFlushAll() { + l.mu.Lock() +- l.flushAll() ++ needToSync := l.flushAll() + l.mu.Unlock() ++ // Some environments are slow when syncing and holding the lock might cause contention. ++ l.syncAll(needToSync) + } + +-// flushAll flushes all the logs and attempts to "sync" their data to disk. ++// flushAll flushes all the logs + // l.mu is held. +-func (l *loggingT) flushAll() { ++// ++// The result is the number of files which need to be synced and the pointers to them. ++func (l *loggingT) flushAll() fileArray { ++ var needToSync fileArray ++ + // Flush from fatal down, in case there's trouble flushing. + for s := severity.FatalLog; s >= severity.InfoLog; s-- { + file := l.file[s] +- if file != nil { +- _ = file.Flush() // ignore error +- _ = file.Sync() // ignore error ++ if sb, ok := file.(*syncBuffer); ok && sb.file != nil { ++ _ = sb.Flush() // ignore error ++ needToSync.files[needToSync.num] = sb.file ++ needToSync.num++ + } + } + if logging.loggerOptions.flush != nil { + logging.loggerOptions.flush() + } ++ return needToSync ++} ++ ++type fileArray struct { ++ num int ++ files [severity.NumSeverity]*os.File ++} ++ ++// syncAll attempts to "sync" their data to disk. ++func (l *loggingT) syncAll(needToSync fileArray) { ++ // Flush from fatal down, in case there's trouble flushing. ++ for i := 0; i < needToSync.num; i++ { ++ _ = needToSync.files[i].Sync() // ignore error ++ } + } + + // CopyStandardLogTo arranges for messages written to the Go "log" package's +diff --git a/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go b/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go +index 3a8d765f..0ce85af9 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go ++++ b/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go +@@ -156,7 +156,9 @@ func (o *openAPI) buildRequestBody(parameters []common.Parameter, consumes []str + } + r := &spec3.RequestBody{ + RequestBodyProps: spec3.RequestBodyProps{ +- Content: map[string]*spec3.MediaType{}, ++ Content: map[string]*spec3.MediaType{}, ++ Description: param.Description(), ++ Required: param.Required(), + }, + } + for _, consume := range consumes { +@@ -172,9 +174,9 @@ func (o *openAPI) buildRequestBody(parameters []common.Parameter, consumes []str + return nil, nil + } + +-func newOpenAPI(config *common.Config) openAPI { ++func newOpenAPI(config *common.OpenAPIV3Config) openAPI { + o := openAPI{ +- config: common.ConvertConfigToV3(config), ++ config: config, + spec: &spec3.OpenAPI{ + Version: "3.0.0", + Info: config.Info, +@@ -283,7 +285,10 @@ func (o *openAPI) buildOpenAPISpec(webServices []common.RouteContainer) error { + sortParameters(pathItem.Parameters) + + for _, route := range routes { +- op, _ := o.buildOperations(route, inPathCommonParamsMap) ++ op, err := o.buildOperations(route, inPathCommonParamsMap) ++ if err != nil { ++ return err ++ } + sortParameters(op.Parameters) + + switch strings.ToUpper(route.Method()) { +@@ -313,24 +318,27 @@ func (o *openAPI) buildOpenAPISpec(webServices []common.RouteContainer) error { + // BuildOpenAPISpec builds OpenAPI v3 spec given a list of route containers and common.Config to customize it. + // + // Deprecated: BuildOpenAPISpecFromRoutes should be used instead. +-func BuildOpenAPISpec(webServices []*restful.WebService, config *common.Config) (*spec3.OpenAPI, error) { ++func BuildOpenAPISpec(webServices []*restful.WebService, config *common.OpenAPIV3Config) (*spec3.OpenAPI, error) { + return BuildOpenAPISpecFromRoutes(restfuladapter.AdaptWebServices(webServices), config) + } + + // BuildOpenAPISpecFromRoutes builds OpenAPI v3 spec given a list of route containers and common.Config to customize it. +-func BuildOpenAPISpecFromRoutes(webServices []common.RouteContainer, config *common.Config) (*spec3.OpenAPI, error) { ++func BuildOpenAPISpecFromRoutes(webServices []common.RouteContainer, config *common.OpenAPIV3Config) (*spec3.OpenAPI, error) { + a := newOpenAPI(config) + err := a.buildOpenAPISpec(webServices) + if err != nil { + return nil, err + } ++ if config.PostProcessSpec != nil { ++ return config.PostProcessSpec(a.spec) ++ } + return a.spec, nil + } + + // BuildOpenAPIDefinitionsForResource builds a partial OpenAPI spec given a sample object and common.Config to customize it. + // BuildOpenAPIDefinitionsForResources returns the OpenAPI spec which includes the definitions for the + // passed type names. +-func BuildOpenAPIDefinitionsForResources(config *common.Config, names ...string) (map[string]*spec.Schema, error) { ++func BuildOpenAPIDefinitionsForResources(config *common.OpenAPIV3Config, names ...string) (map[string]*spec.Schema, error) { + o := newOpenAPI(config) + // We can discard the return value of toSchema because all we care about is the side effect of calling it. + // All the models created for this resource get added to o.swagger.Definitions +diff --git a/vendor/k8s.io/kube-openapi/pkg/cached/cache.go b/vendor/k8s.io/kube-openapi/pkg/cached/cache.go +index 76415b78..a66fe8a0 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/cached/cache.go ++++ b/vendor/k8s.io/kube-openapi/pkg/cached/cache.go +@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and + limitations under the License. + */ + +-// Package cache provides a cache mechanism based on etags to lazily ++// Package cached provides a cache mechanism based on etags to lazily + // build, and/or cache results from expensive operation such that those + // operations are not repeated unnecessarily. The operations can be + // created as a tree, and replaced dynamically as needed. +@@ -25,16 +25,18 @@ limitations under the License. + // + // This package uses a source/transform/sink model of caches to build + // the dependency tree, and can be used as follows: +-// - [NewSource]: A source cache that recomputes the content every time. +-// - [NewStaticSource]: A source cache that always produces the ++// - [Func]: A source cache that recomputes the content every time. ++// - [Once]: A source cache that always produces the + // same content, it is only called once. +-// - [NewTransformer]: A cache that transforms data from one format to ++// - [Transform]: A cache that transforms data from one format to + // another. It's only refreshed when the source changes. +-// - [NewMerger]: A cache that aggregates multiple caches into one. ++// - [Merge]: A cache that aggregates multiple caches in a map into one. + // It's only refreshed when the source changes. +-// - [Replaceable]: A cache adapter that can be atomically +-// replaced with a new one, and saves the previous results in case an +-// error pops-up. ++// - [MergeList]: A cache that aggregates multiple caches in a list into one. ++// It's only refreshed when the source changes. ++// - [Atomic]: A cache adapter that atomically replaces the source with a new one. ++// - [LastSuccess]: A cache adapter that caches the last successful and returns ++// it if the next call fails. It extends [Atomic]. + // + // # Etags + // +@@ -54,61 +56,45 @@ import ( + "sync/atomic" + ) + +-// Result is the content returned from a call to a cache. It can either +-// be created with [NewResultOK] if the call was a success, or +-// [NewResultErr] if the call resulted in an error. ++// Value is wrapping a value behind a getter for lazy evaluation. ++type Value[T any] interface { ++ Get() (value T, etag string, err error) ++} ++ ++// Result is wrapping T and error into a struct for cases where a tuple is more ++// convenient or necessary in Golang. + type Result[T any] struct { +- Data T +- Etag string +- Err error ++ Value T ++ Etag string ++ Err error + } + +-// NewResultOK creates a new [Result] for a successful operation. +-func NewResultOK[T any](data T, etag string) Result[T] { +- return Result[T]{ +- Data: data, +- Etag: etag, +- } ++func (r Result[T]) Get() (T, string, error) { ++ return r.Value, r.Etag, r.Err + } + +-// NewResultErr creates a new [Result] when an error has happened. +-func NewResultErr[T any](err error) Result[T] { +- return Result[T]{ +- Err: err, +- } ++// Func wraps a (thread-safe) function as a Value[T]. ++func Func[T any](fn func() (T, string, error)) Value[T] { ++ return valueFunc[T](fn) + } + +-// Result can be treated as a [Data] if necessary. +-func (r Result[T]) Get() Result[T] { +- return r ++type valueFunc[T any] func() (T, string, error) ++ ++func (c valueFunc[T]) Get() (T, string, error) { ++ return c() + } + +-// Data is a cache that performs an action whose result data will be +-// cached. It also returns an "etag" identifier to version the cache, so +-// that the caller can know if they have the most recent version of the +-// cache (and can decide to cache some operation based on that). +-// +-// The [NewMerger] and [NewTransformer] automatically handle +-// that for you by checking if the etag is updated before calling the +-// merging or transforming function. +-type Data[T any] interface { +- // Returns the cached data, as well as an "etag" to identify the +- // version of the cache, or an error if something happened. +- Get() Result[T] ++// Static returns constant values. ++func Static[T any](value T, etag string) Value[T] { ++ return Result[T]{Value: value, Etag: etag} + } + +-// NewMerger creates a new merge cache, a cache that merges the result +-// of other caches. The function only gets called if any of the +-// dependency has changed. ++// Merge merges a of cached values. The merge function only gets called if any of ++// the dependency has changed. + // + // If any of the dependency returned an error before, or any of the + // dependency returned an error this time, or if the mergeFn failed +-// before, then the function is reran. +-// +-// The caches and results are mapped by K so that associated data can be +-// retrieved. The map of dependencies can not be modified after +-// creation, and a new merger should be created (and probably replaced +-// using a [Replaceable]). ++// before, then the function is run again. + // + // Note that this assumes there is no "partial" merge, the merge + // function will remerge all the dependencies together everytime. Since +@@ -118,18 +104,19 @@ type Data[T any] interface { + // Also note that Golang map iteration is not stable. If the mergeFn + // depends on the order iteration to be stable, it will need to + // implement its own sorting or iteration order. +-func NewMerger[K comparable, T, V any](mergeFn func(results map[K]Result[T]) Result[V], caches map[K]Data[T]) Data[V] { +- listCaches := make([]Data[T], 0, len(caches)) +- // maps from index to key ++func Merge[K comparable, T, V any](mergeFn func(results map[K]Result[T]) (V, string, error), caches map[K]Value[T]) Value[V] { ++ list := make([]Value[T], 0, len(caches)) ++ ++ // map from index to key + indexes := make(map[int]K, len(caches)) + i := 0 + for k := range caches { +- listCaches = append(listCaches, caches[k]) ++ list = append(list, caches[k]) + indexes[i] = k + i++ + } + +- return NewListMerger(func(results []Result[T]) Result[V] { ++ return MergeList(func(results []Result[T]) (V, string, error) { + if len(results) != len(indexes) { + panic(fmt.Errorf("invalid result length %d, expected %d", len(results), len(indexes))) + } +@@ -138,20 +125,11 @@ func NewMerger[K comparable, T, V any](mergeFn func(results map[K]Result[T]) Res + m[indexes[i]] = results[i] + } + return mergeFn(m) +- }, listCaches) +-} +- +-type listMerger[T, V any] struct { +- lock sync.Mutex +- mergeFn func([]Result[T]) Result[V] +- caches []Data[T] +- cacheResults []Result[T] +- result Result[V] ++ }, list) + } + +-// NewListMerger creates a new merge cache that merges the results of +-// other caches in list form. The function only gets called if any of +-// the dependency has changed. ++// MergeList merges a list of cached values. The function only gets called if ++// any of the dependency has changed. + // + // The benefit of ListMerger over the basic Merger is that caches are + // stored in an ordered list so the order of the cache will be +@@ -165,31 +143,37 @@ type listMerger[T, V any] struct { + // function will remerge all the dependencies together everytime. Since + // the list of dependencies is constant, there is no way to save some + // partial merge information either. +-func NewListMerger[T, V any](mergeFn func(results []Result[T]) Result[V], caches []Data[T]) Data[V] { ++func MergeList[T, V any](mergeFn func(results []Result[T]) (V, string, error), delegates []Value[T]) Value[V] { + return &listMerger[T, V]{ +- mergeFn: mergeFn, +- caches: caches, ++ mergeFn: mergeFn, ++ delegates: delegates, + } + } + ++type listMerger[T, V any] struct { ++ lock sync.Mutex ++ mergeFn func([]Result[T]) (V, string, error) ++ delegates []Value[T] ++ cache []Result[T] ++ result Result[V] ++} ++ + func (c *listMerger[T, V]) prepareResultsLocked() []Result[T] { +- cacheResults := make([]Result[T], len(c.caches)) ++ cacheResults := make([]Result[T], len(c.delegates)) + ch := make(chan struct { + int + Result[T] +- }, len(c.caches)) +- for i := range c.caches { ++ }, len(c.delegates)) ++ for i := range c.delegates { + go func(index int) { ++ value, etag, err := c.delegates[index].Get() + ch <- struct { + int + Result[T] +- }{ +- index, +- c.caches[index].Get(), +- } ++ }{index, Result[T]{Value: value, Etag: etag, Err: err}} + }(i) + } +- for i := 0; i < len(c.caches); i++ { ++ for i := 0; i < len(c.delegates); i++ { + res := <-ch + cacheResults[res.int] = res.Result + } +@@ -197,16 +181,16 @@ func (c *listMerger[T, V]) prepareResultsLocked() []Result[T] { + } + + func (c *listMerger[T, V]) needsRunningLocked(results []Result[T]) bool { +- if c.cacheResults == nil { ++ if c.cache == nil { + return true + } + if c.result.Err != nil { + return true + } +- if len(results) != len(c.cacheResults) { +- panic(fmt.Errorf("invalid number of results: %v (expected %v)", len(results), len(c.cacheResults))) ++ if len(results) != len(c.cache) { ++ panic(fmt.Errorf("invalid number of results: %v (expected %v)", len(results), len(c.cache))) + } +- for i, oldResult := range c.cacheResults { ++ for i, oldResult := range c.cache { + newResult := results[i] + if newResult.Etag != oldResult.Etag || newResult.Err != nil || oldResult.Err != nil { + return true +@@ -215,98 +199,92 @@ func (c *listMerger[T, V]) needsRunningLocked(results []Result[T]) bool { + return false + } + +-func (c *listMerger[T, V]) Get() Result[V] { ++func (c *listMerger[T, V]) Get() (V, string, error) { + c.lock.Lock() + defer c.lock.Unlock() + cacheResults := c.prepareResultsLocked() + if c.needsRunningLocked(cacheResults) { +- c.cacheResults = cacheResults +- c.result = c.mergeFn(c.cacheResults) ++ c.cache = cacheResults ++ c.result.Value, c.result.Etag, c.result.Err = c.mergeFn(c.cache) + } +- return c.result ++ return c.result.Value, c.result.Etag, c.result.Err + } + +-// NewTransformer creates a new cache that transforms the result of +-// another cache. The transformFn will only be called if the source +-// cache has updated the output, otherwise, the cached result will be +-// returned. ++// Transform the result of another cached value. The transformFn will only be called ++// if the source has updated, otherwise, the result will be returned. + // + // If the dependency returned an error before, or it returns an error + // this time, or if the transformerFn failed before, the function is + // reran. +-func NewTransformer[T, V any](transformerFn func(Result[T]) Result[V], source Data[T]) Data[V] { +- return NewListMerger(func(caches []Result[T]) Result[V] { +- if len(caches) != 1 { +- panic(fmt.Errorf("invalid cache for transformer cache: %v", caches)) ++func Transform[T, V any](transformerFn func(T, string, error) (V, string, error), source Value[T]) Value[V] { ++ return MergeList(func(delegates []Result[T]) (V, string, error) { ++ if len(delegates) != 1 { ++ panic(fmt.Errorf("invalid cache for transformer cache: %v", delegates)) + } +- return transformerFn(caches[0]) +- }, []Data[T]{source}) +-} +- +-// NewSource creates a new cache that generates some data. This +-// will always be called since we don't know the origin of the data and +-// if it needs to be updated or not. sourceFn MUST be thread-safe. +-func NewSource[T any](sourceFn func() Result[T]) Data[T] { +- c := source[T](sourceFn) +- return &c ++ return transformerFn(delegates[0].Value, delegates[0].Etag, delegates[0].Err) ++ }, []Value[T]{source}) + } + +-type source[T any] func() Result[T] +- +-func (c *source[T]) Get() Result[T] { +- return (*c)() +-} +- +-// NewStaticSource creates a new cache that always generates the +-// same data. This will only be called once (lazily). +-func NewStaticSource[T any](staticFn func() Result[T]) Data[T] { +- return &static[T]{ +- fn: staticFn, ++// Once calls Value[T].Get() lazily and only once, even in case of an error result. ++func Once[T any](d Value[T]) Value[T] { ++ return &once[T]{ ++ data: d, + } + } + +-type static[T any] struct { ++type once[T any] struct { + once sync.Once +- fn func() Result[T] ++ data Value[T] + result Result[T] + } + +-func (c *static[T]) Get() Result[T] { ++func (c *once[T]) Get() (T, string, error) { + c.once.Do(func() { +- c.result = c.fn() ++ c.result.Value, c.result.Etag, c.result.Err = c.data.Get() + }) +- return c.result ++ return c.result.Value, c.result.Etag, c.result.Err + } + +-// Replaceable is a cache that carries the result even when the cache is +-// replaced. This is the type that should typically be stored in +-// structs. +-type Replaceable[T any] struct { +- cache atomic.Pointer[Data[T]] +- result atomic.Pointer[Result[T]] ++// Replaceable extends the Value[T] interface with the ability to change the ++// underlying Value[T] after construction. ++type Replaceable[T any] interface { ++ Value[T] ++ Store(Value[T]) + } + +-// Get retrieves the data from the underlying source. [Replaceable] +-// implements the [Data] interface itself. This is a pass-through +-// that calls the most recent underlying cache. If the cache fails but +-// previously had returned a success, that success will be returned +-// instead. If the cache fails but we never returned a success, that +-// failure is returned. +-func (c *Replaceable[T]) Get() Result[T] { +- result := (*c.cache.Load()).Get() +- +- for { +- cResult := c.result.Load() +- if result.Err != nil && cResult != nil && cResult.Err == nil { +- return *cResult +- } +- if c.result.CompareAndSwap(cResult, &result) { +- return result ++// Atomic wraps a Value[T] as an atomic value that can be replaced. It implements ++// Replaceable[T]. ++type Atomic[T any] struct { ++ value atomic.Pointer[Value[T]] ++} ++ ++var _ Replaceable[[]byte] = &Atomic[[]byte]{} ++ ++func (x *Atomic[T]) Store(val Value[T]) { x.value.Store(&val) } ++func (x *Atomic[T]) Get() (T, string, error) { return (*x.value.Load()).Get() } ++ ++// LastSuccess calls Value[T].Get(), but hides errors by returning the last ++// success if there has been any. ++type LastSuccess[T any] struct { ++ Atomic[T] ++ success atomic.Pointer[Result[T]] ++} ++ ++var _ Replaceable[[]byte] = &LastSuccess[[]byte]{} ++ ++func (c *LastSuccess[T]) Get() (T, string, error) { ++ success := c.success.Load() ++ value, etag, err := c.Atomic.Get() ++ if err == nil { ++ if success == nil { ++ c.success.CompareAndSwap(nil, &Result[T]{Value: value, Etag: etag, Err: err}) + } ++ return value, etag, err ++ } ++ ++ if success != nil { ++ return success.Value, success.Etag, success.Err + } +-} + +-// Replace changes the cache. +-func (c *Replaceable[T]) Replace(cache Data[T]) { +- c.cache.Swap(&cache) ++ return value, etag, err + } +diff --git a/vendor/k8s.io/kube-openapi/pkg/common/common.go b/vendor/k8s.io/kube-openapi/pkg/common/common.go +index 1a6c12e1..e4ce843b 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/common/common.go ++++ b/vendor/k8s.io/kube-openapi/pkg/common/common.go +@@ -22,7 +22,6 @@ import ( + + "github.com/emicklei/go-restful/v3" + +- "k8s.io/kube-openapi/pkg/openapiconv" + "k8s.io/kube-openapi/pkg/spec3" + "k8s.io/kube-openapi/pkg/validation/spec" + ) +@@ -165,6 +164,9 @@ type OpenAPIV3Config struct { + // It is an optional function to customize model names. + GetDefinitionName func(name string) (string, spec.Extensions) + ++ // PostProcessSpec runs after the spec is ready to serve. It allows a final modification to the spec before serving. ++ PostProcessSpec func(*spec3.OpenAPI) (*spec3.OpenAPI, error) ++ + // SecuritySchemes is list of all security schemes for OpenAPI service. + SecuritySchemes spec3.SecuritySchemes + +@@ -172,43 +174,6 @@ type OpenAPIV3Config struct { + DefaultSecurity []map[string][]string + } + +-// ConvertConfigToV3 converts a Config object to an OpenAPIV3Config object +-func ConvertConfigToV3(config *Config) *OpenAPIV3Config { +- if config == nil { +- return nil +- } +- +- v3Config := &OpenAPIV3Config{ +- Info: config.Info, +- IgnorePrefixes: config.IgnorePrefixes, +- GetDefinitions: config.GetDefinitions, +- GetOperationIDAndTags: config.GetOperationIDAndTags, +- GetOperationIDAndTagsFromRoute: config.GetOperationIDAndTagsFromRoute, +- GetDefinitionName: config.GetDefinitionName, +- Definitions: config.Definitions, +- SecuritySchemes: make(spec3.SecuritySchemes), +- DefaultSecurity: config.DefaultSecurity, +- DefaultResponse: openapiconv.ConvertResponse(config.DefaultResponse, []string{"application/json"}), +- +- CommonResponses: make(map[int]*spec3.Response), +- ResponseDefinitions: make(map[string]*spec3.Response), +- } +- +- if config.SecurityDefinitions != nil { +- for s, securityScheme := range *config.SecurityDefinitions { +- v3Config.SecuritySchemes[s] = openapiconv.ConvertSecurityScheme(securityScheme) +- } +- } +- for k, commonResponse := range config.CommonResponses { +- v3Config.CommonResponses[k] = openapiconv.ConvertResponse(&commonResponse, []string{"application/json"}) +- } +- +- for k, responseDefinition := range config.ResponseDefinitions { +- v3Config.ResponseDefinitions[k] = openapiconv.ConvertResponse(&responseDefinition, []string{"application/json"}) +- } +- return v3Config +-} +- + type typeInfo struct { + name string + format string +diff --git a/vendor/k8s.io/kube-openapi/pkg/handler/handler.go b/vendor/k8s.io/kube-openapi/pkg/handler/handler.go +index 0eb3f236..5fc62977 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/handler/handler.go ++++ b/vendor/k8s.io/kube-openapi/pkg/handler/handler.go +@@ -30,6 +30,7 @@ import ( + openapi_v2 "github.com/google/gnostic-models/openapiv2" + "github.com/google/uuid" + "github.com/munnerz/goautoneg" ++ + klog "k8s.io/klog/v2" + "k8s.io/kube-openapi/pkg/builder" + "k8s.io/kube-openapi/pkg/cached" +@@ -59,52 +60,52 @@ type timedSpec struct { + // OpenAPIService is the service responsible for serving OpenAPI spec. It has + // the ability to safely change the spec while serving it. + type OpenAPIService struct { +- specCache cached.Replaceable[*spec.Swagger] +- jsonCache cached.Data[timedSpec] +- protoCache cached.Data[timedSpec] ++ specCache cached.LastSuccess[*spec.Swagger] ++ jsonCache cached.Value[timedSpec] ++ protoCache cached.Value[timedSpec] + } + + // NewOpenAPIService builds an OpenAPIService starting with the given spec. + func NewOpenAPIService(swagger *spec.Swagger) *OpenAPIService { +- return NewOpenAPIServiceLazy(cached.NewResultOK(swagger, uuid.New().String())) ++ return NewOpenAPIServiceLazy(cached.Static(swagger, uuid.New().String())) + } + + // NewOpenAPIServiceLazy builds an OpenAPIService from lazy spec. +-func NewOpenAPIServiceLazy(swagger cached.Data[*spec.Swagger]) *OpenAPIService { ++func NewOpenAPIServiceLazy(swagger cached.Value[*spec.Swagger]) *OpenAPIService { + o := &OpenAPIService{} + o.UpdateSpecLazy(swagger) + +- o.jsonCache = cached.NewTransformer[*spec.Swagger](func(result cached.Result[*spec.Swagger]) cached.Result[timedSpec] { +- if result.Err != nil { +- return cached.NewResultErr[timedSpec](result.Err) ++ o.jsonCache = cached.Transform[*spec.Swagger](func(spec *spec.Swagger, etag string, err error) (timedSpec, string, error) { ++ if err != nil { ++ return timedSpec{}, "", err + } +- json, err := result.Data.MarshalJSON() ++ json, err := spec.MarshalJSON() + if err != nil { +- return cached.NewResultErr[timedSpec](err) ++ return timedSpec{}, "", err + } +- return cached.NewResultOK(timedSpec{spec: json, lastModified: time.Now()}, computeETag(json)) ++ return timedSpec{spec: json, lastModified: time.Now()}, computeETag(json), nil + }, &o.specCache) +- o.protoCache = cached.NewTransformer(func(result cached.Result[timedSpec]) cached.Result[timedSpec] { +- if result.Err != nil { +- return cached.NewResultErr[timedSpec](result.Err) ++ o.protoCache = cached.Transform(func(ts timedSpec, etag string, err error) (timedSpec, string, error) { ++ if err != nil { ++ return timedSpec{}, "", err + } +- proto, err := ToProtoBinary(result.Data.spec) ++ proto, err := ToProtoBinary(ts.spec) + if err != nil { +- return cached.NewResultErr[timedSpec](err) ++ return timedSpec{}, "", err + } + // We can re-use the same etag as json because of the Vary header. +- return cached.NewResultOK(timedSpec{spec: proto, lastModified: result.Data.lastModified}, result.Etag) ++ return timedSpec{spec: proto, lastModified: ts.lastModified}, etag, nil + }, o.jsonCache) + return o + } + + func (o *OpenAPIService) UpdateSpec(swagger *spec.Swagger) error { +- o.UpdateSpecLazy(cached.NewResultOK(swagger, uuid.New().String())) ++ o.UpdateSpecLazy(cached.Static(swagger, uuid.New().String())) + return nil + } + +-func (o *OpenAPIService) UpdateSpecLazy(swagger cached.Data[*spec.Swagger]) { +- o.specCache.Replace(swagger) ++func (o *OpenAPIService) UpdateSpecLazy(swagger cached.Value[*spec.Swagger]) { ++ o.specCache.Store(swagger) + } + + func ToProtoBinary(json []byte) ([]byte, error) { +@@ -130,7 +131,7 @@ func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handl + Type string + SubType string + ReturnedContentType string +- GetDataAndEtag cached.Data[timedSpec] ++ GetDataAndEtag cached.Value[timedSpec] + }{ + {"application", subTypeJSON, "application/" + subTypeJSON, o.jsonCache}, + {"application", subTypeProtobufDeprecated, "application/" + subTypeProtobuf, o.protoCache}, +@@ -154,11 +155,11 @@ func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handl + continue + } + // serve the first matching media type in the sorted clause list +- result := accepts.GetDataAndEtag.Get() +- if result.Err != nil { +- klog.Errorf("Error in OpenAPI handler: %s", result.Err) ++ ts, etag, err := accepts.GetDataAndEtag.Get() ++ if err != nil { ++ klog.Errorf("Error in OpenAPI handler: %s", err) + // only return a 503 if we have no older cache data to serve +- if result.Data.spec == nil { ++ if ts.spec == nil { + w.WriteHeader(http.StatusServiceUnavailable) + return + } +@@ -167,9 +168,9 @@ func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handl + w.Header().Set("Content-Type", accepts.ReturnedContentType) + + // ETag must be enclosed in double quotes: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag +- w.Header().Set("Etag", strconv.Quote(result.Etag)) ++ w.Header().Set("Etag", strconv.Quote(etag)) + // ServeContent will take care of caching using eTag. +- http.ServeContent(w, r, servePath, result.Data.lastModified, bytes.NewReader(result.Data.spec)) ++ http.ServeContent(w, r, servePath, ts.lastModified, bytes.NewReader(ts.spec)) + return + } + } +diff --git a/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go b/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go +index 2263e2f3..fc456348 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go ++++ b/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go +@@ -33,6 +33,7 @@ import ( + openapi_v3 "github.com/google/gnostic-models/openapiv3" + "github.com/google/uuid" + "github.com/munnerz/goautoneg" ++ + "k8s.io/klog/v2" + "k8s.io/kube-openapi/pkg/cached" + "k8s.io/kube-openapi/pkg/common" +@@ -73,38 +74,38 @@ type timedSpec struct { + + // This type is protected by the lock on OpenAPIService. + type openAPIV3Group struct { +- specCache cached.Replaceable[*spec3.OpenAPI] +- pbCache cached.Data[timedSpec] +- jsonCache cached.Data[timedSpec] ++ specCache cached.LastSuccess[*spec3.OpenAPI] ++ pbCache cached.Value[timedSpec] ++ jsonCache cached.Value[timedSpec] + } + + func newOpenAPIV3Group() *openAPIV3Group { + o := &openAPIV3Group{} +- o.jsonCache = cached.NewTransformer[*spec3.OpenAPI](func(result cached.Result[*spec3.OpenAPI]) cached.Result[timedSpec] { +- if result.Err != nil { +- return cached.NewResultErr[timedSpec](result.Err) ++ o.jsonCache = cached.Transform[*spec3.OpenAPI](func(spec *spec3.OpenAPI, etag string, err error) (timedSpec, string, error) { ++ if err != nil { ++ return timedSpec{}, "", err + } +- json, err := json.Marshal(result.Data) ++ json, err := json.Marshal(spec) + if err != nil { +- return cached.NewResultErr[timedSpec](err) ++ return timedSpec{}, "", err + } +- return cached.NewResultOK(timedSpec{spec: json, lastModified: time.Now()}, computeETag(json)) ++ return timedSpec{spec: json, lastModified: time.Now()}, computeETag(json), nil + }, &o.specCache) +- o.pbCache = cached.NewTransformer(func(result cached.Result[timedSpec]) cached.Result[timedSpec] { +- if result.Err != nil { +- return cached.NewResultErr[timedSpec](result.Err) ++ o.pbCache = cached.Transform(func(ts timedSpec, etag string, err error) (timedSpec, string, error) { ++ if err != nil { ++ return timedSpec{}, "", err + } +- proto, err := ToV3ProtoBinary(result.Data.spec) ++ proto, err := ToV3ProtoBinary(ts.spec) + if err != nil { +- return cached.NewResultErr[timedSpec](err) ++ return timedSpec{}, "", err + } +- return cached.NewResultOK(timedSpec{spec: proto, lastModified: result.Data.lastModified}, result.Etag) ++ return timedSpec{spec: proto, lastModified: ts.lastModified}, etag, nil + }, o.jsonCache) + return o + } + +-func (o *openAPIV3Group) UpdateSpec(openapi cached.Data[*spec3.OpenAPI]) { +- o.specCache.Replace(openapi) ++func (o *openAPIV3Group) UpdateSpec(openapi cached.Value[*spec3.OpenAPI]) { ++ o.specCache.Store(openapi) + } + + // OpenAPIService is the service responsible for serving OpenAPI spec. It has +@@ -114,7 +115,7 @@ type OpenAPIService struct { + mutex sync.Mutex + v3Schema map[string]*openAPIV3Group + +- discoveryCache cached.Replaceable[timedSpec] ++ discoveryCache cached.LastSuccess[timedSpec] + } + + func computeETag(data []byte) string { +@@ -137,20 +138,20 @@ func NewOpenAPIService() *OpenAPIService { + o := &OpenAPIService{} + o.v3Schema = make(map[string]*openAPIV3Group) + // We're not locked because we haven't shared the structure yet. +- o.discoveryCache.Replace(o.buildDiscoveryCacheLocked()) ++ o.discoveryCache.Store(o.buildDiscoveryCacheLocked()) + return o + } + +-func (o *OpenAPIService) buildDiscoveryCacheLocked() cached.Data[timedSpec] { +- caches := make(map[string]cached.Data[timedSpec], len(o.v3Schema)) ++func (o *OpenAPIService) buildDiscoveryCacheLocked() cached.Value[timedSpec] { ++ caches := make(map[string]cached.Value[timedSpec], len(o.v3Schema)) + for gvName, group := range o.v3Schema { + caches[gvName] = group.jsonCache + } +- return cached.NewMerger(func(results map[string]cached.Result[timedSpec]) cached.Result[timedSpec] { ++ return cached.Merge(func(results map[string]cached.Result[timedSpec]) (timedSpec, string, error) { + discovery := &OpenAPIV3Discovery{Paths: make(map[string]OpenAPIV3DiscoveryGroupVersion)} + for gvName, result := range results { + if result.Err != nil { +- return cached.NewResultErr[timedSpec](result.Err) ++ return timedSpec{}, "", result.Err + } + discovery.Paths[gvName] = OpenAPIV3DiscoveryGroupVersion{ + ServerRelativeURL: constructServerRelativeURL(gvName, result.Etag), +@@ -158,9 +159,9 @@ func (o *OpenAPIService) buildDiscoveryCacheLocked() cached.Data[timedSpec] { + } + j, err := json.Marshal(discovery) + if err != nil { +- return cached.NewResultErr[timedSpec](err) ++ return timedSpec{}, "", err + } +- return cached.NewResultOK(timedSpec{spec: j, lastModified: time.Now()}, computeETag(j)) ++ return timedSpec{spec: j, lastModified: time.Now()}, computeETag(j), nil + }, caches) + } + +@@ -171,32 +172,32 @@ func (o *OpenAPIService) getSingleGroupBytes(getType string, group string) ([]by + if !ok { + return nil, "", time.Now(), fmt.Errorf("Cannot find CRD group %s", group) + } +- result := cached.Result[timedSpec]{} + switch getType { + case subTypeJSON: +- result = v.jsonCache.Get() ++ ts, etag, err := v.jsonCache.Get() ++ return ts.spec, etag, ts.lastModified, err + case subTypeProtobuf, subTypeProtobufDeprecated: +- result = v.pbCache.Get() ++ ts, etag, err := v.pbCache.Get() ++ return ts.spec, etag, ts.lastModified, err + default: + return nil, "", time.Now(), fmt.Errorf("Invalid accept clause %s", getType) + } +- return result.Data.spec, result.Etag, result.Data.lastModified, result.Err + } + + // UpdateGroupVersionLazy adds or updates an existing group with the new cached. +-func (o *OpenAPIService) UpdateGroupVersionLazy(group string, openapi cached.Data[*spec3.OpenAPI]) { ++func (o *OpenAPIService) UpdateGroupVersionLazy(group string, openapi cached.Value[*spec3.OpenAPI]) { + o.mutex.Lock() + defer o.mutex.Unlock() + if _, ok := o.v3Schema[group]; !ok { + o.v3Schema[group] = newOpenAPIV3Group() + // Since there is a new item, we need to re-build the cache map. +- o.discoveryCache.Replace(o.buildDiscoveryCacheLocked()) ++ o.discoveryCache.Store(o.buildDiscoveryCacheLocked()) + } + o.v3Schema[group].UpdateSpec(openapi) + } + + func (o *OpenAPIService) UpdateGroupVersion(group string, openapi *spec3.OpenAPI) { +- o.UpdateGroupVersionLazy(group, cached.NewResultOK(openapi, uuid.New().String())) ++ o.UpdateGroupVersionLazy(group, cached.Static(openapi, uuid.New().String())) + } + + func (o *OpenAPIService) DeleteGroupVersion(group string) { +@@ -204,19 +205,19 @@ func (o *OpenAPIService) DeleteGroupVersion(group string) { + defer o.mutex.Unlock() + delete(o.v3Schema, group) + // Rebuild the merge cache map since the items have changed. +- o.discoveryCache.Replace(o.buildDiscoveryCacheLocked()) ++ o.discoveryCache.Store(o.buildDiscoveryCacheLocked()) + } + + func (o *OpenAPIService) HandleDiscovery(w http.ResponseWriter, r *http.Request) { +- result := o.discoveryCache.Get() +- if result.Err != nil { +- klog.Errorf("Error serving discovery: %s", result.Err) ++ ts, etag, err := o.discoveryCache.Get() ++ if err != nil { ++ klog.Errorf("Error serving discovery: %s", err) + w.WriteHeader(http.StatusInternalServerError) + return + } +- w.Header().Set("Etag", strconv.Quote(result.Etag)) ++ w.Header().Set("Etag", strconv.Quote(etag)) + w.Header().Set("Content-Type", "application/json") +- http.ServeContent(w, r, "/openapi/v3", result.Data.lastModified, bytes.NewReader(result.Data.spec)) ++ http.ServeContent(w, r, "/openapi/v3", ts.lastModified, bytes.NewReader(ts.spec)) + } + + func (o *OpenAPIService) HandleGroupVersion(w http.ResponseWriter, r *http.Request) { +diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/flags.go b/vendor/k8s.io/kube-openapi/pkg/internal/flags.go +index bef60378..da5485f6 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/internal/flags.go ++++ b/vendor/k8s.io/kube-openapi/pkg/internal/flags.go +@@ -22,3 +22,4 @@ var UseOptimizedJSONUnmarshalingV3 bool = true + + // Used by tests to selectively disable experimental JSON marshaler + var UseOptimizedJSONMarshaling bool = true ++var UseOptimizedJSONMarshalingV3 bool = true +diff --git a/vendor/k8s.io/kube-openapi/pkg/openapiconv/convert.go b/vendor/k8s.io/kube-openapi/pkg/openapiconv/convert.go +deleted file mode 100644 +index e993fe23..00000000 +--- a/vendor/k8s.io/kube-openapi/pkg/openapiconv/convert.go ++++ /dev/null +@@ -1,322 +0,0 @@ +-/* +-Copyright 2022 The Kubernetes Authors. +- +-Licensed under the Apache License, Version 2.0 (the "License"); +-you may not use this file except in compliance with the License. +-You may obtain a copy of the License at +- +- http://www.apache.org/licenses/LICENSE-2.0 +- +-Unless required by applicable law or agreed to in writing, software +-distributed under the License is distributed on an "AS IS" BASIS, +-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-See the License for the specific language governing permissions and +-limitations under the License. +-*/ +- +-package openapiconv +- +-import ( +- "strings" +- +- klog "k8s.io/klog/v2" +- builderutil "k8s.io/kube-openapi/pkg/builder3/util" +- "k8s.io/kube-openapi/pkg/spec3" +- "k8s.io/kube-openapi/pkg/validation/spec" +-) +- +-var OpenAPIV2DefPrefix = "#/definitions/" +-var OpenAPIV3DefPrefix = "#/components/schemas/" +- +-// ConvertV2ToV3 converts an OpenAPI V2 object into V3. +-// Certain references may be shared between the V2 and V3 objects in the conversion. +-func ConvertV2ToV3(v2Spec *spec.Swagger) *spec3.OpenAPI { +- v3Spec := &spec3.OpenAPI{ +- Version: "3.0.0", +- Info: v2Spec.Info, +- ExternalDocs: ConvertExternalDocumentation(v2Spec.ExternalDocs), +- Paths: ConvertPaths(v2Spec.Paths), +- Components: ConvertComponents(v2Spec.SecurityDefinitions, v2Spec.Definitions, v2Spec.Responses, v2Spec.Produces), +- } +- +- return v3Spec +-} +- +-func ConvertExternalDocumentation(v2ED *spec.ExternalDocumentation) *spec3.ExternalDocumentation { +- if v2ED == nil { +- return nil +- } +- return &spec3.ExternalDocumentation{ +- ExternalDocumentationProps: spec3.ExternalDocumentationProps{ +- Description: v2ED.Description, +- URL: v2ED.URL, +- }, +- } +-} +- +-func ConvertComponents(v2SecurityDefinitions spec.SecurityDefinitions, v2Definitions spec.Definitions, v2Responses map[string]spec.Response, produces []string) *spec3.Components { +- components := &spec3.Components{} +- +- if v2Definitions != nil { +- components.Schemas = make(map[string]*spec.Schema) +- } +- for s, schema := range v2Definitions { +- components.Schemas[s] = ConvertSchema(&schema) +- } +- if v2SecurityDefinitions != nil { +- components.SecuritySchemes = make(spec3.SecuritySchemes) +- } +- for s, securityScheme := range v2SecurityDefinitions { +- components.SecuritySchemes[s] = ConvertSecurityScheme(securityScheme) +- } +- if v2Responses != nil { +- components.Responses = make(map[string]*spec3.Response) +- } +- for r, response := range v2Responses { +- components.Responses[r] = ConvertResponse(&response, produces) +- } +- +- return components +-} +- +-func ConvertSchema(v2Schema *spec.Schema) *spec.Schema { +- if v2Schema == nil { +- return nil +- } +- v3Schema := spec.Schema{ +- VendorExtensible: v2Schema.VendorExtensible, +- SchemaProps: v2Schema.SchemaProps, +- SwaggerSchemaProps: v2Schema.SwaggerSchemaProps, +- ExtraProps: v2Schema.ExtraProps, +- } +- +- if refString := v2Schema.Ref.String(); refString != "" { +- if idx := strings.Index(refString, OpenAPIV2DefPrefix); idx != -1 { +- v3Schema.Ref = spec.MustCreateRef(OpenAPIV3DefPrefix + refString[idx+len(OpenAPIV2DefPrefix):]) +- } else { +- klog.Errorf("Error: Swagger V2 Ref %s does not contain #/definitions\n", refString) +- } +- } +- +- if v2Schema.Properties != nil { +- v3Schema.Properties = make(map[string]spec.Schema) +- for key, property := range v2Schema.Properties { +- v3Schema.Properties[key] = *ConvertSchema(&property) +- } +- } +- if v2Schema.Items != nil { +- v3Schema.Items = &spec.SchemaOrArray{ +- Schema: ConvertSchema(v2Schema.Items.Schema), +- Schemas: ConvertSchemaList(v2Schema.Items.Schemas), +- } +- } +- +- if v2Schema.AdditionalProperties != nil { +- v3Schema.AdditionalProperties = &spec.SchemaOrBool{ +- Schema: ConvertSchema(v2Schema.AdditionalProperties.Schema), +- Allows: v2Schema.AdditionalProperties.Allows, +- } +- } +- if v2Schema.AdditionalItems != nil { +- v3Schema.AdditionalItems = &spec.SchemaOrBool{ +- Schema: ConvertSchema(v2Schema.AdditionalItems.Schema), +- Allows: v2Schema.AdditionalItems.Allows, +- } +- } +- +- return builderutil.WrapRefs(&v3Schema) +-} +- +-func ConvertSchemaList(v2SchemaList []spec.Schema) []spec.Schema { +- if v2SchemaList == nil { +- return nil +- } +- v3SchemaList := []spec.Schema{} +- for _, s := range v2SchemaList { +- v3SchemaList = append(v3SchemaList, *ConvertSchema(&s)) +- } +- return v3SchemaList +-} +- +-func ConvertSecurityScheme(v2securityScheme *spec.SecurityScheme) *spec3.SecurityScheme { +- if v2securityScheme == nil { +- return nil +- } +- securityScheme := &spec3.SecurityScheme{ +- VendorExtensible: v2securityScheme.VendorExtensible, +- SecuritySchemeProps: spec3.SecuritySchemeProps{ +- Description: v2securityScheme.Description, +- Type: v2securityScheme.Type, +- Name: v2securityScheme.Name, +- In: v2securityScheme.In, +- }, +- } +- +- if v2securityScheme.Flow != "" { +- securityScheme.Flows = make(map[string]*spec3.OAuthFlow) +- securityScheme.Flows[v2securityScheme.Flow] = &spec3.OAuthFlow{ +- OAuthFlowProps: spec3.OAuthFlowProps{ +- AuthorizationUrl: v2securityScheme.AuthorizationURL, +- TokenUrl: v2securityScheme.TokenURL, +- Scopes: v2securityScheme.Scopes, +- }, +- } +- } +- return securityScheme +-} +- +-func ConvertPaths(v2Paths *spec.Paths) *spec3.Paths { +- if v2Paths == nil { +- return nil +- } +- paths := &spec3.Paths{ +- VendorExtensible: v2Paths.VendorExtensible, +- } +- +- if v2Paths.Paths != nil { +- paths.Paths = make(map[string]*spec3.Path) +- } +- for k, v := range v2Paths.Paths { +- paths.Paths[k] = ConvertPathItem(v) +- } +- return paths +-} +- +-func ConvertPathItem(v2pathItem spec.PathItem) *spec3.Path { +- path := &spec3.Path{ +- Refable: v2pathItem.Refable, +- PathProps: spec3.PathProps{ +- Get: ConvertOperation(v2pathItem.Get), +- Put: ConvertOperation(v2pathItem.Put), +- Post: ConvertOperation(v2pathItem.Post), +- Delete: ConvertOperation(v2pathItem.Delete), +- Options: ConvertOperation(v2pathItem.Options), +- Head: ConvertOperation(v2pathItem.Head), +- Patch: ConvertOperation(v2pathItem.Patch), +- }, +- VendorExtensible: v2pathItem.VendorExtensible, +- } +- for _, param := range v2pathItem.Parameters { +- path.Parameters = append(path.Parameters, ConvertParameter(param)) +- } +- return path +-} +- +-func ConvertOperation(v2Operation *spec.Operation) *spec3.Operation { +- if v2Operation == nil { +- return nil +- } +- operation := &spec3.Operation{ +- VendorExtensible: v2Operation.VendorExtensible, +- OperationProps: spec3.OperationProps{ +- Description: v2Operation.Description, +- ExternalDocs: ConvertExternalDocumentation(v2Operation.OperationProps.ExternalDocs), +- Tags: v2Operation.Tags, +- Summary: v2Operation.Summary, +- Deprecated: v2Operation.Deprecated, +- OperationId: v2Operation.ID, +- }, +- } +- +- for _, param := range v2Operation.Parameters { +- if param.ParamProps.Name == "body" && param.ParamProps.Schema != nil { +- operation.OperationProps.RequestBody = &spec3.RequestBody{ +- RequestBodyProps: spec3.RequestBodyProps{}, +- } +- if v2Operation.Consumes != nil { +- operation.RequestBody.Content = make(map[string]*spec3.MediaType) +- } +- for _, consumer := range v2Operation.Consumes { +- operation.RequestBody.Content[consumer] = &spec3.MediaType{ +- MediaTypeProps: spec3.MediaTypeProps{ +- Schema: ConvertSchema(param.ParamProps.Schema), +- }, +- } +- } +- } else { +- operation.Parameters = append(operation.Parameters, ConvertParameter(param)) +- } +- } +- +- operation.Responses = &spec3.Responses{ResponsesProps: spec3.ResponsesProps{ +- Default: ConvertResponse(v2Operation.Responses.Default, v2Operation.Produces), +- }, +- VendorExtensible: v2Operation.Responses.VendorExtensible, +- } +- +- if v2Operation.Responses.StatusCodeResponses != nil { +- operation.Responses.StatusCodeResponses = make(map[int]*spec3.Response) +- } +- for k, v := range v2Operation.Responses.StatusCodeResponses { +- operation.Responses.StatusCodeResponses[k] = ConvertResponse(&v, v2Operation.Produces) +- } +- return operation +-} +- +-func ConvertResponse(v2Response *spec.Response, produces []string) *spec3.Response { +- if v2Response == nil { +- return nil +- } +- response := &spec3.Response{ +- Refable: ConvertRefableResponse(v2Response.Refable), +- VendorExtensible: v2Response.VendorExtensible, +- ResponseProps: spec3.ResponseProps{ +- Description: v2Response.Description, +- }, +- } +- +- if v2Response.Schema != nil { +- if produces != nil { +- response.Content = make(map[string]*spec3.MediaType) +- } +- for _, producer := range produces { +- response.ResponseProps.Content[producer] = &spec3.MediaType{ +- MediaTypeProps: spec3.MediaTypeProps{ +- Schema: ConvertSchema(v2Response.Schema), +- }, +- } +- } +- } +- return response +-} +- +-func ConvertParameter(v2Param spec.Parameter) *spec3.Parameter { +- param := &spec3.Parameter{ +- Refable: ConvertRefableParameter(v2Param.Refable), +- VendorExtensible: v2Param.VendorExtensible, +- ParameterProps: spec3.ParameterProps{ +- Name: v2Param.Name, +- Description: v2Param.Description, +- In: v2Param.In, +- Required: v2Param.Required, +- Schema: ConvertSchema(v2Param.Schema), +- AllowEmptyValue: v2Param.AllowEmptyValue, +- }, +- } +- // Convert SimpleSchema into Schema +- if param.Schema == nil { +- param.Schema = &spec.Schema{ +- SchemaProps: spec.SchemaProps{ +- Type: []string{v2Param.Type}, +- Format: v2Param.Format, +- UniqueItems: v2Param.UniqueItems, +- }, +- } +- } +- +- return param +-} +- +-func ConvertRefableParameter(refable spec.Refable) spec.Refable { +- if refable.Ref.String() != "" { +- return spec.Refable{Ref: spec.MustCreateRef(strings.Replace(refable.Ref.String(), "#/parameters/", "#/components/parameters/", 1))} +- } +- return refable +-} +- +-func ConvertRefableResponse(refable spec.Refable) spec.Refable { +- if refable.Ref.String() != "" { +- return spec.Refable{Ref: spec.MustCreateRef(strings.Replace(refable.Ref.String(), "#/responses/", "#/components/responses/", 1))} +- } +- return refable +-} +diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go +index 799d866d..9887d185 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go ++++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go +@@ -214,9 +214,6 @@ func makeUnion(extensions map[string]interface{}) (schema.Union, error) { + } + } + +- if union.Discriminator != nil && len(union.Fields) == 0 { +- return schema.Union{}, fmt.Errorf("discriminator set to %v, but no fields in union", *union.Discriminator) +- } + return union, nil + } + +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go b/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go +index 699291f1..1f62c6e7 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go +@@ -32,6 +32,9 @@ type Encoding struct { + + // MarshalJSON is a custom marshal function that knows how to encode Encoding as JSON + func (e *Encoding) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(e) ++ } + b1, err := json.Marshal(e.EncodingProps) + if err != nil { + return nil, err +@@ -43,6 +46,16 @@ func (e *Encoding) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2), nil + } + ++func (e *Encoding) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ EncodingProps encodingPropsOmitZero `json:",inline"` ++ spec.Extensions ++ } ++ x.Extensions = internal.SanitizeExtensions(e.Extensions) ++ x.EncodingProps = encodingPropsOmitZero(e.EncodingProps) ++ return opts.MarshalNext(enc, x) ++} ++ + func (e *Encoding) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, e) +@@ -82,3 +95,11 @@ type EncodingProps struct { + // AllowReserved determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986 + AllowReserved bool `json:"allowReserved,omitempty"` + } ++ ++type encodingPropsOmitZero struct { ++ ContentType string `json:"contentType,omitempty"` ++ Headers map[string]*Header `json:"headers,omitempty"` ++ Style string `json:"style,omitempty"` ++ Explode bool `json:"explode,omitzero"` ++ AllowReserved bool `json:"allowReserved,omitzero"` ++} +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/example.go b/vendor/k8s.io/kube-openapi/pkg/spec3/example.go +index 03b87271..8834a92e 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/example.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/example.go +@@ -36,6 +36,9 @@ type Example struct { + + // MarshalJSON is a custom marshal function that knows how to encode RequestBody as JSON + func (e *Example) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(e) ++ } + b1, err := json.Marshal(e.Refable) + if err != nil { + return nil, err +@@ -50,6 +53,17 @@ func (e *Example) MarshalJSON() ([]byte, error) { + } + return swag.ConcatJSON(b1, b2, b3), nil + } ++func (e *Example) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ Ref string `json:"$ref,omitempty"` ++ ExampleProps `json:",inline"` ++ spec.Extensions ++ } ++ x.Ref = e.Refable.Ref.String() ++ x.Extensions = internal.SanitizeExtensions(e.Extensions) ++ x.ExampleProps = e.ExampleProps ++ return opts.MarshalNext(enc, x) ++} + + func (e *Example) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go b/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go +index e7995672..f0515496 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go +@@ -39,6 +39,9 @@ type ExternalDocumentationProps struct { + + // MarshalJSON is a custom marshal function that knows how to encode Responses as JSON + func (e *ExternalDocumentation) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(e) ++ } + b1, err := json.Marshal(e.ExternalDocumentationProps) + if err != nil { + return nil, err +@@ -50,6 +53,16 @@ func (e *ExternalDocumentation) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2), nil + } + ++func (e *ExternalDocumentation) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ ExternalDocumentationProps `json:",inline"` ++ spec.Extensions ++ } ++ x.Extensions = internal.SanitizeExtensions(e.Extensions) ++ x.ExternalDocumentationProps = e.ExternalDocumentationProps ++ return opts.MarshalNext(enc, x) ++} ++ + func (e *ExternalDocumentation) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, e) +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go b/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go +index bc19dd48..08b6246c 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go +@@ -35,6 +35,18 @@ var OpenAPIV3FuzzFuncs []interface{} = []interface{}{ + func(o *OpenAPI, c fuzz.Continue) { + c.FuzzNoCustom(o) + o.Version = "3.0.0" ++ for i, val := range o.SecurityRequirement { ++ if val == nil { ++ o.SecurityRequirement[i] = make(map[string][]string) ++ } ++ ++ for k, v := range val { ++ if v == nil { ++ val[k] = make([]string, 0) ++ } ++ } ++ } ++ + }, + func(r *interface{}, c fuzz.Continue) { + switch c.Intn(3) { +@@ -169,6 +181,21 @@ var OpenAPIV3FuzzFuncs []interface{} = []interface{}{ + c.Fuzz(&v.ResponseProps) + c.Fuzz(&v.VendorExtensible) + }, ++ func(v *Operation, c fuzz.Continue) { ++ c.FuzzNoCustom(v) ++ // Do not fuzz null values into the array. ++ for i, val := range v.SecurityRequirement { ++ if val == nil { ++ v.SecurityRequirement[i] = make(map[string][]string) ++ } ++ ++ for k, v := range val { ++ if v == nil { ++ val[k] = make([]string, 0) ++ } ++ } ++ } ++ }, + func(v *spec.Extensions, c fuzz.Continue) { + numChildren := c.Intn(5) + for i := 0; i < numChildren; i++ { +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/header.go b/vendor/k8s.io/kube-openapi/pkg/spec3/header.go +index ee5a30f7..9ea30628 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/header.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/header.go +@@ -36,6 +36,9 @@ type Header struct { + + // MarshalJSON is a custom marshal function that knows how to encode Header as JSON + func (h *Header) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(h) ++ } + b1, err := json.Marshal(h.Refable) + if err != nil { + return nil, err +@@ -51,6 +54,18 @@ func (h *Header) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2, b3), nil + } + ++func (h *Header) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ Ref string `json:"$ref,omitempty"` ++ HeaderProps headerPropsOmitZero `json:",inline"` ++ spec.Extensions ++ } ++ x.Ref = h.Refable.Ref.String() ++ x.Extensions = internal.SanitizeExtensions(h.Extensions) ++ x.HeaderProps = headerPropsOmitZero(h.HeaderProps) ++ return opts.MarshalNext(enc, x) ++} ++ + func (h *Header) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, h) +@@ -109,3 +124,19 @@ type HeaderProps struct { + // Examples of the header + Examples map[string]*Example `json:"examples,omitempty"` + } ++ ++// Marshaling structure only, always edit along with corresponding ++// struct (or compilation will fail). ++type headerPropsOmitZero struct { ++ Description string `json:"description,omitempty"` ++ Required bool `json:"required,omitzero"` ++ Deprecated bool `json:"deprecated,omitzero"` ++ AllowEmptyValue bool `json:"allowEmptyValue,omitzero"` ++ Style string `json:"style,omitempty"` ++ Explode bool `json:"explode,omitzero"` ++ AllowReserved bool `json:"allowReserved,omitzero"` ++ Schema *spec.Schema `json:"schema,omitzero"` ++ Content map[string]*MediaType `json:"content,omitempty"` ++ Example interface{} `json:"example,omitempty"` ++ Examples map[string]*Example `json:"examples,omitempty"` ++} +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go b/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go +index d390e69b..47eef1ed 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go +@@ -35,6 +35,9 @@ type MediaType struct { + + // MarshalJSON is a custom marshal function that knows how to encode MediaType as JSON + func (m *MediaType) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(m) ++ } + b1, err := json.Marshal(m.MediaTypeProps) + if err != nil { + return nil, err +@@ -46,6 +49,16 @@ func (m *MediaType) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2), nil + } + ++func (e *MediaType) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ MediaTypeProps mediaTypePropsOmitZero `json:",inline"` ++ spec.Extensions ++ } ++ x.Extensions = internal.SanitizeExtensions(e.Extensions) ++ x.MediaTypeProps = mediaTypePropsOmitZero(e.MediaTypeProps) ++ return opts.MarshalNext(enc, x) ++} ++ + func (m *MediaType) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, m) +@@ -84,3 +97,10 @@ type MediaTypeProps struct { + // A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded + Encoding map[string]*Encoding `json:"encoding,omitempty"` + } ++ ++type mediaTypePropsOmitZero struct { ++ Schema *spec.Schema `json:"schema,omitzero"` ++ Example interface{} `json:"example,omitempty"` ++ Examples map[string]*Example `json:"examples,omitempty"` ++ Encoding map[string]*Encoding `json:"encoding,omitempty"` ++} +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go b/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go +index 28230610..f1e10254 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go +@@ -35,6 +35,9 @@ type Operation struct { + + // MarshalJSON is a custom marshal function that knows how to encode Operation as JSON + func (o *Operation) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(o) ++ } + b1, err := json.Marshal(o.OperationProps) + if err != nil { + return nil, err +@@ -46,6 +49,16 @@ func (o *Operation) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2), nil + } + ++func (o *Operation) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ spec.Extensions ++ OperationProps operationPropsOmitZero `json:",inline"` ++ } ++ x.Extensions = internal.SanitizeExtensions(o.Extensions) ++ x.OperationProps = operationPropsOmitZero(o.OperationProps) ++ return opts.MarshalNext(enc, x) ++} ++ + // UnmarshalJSON hydrates this items instance with the data from JSON + func (o *Operation) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { +@@ -95,3 +108,17 @@ type OperationProps struct { + // Servers contains an alternative server array to service this operation + Servers []*Server `json:"servers,omitempty"` + } ++ ++type operationPropsOmitZero struct { ++ Tags []string `json:"tags,omitempty"` ++ Summary string `json:"summary,omitempty"` ++ Description string `json:"description,omitempty"` ++ ExternalDocs *ExternalDocumentation `json:"externalDocs,omitzero"` ++ OperationId string `json:"operationId,omitempty"` ++ Parameters []*Parameter `json:"parameters,omitempty"` ++ RequestBody *RequestBody `json:"requestBody,omitzero"` ++ Responses *Responses `json:"responses,omitzero"` ++ Deprecated bool `json:"deprecated,omitzero"` ++ SecurityRequirement []map[string][]string `json:"security,omitempty"` ++ Servers []*Server `json:"servers,omitempty"` ++} +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go b/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go +index 613da71a..ada7edb6 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go +@@ -36,6 +36,9 @@ type Parameter struct { + + // MarshalJSON is a custom marshal function that knows how to encode Parameter as JSON + func (p *Parameter) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(p) ++ } + b1, err := json.Marshal(p.Refable) + if err != nil { + return nil, err +@@ -51,6 +54,18 @@ func (p *Parameter) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2, b3), nil + } + ++func (p *Parameter) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ Ref string `json:"$ref,omitempty"` ++ ParameterProps parameterPropsOmitZero `json:",inline"` ++ spec.Extensions ++ } ++ x.Ref = p.Refable.Ref.String() ++ x.Extensions = internal.SanitizeExtensions(p.Extensions) ++ x.ParameterProps = parameterPropsOmitZero(p.ParameterProps) ++ return opts.MarshalNext(enc, x) ++} ++ + func (p *Parameter) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, p) +@@ -114,3 +129,19 @@ type ParameterProps struct { + // Examples of the parameter's potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding + Examples map[string]*Example `json:"examples,omitempty"` + } ++ ++type parameterPropsOmitZero struct { ++ Name string `json:"name,omitempty"` ++ In string `json:"in,omitempty"` ++ Description string `json:"description,omitempty"` ++ Required bool `json:"required,omitzero"` ++ Deprecated bool `json:"deprecated,omitzero"` ++ AllowEmptyValue bool `json:"allowEmptyValue,omitzero"` ++ Style string `json:"style,omitempty"` ++ Explode bool `json:"explode,omitzero"` ++ AllowReserved bool `json:"allowReserved,omitzero"` ++ Schema *spec.Schema `json:"schema,omitzero"` ++ Content map[string]*MediaType `json:"content,omitempty"` ++ Example interface{} `json:"example,omitempty"` ++ Examples map[string]*Example `json:"examples,omitempty"` ++} +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/path.go b/vendor/k8s.io/kube-openapi/pkg/spec3/path.go +index 40d9061a..16fbbb4d 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/path.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/path.go +@@ -35,15 +35,41 @@ type Paths struct { + + // MarshalJSON is a custom marshal function that knows how to encode Paths as JSON + func (p *Paths) MarshalJSON() ([]byte, error) { +- b1, err := json.Marshal(p.Paths) ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(p) ++ } ++ b1, err := json.Marshal(p.VendorExtensible) + if err != nil { + return nil, err + } +- b2, err := json.Marshal(p.VendorExtensible) ++ ++ pths := make(map[string]*Path) ++ for k, v := range p.Paths { ++ if strings.HasPrefix(k, "/") { ++ pths[k] = v ++ } ++ } ++ b2, err := json.Marshal(pths) + if err != nil { + return nil, err + } +- return swag.ConcatJSON(b1, b2), nil ++ concated := swag.ConcatJSON(b1, b2) ++ return concated, nil ++} ++ ++func (p *Paths) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ m := make(map[string]any, len(p.Extensions)+len(p.Paths)) ++ for k, v := range p.Extensions { ++ if internal.IsExtensionKey(k) { ++ m[k] = v ++ } ++ } ++ for k, v := range p.Paths { ++ if strings.HasPrefix(k, "/") { ++ m[k] = v ++ } ++ } ++ return opts.MarshalNext(enc, m) + } + + // UnmarshalJSON hydrates this items instance with the data from JSON +@@ -144,6 +170,9 @@ type Path struct { + + // MarshalJSON is a custom marshal function that knows how to encode Path as JSON + func (p *Path) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(p) ++ } + b1, err := json.Marshal(p.Refable) + if err != nil { + return nil, err +@@ -159,6 +188,18 @@ func (p *Path) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2, b3), nil + } + ++func (p *Path) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ Ref string `json:"$ref,omitempty"` ++ spec.Extensions ++ PathProps ++ } ++ x.Ref = p.Refable.Ref.String() ++ x.Extensions = internal.SanitizeExtensions(p.Extensions) ++ x.PathProps = p.PathProps ++ return opts.MarshalNext(enc, x) ++} ++ + func (p *Path) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, p) +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go b/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go +index 33267ce6..6f8607e4 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go +@@ -36,6 +36,9 @@ type RequestBody struct { + + // MarshalJSON is a custom marshal function that knows how to encode RequestBody as JSON + func (r *RequestBody) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(r) ++ } + b1, err := json.Marshal(r.Refable) + if err != nil { + return nil, err +@@ -51,6 +54,18 @@ func (r *RequestBody) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2, b3), nil + } + ++func (r *RequestBody) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ Ref string `json:"$ref,omitempty"` ++ RequestBodyProps requestBodyPropsOmitZero `json:",inline"` ++ spec.Extensions ++ } ++ x.Ref = r.Refable.Ref.String() ++ x.Extensions = internal.SanitizeExtensions(r.Extensions) ++ x.RequestBodyProps = requestBodyPropsOmitZero(r.RequestBodyProps) ++ return opts.MarshalNext(enc, x) ++} ++ + func (r *RequestBody) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, r) +@@ -77,6 +92,12 @@ type RequestBodyProps struct { + Required bool `json:"required,omitempty"` + } + ++type requestBodyPropsOmitZero struct { ++ Description string `json:"description,omitempty"` ++ Content map[string]*MediaType `json:"content,omitempty"` ++ Required bool `json:"required,omitzero"` ++} ++ + func (r *RequestBody) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error { + var x struct { + spec.Extensions +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/response.go b/vendor/k8s.io/kube-openapi/pkg/spec3/response.go +index 95b388e6..73e241fd 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/response.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/response.go +@@ -37,6 +37,9 @@ type Responses struct { + + // MarshalJSON is a custom marshal function that knows how to encode Responses as JSON + func (r *Responses) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(r) ++ } + b1, err := json.Marshal(r.ResponsesProps) + if err != nil { + return nil, err +@@ -48,6 +51,25 @@ func (r *Responses) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2), nil + } + ++func (r Responses) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ type ArbitraryKeys map[string]interface{} ++ var x struct { ++ ArbitraryKeys ++ Default *Response `json:"default,omitzero"` ++ } ++ x.ArbitraryKeys = make(map[string]any, len(r.Extensions)+len(r.StatusCodeResponses)) ++ for k, v := range r.Extensions { ++ if internal.IsExtensionKey(k) { ++ x.ArbitraryKeys[k] = v ++ } ++ } ++ for k, v := range r.StatusCodeResponses { ++ x.ArbitraryKeys[strconv.Itoa(k)] = v ++ } ++ x.Default = r.Default ++ return opts.MarshalNext(enc, x) ++} ++ + func (r *Responses) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, r) +@@ -179,6 +201,9 @@ type Response struct { + + // MarshalJSON is a custom marshal function that knows how to encode Response as JSON + func (r *Response) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(r) ++ } + b1, err := json.Marshal(r.Refable) + if err != nil { + return nil, err +@@ -194,6 +219,18 @@ func (r *Response) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2, b3), nil + } + ++func (r Response) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ Ref string `json:"$ref,omitempty"` ++ spec.Extensions ++ ResponseProps `json:",inline"` ++ } ++ x.Ref = r.Refable.Ref.String() ++ x.Extensions = internal.SanitizeExtensions(r.Extensions) ++ x.ResponseProps = r.ResponseProps ++ return opts.MarshalNext(enc, x) ++} ++ + func (r *Response) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, r) +@@ -247,6 +284,9 @@ type Link struct { + + // MarshalJSON is a custom marshal function that knows how to encode Link as JSON + func (r *Link) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(r) ++ } + b1, err := json.Marshal(r.Refable) + if err != nil { + return nil, err +@@ -262,6 +302,18 @@ func (r *Link) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2, b3), nil + } + ++func (r *Link) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ Ref string `json:"$ref,omitempty"` ++ spec.Extensions ++ LinkProps `json:",inline"` ++ } ++ x.Ref = r.Refable.Ref.String() ++ x.Extensions = internal.SanitizeExtensions(r.Extensions) ++ x.LinkProps = r.LinkProps ++ return opts.MarshalNext(enc, x) ++} ++ + func (r *Link) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, r) +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go b/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go +index edf7e6de..dd1e98ed 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go +@@ -20,6 +20,8 @@ import ( + "encoding/json" + + "github.com/go-openapi/swag" ++ "k8s.io/kube-openapi/pkg/internal" ++ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" + "k8s.io/kube-openapi/pkg/validation/spec" + ) + +@@ -32,6 +34,9 @@ type SecurityScheme struct { + + // MarshalJSON is a custom marshal function that knows how to encode SecurityScheme as JSON + func (s *SecurityScheme) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(s) ++ } + b1, err := json.Marshal(s.SecuritySchemeProps) + if err != nil { + return nil, err +@@ -47,6 +52,18 @@ func (s *SecurityScheme) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2, b3), nil + } + ++func (s *SecurityScheme) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ Ref string `json:"$ref,omitempty"` ++ SecuritySchemeProps `json:",inline"` ++ spec.Extensions ++ } ++ x.Ref = s.Refable.Ref.String() ++ x.Extensions = internal.SanitizeExtensions(s.Extensions) ++ x.SecuritySchemeProps = s.SecuritySchemeProps ++ return opts.MarshalNext(enc, x) ++} ++ + // UnmarshalJSON hydrates this items instance with the data from JSON + func (s *SecurityScheme) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &s.SecuritySchemeProps); err != nil { +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/server.go b/vendor/k8s.io/kube-openapi/pkg/spec3/server.go +index d5df0a78..654a42c0 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/server.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/server.go +@@ -41,6 +41,9 @@ type ServerProps struct { + + // MarshalJSON is a custom marshal function that knows how to encode Responses as JSON + func (s *Server) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(s) ++ } + b1, err := json.Marshal(s.ServerProps) + if err != nil { + return nil, err +@@ -52,6 +55,16 @@ func (s *Server) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2), nil + } + ++func (s *Server) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ ServerProps `json:",inline"` ++ spec.Extensions ++ } ++ x.Extensions = internal.SanitizeExtensions(s.Extensions) ++ x.ServerProps = s.ServerProps ++ return opts.MarshalNext(enc, x) ++} ++ + func (s *Server) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, s) +@@ -96,6 +109,9 @@ type ServerVariableProps struct { + + // MarshalJSON is a custom marshal function that knows how to encode Responses as JSON + func (s *ServerVariable) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(s) ++ } + b1, err := json.Marshal(s.ServerVariableProps) + if err != nil { + return nil, err +@@ -107,6 +123,16 @@ func (s *ServerVariable) MarshalJSON() ([]byte, error) { + return swag.ConcatJSON(b1, b2), nil + } + ++func (s *ServerVariable) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ var x struct { ++ ServerVariableProps `json:",inline"` ++ spec.Extensions ++ } ++ x.Extensions = internal.SanitizeExtensions(s.Extensions) ++ x.ServerVariableProps = s.ServerVariableProps ++ return opts.MarshalNext(enc, x) ++} ++ + func (s *ServerVariable) UnmarshalJSON(data []byte) error { + if internal.UseOptimizedJSONUnmarshalingV3 { + return jsonv2.Unmarshal(data, s) +diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go b/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go +index bed096fb..5db819c7 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go ++++ b/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go +@@ -36,6 +36,8 @@ type OpenAPI struct { + Servers []*Server `json:"servers,omitempty"` + // Components hold various schemas for the specification + Components *Components `json:"components,omitempty"` ++ // SecurityRequirement holds a declaration of which security mechanisms can be used across the API ++ SecurityRequirement []map[string][]string `json:"security,omitempty"` + // ExternalDocs holds additional external documentation + ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"` + } +@@ -48,3 +50,26 @@ func (o *OpenAPI) UnmarshalJSON(data []byte) error { + } + return json.Unmarshal(data, &p) + } ++ ++func (o *OpenAPI) MarshalJSON() ([]byte, error) { ++ if internal.UseOptimizedJSONMarshalingV3 { ++ return internal.DeterministicMarshal(o) ++ } ++ type OpenAPIWithNoFunctions OpenAPI ++ p := (*OpenAPIWithNoFunctions)(o) ++ return json.Marshal(&p) ++} ++ ++func (o *OpenAPI) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error { ++ type OpenAPIOmitZero struct { ++ Version string `json:"openapi"` ++ Info *spec.Info `json:"info"` ++ Paths *Paths `json:"paths,omitzero"` ++ Servers []*Server `json:"servers,omitempty"` ++ Components *Components `json:"components,omitzero"` ++ SecurityRequirement []map[string][]string `json:"security,omitempty"` ++ ExternalDocs *ExternalDocumentation `json:"externalDocs,omitzero"` ++ } ++ x := (*OpenAPIOmitZero)(o) ++ return opts.MarshalNext(enc, x) ++} +diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go +index 5789e67a..1b758ab2 100644 +--- a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go ++++ b/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go +@@ -22,7 +22,7 @@ import ( + "strings" + + openapi_v2 "github.com/google/gnostic-models/openapiv2" +- "gopkg.in/yaml.v2" ++ yaml "sigs.k8s.io/yaml/goyaml.v2" + ) + + func newSchemaError(path *Path, format string, a ...interface{}) error { +diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/fuzz.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/fuzz.go +deleted file mode 100644 +index c66f998f..00000000 +--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/fuzz.go ++++ /dev/null +@@ -1,502 +0,0 @@ +-/* +-Copyright 2022 The Kubernetes Authors. +- +-Licensed under the Apache License, Version 2.0 (the "License"); +-you may not use this file except in compliance with the License. +-You may obtain a copy of the License at +- +- http://www.apache.org/licenses/LICENSE-2.0 +- +-Unless required by applicable law or agreed to in writing, software +-distributed under the License is distributed on an "AS IS" BASIS, +-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-See the License for the specific language governing permissions and +-limitations under the License. +-*/ +- +-package spec +- +-import ( +- "github.com/go-openapi/jsonreference" +- "github.com/google/go-cmp/cmp" +- fuzz "github.com/google/gofuzz" +-) +- +-var SwaggerFuzzFuncs []interface{} = []interface{}{ +- func(v *Responses, c fuzz.Continue) { +- c.FuzzNoCustom(v) +- if v.Default != nil { +- // Check if we hit maxDepth and left an incomplete value +- if v.Default.Description == "" { +- v.Default = nil +- v.StatusCodeResponses = nil +- } +- } +- +- // conversion has no way to discern empty statusCodeResponses from +- // nil, since "default" is always included in the map. +- // So avoid empty responses list +- if len(v.StatusCodeResponses) == 0 { +- v.StatusCodeResponses = nil +- } +- }, +- func(v *Operation, c fuzz.Continue) { +- c.FuzzNoCustom(v) +- +- if v != nil { +- // force non-nil +- v.Responses = &Responses{} +- c.Fuzz(v.Responses) +- +- v.Schemes = nil +- if c.RandBool() { +- v.Schemes = append(v.Schemes, "http") +- } +- +- if c.RandBool() { +- v.Schemes = append(v.Schemes, "https") +- } +- +- if c.RandBool() { +- v.Schemes = append(v.Schemes, "ws") +- } +- +- if c.RandBool() { +- v.Schemes = append(v.Schemes, "wss") +- } +- +- // Gnostic unconditionally makes security values non-null +- // So do not fuzz null values into the array. +- for i, val := range v.Security { +- if val == nil { +- v.Security[i] = make(map[string][]string) +- } +- +- for k, v := range val { +- if v == nil { +- val[k] = make([]string, 0) +- } +- } +- } +- } +- }, +- func(v map[int]Response, c fuzz.Continue) { +- n := 0 +- c.Fuzz(&n) +- if n == 0 { +- // Test that fuzzer is not at maxDepth so we do not +- // end up with empty elements +- return +- } +- +- // Prevent negative numbers +- num := c.Intn(4) +- for i := 0; i < num+2; i++ { +- val := Response{} +- c.Fuzz(&val) +- +- val.Description = c.RandString() + "x" +- v[100*(i+1)+c.Intn(100)] = val +- } +- }, +- func(v map[string]PathItem, c fuzz.Continue) { +- n := 0 +- c.Fuzz(&n) +- if n == 0 { +- // Test that fuzzer is not at maxDepth so we do not +- // end up with empty elements +- return +- } +- +- num := c.Intn(5) +- for i := 0; i < num+2; i++ { +- val := PathItem{} +- c.Fuzz(&val) +- +- // Ref params are only allowed in certain locations, so +- // possibly add a few to PathItems +- numRefsToAdd := c.Intn(5) +- for i := 0; i < numRefsToAdd; i++ { +- theRef := Parameter{} +- c.Fuzz(&theRef.Refable) +- +- val.Parameters = append(val.Parameters, theRef) +- } +- +- v["/"+c.RandString()] = val +- } +- }, +- func(v *SchemaOrArray, c fuzz.Continue) { +- *v = SchemaOrArray{} +- // gnostic parser just doesn't support more +- // than one Schema here +- v.Schema = &Schema{} +- c.Fuzz(&v.Schema) +- +- }, +- func(v *SchemaOrBool, c fuzz.Continue) { +- *v = SchemaOrBool{} +- +- if c.RandBool() { +- v.Allows = c.RandBool() +- } else { +- v.Schema = &Schema{} +- v.Allows = true +- c.Fuzz(&v.Schema) +- } +- }, +- func(v map[string]Response, c fuzz.Continue) { +- n := 0 +- c.Fuzz(&n) +- if n == 0 { +- // Test that fuzzer is not at maxDepth so we do not +- // end up with empty elements +- return +- } +- +- // Response definitions are not allowed to +- // be refs +- for i := 0; i < c.Intn(5)+1; i++ { +- resp := &Response{} +- +- c.Fuzz(resp) +- resp.Ref = Ref{} +- resp.Description = c.RandString() + "x" +- +- // Response refs are not vendor extensible by gnostic +- resp.VendorExtensible.Extensions = nil +- v[c.RandString()+"x"] = *resp +- } +- }, +- func(v *Header, c fuzz.Continue) { +- if v != nil { +- c.FuzzNoCustom(v) +- +- // descendant Items of Header may not be refs +- cur := v.Items +- for cur != nil { +- cur.Ref = Ref{} +- cur = cur.Items +- } +- } +- }, +- func(v *Ref, c fuzz.Continue) { +- *v = Ref{} +- v.Ref, _ = jsonreference.New("http://asd.com/" + c.RandString()) +- }, +- func(v *Response, c fuzz.Continue) { +- *v = Response{} +- if c.RandBool() { +- v.Ref = Ref{} +- v.Ref.Ref, _ = jsonreference.New("http://asd.com/" + c.RandString()) +- } else { +- c.Fuzz(&v.VendorExtensible) +- c.Fuzz(&v.Schema) +- c.Fuzz(&v.ResponseProps) +- +- v.Headers = nil +- v.Ref = Ref{} +- +- n := 0 +- c.Fuzz(&n) +- if n != 0 { +- // Test that fuzzer is not at maxDepth so we do not +- // end up with empty elements +- num := c.Intn(4) +- for i := 0; i < num; i++ { +- if v.Headers == nil { +- v.Headers = make(map[string]Header) +- } +- hdr := Header{} +- c.Fuzz(&hdr) +- if hdr.Type == "" { +- // hit maxDepth, just abort trying to make haders +- v.Headers = nil +- break +- } +- v.Headers[c.RandString()+"x"] = hdr +- } +- } else { +- v.Headers = nil +- } +- } +- +- v.Description = c.RandString() + "x" +- +- // Gnostic parses empty as nil, so to keep avoid putting empty +- if len(v.Headers) == 0 { +- v.Headers = nil +- } +- }, +- func(v **Info, c fuzz.Continue) { +- // Info is never nil +- *v = &Info{} +- c.FuzzNoCustom(*v) +- +- (*v).Title = c.RandString() + "x" +- }, +- func(v *Extensions, c fuzz.Continue) { +- // gnostic parser only picks up x- vendor extensions +- numChildren := c.Intn(5) +- for i := 0; i < numChildren; i++ { +- if *v == nil { +- *v = Extensions{} +- } +- (*v)["x-"+c.RandString()] = c.RandString() +- } +- }, +- func(v *Swagger, c fuzz.Continue) { +- c.FuzzNoCustom(v) +- +- if v.Paths == nil { +- // Force paths non-nil since it does not have omitempty in json tag. +- // This means a perfect roundtrip (via json) is impossible, +- // since we can't tell the difference between empty/unspecified paths +- v.Paths = &Paths{} +- c.Fuzz(v.Paths) +- } +- +- v.Swagger = "2.0" +- +- // Gnostic support serializing ID at all +- // unavoidable data loss +- v.ID = "" +- +- v.Schemes = nil +- if c.RandUint64()%2 == 1 { +- v.Schemes = append(v.Schemes, "http") +- } +- +- if c.RandUint64()%2 == 1 { +- v.Schemes = append(v.Schemes, "https") +- } +- +- if c.RandUint64()%2 == 1 { +- v.Schemes = append(v.Schemes, "ws") +- } +- +- if c.RandUint64()%2 == 1 { +- v.Schemes = append(v.Schemes, "wss") +- } +- +- // Gnostic unconditionally makes security values non-null +- // So do not fuzz null values into the array. +- for i, val := range v.Security { +- if val == nil { +- v.Security[i] = make(map[string][]string) +- } +- +- for k, v := range val { +- if v == nil { +- val[k] = make([]string, 0) +- } +- } +- } +- }, +- func(v *SecurityScheme, c fuzz.Continue) { +- v.Description = c.RandString() + "x" +- c.Fuzz(&v.VendorExtensible) +- +- switch c.Intn(3) { +- case 0: +- v.Type = "basic" +- case 1: +- v.Type = "apiKey" +- switch c.Intn(2) { +- case 0: +- v.In = "header" +- case 1: +- v.In = "query" +- default: +- panic("unreachable") +- } +- v.Name = "x" + c.RandString() +- case 2: +- v.Type = "oauth2" +- +- switch c.Intn(4) { +- case 0: +- v.Flow = "accessCode" +- v.TokenURL = "https://" + c.RandString() +- v.AuthorizationURL = "https://" + c.RandString() +- case 1: +- v.Flow = "application" +- v.TokenURL = "https://" + c.RandString() +- case 2: +- v.Flow = "implicit" +- v.AuthorizationURL = "https://" + c.RandString() +- case 3: +- v.Flow = "password" +- v.TokenURL = "https://" + c.RandString() +- default: +- panic("unreachable") +- } +- c.Fuzz(&v.Scopes) +- default: +- panic("unreachable") +- } +- }, +- func(v *interface{}, c fuzz.Continue) { +- *v = c.RandString() + "x" +- }, +- func(v *string, c fuzz.Continue) { +- *v = c.RandString() + "x" +- }, +- func(v *ExternalDocumentation, c fuzz.Continue) { +- v.Description = c.RandString() + "x" +- v.URL = c.RandString() + "x" +- }, +- func(v *SimpleSchema, c fuzz.Continue) { +- c.FuzzNoCustom(v) +- +- switch c.Intn(5) { +- case 0: +- v.Type = "string" +- case 1: +- v.Type = "number" +- case 2: +- v.Type = "boolean" +- case 3: +- v.Type = "integer" +- case 4: +- v.Type = "array" +- default: +- panic("unreachable") +- } +- +- switch c.Intn(5) { +- case 0: +- v.CollectionFormat = "csv" +- case 1: +- v.CollectionFormat = "ssv" +- case 2: +- v.CollectionFormat = "tsv" +- case 3: +- v.CollectionFormat = "pipes" +- case 4: +- v.CollectionFormat = "" +- default: +- panic("unreachable") +- } +- +- // None of the types which include SimpleSchema in our definitions +- // actually support "example" in the official spec +- v.Example = nil +- +- // unsupported by openapi +- v.Nullable = false +- }, +- func(v *int64, c fuzz.Continue) { +- c.Fuzz(v) +- +- // Gnostic does not differentiate between 0 and non-specified +- // so avoid using 0 for fuzzer +- if *v == 0 { +- *v = 1 +- } +- }, +- func(v *float64, c fuzz.Continue) { +- c.Fuzz(v) +- +- // Gnostic does not differentiate between 0 and non-specified +- // so avoid using 0 for fuzzer +- if *v == 0.0 { +- *v = 1.0 +- } +- }, +- func(v *Parameter, c fuzz.Continue) { +- if v == nil { +- return +- } +- c.Fuzz(&v.VendorExtensible) +- if c.RandBool() { +- // body param +- v.Description = c.RandString() + "x" +- v.Name = c.RandString() + "x" +- v.In = "body" +- c.Fuzz(&v.Description) +- c.Fuzz(&v.Required) +- +- v.Schema = &Schema{} +- c.Fuzz(&v.Schema) +- +- } else { +- c.Fuzz(&v.SimpleSchema) +- c.Fuzz(&v.CommonValidations) +- v.AllowEmptyValue = false +- v.Description = c.RandString() + "x" +- v.Name = c.RandString() + "x" +- +- switch c.Intn(4) { +- case 0: +- // Header param +- v.In = "header" +- case 1: +- // Form data param +- v.In = "formData" +- v.AllowEmptyValue = c.RandBool() +- case 2: +- // Query param +- v.In = "query" +- v.AllowEmptyValue = c.RandBool() +- case 3: +- // Path param +- v.In = "path" +- v.Required = true +- default: +- panic("unreachable") +- } +- +- // descendant Items of Parameter may not be refs +- cur := v.Items +- for cur != nil { +- cur.Ref = Ref{} +- cur = cur.Items +- } +- } +- }, +- func(v *Schema, c fuzz.Continue) { +- if c.RandBool() { +- // file schema +- c.Fuzz(&v.Default) +- c.Fuzz(&v.Description) +- c.Fuzz(&v.Example) +- c.Fuzz(&v.ExternalDocs) +- +- c.Fuzz(&v.Format) +- c.Fuzz(&v.ReadOnly) +- c.Fuzz(&v.Required) +- c.Fuzz(&v.Title) +- v.Type = StringOrArray{"file"} +- +- } else { +- // normal schema +- c.Fuzz(&v.SchemaProps) +- c.Fuzz(&v.SwaggerSchemaProps) +- c.Fuzz(&v.VendorExtensible) +- // c.Fuzz(&v.ExtraProps) +- // ExtraProps will not roundtrip - gnostic throws out +- // unrecognized keys +- } +- +- // Not supported by official openapi v2 spec +- // and stripped by k8s apiserver +- v.ID = "" +- v.AnyOf = nil +- v.OneOf = nil +- v.Not = nil +- v.Nullable = false +- v.AdditionalItems = nil +- v.Schema = "" +- v.PatternProperties = nil +- v.Definitions = nil +- v.Dependencies = nil +- }, +-} +- +-var SwaggerDiffOptions = []cmp.Option{ +- // cmp.Diff panics on Ref since jsonreference.Ref uses unexported fields +- cmp.Comparer(func(a Ref, b Ref) bool { +- return a.String() == b.String() +- }), +-} +diff --git a/vendor/k8s.io/kubernetes/pkg/securitycontext/util.go b/vendor/k8s.io/kubernetes/pkg/securitycontext/util.go +index 5895df0c..28771b6d 100644 +--- a/vendor/k8s.io/kubernetes/pkg/securitycontext/util.go ++++ b/vendor/k8s.io/kubernetes/pkg/securitycontext/util.go +@@ -188,7 +188,7 @@ func AddNoNewPrivileges(sc *v1.SecurityContext) bool { + + var ( + // These *must* be kept in sync with moby/moby. +- // https://github.com/moby/moby/blob/master/oci/defaults.go#L105-L123 ++ // https://github.com/moby/moby/blob/master/oci/defaults.go#L105-L124 + // @jessfraz will watch changes to those files upstream. + defaultMaskedPaths = []string{ + "/proc/asound", +@@ -201,6 +201,7 @@ var ( + "/proc/sched_debug", + "/proc/scsi", + "/sys/firmware", ++ "/sys/devices/virtual/powercap", + } + defaultReadonlyPaths = []string{ + "/proc/bus", +diff --git a/vendor/k8s.io/kubernetes/test/e2e/storage/utils/create.go b/vendor/k8s.io/kubernetes/test/e2e/storage/utils/create.go +index c3fb6b36..ac570772 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/storage/utils/create.go ++++ b/vendor/k8s.io/kubernetes/test/e2e/storage/utils/create.go +@@ -62,6 +62,10 @@ func LoadFromManifests(files ...string) ([]interface{}, error) { + if err := runtime.DecodeInto(scheme.Codecs.UniversalDecoder(), data, &what); err != nil { + return fmt.Errorf("decode TypeMeta: %w", err) + } ++ // Ignore empty documents. ++ if what.Kind == "" { ++ return nil ++ } + + factory := factories[what] + if factory == nil { +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-attacher/rbac.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-attacher/rbac.yaml +index e47e6fed..3d33dfc0 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-attacher/rbac.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-attacher/rbac.yaml +@@ -1,5 +1,5 @@ +-# Do not edit, downloaded from https://github.com/kubernetes-csi/external-attacher/raw/v3.4.0/deploy/kubernetes//rbac.yaml +-# for csi-driver-host-path v1.8.0 ++# Do not edit, downloaded from https://github.com/kubernetes-csi/external-attacher/raw/v4.5.0/deploy/kubernetes//rbac.yaml ++# for csi-driver-host-path release-1.13 + # by ./update-hostpath.sh + # + # This YAML file contains all RBAC objects that are necessary to run external +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml +index 8f806887..bdd93b89 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-health-monitor/external-health-monitor-controller/rbac.yaml +@@ -1,5 +1,5 @@ +-# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.4.0/deploy/kubernetes/external-health-monitor-controller/rbac.yaml +-# for csi-driver-host-path v1.8.0 ++# Do not edit, downloaded from https://github.com/kubernetes-csi/external-health-monitor/raw/v0.11.0/deploy/kubernetes/external-health-monitor-controller/rbac.yaml ++# for csi-driver-host-path release-1.13 + # by ./update-hostpath.sh + # + # This YAML file contains all RBAC objects that are necessary to run external +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-provisioner/rbac.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-provisioner/rbac.yaml +index ba65d9e7..d80b5d79 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-provisioner/rbac.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-provisioner/rbac.yaml +@@ -1,5 +1,5 @@ +-# Do not edit, downloaded from https://github.com/kubernetes-csi/external-provisioner/raw/v3.1.0/deploy/kubernetes//rbac.yaml +-# for csi-driver-host-path v1.8.0 ++# Do not edit, downloaded from https://github.com/kubernetes-csi/external-provisioner/raw/v4.0.0/deploy/kubernetes//rbac.yaml ++# for csi-driver-host-path release-1.13 + # by ./update-hostpath.sh + # + # This YAML file contains all RBAC objects that are necessary to run external +@@ -61,6 +61,13 @@ rules: + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments"] + verbs: ["get", "list", "watch"] ++ # (Alpha) Access to referencegrants is only needed when the CSI driver ++ # has the CrossNamespaceVolumeDataSource controller capability. ++ # In that case, external-provisioner requires "get", "list", "watch" ++ # permissions for "referencegrants" on "gateway.networking.k8s.io". ++ #- apiGroups: ["gateway.networking.k8s.io"] ++ # resources: ["referencegrants"] ++ # verbs: ["get", "list", "watch"] + + --- + kind: ClusterRoleBinding +@@ -89,9 +96,6 @@ metadata: + rules: + # Only one of the following rules for endpoints or leases is required based on + # what is set for `--leader-election-type`. Endpoints are deprecated in favor of Leases. +-- apiGroups: [""] +- resources: ["endpoints"] +- verbs: ["get", "watch", "list", "delete", "update", "create"] + - apiGroups: ["coordination.k8s.io"] + resources: ["leases"] + verbs: ["get", "watch", "list", "delete", "update", "create"] +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml +index 410d14ff..4f8f7980 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-resizer/rbac.yaml +@@ -1,5 +1,5 @@ +-# Do not edit, downloaded from https://github.com/kubernetes-csi/external-resizer/raw/v1.4.0/deploy/kubernetes//rbac.yaml +-# for csi-driver-host-path v1.8.0 ++# Do not edit, downloaded from https://github.com/kubernetes-csi/external-resizer/raw/v1.10.0/deploy/kubernetes//rbac.yaml ++# for csi-driver-host-path release-1.13 + # by ./update-hostpath.sh + # + # This YAML file contains all RBAC objects that are necessary to run external +@@ -46,6 +46,10 @@ rules: + - apiGroups: [""] + resources: ["events"] + verbs: ["list", "watch", "create", "update", "patch"] ++ # only required if enabling the alpha volume modify feature ++ - apiGroups: ["storage.k8s.io"] ++ resources: ["volumeattributesclasses"] ++ verbs: ["get", "list", "watch"] + + --- + kind: ClusterRoleBinding +@@ -63,7 +67,7 @@ roleRef: + apiGroup: rbac.authorization.k8s.io + + --- +-# Resizer must be able to work with end point in current namespace ++# Resizer must be able to work with `leases` in current namespace + # if (and only if) leadership election is enabled + kind: Role + apiVersion: rbac.authorization.k8s.io/v1 +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml +index 335538d4..7b5f5ad3 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/external-snapshotter/csi-snapshotter/rbac-csi-snapshotter.yaml +@@ -1,5 +1,5 @@ +-# Do not edit, downloaded from https://github.com/kubernetes-csi/external-snapshotter/raw/v5.0.1/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml +-# for csi-driver-host-path v1.8.0 ++# Do not edit, downloaded from https://github.com/kubernetes-csi/external-snapshotter/raw/v7.0.1/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml ++# for csi-driver-host-path release-1.13 + # by ./update-hostpath.sh + # + # Together with the RBAC file for external-provisioner, this YAML file +@@ -12,6 +12,7 @@ + # - optionally rename the non-namespaced ClusterRole if there + # are conflicts with other deployments + ++--- + apiVersion: v1 + kind: ServiceAccount + metadata: +@@ -37,13 +38,24 @@ rules: + - apiGroups: ["snapshot.storage.k8s.io"] + resources: ["volumesnapshotclasses"] + verbs: ["get", "list", "watch"] ++ - apiGroups: ["snapshot.storage.k8s.io"] ++ resources: ["volumesnapshots"] ++ verbs: ["get", "list", "watch", "update", "patch", "create"] + - apiGroups: ["snapshot.storage.k8s.io"] + resources: ["volumesnapshotcontents"] +- verbs: ["create", "get", "list", "watch", "update", "delete", "patch"] ++ verbs: ["get", "list", "watch", "update", "patch", "create"] + - apiGroups: ["snapshot.storage.k8s.io"] + resources: ["volumesnapshotcontents/status"] + verbs: ["update", "patch"] +- ++ - apiGroups: ["groupsnapshot.storage.k8s.io"] ++ resources: ["volumegroupsnapshotclasses"] ++ verbs: ["get", "list", "watch"] ++ - apiGroups: ["groupsnapshot.storage.k8s.io"] ++ resources: ["volumegroupsnapshotcontents"] ++ verbs: ["get", "list", "watch", "update", "patch"] ++ - apiGroups: ["groupsnapshot.storage.k8s.io"] ++ resources: ["volumegroupsnapshotcontents/status"] ++ verbs: ["update", "patch"] + --- + kind: ClusterRoleBinding + apiVersion: rbac.authorization.k8s.io/v1 +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/README.md b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/README.md +index 399316db..ce3a7694 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/README.md ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/README.md +@@ -1,4 +1,4 @@ + The files in this directory are exact copies of "kubernetes-latest" in +-https://github.com/kubernetes-csi/csi-driver-host-path/tree/v1.8.0/deploy/ ++https://github.com/kubernetes-csi/csi-driver-host-path/tree/release-1.13/deploy/ + + Do not edit manually. Run ./update-hostpath.sh to refresh the content. +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-driverinfo.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-driverinfo.yaml +index c8cf666a..0250a52c 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-driverinfo.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-driverinfo.yaml +@@ -15,3 +15,6 @@ spec: + # To determine at runtime which mode a volume uses, pod info and its + # "csi.storage.k8s.io/ephemeral" entry are needed. + podInfoOnMount: true ++ # Kubernetes may use fsGroup to change permissions and ownership ++ # of the volume to match user requested fsGroup in the pod's SecurityPolicy ++ fsGroupPolicy: File +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml +index 6a41a023..eb4c1634 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml +@@ -1,4 +1,4 @@ +-# All of the individual sidecar RBAC roles get bound ++ # All of the individual sidecar RBAC roles get bound + # to this account. + kind: ServiceAccount + apiVersion: v1 +@@ -190,6 +190,7 @@ kind: StatefulSet + apiVersion: apps/v1 + metadata: + name: csi-hostpathplugin ++ namespace: default + labels: + app.kubernetes.io/instance: hostpath.csi.k8s.io + app.kubernetes.io/part-of: csi-driver-host-path +@@ -218,7 +219,7 @@ spec: + serviceAccountName: csi-hostpathplugin-sa + containers: + - name: hostpath +- image: registry.k8s.io/sig-storage/hostpathplugin:v1.11.0 ++ image: registry.k8s.io/sig-storage/hostpathplugin:v1.13.0 + args: + - "--drivername=hostpath.csi.k8s.io" + - "--v=5" +@@ -261,7 +262,7 @@ spec: + name: dev-dir + + - name: csi-external-health-monitor-controller +- image: registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.7.0 ++ image: registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.11.0 + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" +@@ -275,7 +276,7 @@ spec: + mountPath: /csi + + - name: node-driver-registrar +- image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1 ++ image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0 + args: + - --v=5 + - --csi-address=/csi/csi.sock +@@ -303,13 +304,13 @@ spec: + volumeMounts: + - mountPath: /csi + name: socket-dir +- image: registry.k8s.io/sig-storage/livenessprobe:v2.7.0 ++ image: registry.k8s.io/sig-storage/livenessprobe:v2.12.0 + args: + - --csi-address=/csi/csi.sock + - --health-port=9898 + + - name: csi-attacher +- image: registry.k8s.io/sig-storage/csi-attacher:v4.0.0 ++ image: registry.k8s.io/sig-storage/csi-attacher:v4.5.0 + args: + - --v=5 + - --csi-address=/csi/csi.sock +@@ -323,11 +324,12 @@ spec: + name: socket-dir + + - name: csi-provisioner +- image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0 ++ image: registry.k8s.io/sig-storage/csi-provisioner:v4.0.0 + args: + - -v=5 + - --csi-address=/csi/csi.sock + - --feature-gates=Topology=true ++ # end csi-provisioner args + securityContext: + # This is necessary only for systems with SELinux, where + # non-privileged sidecar containers cannot access unix domain socket +@@ -338,7 +340,7 @@ spec: + name: socket-dir + + - name: csi-resizer +- image: registry.k8s.io/sig-storage/csi-resizer:v1.6.0 ++ image: registry.k8s.io/sig-storage/csi-resizer:v1.10.0 + args: + - -v=5 + - -csi-address=/csi/csi.sock +@@ -352,7 +354,7 @@ spec: + name: socket-dir + + - name: csi-snapshotter +- image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0 ++ image: registry.k8s.io/sig-storage/csi-snapshotter:v7.0.1 + args: + - -v=5 + - --csi-address=/csi/csi.sock +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-testing.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-testing.yaml +index 7253a70a..02e5e8d7 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-testing.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-testing.yaml +@@ -11,6 +11,7 @@ apiVersion: v1 + kind: Service + metadata: + name: hostpath-service ++ namespace: default + labels: + app.kubernetes.io/instance: hostpath.csi.k8s.io + app.kubernetes.io/part-of: csi-driver-host-path +@@ -30,6 +31,7 @@ kind: StatefulSet + apiVersion: apps/v1 + metadata: + name: csi-hostpath-socat ++ namespace: default + labels: + app.kubernetes.io/instance: hostpath.csi.k8s.io + app.kubernetes.io/part-of: csi-driver-host-path +@@ -64,7 +66,9 @@ spec: + topologyKey: kubernetes.io/hostname + containers: + - name: socat +- image: docker.io/alpine/socat:1.7.4.3-r0 ++ image: registry.k8s.io/sig-storage/hostpathplugin:v1.13.0 ++ command: ++ - socat + args: + - tcp-listen:10000,fork,reuseaddr + - unix-connect:/csi/csi.sock +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-attacher.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-attacher.yaml +index 7684aea7..b17687c6 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-attacher.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-attacher.yaml +@@ -15,7 +15,7 @@ spec: + serviceAccountName: csi-mock + containers: + - name: csi-attacher +- image: registry.k8s.io/sig-storage/csi-attacher:v4.0.0 ++ image: registry.k8s.io/sig-storage/csi-attacher:v4.5.0 + args: + - --v=5 + - --csi-address=$(ADDRESS) +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-resizer.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-resizer.yaml +index 242c0b5a..ef85e317 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-resizer.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-resizer.yaml +@@ -15,7 +15,7 @@ spec: + serviceAccountName: csi-mock + containers: + - name: csi-resizer +- image: registry.k8s.io/sig-storage/csi-resizer:v1.6.0 ++ image: registry.k8s.io/sig-storage/csi-resizer:v1.10.0 + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-snapshotter.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-snapshotter.yaml +index f788a4a8..6718060e 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-snapshotter.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver-snapshotter.yaml +@@ -15,7 +15,7 @@ spec: + serviceAccountName: csi-mock + containers: + - name: csi-snapshotter +- image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0 ++ image: registry.k8s.io/sig-storage/csi-snapshotter:v7.0.1 + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml +index 4493decc..3035532c 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-driver.yaml +@@ -15,7 +15,7 @@ spec: + serviceAccountName: csi-mock + containers: + - name: csi-provisioner +- image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0 ++ image: registry.k8s.io/sig-storage/csi-provisioner:v4.0.0 + args: + - "--csi-address=$(ADDRESS)" + # Topology support is needed for the pod rescheduling test +@@ -34,7 +34,7 @@ spec: + - mountPath: /csi + name: socket-dir + - name: driver-registrar +- image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1 ++ image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0 + args: + - --v=5 + - --csi-address=/csi/csi.sock +@@ -53,7 +53,7 @@ spec: + - mountPath: /registration + name: registration-dir + - name: mock +- image: registry.k8s.io/sig-storage/hostpathplugin:v1.9.0 ++ image: registry.k8s.io/sig-storage/hostpathplugin:v1.13.0 + args: + - "--drivername=mock.storage.k8s.io" + - "--nodeid=$(KUBE_NODE_NAME)" +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml +index d1aa8ece..189c17af 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml +@@ -15,7 +15,7 @@ spec: + serviceAccountName: csi-mock + containers: + - name: csi-provisioner +- image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0 ++ image: registry.k8s.io/sig-storage/csi-provisioner:v4.0.0 + args: + - "--csi-address=$(ADDRESS)" + # Topology support is needed for the pod rescheduling test +@@ -35,7 +35,7 @@ spec: + - mountPath: /csi + name: socket-dir + - name: driver-registrar +- image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1 ++ image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0 + args: + - --v=5 + - --csi-address=/csi/csi.sock +@@ -53,7 +53,7 @@ spec: + - mountPath: /registration + name: registration-dir + - name: mock +- image: registry.k8s.io/sig-storage/hostpathplugin:v1.9.0 ++ image: registry.k8s.io/sig-storage/hostpathplugin:v1.13.0 + args: + - -v=5 + - -nodeid=$(KUBE_NODE_NAME) +diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/update-hostpath.sh b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/update-hostpath.sh +index ce60b39b..122de0d1 100644 +--- a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/update-hostpath.sh ++++ b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/storage-csi/update-hostpath.sh +@@ -137,5 +137,5 @@ done + grep -r image: hostpath/hostpath/csi-hostpath-plugin.yaml | while read -r image; do + version=$(echo "$image" | sed -e 's/.*:\(.*\)/\1/') + image=$(echo "$image" | sed -e 's/.*image: \([^:]*\).*/\1/') +- sed -i -e "s;$image:.*;$image:$version;" mock/*.yaml ++ sed -i '' -e "s;$image:.*;$image:$version;" mock/*.yaml + done +diff --git a/vendor/k8s.io/kubernetes/test/utils/image/manifest.go b/vendor/k8s.io/kubernetes/test/utils/image/manifest.go +index 8eeabd9d..3d51bd5f 100644 +--- a/vendor/k8s.io/kubernetes/test/utils/image/manifest.go ++++ b/vendor/k8s.io/kubernetes/test/utils/image/manifest.go +@@ -241,7 +241,7 @@ func initImageConfigs(list RegistryList) (map[ImageID]Config, map[ImageID]Config + configs[BusyBox] = Config{list.PromoterE2eRegistry, "busybox", "1.29-4"} + configs[CudaVectorAdd] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "1.0"} + configs[CudaVectorAdd2] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "2.3"} +- configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.4.7"} ++ configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.5.6"} + configs[Etcd] = Config{list.GcEtcdRegistry, "etcd", "3.5.12-0"} + configs[Httpd] = Config{list.PromoterE2eRegistry, "httpd", "2.4.38-4"} + configs[HttpdNew] = Config{list.PromoterE2eRegistry, "httpd", "2.4.39-4"} +diff --git a/vendor/k8s.io/utils/clock/testing/fake_clock.go b/vendor/k8s.io/utils/clock/testing/fake_clock.go +index 79e11deb..462c40c2 100644 +--- a/vendor/k8s.io/utils/clock/testing/fake_clock.go ++++ b/vendor/k8s.io/utils/clock/testing/fake_clock.go +@@ -48,7 +48,6 @@ type fakeClockWaiter struct { + stepInterval time.Duration + skipIfBlocked bool + destChan chan time.Time +- fired bool + afterFunc func() + } + +@@ -198,12 +197,10 @@ func (f *FakeClock) setTimeLocked(t time.Time) { + if w.skipIfBlocked { + select { + case w.destChan <- t: +- w.fired = true + default: + } + } else { + w.destChan <- t +- w.fired = true + } + + if w.afterFunc != nil { +@@ -305,44 +302,48 @@ func (f *fakeTimer) C() <-chan time.Time { + return f.waiter.destChan + } + +-// Stop stops the timer and returns true if the timer has not yet fired, or false otherwise. ++// Stop prevents the Timer from firing. It returns true if the call stops the ++// timer, false if the timer has already expired or been stopped. + func (f *fakeTimer) Stop() bool { + f.fakeClock.lock.Lock() + defer f.fakeClock.lock.Unlock() + ++ active := false + newWaiters := make([]*fakeClockWaiter, 0, len(f.fakeClock.waiters)) + for i := range f.fakeClock.waiters { + w := f.fakeClock.waiters[i] + if w != &f.waiter { + newWaiters = append(newWaiters, w) ++ continue + } ++ // If timer is found, it has not been fired yet. ++ active = true + } + + f.fakeClock.waiters = newWaiters + +- return !f.waiter.fired ++ return active + } + +-// Reset resets the timer to the fake clock's "now" + d. It returns true if the timer has not yet +-// fired, or false otherwise. ++// Reset changes the timer to expire after duration d. It returns true if the ++// timer had been active, false if the timer had expired or been stopped. + func (f *fakeTimer) Reset(d time.Duration) bool { + f.fakeClock.lock.Lock() + defer f.fakeClock.lock.Unlock() + +- active := !f.waiter.fired ++ active := false + +- f.waiter.fired = false + f.waiter.targetTime = f.fakeClock.time.Add(d) + +- var isWaiting bool + for i := range f.fakeClock.waiters { + w := f.fakeClock.waiters[i] + if w == &f.waiter { +- isWaiting = true ++ // If timer is found, it has not been fired yet. ++ active = true + break + } + } +- if !isWaiting { ++ if !active { + f.fakeClock.waiters = append(f.fakeClock.waiters, &f.waiter) + } + +diff --git a/vendor/k8s.io/utils/integer/integer.go b/vendor/k8s.io/utils/integer/integer.go +index e4e740ca..f64d6495 100644 +--- a/vendor/k8s.io/utils/integer/integer.go ++++ b/vendor/k8s.io/utils/integer/integer.go +@@ -16,7 +16,10 @@ limitations under the License. + + package integer + +-// IntMax returns the maximum of the params ++import "math" ++ ++// IntMax returns the maximum of the params. ++// Deprecated: for new code, use the max() builtin instead. + func IntMax(a, b int) int { + if b > a { + return b +@@ -24,7 +27,8 @@ func IntMax(a, b int) int { + return a + } + +-// IntMin returns the minimum of the params ++// IntMin returns the minimum of the params. ++// Deprecated: for new code, use the min() builtin instead. + func IntMin(a, b int) int { + if b < a { + return b +@@ -32,7 +36,8 @@ func IntMin(a, b int) int { + return a + } + +-// Int32Max returns the maximum of the params ++// Int32Max returns the maximum of the params. ++// Deprecated: for new code, use the max() builtin instead. + func Int32Max(a, b int32) int32 { + if b > a { + return b +@@ -40,7 +45,8 @@ func Int32Max(a, b int32) int32 { + return a + } + +-// Int32Min returns the minimum of the params ++// Int32Min returns the minimum of the params. ++// Deprecated: for new code, use the min() builtin instead. + func Int32Min(a, b int32) int32 { + if b < a { + return b +@@ -48,7 +54,8 @@ func Int32Min(a, b int32) int32 { + return a + } + +-// Int64Max returns the maximum of the params ++// Int64Max returns the maximum of the params. ++// Deprecated: for new code, use the max() builtin instead. + func Int64Max(a, b int64) int64 { + if b > a { + return b +@@ -56,7 +63,8 @@ func Int64Max(a, b int64) int64 { + return a + } + +-// Int64Min returns the minimum of the params ++// Int64Min returns the minimum of the params. ++// Deprecated: for new code, use the min() builtin instead. + func Int64Min(a, b int64) int64 { + if b < a { + return b +@@ -65,9 +73,7 @@ func Int64Min(a, b int64) int64 { + } + + // RoundToInt32 rounds floats into integer numbers. ++// Deprecated: use math.Round() and a cast directly. + func RoundToInt32(a float64) int32 { +- if a < 0 { +- return int32(a - 0.5) +- } +- return int32(a + 0.5) ++ return int32(math.Round(a)) + } +diff --git a/vendor/k8s.io/utils/lru/lru.go b/vendor/k8s.io/utils/lru/lru.go +index 47f13528..40c22ece 100644 +--- a/vendor/k8s.io/utils/lru/lru.go ++++ b/vendor/k8s.io/utils/lru/lru.go +@@ -16,6 +16,7 @@ limitations under the License. + package lru + + import ( ++ "fmt" + "sync" + + groupcache "k8s.io/utils/internal/third_party/forked/golang/golang-lru" +@@ -44,6 +45,17 @@ func NewWithEvictionFunc(size int, f EvictionFunc) *Cache { + return c + } + ++// SetEvictionFunc updates the eviction func ++func (c *Cache) SetEvictionFunc(f EvictionFunc) error { ++ c.lock.Lock() ++ defer c.lock.Unlock() ++ if c.cache.OnEvicted != nil { ++ return fmt.Errorf("lru cache eviction function is already set") ++ } ++ c.cache.OnEvicted = f ++ return nil ++} ++ + // Add adds a value to the cache. + func (c *Cache) Add(key Key, value interface{}) { + c.lock.Lock() +diff --git a/vendor/k8s.io/utils/net/multi_listen.go b/vendor/k8s.io/utils/net/multi_listen.go +new file mode 100644 +index 00000000..7cb7795b +--- /dev/null ++++ b/vendor/k8s.io/utils/net/multi_listen.go +@@ -0,0 +1,195 @@ ++/* ++Copyright 2024 The Kubernetes Authors. ++ ++Licensed under the Apache License, Version 2.0 (the "License"); ++you may not use this file except in compliance with the License. ++You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++Unless required by applicable law or agreed to in writing, software ++distributed under the License is distributed on an "AS IS" BASIS, ++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++See the License for the specific language governing permissions and ++limitations under the License. ++*/ ++ ++package net ++ ++import ( ++ "context" ++ "fmt" ++ "net" ++ "sync" ++) ++ ++// connErrPair pairs conn and error which is returned by accept on sub-listeners. ++type connErrPair struct { ++ conn net.Conn ++ err error ++} ++ ++// multiListener implements net.Listener ++type multiListener struct { ++ listeners []net.Listener ++ wg sync.WaitGroup ++ ++ // connCh passes accepted connections, from child listeners to parent. ++ connCh chan connErrPair ++ // stopCh communicates from parent to child listeners. ++ stopCh chan struct{} ++} ++ ++// compile time check to ensure *multiListener implements net.Listener ++var _ net.Listener = &multiListener{} ++ ++// MultiListen returns net.Listener which can listen on and accept connections for ++// the given network on multiple addresses. Internally it uses stdlib to create ++// sub-listener and multiplexes connection requests using go-routines. ++// The network must be "tcp", "tcp4" or "tcp6". ++// It follows the semantics of net.Listen that primarily means: ++// 1. If the host is an unspecified/zero IP address with "tcp" network, MultiListen ++// listens on all available unicast and anycast IP addresses of the local system. ++// 2. Use "tcp4" or "tcp6" to exclusively listen on IPv4 or IPv6 family, respectively. ++// 3. The host can accept names (e.g, localhost) and it will create a listener for at ++// most one of the host's IP. ++func MultiListen(ctx context.Context, network string, addrs ...string) (net.Listener, error) { ++ var lc net.ListenConfig ++ return multiListen( ++ ctx, ++ network, ++ addrs, ++ func(ctx context.Context, network, address string) (net.Listener, error) { ++ return lc.Listen(ctx, network, address) ++ }) ++} ++ ++// multiListen implements MultiListen by consuming stdlib functions as dependency allowing ++// mocking for unit-testing. ++func multiListen( ++ ctx context.Context, ++ network string, ++ addrs []string, ++ listenFunc func(ctx context.Context, network, address string) (net.Listener, error), ++) (net.Listener, error) { ++ if !(network == "tcp" || network == "tcp4" || network == "tcp6") { ++ return nil, fmt.Errorf("network %q not supported", network) ++ } ++ if len(addrs) == 0 { ++ return nil, fmt.Errorf("no address provided to listen on") ++ } ++ ++ ml := &multiListener{ ++ connCh: make(chan connErrPair), ++ stopCh: make(chan struct{}), ++ } ++ for _, addr := range addrs { ++ l, err := listenFunc(ctx, network, addr) ++ if err != nil { ++ // close all the sub-listeners and exit ++ _ = ml.Close() ++ return nil, err ++ } ++ ml.listeners = append(ml.listeners, l) ++ } ++ ++ for _, l := range ml.listeners { ++ ml.wg.Add(1) ++ go func(l net.Listener) { ++ defer ml.wg.Done() ++ for { ++ // Accept() is blocking, unless ml.Close() is called, in which ++ // case it will return immediately with an error. ++ conn, err := l.Accept() ++ // This assumes that ANY error from Accept() will terminate the ++ // sub-listener. We could maybe be more precise, but it ++ // doesn't seem necessary. ++ terminate := err != nil ++ ++ select { ++ case ml.connCh <- connErrPair{conn: conn, err: err}: ++ case <-ml.stopCh: ++ // In case we accepted a connection AND were stopped, and ++ // this select-case was chosen, just throw away the ++ // connection. This avoids potentially blocking on connCh ++ // or leaking a connection. ++ if conn != nil { ++ _ = conn.Close() ++ } ++ terminate = true ++ } ++ // Make sure we don't loop on Accept() returning an error and ++ // the select choosing the channel case. ++ if terminate { ++ return ++ } ++ } ++ }(l) ++ } ++ return ml, nil ++} ++ ++// Accept implements net.Listener. It waits for and returns a connection from ++// any of the sub-listener. ++func (ml *multiListener) Accept() (net.Conn, error) { ++ // wait for any sub-listener to enqueue an accepted connection ++ connErr, ok := <-ml.connCh ++ if !ok { ++ // The channel will be closed only when Close() is called on the ++ // multiListener. Closing of this channel implies that all ++ // sub-listeners are also closed, which causes a "use of closed ++ // network connection" error on their Accept() calls. We return the ++ // same error for multiListener.Accept() if multiListener.Close() ++ // has already been called. ++ return nil, fmt.Errorf("use of closed network connection") ++ } ++ return connErr.conn, connErr.err ++} ++ ++// Close implements net.Listener. It will close all sub-listeners and wait for ++// the go-routines to exit. ++func (ml *multiListener) Close() error { ++ // Make sure this can be called repeatedly without explosions. ++ select { ++ case <-ml.stopCh: ++ return fmt.Errorf("use of closed network connection") ++ default: ++ } ++ ++ // Tell all sub-listeners to stop. ++ close(ml.stopCh) ++ ++ // Closing the listeners causes Accept() to immediately return an error in ++ // the sub-listener go-routines. ++ for _, l := range ml.listeners { ++ _ = l.Close() ++ } ++ ++ // Wait for all the sub-listener go-routines to exit. ++ ml.wg.Wait() ++ close(ml.connCh) ++ ++ // Drain any already-queued connections. ++ for connErr := range ml.connCh { ++ if connErr.conn != nil { ++ _ = connErr.conn.Close() ++ } ++ } ++ return nil ++} ++ ++// Addr is an implementation of the net.Listener interface. It always returns ++// the address of the first listener. Callers should use conn.LocalAddr() to ++// obtain the actual local address of the sub-listener. ++func (ml *multiListener) Addr() net.Addr { ++ return ml.listeners[0].Addr() ++} ++ ++// Addrs is like Addr, but returns the address for all registered listeners. ++func (ml *multiListener) Addrs() []net.Addr { ++ var ret []net.Addr ++ for _, l := range ml.listeners { ++ ret = append(ret, l.Addr()) ++ } ++ return ret ++} +diff --git a/vendor/k8s.io/utils/strings/slices/slices.go b/vendor/k8s.io/utils/strings/slices/slices.go +deleted file mode 100644 +index 8e21838f..00000000 +--- a/vendor/k8s.io/utils/strings/slices/slices.go ++++ /dev/null +@@ -1,82 +0,0 @@ +-/* +-Copyright 2021 The Kubernetes Authors. +- +-Licensed under the Apache License, Version 2.0 (the "License"); +-you may not use this file except in compliance with the License. +-You may obtain a copy of the License at +- +- http://www.apache.org/licenses/LICENSE-2.0 +- +-Unless required by applicable law or agreed to in writing, software +-distributed under the License is distributed on an "AS IS" BASIS, +-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-See the License for the specific language governing permissions and +-limitations under the License. +-*/ +- +-// Package slices defines various functions useful with slices of string type. +-// The goal is to be as close as possible to +-// https://github.com/golang/go/issues/45955. Ideal would be if we can just +-// replace "stringslices" if the "slices" package becomes standard. +-package slices +- +-// Equal reports whether two slices are equal: the same length and all +-// elements equal. If the lengths are different, Equal returns false. +-// Otherwise, the elements are compared in index order, and the +-// comparison stops at the first unequal pair. +-func Equal(s1, s2 []string) bool { +- if len(s1) != len(s2) { +- return false +- } +- for i, n := range s1 { +- if n != s2[i] { +- return false +- } +- } +- return true +-} +- +-// Filter appends to d each element e of s for which keep(e) returns true. +-// It returns the modified d. d may be s[:0], in which case the kept +-// elements will be stored in the same slice. +-// if the slices overlap in some other way, the results are unspecified. +-// To create a new slice with the filtered results, pass nil for d. +-func Filter(d, s []string, keep func(string) bool) []string { +- for _, n := range s { +- if keep(n) { +- d = append(d, n) +- } +- } +- return d +-} +- +-// Contains reports whether v is present in s. +-func Contains(s []string, v string) bool { +- return Index(s, v) >= 0 +-} +- +-// Index returns the index of the first occurrence of v in s, or -1 if +-// not present. +-func Index(s []string, v string) int { +- // "Contains" may be replaced with "Index(s, v) >= 0": +- // https://github.com/golang/go/issues/45955#issuecomment-873377947 +- for i, n := range s { +- if n == v { +- return i +- } +- } +- return -1 +-} +- +-// Functions below are not in https://github.com/golang/go/issues/45955 +- +-// Clone returns a new clone of s. +-func Clone(s []string) []string { +- // https://github.com/go101/go101/wiki/There-is-not-a-perfect-way-to-clone-slices-in-Go +- if s == nil { +- return nil +- } +- c := make([]string, len(s)) +- copy(c, s) +- return c +-} +diff --git a/vendor/k8s.io/utils/trace/trace.go b/vendor/k8s.io/utils/trace/trace.go +index 187eb5d8..559aebb5 100644 +--- a/vendor/k8s.io/utils/trace/trace.go ++++ b/vendor/k8s.io/utils/trace/trace.go +@@ -192,7 +192,7 @@ func (t *Trace) Log() { + t.endTime = &endTime + t.lock.Unlock() + // an explicit logging request should dump all the steps out at the higher level +- if t.parentTrace == nil { // We don't start logging until Log or LogIfLong is called on the root trace ++ if t.parentTrace == nil && klogV(2) { // We don't start logging until Log or LogIfLong is called on the root trace + t.logTrace() + } + } +diff --git a/vendor/modules.txt b/vendor/modules.txt +index 36e14469..8a788149 100644 +--- a/vendor/modules.txt ++++ b/vendor/modules.txt +@@ -29,14 +29,17 @@ github.com/coreos/go-semver/semver + ## explicit; go 1.12 + github.com/coreos/go-systemd/v22/daemon + github.com/coreos/go-systemd/v22/journal +-# github.com/davecgh/go-spew v1.1.1 ++# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc + ## explicit + github.com/davecgh/go-spew/spew ++# github.com/deckhouse/csi-nfs/lib/go/common v0.0.0-20250213115525-4785a9da80db => ../csi-nfs/lib/go/common ++## explicit; go 1.23.4 ++github.com/deckhouse/csi-nfs/lib/go/common/pkg/feature + # github.com/docker/distribution v2.8.2+incompatible + ## explicit + github.com/docker/distribution/digestset + github.com/docker/distribution/reference +-# github.com/emicklei/go-restful/v3 v3.9.0 ++# github.com/emicklei/go-restful/v3 v3.11.0 + ## explicit; go 1.13 + github.com/emicklei/go-restful/v3 + github.com/emicklei/go-restful/v3/log +@@ -49,22 +52,25 @@ github.com/felixge/httpsnoop + # github.com/fsnotify/fsnotify v1.7.0 + ## explicit; go 1.17 + github.com/fsnotify/fsnotify +-# github.com/go-logr/logr v1.4.1 ++# github.com/fxamacker/cbor/v2 v2.7.0 ++## explicit; go 1.17 ++github.com/fxamacker/cbor/v2 ++# github.com/go-logr/logr v1.4.2 + ## explicit; go 1.18 + github.com/go-logr/logr + github.com/go-logr/logr/funcr + # github.com/go-logr/stdr v1.2.2 + ## explicit; go 1.16 + github.com/go-logr/stdr +-# github.com/go-openapi/jsonpointer v0.19.6 +-## explicit; go 1.13 ++# github.com/go-openapi/jsonpointer v0.21.0 ++## explicit; go 1.20 + github.com/go-openapi/jsonpointer + # github.com/go-openapi/jsonreference v0.20.2 + ## explicit; go 1.13 + github.com/go-openapi/jsonreference + github.com/go-openapi/jsonreference/internal +-# github.com/go-openapi/swag v0.22.3 +-## explicit; go 1.18 ++# github.com/go-openapi/swag v0.23.0 ++## explicit; go 1.20 + github.com/go-openapi/swag + # github.com/go-task/slim-sprig/v3 v3.0.0 + ## explicit; go 1.20 +@@ -126,8 +132,8 @@ github.com/google/go-cmp/cmp/internal/value + ## explicit; go 1.12 + github.com/google/gofuzz + github.com/google/gofuzz/bytesource +-# github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 +-## explicit; go 1.19 ++# github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db ++## explicit; go 1.22 + github.com/google/pprof/profile + # github.com/google/uuid v1.6.0 + ## explicit +@@ -163,7 +169,7 @@ github.com/mailru/easyjson/jwriter + # github.com/matttproud/golang_protobuf_extensions v1.0.4 + ## explicit; go 1.9 + github.com/matttproud/golang_protobuf_extensions/pbutil +-# github.com/moby/spdystream v0.2.0 ++# github.com/moby/spdystream v0.5.0 + ## explicit; go 1.13 + github.com/moby/spdystream + github.com/moby/spdystream/spdy +@@ -179,8 +185,11 @@ github.com/modern-go/reflect2 + # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 + ## explicit + github.com/munnerz/goautoneg +-# github.com/onsi/ginkgo/v2 v2.17.2 +-## explicit; go 1.20 ++# github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f ++## explicit ++github.com/mxk/go-flowrate/flowrate ++# github.com/onsi/ginkgo/v2 v2.21.0 ++## explicit; go 1.22.0 + github.com/onsi/ginkgo/v2 + github.com/onsi/ginkgo/v2/config + github.com/onsi/ginkgo/v2/formatter +@@ -201,8 +210,8 @@ github.com/onsi/ginkgo/v2/internal/parallel_support + github.com/onsi/ginkgo/v2/internal/testingtproxy + github.com/onsi/ginkgo/v2/reporters + github.com/onsi/ginkgo/v2/types +-# github.com/onsi/gomega v1.33.0 +-## explicit; go 1.20 ++# github.com/onsi/gomega v1.35.1 ++## explicit; go 1.22 + github.com/onsi/gomega + github.com/onsi/gomega/format + github.com/onsi/gomega/gcustom +@@ -229,7 +238,7 @@ github.com/pborman/uuid + # github.com/pkg/errors v0.9.1 + ## explicit + github.com/pkg/errors +-# github.com/pmezard/go-difflib v1.0.0 ++# github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 + ## explicit + github.com/pmezard/go-difflib/difflib + # github.com/prometheus/client_golang v1.16.0 +@@ -265,6 +274,9 @@ github.com/stoewer/go-strcase + # github.com/stretchr/testify v1.9.0 + ## explicit; go 1.17 + github.com/stretchr/testify/assert ++# github.com/x448/float16 v0.8.4 ++## explicit; go 1.11 ++github.com/x448/float16 + # go.etcd.io/etcd/api/v3 v3.5.9 + ## explicit; go 1.19 + go.etcd.io/etcd/api/v3/authpb +@@ -359,14 +371,13 @@ go.uber.org/zap/internal/color + go.uber.org/zap/internal/exit + go.uber.org/zap/zapcore + go.uber.org/zap/zapgrpc +-# golang.org/x/crypto v0.22.0 +-## explicit; go 1.18 ++# golang.org/x/crypto v0.32.0 ++## explicit; go 1.20 + golang.org/x/crypto/blowfish + golang.org/x/crypto/chacha20 + golang.org/x/crypto/cryptobyte + golang.org/x/crypto/cryptobyte/asn1 + golang.org/x/crypto/curve25519 +-golang.org/x/crypto/curve25519/internal/field + golang.org/x/crypto/hkdf + golang.org/x/crypto/internal/alias + golang.org/x/crypto/internal/poly1305 +@@ -381,7 +392,7 @@ golang.org/x/exp/slices + # golang.org/x/mod v0.22.0 + ## explicit; go 1.22.0 + golang.org/x/mod/sumdb/dirhash +-# golang.org/x/net v0.24.0 ++# golang.org/x/net v0.34.0 + ## explicit; go 1.18 + golang.org/x/net/context + golang.org/x/net/html +@@ -400,20 +411,20 @@ golang.org/x/net/websocket + ## explicit; go 1.18 + golang.org/x/oauth2 + golang.org/x/oauth2/internal +-# golang.org/x/sync v0.7.0 ++# golang.org/x/sync v0.10.0 + ## explicit; go 1.18 + golang.org/x/sync/singleflight +-# golang.org/x/sys v0.19.0 ++# golang.org/x/sys v0.29.0 + ## explicit; go 1.18 + golang.org/x/sys/cpu + golang.org/x/sys/plan9 + golang.org/x/sys/unix + golang.org/x/sys/windows + golang.org/x/sys/windows/registry +-# golang.org/x/term v0.19.0 ++# golang.org/x/term v0.28.0 + ## explicit; go 1.18 + golang.org/x/term +-# golang.org/x/text v0.14.0 ++# golang.org/x/text v0.21.0 + ## explicit; go 1.18 + golang.org/x/text/encoding + golang.org/x/text/encoding/charmap +@@ -444,11 +455,11 @@ golang.org/x/text/transform + golang.org/x/text/unicode/bidi + golang.org/x/text/unicode/norm + golang.org/x/text/width +-# golang.org/x/time v0.3.0 +-## explicit ++# golang.org/x/time v0.7.0 ++## explicit; go 1.18 + golang.org/x/time/rate +-# golang.org/x/tools v0.20.0 +-## explicit; go 1.19 ++# golang.org/x/tools v0.26.0 ++## explicit; go 1.22.0 + golang.org/x/tools/cover + golang.org/x/tools/go/ast/inspector + # google.golang.org/appengine v1.6.8 +@@ -529,8 +540,8 @@ google.golang.org/grpc/serviceconfig + google.golang.org/grpc/stats + google.golang.org/grpc/status + google.golang.org/grpc/tap +-# google.golang.org/protobuf v1.34.0 +-## explicit; go 1.17 ++# google.golang.org/protobuf v1.35.1 ++## explicit; go 1.21 + google.golang.org/protobuf/encoding/protojson + google.golang.org/protobuf/encoding/prototext + google.golang.org/protobuf/encoding/protowire +@@ -645,8 +656,8 @@ k8s.io/api/storage/v1beta1 + k8s.io/apiextensions-apiserver/pkg/apis/apiextensions + k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 + k8s.io/apiextensions-apiserver/pkg/features +-# k8s.io/apimachinery v0.28.9 +-## explicit; go 1.20 ++# k8s.io/apimachinery v0.32.0 ++## explicit; go 1.23.0 + k8s.io/apimachinery/pkg/api/equality + k8s.io/apimachinery/pkg/api/errors + k8s.io/apimachinery/pkg/api/meta +@@ -668,6 +679,8 @@ k8s.io/apimachinery/pkg/labels + k8s.io/apimachinery/pkg/runtime + k8s.io/apimachinery/pkg/runtime/schema + k8s.io/apimachinery/pkg/runtime/serializer ++k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct ++k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes + k8s.io/apimachinery/pkg/runtime/serializer/json + k8s.io/apimachinery/pkg/runtime/serializer/protobuf + k8s.io/apimachinery/pkg/runtime/serializer/recognizer +@@ -690,6 +703,8 @@ k8s.io/apimachinery/pkg/util/managedfields/internal + k8s.io/apimachinery/pkg/util/mergepatch + k8s.io/apimachinery/pkg/util/naming + k8s.io/apimachinery/pkg/util/net ++k8s.io/apimachinery/pkg/util/portforward ++k8s.io/apimachinery/pkg/util/proxy + k8s.io/apimachinery/pkg/util/rand + k8s.io/apimachinery/pkg/util/remotecommand + k8s.io/apimachinery/pkg/util/runtime +@@ -1170,7 +1185,7 @@ k8s.io/controller-manager/pkg/features + k8s.io/controller-manager/pkg/features/register + k8s.io/controller-manager/pkg/leadermigration/config + k8s.io/controller-manager/pkg/leadermigration/options +-# k8s.io/klog/v2 v2.120.1 ++# k8s.io/klog/v2 v2.130.1 + ## explicit; go 1.18 + k8s.io/klog/v2 + k8s.io/klog/v2/internal/buffer +@@ -1185,8 +1200,8 @@ k8s.io/kms/apis/v1beta1 + k8s.io/kms/apis/v2 + k8s.io/kms/pkg/service + k8s.io/kms/pkg/util +-# k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 +-## explicit; go 1.19 ++# k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f ++## explicit; go 1.20 + k8s.io/kube-openapi/pkg/builder + k8s.io/kube-openapi/pkg/builder3 + k8s.io/kube-openapi/pkg/builder3/util +@@ -1197,7 +1212,6 @@ k8s.io/kube-openapi/pkg/handler + k8s.io/kube-openapi/pkg/handler3 + k8s.io/kube-openapi/pkg/internal + k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json +-k8s.io/kube-openapi/pkg/openapiconv + k8s.io/kube-openapi/pkg/schemaconv + k8s.io/kube-openapi/pkg/schemamutation + k8s.io/kube-openapi/pkg/spec3 +@@ -1214,7 +1228,7 @@ k8s.io/kubectl/pkg/util/podutils + # k8s.io/kubelet v0.28.9 => k8s.io/kubelet v0.28.9 + ## explicit; go 1.20 + k8s.io/kubelet/pkg/apis +-# k8s.io/kubernetes v1.28.9 ++# k8s.io/kubernetes v1.28.12 + ## explicit; go 1.20 + k8s.io/kubernetes/pkg/api/legacyscheme + k8s.io/kubernetes/pkg/api/service +@@ -1281,7 +1295,7 @@ k8s.io/mount-utils + ## explicit; go 1.20 + k8s.io/pod-security-admission/api + k8s.io/pod-security-admission/policy +-# k8s.io/utils v0.0.0-20230726121419-3b25d923346b ++# k8s.io/utils v0.0.0-20241210054802-24370beab758 + ## explicit; go 1.18 + k8s.io/utils/buffer + k8s.io/utils/clock +@@ -1299,7 +1313,6 @@ k8s.io/utils/path + k8s.io/utils/pointer + k8s.io/utils/ptr + k8s.io/utils/strings +-k8s.io/utils/strings/slices + k8s.io/utils/trace + # sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 + ## explicit; go 1.17 +@@ -1311,11 +1324,11 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client + ## explicit; go 1.20 + sigs.k8s.io/cloud-provider-azure/pkg/cache + sigs.k8s.io/cloud-provider-azure/pkg/util/deepcopy +-# sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd +-## explicit; go 1.18 ++# sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 ++## explicit; go 1.23 + sigs.k8s.io/json + sigs.k8s.io/json/internal/golang/encoding/json +-# sigs.k8s.io/structured-merge-diff/v4 v4.2.3 ++# sigs.k8s.io/structured-merge-diff/v4 v4.5.0 + ## explicit; go 1.13 + sigs.k8s.io/structured-merge-diff/v4/fieldpath + sigs.k8s.io/structured-merge-diff/v4/merge +@@ -1326,6 +1339,7 @@ sigs.k8s.io/structured-merge-diff/v4/value + ## explicit; go 1.12 + sigs.k8s.io/yaml + sigs.k8s.io/yaml/goyaml.v2 ++# github.com/deckhouse/csi-nfs/lib/go/common => ../csi-nfs/lib/go/common + # k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.9 + # k8s.io/cloud-provider => k8s.io/cloud-provider v0.28.9 + # k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.28.9 +diff --git a/vendor/sigs.k8s.io/json/Makefile b/vendor/sigs.k8s.io/json/Makefile +index 07b8bfa8..fb6cf040 100644 +--- a/vendor/sigs.k8s.io/json/Makefile ++++ b/vendor/sigs.k8s.io/json/Makefile +@@ -19,7 +19,7 @@ vet: + go vet sigs.k8s.io/json + + @echo "checking for external dependencies" +- @deps=$$(go mod graph); \ ++ @deps=$$(go list -f '{{ if not (or .Standard .Module.Main) }}{{.ImportPath}}{{ end }}' -deps sigs.k8s.io/json/... || true); \ + if [ -n "$${deps}" ]; then \ + echo "only stdlib dependencies allowed, found:"; \ + echo "$${deps}"; \ +diff --git a/vendor/sigs.k8s.io/json/OWNERS b/vendor/sigs.k8s.io/json/OWNERS +index 0fadafbd..a08a434e 100644 +--- a/vendor/sigs.k8s.io/json/OWNERS ++++ b/vendor/sigs.k8s.io/json/OWNERS +@@ -2,5 +2,5 @@ + + approvers: + - deads2k +- - lavalamp ++ - jpbetz + - liggitt +diff --git a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go b/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go +index 6a13cf2d..d538ac11 100644 +--- a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go ++++ b/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go +@@ -21,10 +21,10 @@ import ( + + // Unmarshal parses the JSON-encoded data and stores the result + // in the value pointed to by v. If v is nil or not a pointer, +-// Unmarshal returns an InvalidUnmarshalError. ++// Unmarshal returns an [InvalidUnmarshalError]. + // + // Unmarshal uses the inverse of the encodings that +-// Marshal uses, allocating maps, slices, and pointers as necessary, ++// [Marshal] uses, allocating maps, slices, and pointers as necessary, + // with the following additional rules: + // + // To unmarshal JSON into a pointer, Unmarshal first handles the case of +@@ -33,28 +33,28 @@ import ( + // the value pointed at by the pointer. If the pointer is nil, Unmarshal + // allocates a new value for it to point to. + // +-// To unmarshal JSON into a value implementing the Unmarshaler interface, +-// Unmarshal calls that value's UnmarshalJSON method, including ++// To unmarshal JSON into a value implementing [Unmarshaler], ++// Unmarshal calls that value's [Unmarshaler.UnmarshalJSON] method, including + // when the input is a JSON null. +-// Otherwise, if the value implements encoding.TextUnmarshaler +-// and the input is a JSON quoted string, Unmarshal calls that value's +-// UnmarshalText method with the unquoted form of the string. ++// Otherwise, if the value implements [encoding.TextUnmarshaler] ++// and the input is a JSON quoted string, Unmarshal calls ++// [encoding.TextUnmarshaler.UnmarshalText] with the unquoted form of the string. + // + // To unmarshal JSON into a struct, Unmarshal matches incoming object +-// keys to the keys used by Marshal (either the struct field name or its tag), ++// keys to the keys used by [Marshal] (either the struct field name or its tag), + // preferring an exact match but also accepting a case-insensitive match. By + // default, object keys which don't have a corresponding struct field are +-// ignored (see Decoder.DisallowUnknownFields for an alternative). ++// ignored (see [Decoder.DisallowUnknownFields] for an alternative). + // + // To unmarshal JSON into an interface value, + // Unmarshal stores one of these in the interface value: + // +-// bool, for JSON booleans +-// float64, for JSON numbers +-// string, for JSON strings +-// []interface{}, for JSON arrays +-// map[string]interface{}, for JSON objects +-// nil for JSON null ++// - bool, for JSON booleans ++// - float64, for JSON numbers ++// - string, for JSON strings ++// - []interface{}, for JSON arrays ++// - map[string]interface{}, for JSON objects ++// - nil for JSON null + // + // To unmarshal a JSON array into a slice, Unmarshal resets the slice length + // to zero and then appends each element to the slice. +@@ -72,16 +72,15 @@ import ( + // use. If the map is nil, Unmarshal allocates a new map. Otherwise Unmarshal + // reuses the existing map, keeping existing entries. Unmarshal then stores + // key-value pairs from the JSON object into the map. The map's key type must +-// either be any string type, an integer, implement json.Unmarshaler, or +-// implement encoding.TextUnmarshaler. ++// either be any string type, an integer, or implement [encoding.TextUnmarshaler]. + // +-// If the JSON-encoded data contain a syntax error, Unmarshal returns a SyntaxError. ++// If the JSON-encoded data contain a syntax error, Unmarshal returns a [SyntaxError]. + // + // If a JSON value is not appropriate for a given target type, + // or if a JSON number overflows the target type, Unmarshal + // skips that field and completes the unmarshaling as best it can. + // If no more serious errors are encountered, Unmarshal returns +-// an UnmarshalTypeError describing the earliest such error. In any ++// an [UnmarshalTypeError] describing the earliest such error. In any + // case, it's not guaranteed that all the remaining fields following + // the problematic one will be unmarshaled into the target object. + // +@@ -119,7 +118,7 @@ func Unmarshal(data []byte, v any, opts ...UnmarshalOpt) error { + // a JSON value. UnmarshalJSON must copy the JSON data + // if it wishes to retain the data after returning. + // +-// By convention, to approximate the behavior of Unmarshal itself, ++// By convention, to approximate the behavior of [Unmarshal] itself, + // Unmarshalers implement UnmarshalJSON([]byte("null")) as a no-op. + type Unmarshaler interface { + UnmarshalJSON([]byte) error +@@ -157,8 +156,8 @@ func (e *UnmarshalFieldError) Error() string { + return "json: cannot unmarshal object key " + strconv.Quote(e.Key) + " into unexported field " + e.Field.Name + " of type " + e.Type.String() + } + +-// An InvalidUnmarshalError describes an invalid argument passed to Unmarshal. +-// (The argument to Unmarshal must be a non-nil pointer.) ++// An InvalidUnmarshalError describes an invalid argument passed to [Unmarshal]. ++// (The argument to [Unmarshal] must be a non-nil pointer.) + type InvalidUnmarshalError struct { + Type reflect.Type + } +@@ -573,17 +572,10 @@ func (d *decodeState) array(v reflect.Value) error { + break + } + +- // Get element of array, growing if necessary. ++ // Expand slice length, growing the slice if necessary. + if v.Kind() == reflect.Slice { +- // Grow slice if necessary + if i >= v.Cap() { +- newcap := v.Cap() + v.Cap()/2 +- if newcap < 4 { +- newcap = 4 +- } +- newv := reflect.MakeSlice(v.Type(), v.Len(), newcap) +- reflect.Copy(newv, v) +- v.Set(newv) ++ v.Grow(1) + } + if i >= v.Len() { + v.SetLen(i + 1) +@@ -620,13 +612,11 @@ func (d *decodeState) array(v reflect.Value) error { + + if i < v.Len() { + if v.Kind() == reflect.Array { +- // Array. Zero the rest. +- z := reflect.Zero(v.Type().Elem()) + for ; i < v.Len(); i++ { +- v.Index(i).Set(z) ++ v.Index(i).SetZero() // zero remainder of array + } + } else { +- v.SetLen(i) ++ v.SetLen(i) // truncate the slice + } + } + if i == 0 && v.Kind() == reflect.Slice { +@@ -636,7 +626,7 @@ func (d *decodeState) array(v reflect.Value) error { + } + + var nullLiteral = []byte("null") +-var textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() ++var textUnmarshalerType = reflect.TypeFor[encoding.TextUnmarshaler]() + + // object consumes an object from d.data[d.off-1:], decoding into v. + // The first byte ('{') of the object has been read already. +@@ -776,7 +766,7 @@ func (d *decodeState) object(v reflect.Value) error { + if !mapElem.IsValid() { + mapElem = reflect.New(elemType).Elem() + } else { +- mapElem.Set(reflect.Zero(elemType)) ++ mapElem.SetZero() + } + subv = mapElem + if checkDuplicateField != nil { +@@ -784,28 +774,14 @@ func (d *decodeState) object(v reflect.Value) error { + } + d.appendStrictFieldStackKey(string(key)) + } else { +- var f *field +- if i, ok := fields.nameIndex[string(key)]; ok { +- // Found an exact name match. +- f = &fields.list[i] +- if checkDuplicateField != nil { +- checkDuplicateField(i, f.name) +- } +- } else if !d.caseSensitive { +- // Fall back to the expensive case-insensitive +- // linear search. +- for i := range fields.list { +- ff := &fields.list[i] +- if ff.equalFold(ff.nameBytes, key) { +- f = ff +- if checkDuplicateField != nil { +- checkDuplicateField(i, f.name) +- } +- break +- } +- } ++ f := fields.byExactName[string(key)] ++ if f == nil && !d.caseSensitive { ++ f = fields.byFoldedName[string(foldName(key))] + } + if f != nil { ++ if checkDuplicateField != nil { ++ checkDuplicateField(f.listIndex, f.name) ++ } + subv = v + destring = f.quoted + for _, i := range f.index { +@@ -874,33 +850,35 @@ func (d *decodeState) object(v reflect.Value) error { + if v.Kind() == reflect.Map { + kt := t.Key() + var kv reflect.Value +- switch { +- case reflect.PointerTo(kt).Implements(textUnmarshalerType): ++ if reflect.PointerTo(kt).Implements(textUnmarshalerType) { + kv = reflect.New(kt) + if err := d.literalStore(item, kv, true); err != nil { + return err + } + kv = kv.Elem() +- case kt.Kind() == reflect.String: +- kv = reflect.ValueOf(key).Convert(kt) +- default: ++ } else { + switch kt.Kind() { ++ case reflect.String: ++ kv = reflect.New(kt).Elem() ++ kv.SetString(string(key)) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + s := string(key) + n, err := strconv.ParseInt(s, 10, 64) +- if err != nil || reflect.Zero(kt).OverflowInt(n) { ++ if err != nil || kt.OverflowInt(n) { + d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: kt, Offset: int64(start + 1)}) + break + } +- kv = reflect.ValueOf(n).Convert(kt) ++ kv = reflect.New(kt).Elem() ++ kv.SetInt(n) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + s := string(key) + n, err := strconv.ParseUint(s, 10, 64) +- if err != nil || reflect.Zero(kt).OverflowUint(n) { ++ if err != nil || kt.OverflowUint(n) { + d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: kt, Offset: int64(start + 1)}) + break + } +- kv = reflect.ValueOf(n).Convert(kt) ++ kv = reflect.New(kt).Elem() ++ kv.SetUint(n) + default: + panic("json: Unexpected key type") // should never occur + } +@@ -950,12 +928,12 @@ func (d *decodeState) convertNumber(s string) (any, error) { + + f, err := strconv.ParseFloat(s, 64) + if err != nil { +- return nil, &UnmarshalTypeError{Value: "number " + s, Type: reflect.TypeOf(0.0), Offset: int64(d.off)} ++ return nil, &UnmarshalTypeError{Value: "number " + s, Type: reflect.TypeFor[float64](), Offset: int64(d.off)} + } + return f, nil + } + +-var numberType = reflect.TypeOf(Number("")) ++var numberType = reflect.TypeFor[Number]() + + // literalStore decodes a literal stored in item into v. + // +@@ -965,7 +943,7 @@ var numberType = reflect.TypeOf(Number("")) + func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool) error { + // Check for unmarshaler. + if len(item) == 0 { +- //Empty string given ++ // Empty string given. + d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) + return nil + } +@@ -1012,7 +990,7 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool + } + switch v.Kind() { + case reflect.Interface, reflect.Pointer, reflect.Map, reflect.Slice: +- v.Set(reflect.Zero(v.Type())) ++ v.SetZero() + // otherwise, ignore null for primitives/string + } + case 't', 'f': // true, false +@@ -1064,10 +1042,11 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool + } + v.SetBytes(b[:n]) + case reflect.String: +- if v.Type() == numberType && !isValidNumber(string(s)) { ++ t := string(s) ++ if v.Type() == numberType && !isValidNumber(t) { + return fmt.Errorf("json: invalid number literal, trying to unmarshal %q into Number", item) + } +- v.SetString(string(s)) ++ v.SetString(t) + case reflect.Interface: + if v.NumMethod() == 0 { + v.Set(reflect.ValueOf(string(s))) +@@ -1083,13 +1062,12 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool + } + panic(phasePanicMsg) + } +- s := string(item) + switch v.Kind() { + default: + if v.Kind() == reflect.String && v.Type() == numberType { + // s must be a valid number, because it's + // already been tokenized. +- v.SetString(s) ++ v.SetString(string(item)) + break + } + if fromQuoted { +@@ -1097,7 +1075,7 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool + } + d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())}) + case reflect.Interface: +- n, err := d.convertNumber(s) ++ n, err := d.convertNumber(string(item)) + if err != nil { + d.saveError(err) + break +@@ -1109,25 +1087,25 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool + v.Set(reflect.ValueOf(n)) + + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: +- n, err := strconv.ParseInt(s, 10, 64) ++ n, err := strconv.ParseInt(string(item), 10, 64) + if err != nil || v.OverflowInt(n) { +- d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())}) ++ d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())}) + break + } + v.SetInt(n) + + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: +- n, err := strconv.ParseUint(s, 10, 64) ++ n, err := strconv.ParseUint(string(item), 10, 64) + if err != nil || v.OverflowUint(n) { +- d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())}) ++ d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())}) + break + } + v.SetUint(n) + + case reflect.Float32, reflect.Float64: +- n, err := strconv.ParseFloat(s, v.Type().Bits()) ++ n, err := strconv.ParseFloat(string(item), v.Type().Bits()) + if err != nil || v.OverflowFloat(n) { +- d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())}) ++ d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())}) + break + } + v.SetFloat(n) +diff --git a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/encode.go b/vendor/sigs.k8s.io/json/internal/golang/encoding/json/encode.go +index 5b67251f..eb73bff5 100644 +--- a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/encode.go ++++ b/vendor/sigs.k8s.io/json/internal/golang/encoding/json/encode.go +@@ -12,12 +12,13 @@ package json + + import ( + "bytes" ++ "cmp" + "encoding" + "encoding/base64" + "fmt" + "math" + "reflect" +- "sort" ++ "slices" + "strconv" + "strings" + "sync" +@@ -28,29 +29,30 @@ import ( + // Marshal returns the JSON encoding of v. + // + // Marshal traverses the value v recursively. +-// If an encountered value implements the Marshaler interface +-// and is not a nil pointer, Marshal calls its MarshalJSON method +-// to produce JSON. If no MarshalJSON method is present but the +-// value implements encoding.TextMarshaler instead, Marshal calls +-// its MarshalText method and encodes the result as a JSON string. ++// If an encountered value implements [Marshaler] ++// and is not a nil pointer, Marshal calls [Marshaler.MarshalJSON] ++// to produce JSON. If no [Marshaler.MarshalJSON] method is present but the ++// value implements [encoding.TextMarshaler] instead, Marshal calls ++// [encoding.TextMarshaler.MarshalText] and encodes the result as a JSON string. + // The nil pointer exception is not strictly necessary + // but mimics a similar, necessary exception in the behavior of +-// UnmarshalJSON. ++// [Unmarshaler.UnmarshalJSON]. + // + // Otherwise, Marshal uses the following type-dependent default encodings: + // + // Boolean values encode as JSON booleans. + // +-// Floating point, integer, and Number values encode as JSON numbers. ++// Floating point, integer, and [Number] values encode as JSON numbers. ++// NaN and +/-Inf values will return an [UnsupportedValueError]. + // + // String values encode as JSON strings coerced to valid UTF-8, + // replacing invalid bytes with the Unicode replacement rune. + // So that the JSON will be safe to embed inside HTML