File 0001-BUILD-SLE12-revert-btrfs-depend-on-kernel-UAPI-inste.patch of Package containerd

From 0fda5bfa88be9b84743d5b6cfdd6e6d180089027 Mon Sep 17 00:00:00 2001
From: Aleksa Sarai <cyphar@cyphar.com>
Date: Wed, 22 May 2024 12:58:32 -0700
Subject: [PATCH] BUILD: SLE12: revert "btrfs: depend on kernel UAPI instead of
 libbtrfs"

This is a partial revert of commit 52f82acb7b39 ("btrfs: depend on
kernel UAPI instead of libbtrfs"), namely switching from
github.com/containers/btrfs/v2 to v1.

On SLE 12, our UAPI headers are too old, resulting in us being unable to
build the btrfs driver with the new headers. This patch is only needed
for SLE-12.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
---
 go.mod                                        |   2 +-
 go.sum                                        |   4 +-
 snapshots/btrfs/btrfs.go                      |   2 +-
 .../containerd/btrfs/{v2 => }/.gitignore      |   0
 .../containerd/btrfs/{v2 => }/LICENSE         |   0
 .../containerd/btrfs/{v2 => }/Makefile        |   0
 .../containerd/btrfs/{v2 => }/README.md       |  15 -
 .../containerd/btrfs/{v2 => }/btrfs.c         |  12 +-
 .../containerd/btrfs/{v2 => }/btrfs.go        |  47 +--
 .../containerd/btrfs/{v2 => }/btrfs.h         |  22 +-
 .../containerd/btrfs/{v2 => }/doc.go          |   0
 .../containerd/btrfs/{v2 => }/helpers.go      |  29 +-
 .../containerd/btrfs/{v2 => }/info.go         |   0
 .../containerd/btrfs/{v2 => }/ioctl.go        |   0
 vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s   |  17 -
 .../golang.org/x/sys/cpu/asm_darwin_x86_gc.s  |  17 -
 vendor/golang.org/x/sys/cpu/byteorder.go      |  66 ----
 vendor/golang.org/x/sys/cpu/cpu.go            | 338 ------------------
 vendor/golang.org/x/sys/cpu/cpu_aix.go        |  33 --
 vendor/golang.org/x/sys/cpu/cpu_arm.go        |  73 ----
 vendor/golang.org/x/sys/cpu/cpu_arm64.go      | 194 ----------
 vendor/golang.org/x/sys/cpu/cpu_arm64.s       |  39 --
 vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go |  61 ----
 vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go   |  12 -
 vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go   |  21 --
 vendor/golang.org/x/sys/cpu/cpu_gc_x86.go     |  15 -
 vendor/golang.org/x/sys/cpu/cpu_gc_x86.s      |  26 --
 .../golang.org/x/sys/cpu/cpu_gccgo_arm64.go   |  11 -
 .../golang.org/x/sys/cpu/cpu_gccgo_s390x.go   |  22 --
 vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c   |  37 --
 vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go  |  25 --
 vendor/golang.org/x/sys/cpu/cpu_linux.go      |  15 -
 vendor/golang.org/x/sys/cpu/cpu_linux_arm.go  |  39 --
 .../golang.org/x/sys/cpu/cpu_linux_arm64.go   | 120 -------
 .../golang.org/x/sys/cpu/cpu_linux_loong64.go |  22 --
 .../golang.org/x/sys/cpu/cpu_linux_mips64x.go |  22 --
 .../golang.org/x/sys/cpu/cpu_linux_noinit.go  |   9 -
 .../golang.org/x/sys/cpu/cpu_linux_ppc64x.go  |  30 --
 .../golang.org/x/sys/cpu/cpu_linux_riscv64.go | 160 ---------
 .../golang.org/x/sys/cpu/cpu_linux_s390x.go   |  40 ---
 vendor/golang.org/x/sys/cpu/cpu_loong64.go    |  50 ---
 vendor/golang.org/x/sys/cpu/cpu_loong64.s     |  13 -
 vendor/golang.org/x/sys/cpu/cpu_mips64x.go    |  15 -
 vendor/golang.org/x/sys/cpu/cpu_mipsx.go      |  11 -
 .../golang.org/x/sys/cpu/cpu_netbsd_arm64.go  | 173 ---------
 .../golang.org/x/sys/cpu/cpu_openbsd_arm64.go |  65 ----
 .../golang.org/x/sys/cpu/cpu_openbsd_arm64.s  |  11 -
 vendor/golang.org/x/sys/cpu/cpu_other_arm.go  |   9 -
 .../golang.org/x/sys/cpu/cpu_other_arm64.go   |   9 -
 .../golang.org/x/sys/cpu/cpu_other_mips64x.go |  11 -
 .../golang.org/x/sys/cpu/cpu_other_ppc64x.go  |  12 -
 .../golang.org/x/sys/cpu/cpu_other_riscv64.go |  11 -
 vendor/golang.org/x/sys/cpu/cpu_other_x86.go  |  11 -
 vendor/golang.org/x/sys/cpu/cpu_ppc64x.go     |  16 -
 vendor/golang.org/x/sys/cpu/cpu_riscv64.go    |  32 --
 vendor/golang.org/x/sys/cpu/cpu_s390x.go      | 172 ---------
 vendor/golang.org/x/sys/cpu/cpu_s390x.s       |  57 ---
 vendor/golang.org/x/sys/cpu/cpu_wasm.go       |  17 -
 vendor/golang.org/x/sys/cpu/cpu_x86.go        | 162 ---------
 vendor/golang.org/x/sys/cpu/cpu_zos.go        |  10 -
 vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go  |  25 --
 vendor/golang.org/x/sys/cpu/endian_big.go     |  10 -
 vendor/golang.org/x/sys/cpu/endian_little.go  |  10 -
 vendor/golang.org/x/sys/cpu/hwcap_linux.go    |  71 ----
 vendor/golang.org/x/sys/cpu/parse.go          |  43 ---
 .../x/sys/cpu/proc_cpuinfo_linux.go           |  53 ---
 vendor/golang.org/x/sys/cpu/runtime_auxv.go   |  16 -
 .../x/sys/cpu/runtime_auxv_go121.go           |  18 -
 .../golang.org/x/sys/cpu/syscall_aix_gccgo.go |  26 --
 .../x/sys/cpu/syscall_aix_ppc64_gc.go         |  35 --
 .../x/sys/cpu/syscall_darwin_x86_gc.go        |  98 -----
 vendor/modules.txt                            |   7 +-
 72 files changed, 55 insertions(+), 2821 deletions(-)
 rename vendor/github.com/containerd/btrfs/{v2 => }/.gitignore (100%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/LICENSE (100%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/Makefile (100%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/README.md (81%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/btrfs.c (82%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/btrfs.go (88%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/btrfs.h (71%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/doc.go (100%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/helpers.go (76%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/info.go (100%)
 rename vendor/github.com/containerd/btrfs/{v2 => }/ioctl.go (100%)
 delete mode 100644 vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
 delete mode 100644 vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s
 delete mode 100644 vendor/golang.org/x/sys/cpu/byteorder.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_aix.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_arm64.s
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gc_x86.s
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_arm.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_loong64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_loong64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_loong64.s
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_mips64x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_mipsx.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_arm.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_other_x86.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_riscv64.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_s390x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_s390x.s
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_wasm.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_x86.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_zos.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/endian_big.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/endian_little.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/hwcap_linux.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/parse.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/runtime_auxv.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
 delete mode 100644 vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go

Index: containerd-2.2.1_dea7da592/go.mod
===================================================================
--- containerd-2.2.1_dea7da592.orig/go.mod
+++ containerd-2.2.1_dea7da592/go.mod
@@ -9,7 +9,7 @@ require (
 	github.com/Microsoft/hcsshim v0.14.0-rc.1
 	github.com/checkpoint-restore/checkpointctl v1.4.0
 	github.com/checkpoint-restore/go-criu/v7 v7.2.0
-	github.com/containerd/btrfs/v2 v2.0.0
+	github.com/containerd/btrfs v1.0.0
 	github.com/containerd/cgroups/v3 v3.1.2
 	github.com/containerd/console v1.0.5
 	github.com/containerd/containerd/api v1.10.0
Index: containerd-2.2.1_dea7da592/go.sum
===================================================================
--- containerd-2.2.1_dea7da592.orig/go.sum
+++ containerd-2.2.1_dea7da592/go.sum
@@ -35,8 +35,8 @@ github.com/cilium/ebpf v0.16.0 h1:+BiEnH
 github.com/cilium/ebpf v0.16.0/go.mod h1:L7u2Blt2jMM/vLAVgjxluxtBKlz3/GWjB0dMOEngfwE=
 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/containerd/btrfs/v2 v2.0.0 h1:FN4wsx7KQrYoLXN7uLP0vBV4oVWHOIKDRQ1G2Z0oL5M=
-github.com/containerd/btrfs/v2 v2.0.0/go.mod h1:swkD/7j9HApWpzl8OHfrHNxppPd9l44DFZdF94BUj9k=
+github.com/containerd/btrfs v1.0.0 h1:osn1exbzdub9L5SouXO5swW4ea/xVdJZ3wokxN5GrnA=
+github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss=
 github.com/containerd/cgroups/v3 v3.1.2 h1:OSosXMtkhI6Qove637tg1XgK4q+DhR0mX8Wi8EhrHa4=
 github.com/containerd/cgroups/v3 v3.1.2/go.mod h1:PKZ2AcWmSBsY/tJUVhtS/rluX0b1uq1GmPO1ElCmbOw=
 github.com/containerd/console v1.0.5 h1:R0ymNeydRqH2DmakFNdmjR2k0t7UPuiOV/N/27/qqsc=
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/README.md
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/README.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# go-btrfs
-
-[![PkgGoDev](https://pkg.go.dev/badge/github.com/containerd/btrfs)](https://pkg.go.dev/github.com/containerd/btrfs)
-[![Build Status](https://github.com/containerd/btrfs/workflows/CI/badge.svg)](https://github.com/containerd/btrfs/actions?query=workflow%3ACI)
-[![Go Report Card](https://goreportcard.com/badge/github.com/containerd/btrfs)](https://goreportcard.com/report/github.com/containerd/btrfs)
-
-Native Go bindings for btrfs.
-
-# Status
-
-These are in the early stages. We will try to maintain stability, but please
-vendor if you are relying on these directly.
-
-# Dependencies
-
-## v2.x
-
-Headers from kernel 4.12 or newer.
-The package name is `linux-libc-dev` on Debian/Ubuntu, `kernel-headers` on Fedora and RHEL-like distros.
-
-The headers are only required on compilation time, not on run time.
-
-## v1.x
-
-libbtrfs headers.
-The package name is `libbtrfs-dev` on Debian/Ubuntu, `btrfs-progs-devel` on Fedora and CentOS 7.
-The package is not available for Rocky Linux and AlmaLinux.
-
-# Contribute
-
-This package may not cover all the use cases for btrfs. If something you need
-is missing, please don't hesitate to submit a PR.
-
-Note that due to struct alignment issues, this isn't yet fully native.
-Preferably, this could be resolved, so contributions in this direction are
-greatly appreciated.
-
-## Applying License Header to New Files
-
-If you submit a contribution that adds a new file, please add the license
-header. You can do so manually or use the `ltag` tool:
-
-
-```console
-$ go get github.com/kunalkushwaha/ltag
-$ ltag -t ./license-templates
-```
-
-The above will add the appropriate licenses to Go files. New templates will
-need to be added if other kinds of files are added. Please consult the
-documentation at https://github.com/kunalkushwaha/ltag
-
-## Project details
-
-btrfs is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE).
-As a containerd sub-project, you will find the:
- * [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md),
- * [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS),
- * and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md)
-
-information in our [`containerd/project`](https://github.com/containerd/project) repository.
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/README.md
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/README.md
@@ -0,0 +1,46 @@
+# go-btrfs
+
+[![PkgGoDev](https://pkg.go.dev/badge/github.com/containerd/btrfs)](https://pkg.go.dev/github.com/containerd/btrfs)
+[![Build Status](https://github.com/containerd/btrfs/workflows/CI/badge.svg)](https://github.com/containerd/btrfs/actions?query=workflow%3ACI)
+[![Go Report Card](https://goreportcard.com/badge/github.com/containerd/btrfs)](https://goreportcard.com/report/github.com/containerd/btrfs)
+
+Native Go bindings for btrfs.
+
+# Status
+
+These are in the early stages. We will try to maintain stability, but please
+vendor if you are relying on these directly.
+
+# Contribute
+
+This package may not cover all the use cases for btrfs. If something you need
+is missing, please don't hesitate to submit a PR.
+
+Note that due to struct alignment issues, this isn't yet fully native.
+Preferably, this could be resolved, so contributions in this direction are
+greatly appreciated.
+
+## Applying License Header to New Files
+
+If you submit a contribution that adds a new file, please add the license
+header. You can do so manually or use the `ltag` tool:
+
+
+```console
+$ go get github.com/kunalkushwaha/ltag
+$ ltag -t ./license-templates
+```
+
+The above will add the appropriate licenses to Go files. New templates will
+need to be added if other kinds of files are added. Please consult the
+documentation at https://github.com/kunalkushwaha/ltag
+
+## Project details
+
+btrfs is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE).
+As a containerd sub-project, you will find the:
+ * [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md),
+ * [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS),
+ * and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md)
+
+information in our [`containerd/project`](https://github.com/containerd/project) repository.
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/btrfs.c
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/btrfs.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  Copyright The containerd 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.
-*/
-
-#include <string.h>
-#include "btrfs.h"
-
-void unpack_root_item(struct gosafe_btrfs_root_item* dst, struct btrfs_root_item* src) {
-	memcpy(dst->uuid, src->uuid, BTRFS_UUID_SIZE);
-	memcpy(dst->parent_uuid, src->parent_uuid, BTRFS_UUID_SIZE);
-	memcpy(dst->received_uuid, src->received_uuid, BTRFS_UUID_SIZE);
-	dst->generation = src->generation;
-	dst->otransid = src->otransid;
-	dst->flags = src->flags;
-}
-
-/* unpack_root_ref(struct gosafe_btrfs_root_ref* dst, struct btrfs_root_ref* src) { */
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/btrfs.c
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/btrfs.c
@@ -0,0 +1,33 @@
+/*
+  Copyright The containerd 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.
+*/
+
+#include <stddef.h>
+#include <linux/magic.h>
+#include <btrfs/ioctl.h>
+#include <btrfs/ctree.h>
+
+#include "btrfs.h"
+
+void unpack_root_item(struct gosafe_btrfs_root_item* dst, struct btrfs_root_item* src) {
+	memcpy(dst->uuid, src->uuid, BTRFS_UUID_SIZE);
+	memcpy(dst->parent_uuid, src->parent_uuid, BTRFS_UUID_SIZE);
+	memcpy(dst->received_uuid, src->received_uuid, BTRFS_UUID_SIZE);
+	dst->gen = btrfs_root_generation(src);
+	dst->ogen = btrfs_root_otransid(src);
+	dst->flags = btrfs_root_flags(src);
+}
+
+/* unpack_root_ref(struct gosafe_btrfs_root_ref* dst, struct btrfs_root_ref* src) { */
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/btrfs.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/btrfs.go
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
-   Copyright The containerd 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 btrfs
-
-/*
-#include <linux/magic.h>
-#include "btrfs.h"
-
-static char* get_name_btrfs_ioctl_vol_args_v2(struct btrfs_ioctl_vol_args_v2* btrfs_struct) {
-	return btrfs_struct->name;
-}
-*/
-import "C"
-
-import (
-	"errors"
-	"fmt"
-	"os"
-	"path/filepath"
-	"sort"
-	"syscall"
-	"unsafe"
-)
-
-// maxByteSliceSize is the smallest size that Go supports on various platforms.
-// On mipsle, 1<<31-1 overflows the address space.
-const maxByteSliceSize = 1 << 30
-
-// IsSubvolume returns nil if the path is a valid subvolume. An error is
-// returned if the path does not exist or the path is not a valid subvolume.
-func IsSubvolume(path string) error {
-	fi, err := os.Lstat(path)
-	if err != nil {
-		return err
-	}
-
-	if err := isFileInfoSubvol(fi); err != nil {
-		return err
-	}
-
-	var statfs syscall.Statfs_t
-	if err := syscall.Statfs(path, &statfs); err != nil {
-		return err
-	}
-
-	return isStatfsSubvol(&statfs)
-}
-
-// SubvolID returns the subvolume ID for the provided path
-func SubvolID(path string) (uint64, error) {
-	fp, err := openSubvolDir(path)
-	if err != nil {
-		return 0, err
-	}
-	defer fp.Close()
-
-	return subvolID(fp.Fd())
-}
-
-// SubvolInfo returns information about the subvolume at the provided path.
-func SubvolInfo(path string) (info Info, err error) {
-	path, err = filepath.EvalSymlinks(path)
-	if err != nil {
-		return info, err
-	}
-
-	fp, err := openSubvolDir(path)
-	if err != nil {
-		return info, err
-	}
-	defer fp.Close()
-
-	id, err := subvolID(fp.Fd())
-	if err != nil {
-		return info, err
-	}
-
-	subvolsByID, err := subvolMap(path)
-	if err != nil {
-		return info, err
-	}
-
-	if info, ok := subvolsByID[id]; ok {
-		return *info, nil
-	}
-
-	return info, fmt.Errorf("%q not found", path)
-}
-
-func subvolMap(path string) (map[uint64]*Info, error) {
-	fp, err := openSubvolDir(path)
-	if err != nil {
-		return nil, err
-	}
-	defer fp.Close()
-
-	var args C.struct_btrfs_ioctl_search_args
-
-	args.key.tree_id = C.BTRFS_ROOT_TREE_OBJECTID
-	args.key.min_type = C.BTRFS_ROOT_ITEM_KEY
-	args.key.max_type = C.BTRFS_ROOT_BACKREF_KEY
-	args.key.min_objectid = C.BTRFS_FS_TREE_OBJECTID
-	args.key.max_objectid = C.BTRFS_LAST_FREE_OBJECTID
-	args.key.max_offset = ^C.__u64(0)
-	args.key.max_transid = ^C.__u64(0)
-
-	subvolsByID := make(map[uint64]*Info)
-
-	for {
-		args.key.nr_items = 4096
-		if err := ioctl(fp.Fd(), C.BTRFS_IOC_TREE_SEARCH, uintptr(unsafe.Pointer(&args))); err != nil {
-			return nil, err
-		}
-
-		if args.key.nr_items == 0 {
-			break
-		}
-
-		var (
-			sh     C.struct_btrfs_ioctl_search_header
-			shSize = unsafe.Sizeof(sh)
-			buf    = (*[maxByteSliceSize]byte)(unsafe.Pointer(&args.buf[0]))[:C.BTRFS_SEARCH_ARGS_BUFSIZE]
-		)
-
-		for i := 0; i < int(args.key.nr_items); i++ {
-			sh = (*(*C.struct_btrfs_ioctl_search_header)(unsafe.Pointer(&buf[0])))
-			buf = buf[shSize:]
-
-			info := subvolsByID[uint64(sh.objectid)]
-			if info == nil {
-				info = &Info{}
-			}
-			info.ID = uint64(sh.objectid)
-
-			if sh._type == C.BTRFS_ROOT_BACKREF_KEY {
-				rr := (*(*C.struct_btrfs_root_ref)(unsafe.Pointer(&buf[0])))
-
-				// This branch processes the backrefs from the root object. We
-				// get an entry of the objectid, with name, but the parent is
-				// the offset.
-
-				nname := le16ToNative(rr.name_len)
-				name := string(buf[C.sizeof_struct_btrfs_root_ref : C.sizeof_struct_btrfs_root_ref+uintptr(nname)])
-
-				info.ID = uint64(sh.objectid)
-				info.ParentID = uint64(sh.offset)
-				info.Name = name
-				info.DirID = le64ToNative(rr.dirid)
-
-				subvolsByID[uint64(sh.objectid)] = info
-			} else if sh._type == C.BTRFS_ROOT_ITEM_KEY &&
-				(sh.objectid >= C.BTRFS_ROOT_ITEM_KEY ||
-					sh.objectid == C.BTRFS_FS_TREE_OBJECTID) {
-
-				var (
-					ri  = (*C.struct_btrfs_root_item)(unsafe.Pointer(&buf[0]))
-					gri C.struct_gosafe_btrfs_root_item
-				)
-
-				C.unpack_root_item(&gri, ri)
-
-				if gri.flags&C.BTRFS_ROOT_SUBVOL_RDONLY != 0 {
-					info.Readonly = true
-				}
-
-				// in this case, the offset is the actual offset.
-				info.Offset = uint64(sh.offset)
-
-				info.UUID = uuidString(&gri.uuid)
-				info.ParentUUID = uuidString(&gri.parent_uuid)
-				info.ReceivedUUID = uuidString(&gri.received_uuid)
-
-				info.Generation = le64ToNative(gri.generation)
-				info.OriginalGeneration = le64ToNative(gri.otransid)
-
-				subvolsByID[uint64(sh.objectid)] = info
-			}
-
-			args.key.min_objectid = sh.objectid
-			args.key.min_offset = sh.offset
-			args.key.min_type = sh._type //  this is very questionable.
-
-			buf = buf[sh.len:]
-		}
-
-		args.key.min_offset++
-		if args.key.min_offset == 0 {
-			args.key.min_type++
-		} else {
-			continue
-		}
-
-		if args.key.min_type > C.BTRFS_ROOT_BACKREF_KEY {
-			args.key.min_type = C.BTRFS_ROOT_ITEM_KEY
-			args.key.min_objectid++
-		} else {
-			continue
-		}
-
-		if args.key.min_objectid > args.key.max_objectid {
-			break
-		}
-	}
-
-	mnt, err := findMountPoint(path)
-	if err != nil {
-		return nil, err
-	}
-
-	for _, sv := range subvolsByID {
-		path := sv.Name
-		parentID := sv.ParentID
-
-		for parentID != 0 {
-			parent, ok := subvolsByID[parentID]
-			if !ok {
-				break
-			}
-
-			parentID = parent.ParentID
-			path = filepath.Join(parent.Name, path)
-		}
-
-		sv.Path = filepath.Join(mnt, path)
-	}
-	return subvolsByID, nil
-}
-
-// SubvolList will return the information for all subvolumes corresponding to
-// the provided path.
-func SubvolList(path string) ([]Info, error) {
-	subvolsByID, err := subvolMap(path)
-	if err != nil {
-		return nil, err
-	}
-
-	subvols := make([]Info, 0, len(subvolsByID))
-	for _, sv := range subvolsByID {
-		subvols = append(subvols, *sv)
-	}
-
-	sort.Sort(infosByID(subvols))
-
-	return subvols, nil
-}
-
-// SubvolCreate creates a subvolume at the provided path.
-func SubvolCreate(path string) error {
-	dir, name := filepath.Split(path)
-
-	fp, err := os.Open(dir)
-	if err != nil {
-		return err
-	}
-	defer fp.Close()
-
-	var args C.struct_btrfs_ioctl_vol_args
-	args.fd = C.__s64(fp.Fd())
-
-	if len(name) > C.BTRFS_PATH_NAME_MAX {
-		return fmt.Errorf("%q too long for subvolume", name)
-	}
-	nameptr := (*[maxByteSliceSize]byte)(unsafe.Pointer(&args.name[0]))[:C.BTRFS_PATH_NAME_MAX:C.BTRFS_PATH_NAME_MAX]
-	copy(nameptr[:C.BTRFS_PATH_NAME_MAX], []byte(name))
-
-	if err := ioctl(fp.Fd(), C.BTRFS_IOC_SUBVOL_CREATE, uintptr(unsafe.Pointer(&args))); err != nil {
-		return fmt.Errorf("btrfs subvolume create failed: %w", err)
-	}
-
-	return nil
-}
-
-// SubvolSnapshot creates a snapshot in dst from src. If readonly is true, the
-// snapshot will be readonly.
-func SubvolSnapshot(dst, src string, readonly bool) error {
-	dstdir, dstname := filepath.Split(dst)
-
-	dstfp, err := openSubvolDir(dstdir)
-	if err != nil {
-		return fmt.Errorf("opening snapshot destination subvolume failed: %w", err)
-	}
-	defer dstfp.Close()
-
-	srcfp, err := openSubvolDir(src)
-	if err != nil {
-		return fmt.Errorf("opening snapshot source subvolume failed: %w", err)
-	}
-	defer srcfp.Close()
-
-	// dstdir is the ioctl arg, wile srcdir gets set on the args
-	var args C.struct_btrfs_ioctl_vol_args_v2
-	args.fd = C.__s64(srcfp.Fd())
-	name := C.get_name_btrfs_ioctl_vol_args_v2(&args)
-
-	if len(dstname) > C.BTRFS_SUBVOL_NAME_MAX {
-		return fmt.Errorf("%q too long for subvolume", dstname)
-	}
-
-	nameptr := (*[maxByteSliceSize]byte)(unsafe.Pointer(name))[:C.BTRFS_SUBVOL_NAME_MAX:C.BTRFS_SUBVOL_NAME_MAX]
-	copy(nameptr[:C.BTRFS_SUBVOL_NAME_MAX], []byte(dstname))
-
-	if readonly {
-		args.flags |= C.BTRFS_SUBVOL_RDONLY
-	}
-
-	if err := ioctl(dstfp.Fd(), C.BTRFS_IOC_SNAP_CREATE_V2, uintptr(unsafe.Pointer(&args))); err != nil {
-		return fmt.Errorf("snapshot create failed: %w", err)
-	}
-
-	return nil
-}
-
-// SubvolDelete deletes the subvolumes under the given path.
-func SubvolDelete(path string) error {
-	dir, name := filepath.Split(path)
-	fp, err := openSubvolDir(dir)
-	if err != nil {
-		return fmt.Errorf("failed opening %v: %w", path, err)
-	}
-	defer fp.Close()
-
-	// remove child subvolumes
-	if err := filepath.Walk(path, func(p string, fi os.FileInfo, err error) error {
-		if err != nil {
-			if os.IsNotExist(err) || p == path {
-				return nil
-			}
-
-			return fmt.Errorf("failed walking subvolume %v: %w", p, err)
-		}
-
-		if !fi.IsDir() {
-			return nil // just ignore it!
-		}
-
-		if p == path {
-			return nil
-		}
-
-		if err := isFileInfoSubvol(fi); err != nil {
-			return nil
-		}
-
-		if err := SubvolDelete(p); err != nil {
-			return fmt.Errorf("recursive delete of %v failed: %w", p, err)
-		}
-
-		return filepath.SkipDir // children get walked by call above.
-	}); err != nil {
-		return err
-	}
-
-	var args C.struct_btrfs_ioctl_vol_args
-	if len(name) > C.BTRFS_SUBVOL_NAME_MAX {
-		return fmt.Errorf("%q too long for subvolume", name)
-	}
-
-	nameptr := (*[maxByteSliceSize]byte)(unsafe.Pointer(&args.name[0]))[:C.BTRFS_SUBVOL_NAME_MAX:C.BTRFS_SUBVOL_NAME_MAX]
-	copy(nameptr[:C.BTRFS_SUBVOL_NAME_MAX], []byte(name))
-
-	if err := ioctl(fp.Fd(), C.BTRFS_IOC_SNAP_DESTROY, uintptr(unsafe.Pointer(&args))); err != nil {
-		return fmt.Errorf("failed removing subvolume %v: %w", path, err)
-	}
-
-	return nil
-}
-
-func openSubvolDir(path string) (*os.File, error) {
-	fp, err := os.Open(path)
-	if err != nil {
-		return nil, fmt.Errorf("opening %v as subvolume failed: %w", path, err)
-	}
-
-	return fp, nil
-}
-
-func isStatfsSubvol(statfs *syscall.Statfs_t) error {
-	if int64(statfs.Type) != int64(C.BTRFS_SUPER_MAGIC) {
-		return fmt.Errorf("not a btrfs filesystem")
-	}
-
-	return nil
-}
-
-func isFileInfoSubvol(fi os.FileInfo) error {
-	if !fi.IsDir() {
-		return errors.New("must be a directory")
-	}
-
-	stat := fi.Sys().(*syscall.Stat_t)
-
-	if stat.Ino != C.BTRFS_FIRST_FREE_OBJECTID {
-		return fmt.Errorf("incorrect inode type")
-	}
-
-	return nil
-}
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/btrfs.go
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/btrfs.go
@@ -0,0 +1,412 @@
+/*
+   Copyright The containerd 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 btrfs
+
+/*
+#include <stddef.h>
+#include <btrfs/ioctl.h>
+#include "btrfs.h"
+
+static char* get_name_btrfs_ioctl_vol_args_v2(struct btrfs_ioctl_vol_args_v2* btrfs_struct) {
+	return btrfs_struct->name;
+}
+*/
+import "C"
+
+import (
+	"os"
+	"path/filepath"
+	"sort"
+	"syscall"
+	"unsafe"
+
+	"github.com/pkg/errors"
+)
+
+// maxByteSliceSize is the smallest size that Go supports on various platforms.
+// On mipsle, 1<<31-1 overflows the address space.
+const maxByteSliceSize = 1 << 30
+
+// IsSubvolume returns nil if the path is a valid subvolume. An error is
+// returned if the path does not exist or the path is not a valid subvolume.
+func IsSubvolume(path string) error {
+	fi, err := os.Lstat(path)
+	if err != nil {
+		return err
+	}
+
+	if err := isFileInfoSubvol(fi); err != nil {
+		return err
+	}
+
+	var statfs syscall.Statfs_t
+	if err := syscall.Statfs(path, &statfs); err != nil {
+		return err
+	}
+
+	return isStatfsSubvol(&statfs)
+}
+
+// SubvolID returns the subvolume ID for the provided path
+func SubvolID(path string) (uint64, error) {
+	fp, err := openSubvolDir(path)
+	if err != nil {
+		return 0, err
+	}
+	defer fp.Close()
+
+	return subvolID(fp.Fd())
+}
+
+// SubvolInfo returns information about the subvolume at the provided path.
+func SubvolInfo(path string) (info Info, err error) {
+	path, err = filepath.EvalSymlinks(path)
+	if err != nil {
+		return info, err
+	}
+
+	fp, err := openSubvolDir(path)
+	if err != nil {
+		return info, err
+	}
+	defer fp.Close()
+
+	id, err := subvolID(fp.Fd())
+	if err != nil {
+		return info, err
+	}
+
+	subvolsByID, err := subvolMap(path)
+	if err != nil {
+		return info, err
+	}
+
+	if info, ok := subvolsByID[id]; ok {
+		return *info, nil
+	}
+
+	return info, errors.Errorf("%q not found", path)
+}
+
+func subvolMap(path string) (map[uint64]*Info, error) {
+	fp, err := openSubvolDir(path)
+	if err != nil {
+		return nil, err
+	}
+	defer fp.Close()
+
+	var args C.struct_btrfs_ioctl_search_args
+
+	args.key.tree_id = C.BTRFS_ROOT_TREE_OBJECTID
+	args.key.min_type = C.BTRFS_ROOT_ITEM_KEY
+	args.key.max_type = C.BTRFS_ROOT_BACKREF_KEY
+	args.key.min_objectid = C.BTRFS_FS_TREE_OBJECTID
+	args.key.max_objectid = C.BTRFS_LAST_FREE_OBJECTID
+	args.key.max_offset = ^C.__u64(0)
+	args.key.max_transid = ^C.__u64(0)
+
+	subvolsByID := make(map[uint64]*Info)
+
+	for {
+		args.key.nr_items = 4096
+		if err := ioctl(fp.Fd(), C.BTRFS_IOC_TREE_SEARCH, uintptr(unsafe.Pointer(&args))); err != nil {
+			return nil, err
+		}
+
+		if args.key.nr_items == 0 {
+			break
+		}
+
+		var (
+			sh     C.struct_btrfs_ioctl_search_header
+			shSize = unsafe.Sizeof(sh)
+			buf    = (*[maxByteSliceSize]byte)(unsafe.Pointer(&args.buf[0]))[:C.BTRFS_SEARCH_ARGS_BUFSIZE]
+		)
+
+		for i := 0; i < int(args.key.nr_items); i++ {
+			sh = (*(*C.struct_btrfs_ioctl_search_header)(unsafe.Pointer(&buf[0])))
+			buf = buf[shSize:]
+
+			info := subvolsByID[uint64(sh.objectid)]
+			if info == nil {
+				info = &Info{}
+			}
+			info.ID = uint64(sh.objectid)
+
+			if sh._type == C.BTRFS_ROOT_BACKREF_KEY {
+				rr := (*(*C.struct_btrfs_root_ref)(unsafe.Pointer(&buf[0])))
+
+				// This branch processes the backrefs from the root object. We
+				// get an entry of the objectid, with name, but the parent is
+				// the offset.
+
+				nname := C.btrfs_stack_root_ref_name_len(&rr)
+				name := string(buf[C.sizeof_struct_btrfs_root_ref : C.sizeof_struct_btrfs_root_ref+uintptr(nname)])
+
+				info.ID = uint64(sh.objectid)
+				info.ParentID = uint64(sh.offset)
+				info.Name = name
+				info.DirID = uint64(C.btrfs_stack_root_ref_dirid(&rr))
+
+				subvolsByID[uint64(sh.objectid)] = info
+			} else if sh._type == C.BTRFS_ROOT_ITEM_KEY &&
+				(sh.objectid >= C.BTRFS_ROOT_ITEM_KEY ||
+					sh.objectid == C.BTRFS_FS_TREE_OBJECTID) {
+
+				var (
+					ri  = (*C.struct_btrfs_root_item)(unsafe.Pointer(&buf[0]))
+					gri C.struct_gosafe_btrfs_root_item
+				)
+
+				C.unpack_root_item(&gri, ri)
+
+				if gri.flags&C.BTRFS_ROOT_SUBVOL_RDONLY != 0 {
+					info.Readonly = true
+				}
+
+				// in this case, the offset is the actual offset.
+				info.Offset = uint64(sh.offset)
+
+				info.UUID = uuidString(&gri.uuid)
+				info.ParentUUID = uuidString(&gri.parent_uuid)
+				info.ReceivedUUID = uuidString(&gri.received_uuid)
+
+				info.Generation = uint64(gri.gen)
+				info.OriginalGeneration = uint64(gri.ogen)
+
+				subvolsByID[uint64(sh.objectid)] = info
+			}
+
+			args.key.min_objectid = sh.objectid
+			args.key.min_offset = sh.offset
+			args.key.min_type = sh._type //  this is very questionable.
+
+			buf = buf[sh.len:]
+		}
+
+		args.key.min_offset++
+		if args.key.min_offset == 0 {
+			args.key.min_type++
+		} else {
+			continue
+		}
+
+		if args.key.min_type > C.BTRFS_ROOT_BACKREF_KEY {
+			args.key.min_type = C.BTRFS_ROOT_ITEM_KEY
+			args.key.min_objectid++
+		} else {
+			continue
+		}
+
+		if args.key.min_objectid > args.key.max_objectid {
+			break
+		}
+	}
+
+	mnt, err := findMountPoint(path)
+	if err != nil {
+		return nil, err
+	}
+
+	for _, sv := range subvolsByID {
+		path := sv.Name
+		parentID := sv.ParentID
+
+		for parentID != 0 {
+			parent, ok := subvolsByID[parentID]
+			if !ok {
+				break
+			}
+
+			parentID = parent.ParentID
+			path = filepath.Join(parent.Name, path)
+		}
+
+		sv.Path = filepath.Join(mnt, path)
+	}
+	return subvolsByID, nil
+}
+
+// SubvolList will return the information for all subvolumes corresponding to
+// the provided path.
+func SubvolList(path string) ([]Info, error) {
+	subvolsByID, err := subvolMap(path)
+	if err != nil {
+		return nil, err
+	}
+
+	subvols := make([]Info, 0, len(subvolsByID))
+	for _, sv := range subvolsByID {
+		subvols = append(subvols, *sv)
+	}
+
+	sort.Sort(infosByID(subvols))
+
+	return subvols, nil
+}
+
+// SubvolCreate creates a subvolume at the provided path.
+func SubvolCreate(path string) error {
+	dir, name := filepath.Split(path)
+
+	fp, err := os.Open(dir)
+	if err != nil {
+		return err
+	}
+	defer fp.Close()
+
+	var args C.struct_btrfs_ioctl_vol_args
+	args.fd = C.__s64(fp.Fd())
+
+	if len(name) > C.BTRFS_PATH_NAME_MAX {
+		return errors.Errorf("%q too long for subvolume", name)
+	}
+	nameptr := (*[maxByteSliceSize]byte)(unsafe.Pointer(&args.name[0]))[:C.BTRFS_PATH_NAME_MAX:C.BTRFS_PATH_NAME_MAX]
+	copy(nameptr[:C.BTRFS_PATH_NAME_MAX], []byte(name))
+
+	if err := ioctl(fp.Fd(), C.BTRFS_IOC_SUBVOL_CREATE, uintptr(unsafe.Pointer(&args))); err != nil {
+		return errors.Wrap(err, "btrfs subvolume create failed")
+	}
+
+	return nil
+}
+
+// SubvolSnapshot creates a snapshot in dst from src. If readonly is true, the
+// snapshot will be readonly.
+func SubvolSnapshot(dst, src string, readonly bool) error {
+	dstdir, dstname := filepath.Split(dst)
+
+	dstfp, err := openSubvolDir(dstdir)
+	if err != nil {
+		return errors.Wrapf(err, "opening snapshot destination subvolume failed")
+	}
+	defer dstfp.Close()
+
+	srcfp, err := openSubvolDir(src)
+	if err != nil {
+		return errors.Wrapf(err, "opening snapshot source subvolume failed")
+	}
+	defer srcfp.Close()
+
+	// dstdir is the ioctl arg, wile srcdir gets set on the args
+	var args C.struct_btrfs_ioctl_vol_args_v2
+	args.fd = C.__s64(srcfp.Fd())
+	name := C.get_name_btrfs_ioctl_vol_args_v2(&args)
+
+	if len(dstname) > C.BTRFS_SUBVOL_NAME_MAX {
+		return errors.Errorf("%q too long for subvolume", dstname)
+	}
+
+	nameptr := (*[maxByteSliceSize]byte)(unsafe.Pointer(name))[:C.BTRFS_SUBVOL_NAME_MAX:C.BTRFS_SUBVOL_NAME_MAX]
+	copy(nameptr[:C.BTRFS_SUBVOL_NAME_MAX], []byte(dstname))
+
+	if readonly {
+		args.flags |= C.BTRFS_SUBVOL_RDONLY
+	}
+
+	if err := ioctl(dstfp.Fd(), C.BTRFS_IOC_SNAP_CREATE_V2, uintptr(unsafe.Pointer(&args))); err != nil {
+		return errors.Wrapf(err, "snapshot create failed")
+	}
+
+	return nil
+}
+
+// SubvolDelete deletes the subvolumes under the given path.
+func SubvolDelete(path string) error {
+	dir, name := filepath.Split(path)
+	fp, err := openSubvolDir(dir)
+	if err != nil {
+		return errors.Wrapf(err, "failed opening %v", path)
+	}
+	defer fp.Close()
+
+	// remove child subvolumes
+	if err := filepath.Walk(path, func(p string, fi os.FileInfo, err error) error {
+		if err != nil {
+			if os.IsNotExist(err) || p == path {
+				return nil
+			}
+
+			return errors.Wrapf(err, "failed walking subvolume %v", p)
+		}
+
+		if !fi.IsDir() {
+			return nil // just ignore it!
+		}
+
+		if p == path {
+			return nil
+		}
+
+		if err := isFileInfoSubvol(fi); err != nil {
+			return nil
+		}
+
+		if err := SubvolDelete(p); err != nil {
+			return errors.Wrapf(err, "recursive delete of %v failed", p)
+		}
+
+		return filepath.SkipDir // children get walked by call above.
+	}); err != nil {
+		return err
+	}
+
+	var args C.struct_btrfs_ioctl_vol_args
+	if len(name) > C.BTRFS_SUBVOL_NAME_MAX {
+		return errors.Errorf("%q too long for subvolume", name)
+	}
+
+	nameptr := (*[maxByteSliceSize]byte)(unsafe.Pointer(&args.name[0]))[:C.BTRFS_SUBVOL_NAME_MAX:C.BTRFS_SUBVOL_NAME_MAX]
+	copy(nameptr[:C.BTRFS_SUBVOL_NAME_MAX], []byte(name))
+
+	if err := ioctl(fp.Fd(), C.BTRFS_IOC_SNAP_DESTROY, uintptr(unsafe.Pointer(&args))); err != nil {
+		return errors.Wrapf(err, "failed removing subvolume %v", path)
+	}
+
+	return nil
+}
+
+func openSubvolDir(path string) (*os.File, error) {
+	fp, err := os.Open(path)
+	if err != nil {
+		return nil, errors.Wrapf(err, "opening %v as subvolume failed", path)
+	}
+
+	return fp, nil
+}
+
+func isStatfsSubvol(statfs *syscall.Statfs_t) error {
+	if int64(statfs.Type) != int64(C.BTRFS_SUPER_MAGIC) {
+		return errors.Errorf("not a btrfs filesystem")
+	}
+
+	return nil
+}
+
+func isFileInfoSubvol(fi os.FileInfo) error {
+	if !fi.IsDir() {
+		errors.Errorf("must be a directory")
+	}
+
+	stat := fi.Sys().(*syscall.Stat_t)
+
+	if stat.Ino != C.BTRFS_FIRST_FREE_OBJECTID {
+		return errors.Errorf("incorrect inode type")
+	}
+
+	return nil
+}
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/btrfs.h
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/btrfs.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  Copyright The containerd 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.
-*/
-
-#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)
-#error "Headers from kernel >= 4.12 are required on compilation time (not on run time)"
-#endif
-#include <linux/btrfs.h>
-#include <linux/btrfs_tree.h>
-
-// unfortunately, we need to define "alignment safe" C structs to populate for
-// packed structs that aren't handled by cgo. Fields will be added here, as
-// needed.
-
-struct gosafe_btrfs_root_item {
-	__u8 uuid[BTRFS_UUID_SIZE];
-	__u8 parent_uuid[BTRFS_UUID_SIZE];
-	__u8 received_uuid[BTRFS_UUID_SIZE];
-
-	__le64 generation;
-	__le64 otransid;
-	__le64 flags;
-};
-
-void unpack_root_item(struct gosafe_btrfs_root_item* dst, struct btrfs_root_item* src);
-/* void unpack_root_ref(struct gosafe_btrfs_root_ref* dst, struct btrfs_root_ref* src); */
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/btrfs.h
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/btrfs.h
@@ -0,0 +1,37 @@
+/*
+  Copyright The containerd 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.
+*/
+
+#include <stddef.h>
+#include <linux/magic.h>
+#include <btrfs/ioctl.h>
+#include <btrfs/ctree.h>
+
+// unfortunately, we need to define "alignment safe" C structs to populate for
+// packed structs that aren't handled by cgo. Fields will be added here, as
+// needed.
+
+struct gosafe_btrfs_root_item {
+	u8 uuid[BTRFS_UUID_SIZE];
+	u8 parent_uuid[BTRFS_UUID_SIZE];
+	u8 received_uuid[BTRFS_UUID_SIZE];
+
+	u64 gen;
+	u64 ogen;
+	u64 flags;
+};
+
+void unpack_root_item(struct gosafe_btrfs_root_item* dst, struct btrfs_root_item* src);
+/* void unpack_root_ref(struct gosafe_btrfs_root_ref* dst, struct btrfs_root_ref* src); */
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/helpers.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/helpers.go
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
-   Copyright The containerd 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 btrfs
-
-/*
-#include "btrfs.h"
-*/
-import "C"
-
-import (
-	"bufio"
-	"bytes"
-	"encoding/binary"
-	"fmt"
-	"os"
-	"strings"
-	"unsafe"
-
-	"golang.org/x/sys/cpu"
-)
-
-func subvolID(fd uintptr) (uint64, error) {
-	var args C.struct_btrfs_ioctl_ino_lookup_args
-	args.objectid = C.BTRFS_FIRST_FREE_OBJECTID
-
-	if err := ioctl(fd, C.BTRFS_IOC_INO_LOOKUP, uintptr(unsafe.Pointer(&args))); err != nil {
-		return 0, err
-	}
-
-	return uint64(args.treeid), nil
-}
-
-var (
-	zeroArray = [16]byte{}
-	zeros     = zeroArray[:]
-)
-
-func uuidString(uuid *[C.BTRFS_UUID_SIZE]C.__u8) string {
-	b := (*[maxByteSliceSize]byte)(unsafe.Pointer(uuid))[:C.BTRFS_UUID_SIZE]
-
-	if bytes.Equal(b, zeros) {
-		return ""
-	}
-
-	return fmt.Sprintf("%x-%x-%x-%x-%x", b[:4], b[4:4+2], b[6:6+2], b[8:8+2], b[10:16])
-}
-
-func le16ToNative(le16 C.__le16) uint16 {
-	if cpu.IsBigEndian {
-		b := make([]byte, 2)
-		binary.LittleEndian.PutUint16(b, uint16(le16))
-		return binary.BigEndian.Uint16(b)
-	}
-	return uint16(le16)
-}
-
-func le64ToNative(le64 C.__le64) uint64 {
-	if cpu.IsBigEndian {
-		b := make([]byte, 8)
-		binary.LittleEndian.PutUint64(b, uint64(le64))
-		return binary.BigEndian.Uint64(b)
-	}
-	return uint64(le64)
-}
-
-func findMountPoint(path string) (string, error) {
-	fp, err := os.Open("/proc/self/mounts")
-	if err != nil {
-		return "", err
-	}
-	defer fp.Close()
-
-	const (
-		deviceIdx = 0
-		pathIdx   = 1
-		typeIdx   = 2
-		options   = 3
-	)
-
-	var (
-		mount   string
-		scanner = bufio.NewScanner(fp)
-	)
-
-	for scanner.Scan() {
-		fields := strings.Fields(scanner.Text())
-		if fields[typeIdx] != "btrfs" {
-			continue // skip non-btrfs
-		}
-
-		if strings.HasPrefix(path, fields[pathIdx]) {
-			mount = fields[pathIdx]
-		}
-	}
-
-	if scanner.Err() != nil {
-		return "", scanner.Err()
-	}
-
-	if mount == "" {
-		return "", fmt.Errorf("mount point of %v not found", path)
-	}
-
-	return mount, nil
-}
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/helpers.go
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/helpers.go
@@ -0,0 +1,102 @@
+/*
+   Copyright The containerd 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 btrfs
+
+/*
+#include <stddef.h>
+#include <btrfs/ioctl.h>
+#include <btrfs/ctree.h>
+*/
+import "C"
+
+import (
+	"bufio"
+	"bytes"
+	"fmt"
+	"os"
+	"strings"
+	"unsafe"
+
+	"github.com/pkg/errors"
+)
+
+func subvolID(fd uintptr) (uint64, error) {
+	var args C.struct_btrfs_ioctl_ino_lookup_args
+	args.objectid = C.BTRFS_FIRST_FREE_OBJECTID
+
+	if err := ioctl(fd, C.BTRFS_IOC_INO_LOOKUP, uintptr(unsafe.Pointer(&args))); err != nil {
+		return 0, err
+	}
+
+	return uint64(args.treeid), nil
+}
+
+var (
+	zeroArray = [16]byte{}
+	zeros     = zeroArray[:]
+)
+
+func uuidString(uuid *[C.BTRFS_UUID_SIZE]C.u8) string {
+	b := (*[maxByteSliceSize]byte)(unsafe.Pointer(uuid))[:C.BTRFS_UUID_SIZE]
+
+	if bytes.Equal(b, zeros) {
+		return ""
+	}
+
+	return fmt.Sprintf("%x-%x-%x-%x-%x", b[:4], b[4:4+2], b[6:6+2], b[8:8+2], b[10:16])
+}
+
+func findMountPoint(path string) (string, error) {
+	fp, err := os.Open("/proc/self/mounts")
+	if err != nil {
+		return "", err
+	}
+	defer fp.Close()
+
+	const (
+		deviceIdx = 0
+		pathIdx   = 1
+		typeIdx   = 2
+		options   = 3
+	)
+
+	var (
+		mount   string
+		scanner = bufio.NewScanner(fp)
+	)
+
+	for scanner.Scan() {
+		fields := strings.Fields(scanner.Text())
+		if fields[typeIdx] != "btrfs" {
+			continue // skip non-btrfs
+		}
+
+		if strings.HasPrefix(path, fields[pathIdx]) {
+			mount = fields[pathIdx]
+		}
+	}
+
+	if scanner.Err() != nil {
+		return "", scanner.Err()
+	}
+
+	if mount == "" {
+		return "", errors.Errorf("mount point of %v not found", path)
+	}
+
+	return mount, nil
+}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
+++ /dev/null
@@ -1,17 +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 gc
-
-#include "textflag.h"
-
-//
-// System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
-//
-
-TEXT ·syscall6(SB),NOSPLIT,$0-88
-	JMP	syscall·syscall6(SB)
-
-TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
-	JMP	syscall·rawSyscall6(SB)
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/asm_darwin_x86_gc.s
+++ /dev/null
@@ -1,17 +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.
-
-//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)
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/byteorder.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/byteorder.go
+++ /dev/null
@@ -1,66 +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.
-
-package cpu
-
-import (
-	"runtime"
-)
-
-// byteOrder is a subset of encoding/binary.ByteOrder.
-type byteOrder interface {
-	Uint32([]byte) uint32
-	Uint64([]byte) uint64
-}
-
-type littleEndian struct{}
-type bigEndian struct{}
-
-func (littleEndian) Uint32(b []byte) uint32 {
-	_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
-	return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
-}
-
-func (littleEndian) Uint64(b []byte) uint64 {
-	_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
-	return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
-		uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
-}
-
-func (bigEndian) Uint32(b []byte) uint32 {
-	_ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
-	return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24
-}
-
-func (bigEndian) Uint64(b []byte) uint64 {
-	_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
-	return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
-		uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
-}
-
-// hostByteOrder returns littleEndian on little-endian machines and
-// bigEndian on big-endian machines.
-func hostByteOrder() byteOrder {
-	switch runtime.GOARCH {
-	case "386", "amd64", "amd64p32",
-		"alpha",
-		"arm", "arm64",
-		"loong64",
-		"mipsle", "mips64le", "mips64p32le",
-		"nios2",
-		"ppc64le",
-		"riscv", "riscv64",
-		"sh":
-		return littleEndian{}
-	case "armbe", "arm64be",
-		"m68k",
-		"mips", "mips64", "mips64p32",
-		"ppc", "ppc64",
-		"s390", "s390x",
-		"shbe",
-		"sparc", "sparc64":
-		return bigEndian{}
-	}
-	panic("unknown architecture")
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu.go
+++ /dev/null
@@ -1,341 +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.
-
-// Package cpu implements processor feature detection for
-// various CPU architectures.
-package cpu
-
-import (
-	"os"
-	"strings"
-)
-
-// Initialized reports whether the CPU features were initialized.
-//
-// For some GOOS/GOARCH combinations initialization of the CPU features depends
-// on reading an operating specific file, e.g. /proc/self/auxv on linux/arm
-// Initialized will report false if reading the file fails.
-var Initialized bool
-
-// CacheLinePad is used to pad structs to avoid false sharing.
-type CacheLinePad struct{ _ [cacheLineSize]byte }
-
-// X86 contains the supported CPU features of the
-// current X86/AMD64 platform. If the current platform
-// is not X86/AMD64 then all feature flags are false.
-//
-// X86 is padded to avoid false sharing. Further the HasAVX
-// and HasAVX2 are only set if the OS supports XMM and YMM
-// registers in addition to the CPUID feature bit being set.
-var X86 struct {
-	_                   CacheLinePad
-	HasAES              bool // AES hardware implementation (AES NI)
-	HasADX              bool // Multi-precision add-carry instruction extensions
-	HasAVX              bool // Advanced vector extension
-	HasAVX2             bool // Advanced vector extension 2
-	HasAVX512           bool // Advanced vector extension 512
-	HasAVX512F          bool // Advanced vector extension 512 Foundation Instructions
-	HasAVX512CD         bool // Advanced vector extension 512 Conflict Detection Instructions
-	HasAVX512ER         bool // Advanced vector extension 512 Exponential and Reciprocal Instructions
-	HasAVX512PF         bool // Advanced vector extension 512 Prefetch Instructions
-	HasAVX512VL         bool // Advanced vector extension 512 Vector Length Extensions
-	HasAVX512BW         bool // Advanced vector extension 512 Byte and Word Instructions
-	HasAVX512DQ         bool // Advanced vector extension 512 Doubleword and Quadword Instructions
-	HasAVX512IFMA       bool // Advanced vector extension 512 Integer Fused Multiply Add
-	HasAVX512VBMI       bool // Advanced vector extension 512 Vector Byte Manipulation Instructions
-	HasAVX5124VNNIW     bool // Advanced vector extension 512 Vector Neural Network Instructions Word variable precision
-	HasAVX5124FMAPS     bool // Advanced vector extension 512 Fused Multiply Accumulation Packed Single precision
-	HasAVX512VPOPCNTDQ  bool // Advanced vector extension 512 Double and quad word population count instructions
-	HasAVX512VPCLMULQDQ bool // Advanced vector extension 512 Vector carry-less multiply operations
-	HasAVX512VNNI       bool // Advanced vector extension 512 Vector Neural Network Instructions
-	HasAVX512GFNI       bool // Advanced vector extension 512 Galois field New Instructions
-	HasAVX512VAES       bool // Advanced vector extension 512 Vector AES instructions
-	HasAVX512VBMI2      bool // Advanced vector extension 512 Vector Byte Manipulation Instructions 2
-	HasAVX512BITALG     bool // Advanced vector extension 512 Bit Algorithms
-	HasAVX512BF16       bool // Advanced vector extension 512 BFloat16 Instructions
-	HasAMXTile          bool // Advanced Matrix Extension Tile instructions
-	HasAMXInt8          bool // Advanced Matrix Extension Int8 instructions
-	HasAMXBF16          bool // Advanced Matrix Extension BFloat16 instructions
-	HasBMI1             bool // Bit manipulation instruction set 1
-	HasBMI2             bool // Bit manipulation instruction set 2
-	HasCX16             bool // Compare and exchange 16 Bytes
-	HasERMS             bool // Enhanced REP for MOVSB and STOSB
-	HasFMA              bool // Fused-multiply-add instructions
-	HasOSXSAVE          bool // OS supports XSAVE/XRESTOR for saving/restoring XMM registers.
-	HasPCLMULQDQ        bool // PCLMULQDQ instruction - most often used for AES-GCM
-	HasPOPCNT           bool // Hamming weight instruction POPCNT.
-	HasRDRAND           bool // RDRAND instruction (on-chip random number generator)
-	HasRDSEED           bool // RDSEED instruction (on-chip random number generator)
-	HasSSE2             bool // Streaming SIMD extension 2 (always available on amd64)
-	HasSSE3             bool // Streaming SIMD extension 3
-	HasSSSE3            bool // Supplemental streaming SIMD extension 3
-	HasSSE41            bool // Streaming SIMD extension 4 and 4.1
-	HasSSE42            bool // Streaming SIMD extension 4 and 4.2
-	HasAVXIFMA          bool // Advanced vector extension Integer Fused Multiply Add
-	HasAVXVNNI          bool // Advanced vector extension Vector Neural Network Instructions
-	HasAVXVNNIInt8      bool // Advanced vector extension Vector Neural Network Int8 instructions
-	_                   CacheLinePad
-}
-
-// ARM64 contains the supported CPU features of the
-// current ARMv8(aarch64) platform. If the current platform
-// is not arm64 then all feature flags are false.
-var ARM64 struct {
-	_           CacheLinePad
-	HasFP       bool // Floating-point instruction set (always available)
-	HasASIMD    bool // Advanced SIMD (always available)
-	HasEVTSTRM  bool // Event stream support
-	HasAES      bool // AES hardware implementation
-	HasPMULL    bool // Polynomial multiplication instruction set
-	HasSHA1     bool // SHA1 hardware implementation
-	HasSHA2     bool // SHA2 hardware implementation
-	HasCRC32    bool // CRC32 hardware implementation
-	HasATOMICS  bool // Atomic memory operation instruction set
-	HasHPDS     bool // Hierarchical permission disables in translations tables
-	HasLOR      bool // Limited ordering regions
-	HasPAN      bool // Privileged access never
-	HasFPHP     bool // Half precision floating-point instruction set
-	HasASIMDHP  bool // Advanced SIMD half precision instruction set
-	HasCPUID    bool // CPUID identification scheme registers
-	HasASIMDRDM bool // Rounding double multiply add/subtract instruction set
-	HasJSCVT    bool // Javascript conversion from floating-point to integer
-	HasFCMA     bool // Floating-point multiplication and addition of complex numbers
-	HasLRCPC    bool // Release Consistent processor consistent support
-	HasDCPOP    bool // Persistent memory support
-	HasSHA3     bool // SHA3 hardware implementation
-	HasSM3      bool // SM3 hardware implementation
-	HasSM4      bool // SM4 hardware implementation
-	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
-}
-
-// ARM contains the supported CPU features of the current ARM (32-bit) platform.
-// All feature flags are false if:
-//  1. the current platform is not arm, or
-//  2. the current operating system is not Linux.
-var ARM struct {
-	_           CacheLinePad
-	HasSWP      bool // SWP instruction support
-	HasHALF     bool // Half-word load and store support
-	HasTHUMB    bool // ARM Thumb instruction set
-	Has26BIT    bool // Address space limited to 26-bits
-	HasFASTMUL  bool // 32-bit operand, 64-bit result multiplication support
-	HasFPA      bool // Floating point arithmetic support
-	HasVFP      bool // Vector floating point support
-	HasEDSP     bool // DSP Extensions support
-	HasJAVA     bool // Java instruction set
-	HasIWMMXT   bool // Intel Wireless MMX technology support
-	HasCRUNCH   bool // MaverickCrunch context switching and handling
-	HasTHUMBEE  bool // Thumb EE instruction set
-	HasNEON     bool // NEON instruction set
-	HasVFPv3    bool // Vector floating point version 3 support
-	HasVFPv3D16 bool // Vector floating point version 3 D8-D15
-	HasTLS      bool // Thread local storage support
-	HasVFPv4    bool // Vector floating point version 4 support
-	HasIDIVA    bool // Integer divide instruction support in ARM mode
-	HasIDIVT    bool // Integer divide instruction support in Thumb mode
-	HasVFPD32   bool // Vector floating point version 3 D15-D31
-	HasLPAE     bool // Large Physical Address Extensions
-	HasEVTSTRM  bool // Event stream support
-	HasAES      bool // AES hardware implementation
-	HasPMULL    bool // Polynomial multiplication instruction set
-	HasSHA1     bool // SHA1 hardware implementation
-	HasSHA2     bool // SHA2 hardware implementation
-	HasCRC32    bool // CRC32 hardware implementation
-	_           CacheLinePad
-}
-
-// The booleans in Loong64 contain the correspondingly named cpu feature bit.
-// The struct is padded to avoid false sharing.
-var Loong64 struct {
-	_         CacheLinePad
-	HasLSX    bool // support 128-bit vector extension
-	HasLASX   bool // support 256-bit vector extension
-	HasCRC32  bool // support CRC instruction
-	HasLAM_BH bool // support AM{SWAP/ADD}[_DB].{B/H} instruction
-	HasLAMCAS bool // support AMCAS[_DB].{B/H/W/D} instruction
-	_         CacheLinePad
-}
-
-// MIPS64X contains the supported CPU features of the current mips64/mips64le
-// platforms. If the current platform is not mips64/mips64le or the current
-// operating system is not Linux then all feature flags are false.
-var MIPS64X struct {
-	_      CacheLinePad
-	HasMSA bool // MIPS SIMD architecture
-	_      CacheLinePad
-}
-
-// PPC64 contains the supported CPU features of the current ppc64/ppc64le platforms.
-// If the current platform is not ppc64/ppc64le then all feature flags are false.
-//
-// For ppc64/ppc64le, it is safe to check only for ISA level starting on ISA v3.00,
-// since there are no optional categories. There are some exceptions that also
-// require kernel support to work (DARN, SCV), so there are feature bits for
-// those as well. The struct is padded to avoid false sharing.
-var PPC64 struct {
-	_        CacheLinePad
-	HasDARN  bool // Hardware random number generator (requires kernel enablement)
-	HasSCV   bool // Syscall vectored (requires kernel enablement)
-	IsPOWER8 bool // ISA v2.07 (POWER8)
-	IsPOWER9 bool // ISA v3.00 (POWER9), implies IsPOWER8
-	_        CacheLinePad
-}
-
-// S390X contains the supported CPU features of the current IBM Z
-// (s390x) platform. If the current platform is not IBM Z then all
-// feature flags are false.
-//
-// S390X is padded to avoid false sharing. Further HasVX is only set
-// if the OS supports vector registers in addition to the STFLE
-// feature bit being set.
-var S390X struct {
-	_         CacheLinePad
-	HasZARCH  bool // z/Architecture mode is active [mandatory]
-	HasSTFLE  bool // store facility list extended
-	HasLDISP  bool // long (20-bit) displacements
-	HasEIMM   bool // 32-bit immediates
-	HasDFP    bool // decimal floating point
-	HasETF3EH bool // ETF-3 enhanced
-	HasMSA    bool // message security assist (CPACF)
-	HasAES    bool // KM-AES{128,192,256} functions
-	HasAESCBC bool // KMC-AES{128,192,256} functions
-	HasAESCTR bool // KMCTR-AES{128,192,256} functions
-	HasAESGCM bool // KMA-GCM-AES{128,192,256} functions
-	HasGHASH  bool // KIMD-GHASH function
-	HasSHA1   bool // K{I,L}MD-SHA-1 functions
-	HasSHA256 bool // K{I,L}MD-SHA-256 functions
-	HasSHA512 bool // K{I,L}MD-SHA-512 functions
-	HasSHA3   bool // K{I,L}MD-SHA3-{224,256,384,512} and K{I,L}MD-SHAKE-{128,256} functions
-	HasVX     bool // vector facility
-	HasVXE    bool // vector-enhancements facility 1
-	_         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
-	HasZvbb           bool // Vector Basic Bit-manipulation
-	HasZvbc           bool // Vector Carryless Multiplication
-	HasZvkb           bool // Vector Cryptography Bit-manipulation
-	HasZvkt           bool // Vector Data-Independent Execution Latency
-	HasZvkg           bool // Vector GCM/GMAC
-	HasZvkn           bool // NIST Algorithm Suite (AES/SHA256/SHA512)
-	HasZvknc          bool // NIST Algorithm Suite with carryless multiply
-	HasZvkng          bool // NIST Algorithm Suite with GCM
-	HasZvks           bool // ShangMi Algorithm Suite
-	HasZvksc          bool // ShangMi Algorithm Suite with carryless multiplication
-	HasZvksg          bool // ShangMi Algorithm Suite with GCM
-	_                 CacheLinePad
-}
-
-func init() {
-	archInit()
-	initOptions()
-	processOptions()
-}
-
-// options contains the cpu debug options that can be used in GODEBUG.
-// Options are arch dependent and are added by the arch specific initOptions functions.
-// Features that are mandatory for the specific GOARCH should have the Required field set
-// (e.g. SSE2 on amd64).
-var options []option
-
-// Option names should be lower case. e.g. avx instead of AVX.
-type option struct {
-	Name      string
-	Feature   *bool
-	Specified bool // whether feature value was specified in GODEBUG
-	Enable    bool // whether feature should be enabled
-	Required  bool // whether feature is mandatory and can not be disabled
-}
-
-func processOptions() {
-	env := os.Getenv("GODEBUG")
-field:
-	for env != "" {
-		field := ""
-		i := strings.IndexByte(env, ',')
-		if i < 0 {
-			field, env = env, ""
-		} else {
-			field, env = env[:i], env[i+1:]
-		}
-		if len(field) < 4 || field[:4] != "cpu." {
-			continue
-		}
-		i = strings.IndexByte(field, '=')
-		if i < 0 {
-			print("GODEBUG sys/cpu: no value specified for \"", field, "\"\n")
-			continue
-		}
-		key, value := field[4:i], field[i+1:] // e.g. "SSE2", "on"
-
-		var enable bool
-		switch value {
-		case "on":
-			enable = true
-		case "off":
-			enable = false
-		default:
-			print("GODEBUG sys/cpu: value \"", value, "\" not supported for cpu option \"", key, "\"\n")
-			continue field
-		}
-
-		if key == "all" {
-			for i := range options {
-				options[i].Specified = true
-				options[i].Enable = enable || options[i].Required
-			}
-			continue field
-		}
-
-		for i := range options {
-			if options[i].Name == key {
-				options[i].Specified = true
-				options[i].Enable = enable
-				continue field
-			}
-		}
-
-		print("GODEBUG sys/cpu: unknown cpu feature \"", key, "\"\n")
-	}
-
-	for _, o := range options {
-		if !o.Specified {
-			continue
-		}
-
-		if o.Enable && !*o.Feature {
-			print("GODEBUG sys/cpu: can not enable \"", o.Name, "\", missing CPU support\n")
-			continue
-		}
-
-		if !o.Enable && o.Required {
-			print("GODEBUG sys/cpu: can not disable \"", o.Name, "\", required CPU feature\n")
-			continue
-		}
-
-		*o.Feature = o.Enable
-	}
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_aix.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_aix.go
+++ /dev/null
@@ -1,33 +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 aix
-
-package cpu
-
-const (
-	// getsystemcfg constants
-	_SC_IMPL     = 2
-	_IMPL_POWER8 = 0x10000
-	_IMPL_POWER9 = 0x20000
-)
-
-func archInit() {
-	impl := getsystemcfg(_SC_IMPL)
-	if impl&_IMPL_POWER8 != 0 {
-		PPC64.IsPOWER8 = true
-	}
-	if impl&_IMPL_POWER9 != 0 {
-		PPC64.IsPOWER8 = true
-		PPC64.IsPOWER9 = true
-	}
-
-	Initialized = true
-}
-
-func getsystemcfg(label int) (n uint64) {
-	r0, _ := callgetsystemcfg(label)
-	n = uint64(r0)
-	return
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_arm.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_arm.go
+++ /dev/null
@@ -1,73 +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.
-
-package cpu
-
-const cacheLineSize = 32
-
-// HWCAP/HWCAP2 bits.
-// These are specific to Linux.
-const (
-	hwcap_SWP       = 1 << 0
-	hwcap_HALF      = 1 << 1
-	hwcap_THUMB     = 1 << 2
-	hwcap_26BIT     = 1 << 3
-	hwcap_FAST_MULT = 1 << 4
-	hwcap_FPA       = 1 << 5
-	hwcap_VFP       = 1 << 6
-	hwcap_EDSP      = 1 << 7
-	hwcap_JAVA      = 1 << 8
-	hwcap_IWMMXT    = 1 << 9
-	hwcap_CRUNCH    = 1 << 10
-	hwcap_THUMBEE   = 1 << 11
-	hwcap_NEON      = 1 << 12
-	hwcap_VFPv3     = 1 << 13
-	hwcap_VFPv3D16  = 1 << 14
-	hwcap_TLS       = 1 << 15
-	hwcap_VFPv4     = 1 << 16
-	hwcap_IDIVA     = 1 << 17
-	hwcap_IDIVT     = 1 << 18
-	hwcap_VFPD32    = 1 << 19
-	hwcap_LPAE      = 1 << 20
-	hwcap_EVTSTRM   = 1 << 21
-
-	hwcap2_AES   = 1 << 0
-	hwcap2_PMULL = 1 << 1
-	hwcap2_SHA1  = 1 << 2
-	hwcap2_SHA2  = 1 << 3
-	hwcap2_CRC32 = 1 << 4
-)
-
-func initOptions() {
-	options = []option{
-		{Name: "pmull", Feature: &ARM.HasPMULL},
-		{Name: "sha1", Feature: &ARM.HasSHA1},
-		{Name: "sha2", Feature: &ARM.HasSHA2},
-		{Name: "swp", Feature: &ARM.HasSWP},
-		{Name: "thumb", Feature: &ARM.HasTHUMB},
-		{Name: "thumbee", Feature: &ARM.HasTHUMBEE},
-		{Name: "tls", Feature: &ARM.HasTLS},
-		{Name: "vfp", Feature: &ARM.HasVFP},
-		{Name: "vfpd32", Feature: &ARM.HasVFPD32},
-		{Name: "vfpv3", Feature: &ARM.HasVFPv3},
-		{Name: "vfpv3d16", Feature: &ARM.HasVFPv3D16},
-		{Name: "vfpv4", Feature: &ARM.HasVFPv4},
-		{Name: "half", Feature: &ARM.HasHALF},
-		{Name: "26bit", Feature: &ARM.Has26BIT},
-		{Name: "fastmul", Feature: &ARM.HasFASTMUL},
-		{Name: "fpa", Feature: &ARM.HasFPA},
-		{Name: "edsp", Feature: &ARM.HasEDSP},
-		{Name: "java", Feature: &ARM.HasJAVA},
-		{Name: "iwmmxt", Feature: &ARM.HasIWMMXT},
-		{Name: "crunch", Feature: &ARM.HasCRUNCH},
-		{Name: "neon", Feature: &ARM.HasNEON},
-		{Name: "idivt", Feature: &ARM.HasIDIVT},
-		{Name: "idiva", Feature: &ARM.HasIDIVA},
-		{Name: "lpae", Feature: &ARM.HasLPAE},
-		{Name: "evtstrm", Feature: &ARM.HasEVTSTRM},
-		{Name: "aes", Feature: &ARM.HasAES},
-		{Name: "crc32", Feature: &ARM.HasCRC32},
-	}
-
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_arm64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_arm64.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.
-
-package cpu
-
-import "runtime"
-
-// cacheLineSize is used to prevent false sharing of cache lines.
-// We choose 128 because Apple Silicon, a.k.a. M1, has 128-byte cache line size.
-// It doesn't cost much and is much more future-proof.
-const cacheLineSize = 128
-
-func initOptions() {
-	options = []option{
-		{Name: "fp", Feature: &ARM64.HasFP},
-		{Name: "asimd", Feature: &ARM64.HasASIMD},
-		{Name: "evstrm", Feature: &ARM64.HasEVTSTRM},
-		{Name: "aes", Feature: &ARM64.HasAES},
-		{Name: "fphp", Feature: &ARM64.HasFPHP},
-		{Name: "jscvt", Feature: &ARM64.HasJSCVT},
-		{Name: "lrcpc", Feature: &ARM64.HasLRCPC},
-		{Name: "pmull", Feature: &ARM64.HasPMULL},
-		{Name: "sha1", Feature: &ARM64.HasSHA1},
-		{Name: "sha2", Feature: &ARM64.HasSHA2},
-		{Name: "sha3", Feature: &ARM64.HasSHA3},
-		{Name: "sha512", Feature: &ARM64.HasSHA512},
-		{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},
-		{Name: "cpuid", Feature: &ARM64.HasCPUID},
-		{Name: "asimrdm", Feature: &ARM64.HasASIMDRDM},
-		{Name: "fcma", Feature: &ARM64.HasFCMA},
-		{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},
-	}
-}
-
-func archInit() {
-	switch runtime.GOOS {
-	case "freebsd":
-		readARM64Registers()
-	case "linux", "netbsd", "openbsd":
-		doinit()
-	default:
-		// Many platforms don't seem to allow reading these registers.
-		setMinimalFeatures()
-	}
-}
-
-// setMinimalFeatures fakes the minimal ARM64 features expected by
-// TestARM64minimalFeatures.
-func setMinimalFeatures() {
-	ARM64.HasASIMD = true
-	ARM64.HasFP = true
-}
-
-func readARM64Registers() {
-	Initialized = true
-
-	parseARM64SystemRegisters(getisar0(), getisar1(), getmmfr1(), getpfr0())
-}
-
-func parseARM64SystemRegisters(isar0, isar1, mmfr1, pfr0 uint64) {
-	// ID_AA64ISAR0_EL1
-	switch extractBits(isar0, 4, 7) {
-	case 1:
-		ARM64.HasAES = true
-	case 2:
-		ARM64.HasAES = true
-		ARM64.HasPMULL = true
-	}
-
-	switch extractBits(isar0, 8, 11) {
-	case 1:
-		ARM64.HasSHA1 = true
-	}
-
-	switch extractBits(isar0, 12, 15) {
-	case 1:
-		ARM64.HasSHA2 = true
-	case 2:
-		ARM64.HasSHA2 = true
-		ARM64.HasSHA512 = true
-	}
-
-	switch extractBits(isar0, 16, 19) {
-	case 1:
-		ARM64.HasCRC32 = true
-	}
-
-	switch extractBits(isar0, 20, 23) {
-	case 2:
-		ARM64.HasATOMICS = true
-	}
-
-	switch extractBits(isar0, 28, 31) {
-	case 1:
-		ARM64.HasASIMDRDM = true
-	}
-
-	switch extractBits(isar0, 32, 35) {
-	case 1:
-		ARM64.HasSHA3 = true
-	}
-
-	switch extractBits(isar0, 36, 39) {
-	case 1:
-		ARM64.HasSM3 = true
-	}
-
-	switch extractBits(isar0, 40, 43) {
-	case 1:
-		ARM64.HasSM4 = true
-	}
-
-	switch extractBits(isar0, 44, 47) {
-	case 1:
-		ARM64.HasASIMDDP = true
-	}
-
-	// ID_AA64ISAR1_EL1
-	switch extractBits(isar1, 0, 3) {
-	case 1:
-		ARM64.HasDCPOP = true
-	}
-
-	switch extractBits(isar1, 12, 15) {
-	case 1:
-		ARM64.HasJSCVT = true
-	}
-
-	switch extractBits(isar1, 16, 19) {
-	case 1:
-		ARM64.HasFCMA = true
-	}
-
-	switch extractBits(isar1, 20, 23) {
-	case 1:
-		ARM64.HasLRCPC = true
-	}
-
-	switch extractBits(isar1, 52, 55) {
-	case 1:
-		ARM64.HasI8MM = true
-	}
-
-	// ID_AA64MMFR1_EL1
-	switch extractBits(mmfr1, 12, 15) {
-	case 1, 2:
-		ARM64.HasHPDS = true
-	}
-
-	switch extractBits(mmfr1, 16, 19) {
-	case 1:
-		ARM64.HasLOR = true
-	}
-
-	switch extractBits(mmfr1, 20, 23) {
-	case 1, 2, 3:
-		ARM64.HasPAN = true
-	}
-
-	// ID_AA64PFR0_EL1
-	switch extractBits(pfr0, 16, 19) {
-	case 0:
-		ARM64.HasFP = true
-	case 1:
-		ARM64.HasFP = true
-		ARM64.HasFPHP = true
-	}
-
-	switch extractBits(pfr0, 20, 23) {
-	case 0:
-		ARM64.HasASIMD = true
-	case 1:
-		ARM64.HasASIMD = true
-		ARM64.HasASIMDHP = true
-	}
-
-	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
-	}
-}
-
-func extractBits(data uint64, start, end uint) uint {
-	return (uint)(data>>start) & ((1 << (end - start + 1)) - 1)
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_arm64.s
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_arm64.s
+++ /dev/null
@@ -1,42 +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 gc
-
-#include "textflag.h"
-
-// func getisar0() uint64
-TEXT ·getisar0(SB),NOSPLIT,$0-8
-	// get Instruction Set Attributes 0 into x0
-	MRS	ID_AA64ISAR0_EL1, R0
-	MOVD	R0, ret+0(FP)
-	RET
-
-// func getisar1() uint64
-TEXT ·getisar1(SB),NOSPLIT,$0-8
-	// get Instruction Set Attributes 1 into x0
-	MRS	ID_AA64ISAR1_EL1, R0
-	MOVD	R0, ret+0(FP)
-	RET
-
-// func getmmfr1() uint64
-TEXT ·getmmfr1(SB),NOSPLIT,$0-8
-	// get Memory Model Feature Register 1 into x0
-	MRS	ID_AA64MMFR1_EL1, R0
-	MOVD	R0, ret+0(FP)
-	RET
-
-// func getpfr0() uint64
-TEXT ·getpfr0(SB),NOSPLIT,$0-8
-	// get Processor Feature Register 0 into x0
-	MRS	ID_AA64PFR0_EL1, R0
-	MOVD	R0, ret+0(FP)
-	RET
-
-// func getzfr0() uint64
-TEXT ·getzfr0(SB),NOSPLIT,$0-8
-	// get SVE Feature Register 0 into x0
-	MRS	ID_AA64ZFR0_EL1, R0
-	MOVD	R0, ret+0(FP)
-	RET
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_darwin_x86.go
+++ /dev/null
@@ -1,61 +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.
-
-//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)
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
+++ /dev/null
@@ -1,13 +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 gc
-
-package cpu
-
-func getisar0() uint64
-func getisar1() uint64
-func getmmfr1() uint64
-func getpfr0() uint64
-func getzfr0() uint64
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
+++ /dev/null
@@ -1,21 +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 gc
-
-package cpu
-
-// haveAsmFunctions reports whether the other functions in this file can
-// be safely called.
-func haveAsmFunctions() bool { return true }
-
-// The following feature detection functions are defined in cpu_s390x.s.
-// They are likely to be expensive to call so the results should be cached.
-func stfle() facilityList
-func kmQuery() queryResult
-func kmcQuery() queryResult
-func kmctrQuery() queryResult
-func kmaQuery() queryResult
-func kimdQuery() queryResult
-func klmdQuery() queryResult
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
+++ /dev/null
@@ -1,15 +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 (386 || amd64 || amd64p32) && gc
-
-package cpu
-
-// 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_gc_x86.s for gc compiler
-// and in cpu_gccgo.c for gccgo.
-func xgetbv() (eax, edx uint32)
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_gc_x86.s
+++ /dev/null
@@ -1,26 +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 (386 || amd64 || amd64p32) && gc
-
-#include "textflag.h"
-
-// func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
-TEXT ·cpuid(SB), NOSPLIT, $0-24
-	MOVL eaxArg+0(FP), AX
-	MOVL ecxArg+4(FP), CX
-	CPUID
-	MOVL AX, eax+8(FP)
-	MOVL BX, ebx+12(FP)
-	MOVL CX, ecx+16(FP)
-	MOVL DX, edx+20(FP)
-	RET
-
-// func xgetbv() (eax, edx uint32)
-TEXT ·xgetbv(SB), NOSPLIT, $0-8
-	MOVL $0, CX
-	XGETBV
-	MOVL AX, eax+0(FP)
-	MOVL DX, edx+4(FP)
-	RET
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
+++ /dev/null
@@ -1,12 +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 gccgo
-
-package cpu
-
-func getisar0() uint64 { return 0 }
-func getisar1() uint64 { return 0 }
-func getmmfr1() uint64 { return 0 }
-func getpfr0() uint64  { return 0 }
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
+++ /dev/null
@@ -1,22 +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 gccgo
-
-package cpu
-
-// haveAsmFunctions reports whether the other functions in this file can
-// be safely called.
-func haveAsmFunctions() bool { return false }
-
-// TODO(mundaym): the following feature detection functions are currently
-// stubs. See https://golang.org/cl/162887 for how to fix this.
-// They are likely to be expensive to call so the results should be cached.
-func stfle() facilityList     { panic("not implemented for gccgo") }
-func kmQuery() queryResult    { panic("not implemented for gccgo") }
-func kmcQuery() queryResult   { panic("not implemented for gccgo") }
-func kmctrQuery() queryResult { panic("not implemented for gccgo") }
-func kmaQuery() queryResult   { panic("not implemented for gccgo") }
-func kimdQuery() queryResult  { panic("not implemented for gccgo") }
-func klmdQuery() queryResult  { panic("not implemented for gccgo") }
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c
+++ /dev/null
@@ -1,37 +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 (386 || amd64 || amd64p32) && gccgo
-
-#include <cpuid.h>
-#include <stdint.h>
-#include <x86intrin.h>
-
-// Need to wrap __get_cpuid_count because it's declared as static.
-int
-gccgoGetCpuidCount(uint32_t leaf, uint32_t subleaf,
-                   uint32_t *eax, uint32_t *ebx,
-                   uint32_t *ecx, uint32_t *edx)
-{
-	return __get_cpuid_count(leaf, subleaf, eax, ebx, ecx, edx);
-}
-
-#pragma GCC diagnostic ignored "-Wunknown-pragmas"
-#pragma GCC push_options
-#pragma GCC target("xsave")
-#pragma clang attribute push (__attribute__((target("xsave"))), apply_to=function)
-
-// xgetbv reads the contents of an XCR (Extended Control Register)
-// specified in the ECX register into registers EDX:EAX.
-// Currently, the only supported value for XCR is 0.
-void
-gccgoXgetbv(uint32_t *eax, uint32_t *edx)
-{
-	uint64_t v = _xgetbv(0);
-	*eax = v & 0xffffffff;
-	*edx = v >> 32;
-}
-
-#pragma clang attribute pop
-#pragma GCC pop_options
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
+++ /dev/null
@@ -1,25 +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 (386 || amd64 || amd64p32) && gccgo
-
-package cpu
-
-//extern gccgoGetCpuidCount
-func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32)
-
-func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) {
-	var a, b, c, d uint32
-	gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d)
-	return a, b, c, d
-}
-
-//extern gccgoXgetbv
-func gccgoXgetbv(eax, edx *uint32)
-
-func xgetbv() (eax, edx uint32) {
-	var a, d uint32
-	gccgoXgetbv(&a, &d)
-	return a, d
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_linux.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_linux.go
+++ /dev/null
@@ -1,15 +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 !386 && !amd64 && !amd64p32 && !arm64
-
-package cpu
-
-func archInit() {
-	if err := readHWCAP(); err != nil {
-		return
-	}
-	doinit()
-	Initialized = true
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_linux_arm.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_linux_arm.go
+++ /dev/null
@@ -1,39 +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.
-
-package cpu
-
-func doinit() {
-	ARM.HasSWP = isSet(hwCap, hwcap_SWP)
-	ARM.HasHALF = isSet(hwCap, hwcap_HALF)
-	ARM.HasTHUMB = isSet(hwCap, hwcap_THUMB)
-	ARM.Has26BIT = isSet(hwCap, hwcap_26BIT)
-	ARM.HasFASTMUL = isSet(hwCap, hwcap_FAST_MULT)
-	ARM.HasFPA = isSet(hwCap, hwcap_FPA)
-	ARM.HasVFP = isSet(hwCap, hwcap_VFP)
-	ARM.HasEDSP = isSet(hwCap, hwcap_EDSP)
-	ARM.HasJAVA = isSet(hwCap, hwcap_JAVA)
-	ARM.HasIWMMXT = isSet(hwCap, hwcap_IWMMXT)
-	ARM.HasCRUNCH = isSet(hwCap, hwcap_CRUNCH)
-	ARM.HasTHUMBEE = isSet(hwCap, hwcap_THUMBEE)
-	ARM.HasNEON = isSet(hwCap, hwcap_NEON)
-	ARM.HasVFPv3 = isSet(hwCap, hwcap_VFPv3)
-	ARM.HasVFPv3D16 = isSet(hwCap, hwcap_VFPv3D16)
-	ARM.HasTLS = isSet(hwCap, hwcap_TLS)
-	ARM.HasVFPv4 = isSet(hwCap, hwcap_VFPv4)
-	ARM.HasIDIVA = isSet(hwCap, hwcap_IDIVA)
-	ARM.HasIDIVT = isSet(hwCap, hwcap_IDIVT)
-	ARM.HasVFPD32 = isSet(hwCap, hwcap_VFPD32)
-	ARM.HasLPAE = isSet(hwCap, hwcap_LPAE)
-	ARM.HasEVTSTRM = isSet(hwCap, hwcap_EVTSTRM)
-	ARM.HasAES = isSet(hwCap2, hwcap2_AES)
-	ARM.HasPMULL = isSet(hwCap2, hwcap2_PMULL)
-	ARM.HasSHA1 = isSet(hwCap2, hwcap2_SHA1)
-	ARM.HasSHA2 = isSet(hwCap2, hwcap2_SHA2)
-	ARM.HasCRC32 = isSet(hwCap2, hwcap2_CRC32)
-}
-
-func isSet(hwc uint, value uint) bool {
-	return hwc&value != 0
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go
+++ /dev/null
@@ -1,120 +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.
-
-package cpu
-
-import (
-	"strings"
-	"syscall"
-)
-
-// HWCAP/HWCAP2 bits. These are exposed by Linux.
-const (
-	hwcap_FP       = 1 << 0
-	hwcap_ASIMD    = 1 << 1
-	hwcap_EVTSTRM  = 1 << 2
-	hwcap_AES      = 1 << 3
-	hwcap_PMULL    = 1 << 4
-	hwcap_SHA1     = 1 << 5
-	hwcap_SHA2     = 1 << 6
-	hwcap_CRC32    = 1 << 7
-	hwcap_ATOMICS  = 1 << 8
-	hwcap_FPHP     = 1 << 9
-	hwcap_ASIMDHP  = 1 << 10
-	hwcap_CPUID    = 1 << 11
-	hwcap_ASIMDRDM = 1 << 12
-	hwcap_JSCVT    = 1 << 13
-	hwcap_FCMA     = 1 << 14
-	hwcap_LRCPC    = 1 << 15
-	hwcap_DCPOP    = 1 << 16
-	hwcap_SHA3     = 1 << 17
-	hwcap_SM3      = 1 << 18
-	hwcap_SM4      = 1 << 19
-	hwcap_ASIMDDP  = 1 << 20
-	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
-// on Linux 4.11+. Ideally we'd like to ask the question about
-// whether the current kernel contains
-// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77c97b4ee21290f5f083173d957843b615abbff2
-// but the version number will have to do.
-func linuxKernelCanEmulateCPUID() bool {
-	var un syscall.Utsname
-	syscall.Uname(&un)
-	var sb strings.Builder
-	for _, b := range un.Release[:] {
-		if b == 0 {
-			break
-		}
-		sb.WriteByte(byte(b))
-	}
-	major, minor, _, ok := parseRelease(sb.String())
-	return ok && (major > 4 || major == 4 && minor >= 11)
-}
-
-func doinit() {
-	if err := readHWCAP(); err != nil {
-		// We failed to read /proc/self/auxv. This can happen if the binary has
-		// been given extra capabilities(7) with /bin/setcap.
-		//
-		// When this happens, we have two options. If the Linux kernel is new
-		// enough (4.11+), we can read the arm64 registers directly which'll
-		// trap into the kernel and then return back to userspace.
-		//
-		// But on older kernels, such as Linux 4.4.180 as used on many Synology
-		// devices, calling readARM64Registers (specifically getisar0) will
-		// cause a SIGILL and we'll die. So for older kernels, parse /proc/cpuinfo
-		// instead.
-		//
-		// See golang/go#57336.
-		if linuxKernelCanEmulateCPUID() {
-			readARM64Registers()
-		} else {
-			readLinuxProcCPUInfo()
-		}
-		return
-	}
-
-	// HWCAP feature bits
-	ARM64.HasFP = isSet(hwCap, hwcap_FP)
-	ARM64.HasASIMD = isSet(hwCap, hwcap_ASIMD)
-	ARM64.HasEVTSTRM = isSet(hwCap, hwcap_EVTSTRM)
-	ARM64.HasAES = isSet(hwCap, hwcap_AES)
-	ARM64.HasPMULL = isSet(hwCap, hwcap_PMULL)
-	ARM64.HasSHA1 = isSet(hwCap, hwcap_SHA1)
-	ARM64.HasSHA2 = isSet(hwCap, hwcap_SHA2)
-	ARM64.HasCRC32 = isSet(hwCap, hwcap_CRC32)
-	ARM64.HasATOMICS = isSet(hwCap, hwcap_ATOMICS)
-	ARM64.HasFPHP = isSet(hwCap, hwcap_FPHP)
-	ARM64.HasASIMDHP = isSet(hwCap, hwcap_ASIMDHP)
-	ARM64.HasCPUID = isSet(hwCap, hwcap_CPUID)
-	ARM64.HasASIMDRDM = isSet(hwCap, hwcap_ASIMDRDM)
-	ARM64.HasJSCVT = isSet(hwCap, hwcap_JSCVT)
-	ARM64.HasFCMA = isSet(hwCap, hwcap_FCMA)
-	ARM64.HasLRCPC = isSet(hwCap, hwcap_LRCPC)
-	ARM64.HasDCPOP = isSet(hwCap, hwcap_DCPOP)
-	ARM64.HasSHA3 = isSet(hwCap, hwcap_SHA3)
-	ARM64.HasSM3 = isSet(hwCap, hwcap_SM3)
-	ARM64.HasSM4 = isSet(hwCap, hwcap_SM4)
-	ARM64.HasASIMDDP = isSet(hwCap, hwcap_ASIMDDP)
-	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 {
-	return hwc&value != 0
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_linux_loong64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_linux_loong64.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2025 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
-
-// HWCAP bits. These are exposed by the Linux kernel.
-const (
-	hwcap_LOONGARCH_LSX  = 1 << 4
-	hwcap_LOONGARCH_LASX = 1 << 5
-)
-
-func doinit() {
-	// TODO: Features that require kernel support like LSX and LASX can
-	// be detected here once needed in std library or by the compiler.
-	Loong64.HasLSX = hwcIsSet(hwCap, hwcap_LOONGARCH_LSX)
-	Loong64.HasLASX = hwcIsSet(hwCap, hwcap_LOONGARCH_LASX)
-}
-
-func hwcIsSet(hwc uint, val uint) bool {
-	return hwc&val != 0
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go
+++ /dev/null
@@ -1,22 +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 linux && (mips64 || mips64le)
-
-package cpu
-
-// HWCAP bits. These are exposed by the Linux kernel 5.4.
-const (
-	// CPU features
-	hwcap_MIPS_MSA = 1 << 1
-)
-
-func doinit() {
-	// HWCAP feature bits
-	MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA)
-}
-
-func isSet(hwc uint, value uint) bool {
-	return hwc&value != 0
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
+++ /dev/null
@@ -1,9 +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 linux && !arm && !arm64 && !loong64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64
-
-package cpu
-
-func doinit() {}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
+++ /dev/null
@@ -1,30 +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 linux && (ppc64 || ppc64le)
-
-package cpu
-
-// HWCAP/HWCAP2 bits. These are exposed by the kernel.
-const (
-	// ISA Level
-	_PPC_FEATURE2_ARCH_2_07 = 0x80000000
-	_PPC_FEATURE2_ARCH_3_00 = 0x00800000
-
-	// CPU features
-	_PPC_FEATURE2_DARN = 0x00200000
-	_PPC_FEATURE2_SCV  = 0x00100000
-)
-
-func doinit() {
-	// HWCAP2 feature bits
-	PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07)
-	PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00)
-	PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN)
-	PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV)
-}
-
-func isSet(hwc uint, value uint) bool {
-	return hwc&value != 0
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go
+++ /dev/null
@@ -1,160 +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 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_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_ZVKNHB      = 0x800000
-	riscv_HWPROBE_EXT_ZVKSED      = 0x1000000
-	riscv_HWPROBE_EXT_ZVKSH       = 0x2000000
-	riscv_HWPROBE_EXT_ZVKT        = 0x4000000
-	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)
-			RISCV64.HasZvbb = isSet(v, riscv_HWPROBE_EXT_ZVBB)
-			RISCV64.HasZvbc = isSet(v, riscv_HWPROBE_EXT_ZVBC)
-			RISCV64.HasZvkb = isSet(v, riscv_HWPROBE_EXT_ZVKB)
-			RISCV64.HasZvkg = isSet(v, riscv_HWPROBE_EXT_ZVKG)
-			RISCV64.HasZvkt = isSet(v, riscv_HWPROBE_EXT_ZVKT)
-			// Cryptography shorthand extensions
-			RISCV64.HasZvkn = isSet(v, riscv_HWPROBE_EXT_ZVKNED) &&
-				isSet(v, riscv_HWPROBE_EXT_ZVKNHB) && RISCV64.HasZvkb && RISCV64.HasZvkt
-			RISCV64.HasZvknc = RISCV64.HasZvkn && RISCV64.HasZvbc
-			RISCV64.HasZvkng = RISCV64.HasZvkn && RISCV64.HasZvkg
-			RISCV64.HasZvks = isSet(v, riscv_HWPROBE_EXT_ZVKSED) &&
-				isSet(v, riscv_HWPROBE_EXT_ZVKSH) && RISCV64.HasZvkb && RISCV64.HasZvkt
-			RISCV64.HasZvksc = RISCV64.HasZvks && RISCV64.HasZvbc
-			RISCV64.HasZvksg = RISCV64.HasZvks && RISCV64.HasZvkg
-		}
-		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
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
+++ /dev/null
@@ -1,40 +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.
-
-package cpu
-
-const (
-	// bit mask values from /usr/include/bits/hwcap.h
-	hwcap_ZARCH  = 2
-	hwcap_STFLE  = 4
-	hwcap_MSA    = 8
-	hwcap_LDISP  = 16
-	hwcap_EIMM   = 32
-	hwcap_DFP    = 64
-	hwcap_ETF3EH = 256
-	hwcap_VX     = 2048
-	hwcap_VXE    = 8192
-)
-
-func initS390Xbase() {
-	// test HWCAP bit vector
-	has := func(featureMask uint) bool {
-		return hwCap&featureMask == featureMask
-	}
-
-	// mandatory
-	S390X.HasZARCH = has(hwcap_ZARCH)
-
-	// optional
-	S390X.HasSTFLE = has(hwcap_STFLE)
-	S390X.HasLDISP = has(hwcap_LDISP)
-	S390X.HasEIMM = has(hwcap_EIMM)
-	S390X.HasETF3EH = has(hwcap_ETF3EH)
-	S390X.HasDFP = has(hwcap_DFP)
-	S390X.HasMSA = has(hwcap_MSA)
-	S390X.HasVX = has(hwcap_VX)
-	if S390X.HasVX {
-		S390X.HasVXE = has(hwcap_VXE)
-	}
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_loong64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_loong64.go
+++ /dev/null
@@ -1,50 +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 loong64
-
-package cpu
-
-const cacheLineSize = 64
-
-// Bit fields for CPUCFG registers, Related reference documents:
-// https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_cpucfg
-const (
-	// CPUCFG1 bits
-	cpucfg1_CRC32 = 1 << 25
-
-	// CPUCFG2 bits
-	cpucfg2_LAM_BH = 1 << 27
-	cpucfg2_LAMCAS = 1 << 28
-)
-
-func initOptions() {
-	options = []option{
-		{Name: "lsx", Feature: &Loong64.HasLSX},
-		{Name: "lasx", Feature: &Loong64.HasLASX},
-		{Name: "crc32", Feature: &Loong64.HasCRC32},
-		{Name: "lam_bh", Feature: &Loong64.HasLAM_BH},
-		{Name: "lamcas", Feature: &Loong64.HasLAMCAS},
-	}
-
-	// The CPUCFG data on Loong64 only reflects the hardware capabilities,
-	// not the kernel support status, so features such as LSX and LASX that
-	// require kernel support cannot be obtained from the CPUCFG data.
-	//
-	// These features only require hardware capability support and do not
-	// require kernel specific support, so they can be obtained directly
-	// through CPUCFG
-	cfg1 := get_cpucfg(1)
-	cfg2 := get_cpucfg(2)
-
-	Loong64.HasCRC32 = cfgIsSet(cfg1, cpucfg1_CRC32)
-	Loong64.HasLAMCAS = cfgIsSet(cfg2, cpucfg2_LAMCAS)
-	Loong64.HasLAM_BH = cfgIsSet(cfg2, cpucfg2_LAM_BH)
-}
-
-func get_cpucfg(reg uint32) uint32
-
-func cfgIsSet(cfg uint32, val uint32) bool {
-	return cfg&val != 0
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_loong64.s
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_loong64.s
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2025 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 "textflag.h"
-
-// func get_cpucfg(reg uint32) uint32
-TEXT ·get_cpucfg(SB), NOSPLIT|NOFRAME, $0
-	MOVW	reg+0(FP), R5
-	// CPUCFG R5, R4 = 0x00006ca4
-	WORD	$0x00006ca4
-	MOVW	R4, ret+8(FP)
-	RET
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_mips64x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_mips64x.go
+++ /dev/null
@@ -1,15 +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 mips64 || mips64le
-
-package cpu
-
-const cacheLineSize = 32
-
-func initOptions() {
-	options = []option{
-		{Name: "msa", Feature: &MIPS64X.HasMSA},
-	}
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_mipsx.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_mipsx.go
+++ /dev/null
@@ -1,11 +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 mips || mipsle
-
-package cpu
-
-const cacheLineSize = 32
-
-func initOptions() {}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
+++ /dev/null
@@ -1,173 +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.
-
-package cpu
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-// Minimal copy of functionality from x/sys/unix so the cpu package can call
-// sysctl without depending on x/sys/unix.
-
-const (
-	_CTL_QUERY = -2
-
-	_SYSCTL_VERS_1 = 0x1000000
-)
-
-var _zero uintptr
-
-func sysctl(mib []int32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
-	var _p0 unsafe.Pointer
-	if len(mib) > 0 {
-		_p0 = unsafe.Pointer(&mib[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, errno := syscall.Syscall6(
-		syscall.SYS___SYSCTL,
-		uintptr(_p0),
-		uintptr(len(mib)),
-		uintptr(unsafe.Pointer(old)),
-		uintptr(unsafe.Pointer(oldlen)),
-		uintptr(unsafe.Pointer(new)),
-		uintptr(newlen))
-	if errno != 0 {
-		return errno
-	}
-	return nil
-}
-
-type sysctlNode struct {
-	Flags          uint32
-	Num            int32
-	Name           [32]int8
-	Ver            uint32
-	__rsvd         uint32
-	Un             [16]byte
-	_sysctl_size   [8]byte
-	_sysctl_func   [8]byte
-	_sysctl_parent [8]byte
-	_sysctl_desc   [8]byte
-}
-
-func sysctlNodes(mib []int32) ([]sysctlNode, error) {
-	var olen uintptr
-
-	// Get a list of all sysctl nodes below the given MIB by performing
-	// a sysctl for the given MIB with CTL_QUERY appended.
-	mib = append(mib, _CTL_QUERY)
-	qnode := sysctlNode{Flags: _SYSCTL_VERS_1}
-	qp := (*byte)(unsafe.Pointer(&qnode))
-	sz := unsafe.Sizeof(qnode)
-	if err := sysctl(mib, nil, &olen, qp, sz); err != nil {
-		return nil, err
-	}
-
-	// Now that we know the size, get the actual nodes.
-	nodes := make([]sysctlNode, olen/sz)
-	np := (*byte)(unsafe.Pointer(&nodes[0]))
-	if err := sysctl(mib, np, &olen, qp, sz); err != nil {
-		return nil, err
-	}
-
-	return nodes, nil
-}
-
-func nametomib(name string) ([]int32, error) {
-	// Split name into components.
-	var parts []string
-	last := 0
-	for i := 0; i < len(name); i++ {
-		if name[i] == '.' {
-			parts = append(parts, name[last:i])
-			last = i + 1
-		}
-	}
-	parts = append(parts, name[last:])
-
-	mib := []int32{}
-	// Discover the nodes and construct the MIB OID.
-	for partno, part := range parts {
-		nodes, err := sysctlNodes(mib)
-		if err != nil {
-			return nil, err
-		}
-		for _, node := range nodes {
-			n := make([]byte, 0)
-			for i := range node.Name {
-				if node.Name[i] != 0 {
-					n = append(n, byte(node.Name[i]))
-				}
-			}
-			if string(n) == part {
-				mib = append(mib, int32(node.Num))
-				break
-			}
-		}
-		if len(mib) != partno+1 {
-			return nil, err
-		}
-	}
-
-	return mib, nil
-}
-
-// aarch64SysctlCPUID is struct aarch64_sysctl_cpu_id from NetBSD's <aarch64/armreg.h>
-type aarch64SysctlCPUID struct {
-	midr      uint64 /* Main ID Register */
-	revidr    uint64 /* Revision ID Register */
-	mpidr     uint64 /* Multiprocessor Affinity Register */
-	aa64dfr0  uint64 /* A64 Debug Feature Register 0 */
-	aa64dfr1  uint64 /* A64 Debug Feature Register 1 */
-	aa64isar0 uint64 /* A64 Instruction Set Attribute Register 0 */
-	aa64isar1 uint64 /* A64 Instruction Set Attribute Register 1 */
-	aa64mmfr0 uint64 /* A64 Memory Model Feature Register 0 */
-	aa64mmfr1 uint64 /* A64 Memory Model Feature Register 1 */
-	aa64mmfr2 uint64 /* A64 Memory Model Feature Register 2 */
-	aa64pfr0  uint64 /* A64 Processor Feature Register 0 */
-	aa64pfr1  uint64 /* A64 Processor Feature Register 1 */
-	aa64zfr0  uint64 /* A64 SVE Feature ID Register 0 */
-	mvfr0     uint32 /* Media and VFP Feature Register 0 */
-	mvfr1     uint32 /* Media and VFP Feature Register 1 */
-	mvfr2     uint32 /* Media and VFP Feature Register 2 */
-	pad       uint32
-	clidr     uint64 /* Cache Level ID Register */
-	ctr       uint64 /* Cache Type Register */
-}
-
-func sysctlCPUID(name string) (*aarch64SysctlCPUID, error) {
-	mib, err := nametomib(name)
-	if err != nil {
-		return nil, err
-	}
-
-	out := aarch64SysctlCPUID{}
-	n := unsafe.Sizeof(out)
-	_, _, errno := syscall.Syscall6(
-		syscall.SYS___SYSCTL,
-		uintptr(unsafe.Pointer(&mib[0])),
-		uintptr(len(mib)),
-		uintptr(unsafe.Pointer(&out)),
-		uintptr(unsafe.Pointer(&n)),
-		uintptr(0),
-		uintptr(0))
-	if errno != 0 {
-		return nil, errno
-	}
-	return &out, nil
-}
-
-func doinit() {
-	cpuid, err := sysctlCPUID("machdep.cpu0.cpu_id")
-	if err != nil {
-		setMinimalFeatures()
-		return
-	}
-	parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64mmfr1, cpuid.aa64pfr0)
-
-	Initialized = true
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
+++ /dev/null
@@ -1,65 +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.
-
-package cpu
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-// Minimal copy of functionality from x/sys/unix so the cpu package can call
-// sysctl without depending on x/sys/unix.
-
-const (
-	// From OpenBSD's sys/sysctl.h.
-	_CTL_MACHDEP = 7
-
-	// From OpenBSD's machine/cpu.h.
-	_CPU_ID_AA64ISAR0 = 2
-	_CPU_ID_AA64ISAR1 = 3
-)
-
-// Implemented in the runtime package (runtime/sys_openbsd3.go)
-func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-//go:linkname syscall_syscall6 syscall.syscall6
-
-func sysctl(mib []uint32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
-	_, _, errno := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(unsafe.Pointer(&mib[0])), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	if errno != 0 {
-		return errno
-	}
-	return nil
-}
-
-var libc_sysctl_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
-
-func sysctlUint64(mib []uint32) (uint64, bool) {
-	var out uint64
-	nout := unsafe.Sizeof(out)
-	if err := sysctl(mib, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); err != nil {
-		return 0, false
-	}
-	return out, true
-}
-
-func doinit() {
-	setMinimalFeatures()
-
-	// Get ID_AA64ISAR0 and ID_AA64ISAR1 from sysctl.
-	isar0, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64ISAR0})
-	if !ok {
-		return
-	}
-	isar1, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64ISAR1})
-	if !ok {
-		return
-	}
-	parseARM64SystemRegisters(isar0, isar1, 0, 0)
-
-	Initialized = true
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s
+++ /dev/null
@@ -1,11 +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.
-
-#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)
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_other_arm.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_other_arm.go
+++ /dev/null
@@ -1,9 +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 !linux && arm
-
-package cpu
-
-func archInit() {}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
+++ /dev/null
@@ -1,9 +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 !linux && !netbsd && !openbsd && arm64
-
-package cpu
-
-func doinit() {}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go
+++ /dev/null
@@ -1,11 +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 !linux && (mips64 || mips64le)
-
-package cpu
-
-func archInit() {
-	Initialized = true
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go
+++ /dev/null
@@ -1,12 +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 !aix && !linux && (ppc64 || ppc64le)
-
-package cpu
-
-func archInit() {
-	PPC64.IsPOWER8 = true
-	Initialized = true
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go
+++ /dev/null
@@ -1,11 +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 !linux && riscv64
-
-package cpu
-
-func archInit() {
-	Initialized = true
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_other_x86.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_other_x86.go
+++ /dev/null
@@ -1,11 +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.
-
-//go:build 386 || amd64p32 || (amd64 && (!darwin || !gc))
-
-package cpu
-
-func darwinSupportsAVX512() bool {
-	panic("only implemented for gc && amd64 && darwin")
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
+++ /dev/null
@@ -1,16 +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 ppc64 || ppc64le
-
-package cpu
-
-const cacheLineSize = 128
-
-func initOptions() {
-	options = []option{
-		{Name: "darn", Feature: &PPC64.HasDARN},
-		{Name: "scv", Feature: &PPC64.HasSCV},
-	}
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
+++ /dev/null
@@ -1,32 +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 riscv64
-
-package cpu
-
-const cacheLineSize = 64
-
-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},
-		// RISC-V Cryptography Extensions
-		{Name: "zvbb", Feature: &RISCV64.HasZvbb},
-		{Name: "zvbc", Feature: &RISCV64.HasZvbc},
-		{Name: "zvkb", Feature: &RISCV64.HasZvkb},
-		{Name: "zvkg", Feature: &RISCV64.HasZvkg},
-		{Name: "zvkt", Feature: &RISCV64.HasZvkt},
-		{Name: "zvkn", Feature: &RISCV64.HasZvkn},
-		{Name: "zvknc", Feature: &RISCV64.HasZvknc},
-		{Name: "zvkng", Feature: &RISCV64.HasZvkng},
-		{Name: "zvks", Feature: &RISCV64.HasZvks},
-		{Name: "zvksc", Feature: &RISCV64.HasZvksc},
-		{Name: "zvksg", Feature: &RISCV64.HasZvksg},
-	}
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_s390x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_s390x.go
+++ /dev/null
@@ -1,172 +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.
-
-package cpu
-
-const cacheLineSize = 256
-
-func initOptions() {
-	options = []option{
-		{Name: "zarch", Feature: &S390X.HasZARCH, Required: true},
-		{Name: "stfle", Feature: &S390X.HasSTFLE, Required: true},
-		{Name: "ldisp", Feature: &S390X.HasLDISP, Required: true},
-		{Name: "eimm", Feature: &S390X.HasEIMM, Required: true},
-		{Name: "dfp", Feature: &S390X.HasDFP},
-		{Name: "etf3eh", Feature: &S390X.HasETF3EH},
-		{Name: "msa", Feature: &S390X.HasMSA},
-		{Name: "aes", Feature: &S390X.HasAES},
-		{Name: "aescbc", Feature: &S390X.HasAESCBC},
-		{Name: "aesctr", Feature: &S390X.HasAESCTR},
-		{Name: "aesgcm", Feature: &S390X.HasAESGCM},
-		{Name: "ghash", Feature: &S390X.HasGHASH},
-		{Name: "sha1", Feature: &S390X.HasSHA1},
-		{Name: "sha256", Feature: &S390X.HasSHA256},
-		{Name: "sha3", Feature: &S390X.HasSHA3},
-		{Name: "sha512", Feature: &S390X.HasSHA512},
-		{Name: "vx", Feature: &S390X.HasVX},
-		{Name: "vxe", Feature: &S390X.HasVXE},
-	}
-}
-
-// bitIsSet reports whether the bit at index is set. The bit index
-// is in big endian order, so bit index 0 is the leftmost bit.
-func bitIsSet(bits []uint64, index uint) bool {
-	return bits[index/64]&((1<<63)>>(index%64)) != 0
-}
-
-// facility is a bit index for the named facility.
-type facility uint8
-
-const (
-	// mandatory facilities
-	zarch  facility = 1  // z architecture mode is active
-	stflef facility = 7  // store-facility-list-extended
-	ldisp  facility = 18 // long-displacement
-	eimm   facility = 21 // extended-immediate
-
-	// miscellaneous facilities
-	dfp    facility = 42 // decimal-floating-point
-	etf3eh facility = 30 // extended-translation 3 enhancement
-
-	// cryptography facilities
-	msa  facility = 17  // message-security-assist
-	msa3 facility = 76  // message-security-assist extension 3
-	msa4 facility = 77  // message-security-assist extension 4
-	msa5 facility = 57  // message-security-assist extension 5
-	msa8 facility = 146 // message-security-assist extension 8
-	msa9 facility = 155 // message-security-assist extension 9
-
-	// vector facilities
-	vx   facility = 129 // vector facility
-	vxe  facility = 135 // vector-enhancements 1
-	vxe2 facility = 148 // vector-enhancements 2
-)
-
-// facilityList contains the result of an STFLE call.
-// Bits are numbered in big endian order so the
-// leftmost bit (the MSB) is at index 0.
-type facilityList struct {
-	bits [4]uint64
-}
-
-// Has reports whether the given facilities are present.
-func (s *facilityList) Has(fs ...facility) bool {
-	if len(fs) == 0 {
-		panic("no facility bits provided")
-	}
-	for _, f := range fs {
-		if !bitIsSet(s.bits[:], uint(f)) {
-			return false
-		}
-	}
-	return true
-}
-
-// function is the code for the named cryptographic function.
-type function uint8
-
-const (
-	// KM{,A,C,CTR} function codes
-	aes128 function = 18 // AES-128
-	aes192 function = 19 // AES-192
-	aes256 function = 20 // AES-256
-
-	// K{I,L}MD function codes
-	sha1     function = 1  // SHA-1
-	sha256   function = 2  // SHA-256
-	sha512   function = 3  // SHA-512
-	sha3_224 function = 32 // SHA3-224
-	sha3_256 function = 33 // SHA3-256
-	sha3_384 function = 34 // SHA3-384
-	sha3_512 function = 35 // SHA3-512
-	shake128 function = 36 // SHAKE-128
-	shake256 function = 37 // SHAKE-256
-
-	// KLMD function codes
-	ghash function = 65 // GHASH
-)
-
-// queryResult contains the result of a Query function
-// call. Bits are numbered in big endian order so the
-// leftmost bit (the MSB) is at index 0.
-type queryResult struct {
-	bits [2]uint64
-}
-
-// Has reports whether the given functions are present.
-func (q *queryResult) Has(fns ...function) bool {
-	if len(fns) == 0 {
-		panic("no function codes provided")
-	}
-	for _, f := range fns {
-		if !bitIsSet(q.bits[:], uint(f)) {
-			return false
-		}
-	}
-	return true
-}
-
-func doinit() {
-	initS390Xbase()
-
-	// We need implementations of stfle, km and so on
-	// to detect cryptographic features.
-	if !haveAsmFunctions() {
-		return
-	}
-
-	// optional cryptographic functions
-	if S390X.HasMSA {
-		aes := []function{aes128, aes192, aes256}
-
-		// cipher message
-		km, kmc := kmQuery(), kmcQuery()
-		S390X.HasAES = km.Has(aes...)
-		S390X.HasAESCBC = kmc.Has(aes...)
-		if S390X.HasSTFLE {
-			facilities := stfle()
-			if facilities.Has(msa4) {
-				kmctr := kmctrQuery()
-				S390X.HasAESCTR = kmctr.Has(aes...)
-			}
-			if facilities.Has(msa8) {
-				kma := kmaQuery()
-				S390X.HasAESGCM = kma.Has(aes...)
-			}
-		}
-
-		// compute message digest
-		kimd := kimdQuery() // intermediate (no padding)
-		klmd := klmdQuery() // last (padding)
-		S390X.HasSHA1 = kimd.Has(sha1) && klmd.Has(sha1)
-		S390X.HasSHA256 = kimd.Has(sha256) && klmd.Has(sha256)
-		S390X.HasSHA512 = kimd.Has(sha512) && klmd.Has(sha512)
-		S390X.HasGHASH = kimd.Has(ghash) // KLMD-GHASH does not exist
-		sha3 := []function{
-			sha3_224, sha3_256, sha3_384, sha3_512,
-			shake128, shake256,
-		}
-		S390X.HasSHA3 = kimd.Has(sha3...) && klmd.Has(sha3...)
-	}
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_s390x.s
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_s390x.s
+++ /dev/null
@@ -1,57 +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 gc
-
-#include "textflag.h"
-
-// func stfle() facilityList
-TEXT ·stfle(SB), NOSPLIT|NOFRAME, $0-32
-	MOVD $ret+0(FP), R1
-	MOVD $3, R0          // last doubleword index to store
-	XC   $32, (R1), (R1) // clear 4 doublewords (32 bytes)
-	WORD $0xb2b01000     // store facility list extended (STFLE)
-	RET
-
-// func kmQuery() queryResult
-TEXT ·kmQuery(SB), NOSPLIT|NOFRAME, $0-16
-	MOVD $0, R0         // set function code to 0 (KM-Query)
-	MOVD $ret+0(FP), R1 // address of 16-byte return value
-	WORD $0xB92E0024    // cipher message (KM)
-	RET
-
-// func kmcQuery() queryResult
-TEXT ·kmcQuery(SB), NOSPLIT|NOFRAME, $0-16
-	MOVD $0, R0         // set function code to 0 (KMC-Query)
-	MOVD $ret+0(FP), R1 // address of 16-byte return value
-	WORD $0xB92F0024    // cipher message with chaining (KMC)
-	RET
-
-// func kmctrQuery() queryResult
-TEXT ·kmctrQuery(SB), NOSPLIT|NOFRAME, $0-16
-	MOVD $0, R0         // set function code to 0 (KMCTR-Query)
-	MOVD $ret+0(FP), R1 // address of 16-byte return value
-	WORD $0xB92D4024    // cipher message with counter (KMCTR)
-	RET
-
-// func kmaQuery() queryResult
-TEXT ·kmaQuery(SB), NOSPLIT|NOFRAME, $0-16
-	MOVD $0, R0         // set function code to 0 (KMA-Query)
-	MOVD $ret+0(FP), R1 // address of 16-byte return value
-	WORD $0xb9296024    // cipher message with authentication (KMA)
-	RET
-
-// func kimdQuery() queryResult
-TEXT ·kimdQuery(SB), NOSPLIT|NOFRAME, $0-16
-	MOVD $0, R0         // set function code to 0 (KIMD-Query)
-	MOVD $ret+0(FP), R1 // address of 16-byte return value
-	WORD $0xB93E0024    // compute intermediate message digest (KIMD)
-	RET
-
-// func klmdQuery() queryResult
-TEXT ·klmdQuery(SB), NOSPLIT|NOFRAME, $0-16
-	MOVD $0, R0         // set function code to 0 (KLMD-Query)
-	MOVD $ret+0(FP), R1 // address of 16-byte return value
-	WORD $0xB93F0024    // compute last message digest (KLMD)
-	RET
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_wasm.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_wasm.go
+++ /dev/null
@@ -1,17 +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 wasm
-
-package cpu
-
-// We're compiling the cpu package for an unknown (software-abstracted) CPU.
-// Make CacheLinePad an empty struct and hope that the usual struct alignment
-// rules are good enough.
-
-const cacheLineSize = 0
-
-func initOptions() {}
-
-func archInit() {}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_x86.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_x86.go
+++ /dev/null
@@ -1,162 +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 386 || amd64 || amd64p32
-
-package cpu
-
-import "runtime"
-
-const cacheLineSize = 64
-
-func initOptions() {
-	options = []option{
-		{Name: "adx", Feature: &X86.HasADX},
-		{Name: "aes", Feature: &X86.HasAES},
-		{Name: "avx", Feature: &X86.HasAVX},
-		{Name: "avx2", Feature: &X86.HasAVX2},
-		{Name: "avx512", Feature: &X86.HasAVX512},
-		{Name: "avx512f", Feature: &X86.HasAVX512F},
-		{Name: "avx512cd", Feature: &X86.HasAVX512CD},
-		{Name: "avx512er", Feature: &X86.HasAVX512ER},
-		{Name: "avx512pf", Feature: &X86.HasAVX512PF},
-		{Name: "avx512vl", Feature: &X86.HasAVX512VL},
-		{Name: "avx512bw", Feature: &X86.HasAVX512BW},
-		{Name: "avx512dq", Feature: &X86.HasAVX512DQ},
-		{Name: "avx512ifma", Feature: &X86.HasAVX512IFMA},
-		{Name: "avx512vbmi", Feature: &X86.HasAVX512VBMI},
-		{Name: "avx512vnniw", Feature: &X86.HasAVX5124VNNIW},
-		{Name: "avx5124fmaps", Feature: &X86.HasAVX5124FMAPS},
-		{Name: "avx512vpopcntdq", Feature: &X86.HasAVX512VPOPCNTDQ},
-		{Name: "avx512vpclmulqdq", Feature: &X86.HasAVX512VPCLMULQDQ},
-		{Name: "avx512vnni", Feature: &X86.HasAVX512VNNI},
-		{Name: "avx512gfni", Feature: &X86.HasAVX512GFNI},
-		{Name: "avx512vaes", Feature: &X86.HasAVX512VAES},
-		{Name: "avx512vbmi2", Feature: &X86.HasAVX512VBMI2},
-		{Name: "avx512bitalg", Feature: &X86.HasAVX512BITALG},
-		{Name: "avx512bf16", Feature: &X86.HasAVX512BF16},
-		{Name: "amxtile", Feature: &X86.HasAMXTile},
-		{Name: "amxint8", Feature: &X86.HasAMXInt8},
-		{Name: "amxbf16", Feature: &X86.HasAMXBF16},
-		{Name: "bmi1", Feature: &X86.HasBMI1},
-		{Name: "bmi2", Feature: &X86.HasBMI2},
-		{Name: "cx16", Feature: &X86.HasCX16},
-		{Name: "erms", Feature: &X86.HasERMS},
-		{Name: "fma", Feature: &X86.HasFMA},
-		{Name: "osxsave", Feature: &X86.HasOSXSAVE},
-		{Name: "pclmulqdq", Feature: &X86.HasPCLMULQDQ},
-		{Name: "popcnt", Feature: &X86.HasPOPCNT},
-		{Name: "rdrand", Feature: &X86.HasRDRAND},
-		{Name: "rdseed", Feature: &X86.HasRDSEED},
-		{Name: "sse3", Feature: &X86.HasSSE3},
-		{Name: "sse41", Feature: &X86.HasSSE41},
-		{Name: "sse42", Feature: &X86.HasSSE42},
-		{Name: "ssse3", Feature: &X86.HasSSSE3},
-		{Name: "avxifma", Feature: &X86.HasAVXIFMA},
-		{Name: "avxvnni", Feature: &X86.HasAVXVNNI},
-		{Name: "avxvnniint8", Feature: &X86.HasAVXVNNIInt8},
-
-		// These capabilities should always be enabled on amd64:
-		{Name: "sse2", Feature: &X86.HasSSE2, Required: runtime.GOARCH == "amd64"},
-	}
-}
-
-func archInit() {
-
-	Initialized = true
-
-	maxID, _, _, _ := cpuid(0, 0)
-
-	if maxID < 1 {
-		return
-	}
-
-	_, _, ecx1, edx1 := cpuid(1, 0)
-	X86.HasSSE2 = isSet(26, edx1)
-
-	X86.HasSSE3 = isSet(0, ecx1)
-	X86.HasPCLMULQDQ = isSet(1, ecx1)
-	X86.HasSSSE3 = isSet(9, ecx1)
-	X86.HasFMA = isSet(12, ecx1)
-	X86.HasCX16 = isSet(13, ecx1)
-	X86.HasSSE41 = isSet(19, ecx1)
-	X86.HasSSE42 = isSet(20, ecx1)
-	X86.HasPOPCNT = isSet(23, ecx1)
-	X86.HasAES = isSet(25, ecx1)
-	X86.HasOSXSAVE = isSet(27, ecx1)
-	X86.HasRDRAND = isSet(30, ecx1)
-
-	var osSupportsAVX, osSupportsAVX512 bool
-	// For XGETBV, OSXSAVE bit is required and sufficient.
-	if X86.HasOSXSAVE {
-		eax, _ := xgetbv()
-		// Check if XMM and YMM registers have OS support.
-		osSupportsAVX = isSet(1, eax) && isSet(2, eax)
-
-		if runtime.GOOS == "darwin" {
-			// 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)
-		}
-	}
-
-	X86.HasAVX = isSet(28, ecx1) && osSupportsAVX
-
-	if maxID < 7 {
-		return
-	}
-
-	eax7, ebx7, ecx7, edx7 := cpuid(7, 0)
-	X86.HasBMI1 = isSet(3, ebx7)
-	X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX
-	X86.HasBMI2 = isSet(8, ebx7)
-	X86.HasERMS = isSet(9, ebx7)
-	X86.HasRDSEED = isSet(18, ebx7)
-	X86.HasADX = isSet(19, ebx7)
-
-	X86.HasAVX512 = isSet(16, ebx7) && osSupportsAVX512 // Because avx-512 foundation is the core required extension
-	if X86.HasAVX512 {
-		X86.HasAVX512F = true
-		X86.HasAVX512CD = isSet(28, ebx7)
-		X86.HasAVX512ER = isSet(27, ebx7)
-		X86.HasAVX512PF = isSet(26, ebx7)
-		X86.HasAVX512VL = isSet(31, ebx7)
-		X86.HasAVX512BW = isSet(30, ebx7)
-		X86.HasAVX512DQ = isSet(17, ebx7)
-		X86.HasAVX512IFMA = isSet(21, ebx7)
-		X86.HasAVX512VBMI = isSet(1, ecx7)
-		X86.HasAVX5124VNNIW = isSet(2, edx7)
-		X86.HasAVX5124FMAPS = isSet(3, edx7)
-		X86.HasAVX512VPOPCNTDQ = isSet(14, ecx7)
-		X86.HasAVX512VPCLMULQDQ = isSet(10, ecx7)
-		X86.HasAVX512VNNI = isSet(11, ecx7)
-		X86.HasAVX512GFNI = isSet(8, ecx7)
-		X86.HasAVX512VAES = isSet(9, ecx7)
-		X86.HasAVX512VBMI2 = isSet(6, ecx7)
-		X86.HasAVX512BITALG = isSet(12, ecx7)
-	}
-
-	X86.HasAMXTile = isSet(24, edx7)
-	X86.HasAMXInt8 = isSet(25, edx7)
-	X86.HasAMXBF16 = isSet(22, edx7)
-
-	// These features depend on the second level of extended features.
-	if eax7 >= 1 {
-		eax71, _, _, edx71 := cpuid(7, 1)
-		if X86.HasAVX512 {
-			X86.HasAVX512BF16 = isSet(5, eax71)
-		}
-		if X86.HasAVX {
-			X86.HasAVXIFMA = isSet(23, eax71)
-			X86.HasAVXVNNI = isSet(4, eax71)
-			X86.HasAVXVNNIInt8 = isSet(4, edx71)
-		}
-	}
-}
-
-func isSet(bitpos uint, value uint32) bool {
-	return value&(1<<bitpos) != 0
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_zos.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_zos.go
+++ /dev/null
@@ -1,10 +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.
-
-package cpu
-
-func archInit() {
-	doinit()
-	Initialized = true
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go
+++ /dev/null
@@ -1,25 +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.
-
-package cpu
-
-func initS390Xbase() {
-	// get the facilities list
-	facilities := stfle()
-
-	// mandatory
-	S390X.HasZARCH = facilities.Has(zarch)
-	S390X.HasSTFLE = facilities.Has(stflef)
-	S390X.HasLDISP = facilities.Has(ldisp)
-	S390X.HasEIMM = facilities.Has(eimm)
-
-	// optional
-	S390X.HasETF3EH = facilities.Has(etf3eh)
-	S390X.HasDFP = facilities.Has(dfp)
-	S390X.HasMSA = facilities.Has(msa)
-	S390X.HasVX = facilities.Has(vx)
-	if S390X.HasVX {
-		S390X.HasVXE = facilities.Has(vxe)
-	}
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/endian_big.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/endian_big.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2023 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 armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
-
-package cpu
-
-// IsBigEndian records whether the GOARCH's byte order is big endian.
-const IsBigEndian = true
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/endian_little.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/endian_little.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2023 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 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
-
-package cpu
-
-// IsBigEndian records whether the GOARCH's byte order is big endian.
-const IsBigEndian = false
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/hwcap_linux.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/hwcap_linux.go
+++ /dev/null
@@ -1,71 +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.
-
-package cpu
-
-import (
-	"os"
-)
-
-const (
-	_AT_HWCAP  = 16
-	_AT_HWCAP2 = 26
-
-	procAuxv = "/proc/self/auxv"
-
-	uintSize = int(32 << (^uint(0) >> 63))
-)
-
-// For those platforms don't have a 'cpuid' equivalent we use HWCAP/HWCAP2
-// These are initialized in cpu_$GOARCH.go
-// and should not be changed after they are initialized.
-var hwCap uint
-var hwCap2 uint
-
-func readHWCAP() error {
-	// For Go 1.21+, get auxv from the Go runtime.
-	if a := getAuxv(); len(a) > 0 {
-		for len(a) >= 2 {
-			tag, val := a[0], uint(a[1])
-			a = a[2:]
-			switch tag {
-			case _AT_HWCAP:
-				hwCap = val
-			case _AT_HWCAP2:
-				hwCap2 = val
-			}
-		}
-		return nil
-	}
-
-	buf, err := os.ReadFile(procAuxv)
-	if err != nil {
-		// e.g. on android /proc/self/auxv is not accessible, so silently
-		// ignore the error and leave Initialized = false. On some
-		// architectures (e.g. arm64) doinit() implements a fallback
-		// readout and will set Initialized = true again.
-		return err
-	}
-	bo := hostByteOrder()
-	for len(buf) >= 2*(uintSize/8) {
-		var tag, val uint
-		switch uintSize {
-		case 32:
-			tag = uint(bo.Uint32(buf[0:]))
-			val = uint(bo.Uint32(buf[4:]))
-			buf = buf[8:]
-		case 64:
-			tag = uint(bo.Uint64(buf[0:]))
-			val = uint(bo.Uint64(buf[8:]))
-			buf = buf[16:]
-		}
-		switch tag {
-		case _AT_HWCAP:
-			hwCap = val
-		case _AT_HWCAP2:
-			hwCap2 = val
-		}
-	}
-	return nil
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/parse.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/parse.go
+++ /dev/null
@@ -1,43 +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.
-
-package cpu
-
-import "strconv"
-
-// parseRelease parses a dot-separated version number. It follows the semver
-// syntax, but allows the minor and patch versions to be elided.
-//
-// This is a copy of the Go runtime's parseRelease from
-// https://golang.org/cl/209597.
-func parseRelease(rel string) (major, minor, patch int, ok bool) {
-	// Strip anything after a dash or plus.
-	for i := range len(rel) {
-		if rel[i] == '-' || rel[i] == '+' {
-			rel = rel[:i]
-			break
-		}
-	}
-
-	next := func() (int, bool) {
-		for i := range len(rel) {
-			if rel[i] == '.' {
-				ver, err := strconv.Atoi(rel[:i])
-				rel = rel[i+1:]
-				return ver, err == nil
-			}
-		}
-		ver, err := strconv.Atoi(rel)
-		rel = ""
-		return ver, err == nil
-	}
-	if major, ok = next(); !ok || rel == "" {
-		return
-	}
-	if minor, ok = next(); !ok || rel == "" {
-		return
-	}
-	patch, ok = next()
-	return
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go
+++ /dev/null
@@ -1,53 +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 linux && arm64
-
-package cpu
-
-import (
-	"errors"
-	"io"
-	"os"
-	"strings"
-)
-
-func readLinuxProcCPUInfo() error {
-	f, err := os.Open("/proc/cpuinfo")
-	if err != nil {
-		return err
-	}
-	defer f.Close()
-
-	var buf [1 << 10]byte // enough for first CPU
-	n, err := io.ReadFull(f, buf[:])
-	if err != nil && err != io.ErrUnexpectedEOF {
-		return err
-	}
-	in := string(buf[:n])
-	const features = "\nFeatures	: "
-	i := strings.Index(in, features)
-	if i == -1 {
-		return errors.New("no CPU features found")
-	}
-	in = in[i+len(features):]
-	if i := strings.Index(in, "\n"); i != -1 {
-		in = in[:i]
-	}
-	m := map[string]*bool{}
-
-	initOptions() // need it early here; it's harmless to call twice
-	for _, o := range options {
-		m[o.Name] = o.Feature
-	}
-	// The EVTSTRM field has alias "evstrm" in Go, but Linux calls it "evtstrm".
-	m["evtstrm"] = &ARM64.HasEVTSTRM
-
-	for _, f := range strings.Fields(in) {
-		if p, ok := m[f]; ok {
-			*p = true
-		}
-	}
-	return nil
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/runtime_auxv.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/runtime_auxv.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2023 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
-
-// getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)
-// on platforms that use auxv.
-var getAuxvFn func() []uintptr
-
-func getAuxv() []uintptr {
-	if getAuxvFn == nil {
-		return nil
-	}
-	return getAuxvFn()
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2023 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.21
-
-package cpu
-
-import (
-	_ "unsafe" // for linkname
-)
-
-//go:linkname runtime_getAuxv runtime.getAuxv
-func runtime_getAuxv() []uintptr
-
-func init() {
-	getAuxvFn = runtime_getAuxv
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+++ /dev/null
@@ -1,26 +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.
-
-// Recreate a getsystemcfg syscall handler instead of
-// using the one provided by x/sys/unix to avoid having
-// the dependency between them. (See golang.org/issue/32102)
-// Moreover, this file will be used during the building of
-// gccgo's libgo and thus must not used a CGo method.
-
-//go:build aix && gccgo
-
-package cpu
-
-import (
-	"syscall"
-)
-
-//extern getsystemcfg
-func gccgoGetsystemcfg(label uint32) (r uint64)
-
-func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) {
-	r1 = uintptr(gccgoGetsystemcfg(uint32(label)))
-	e1 = syscall.GetErrno()
-	return
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
+++ /dev/null
@@ -1,35 +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.
-
-// Minimal copy of x/sys/unix so the cpu package can make a
-// system call on AIX without depending on x/sys/unix.
-// (See golang.org/issue/32102)
-
-//go:build aix && ppc64 && gc
-
-package cpu
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-//go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
-
-//go:linkname libc_getsystemcfg libc_getsystemcfg
-
-type syscallFunc uintptr
-
-var libc_getsystemcfg syscallFunc
-
-type errno = syscall.Errno
-
-// Implemented in runtime/syscall_aix.go.
-func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
-func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
-
-func callgetsystemcfg(label int) (r1 uintptr, e1 errno) {
-	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)
-	return
-}
Index: containerd-2.2.1_dea7da592/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/golang.org/x/sys/cpu/syscall_darwin_x86_gc.go
+++ /dev/null
@@ -1,98 +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.
-
-// 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
Index: containerd-2.2.1_dea7da592/vendor/modules.txt
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/modules.txt
+++ containerd-2.2.1_dea7da592/vendor/modules.txt
@@ -95,9 +95,9 @@ github.com/cilium/ebpf/internal/sysenc
 github.com/cilium/ebpf/internal/tracefs
 github.com/cilium/ebpf/internal/unix
 github.com/cilium/ebpf/link
-# github.com/containerd/btrfs/v2 v2.0.0
-## explicit; go 1.19
-github.com/containerd/btrfs/v2
+# github.com/containerd/btrfs v1.0.0
+## explicit; go 1.15
+github.com/containerd/btrfs
 # github.com/containerd/cgroups/v3 v3.1.2
 ## explicit; go 1.22.0
 github.com/containerd/cgroups/v3
@@ -696,7 +696,6 @@ golang.org/x/sync/errgroup
 golang.org/x/sync/semaphore
 # golang.org/x/sys v0.38.0
 ## explicit; go 1.24.0
-golang.org/x/sys/cpu
 golang.org/x/sys/plan9
 golang.org/x/sys/unix
 golang.org/x/sys/windows
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/.gitignore
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/.gitignore
@@ -0,0 +1,28 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+bin/
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
+
+# Support running go modules in vendor mode for local development
+/vendor/
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/LICENSE
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   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.
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/Makefile
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/Makefile
@@ -0,0 +1,34 @@
+#   Copyright The containerd 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.
+
+
+.PHONY: clean binaries generate lint vet test
+all: vet lint test binaries
+
+binaries: bin/btrfs-test
+
+vet:
+	go vet ./...
+
+lint:
+	golint ./...
+
+test:
+	go test -v ./...
+
+bin/%: ./cmd/% *.go
+	go build -o ./$@ ./$<
+
+clean:
+	rm -rf bin/*
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/doc.go
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/doc.go
@@ -0,0 +1,18 @@
+/*
+   Copyright The containerd 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 btrfs provides bindings for working with btrfs partitions from Go.
+package btrfs
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/info.go
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/info.go
@@ -0,0 +1,45 @@
+/*
+   Copyright The containerd 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 btrfs
+
+// Info describes metadata about a btrfs subvolume.
+type Info struct {
+	ID         uint64 // subvolume id
+	ParentID   uint64 // aka ref_tree
+	TopLevelID uint64 // not actually clear what this is, not set for now.
+	Offset     uint64 // key offset for root
+	DirID      uint64
+
+	Generation         uint64
+	OriginalGeneration uint64
+
+	UUID         string
+	ParentUUID   string
+	ReceivedUUID string
+
+	Name string
+	Path string // absolute path of subvolume
+	Root string // path of root mount point
+
+	Readonly bool // true if the snaps hot is readonly, extracted from flags
+}
+
+type infosByID []Info
+
+func (b infosByID) Len() int           { return len(b) }
+func (b infosByID) Less(i, j int) bool { return b[i].ID < b[j].ID }
+func (b infosByID) Swap(i, j int)      { b[i], b[j] = b[j], b[i] }
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/ioctl.go
===================================================================
--- /dev/null
+++ containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/ioctl.go
@@ -0,0 +1,27 @@
+/*
+   Copyright The containerd 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 btrfs
+
+import "syscall"
+
+func ioctl(fd, request, args uintptr) error {
+	_, _, errno := syscall.Syscall(syscall.SYS_IOCTL, fd, request, args)
+	if errno != 0 {
+		return errno
+	}
+	return nil
+}
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/.gitignore
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/.gitignore
+++ /dev/null
@@ -1,28 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-bin/
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
-
-# Support running go modules in vendor mode for local development
-/vendor/
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/LICENSE
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright {yyyy} {name of copyright owner}
-
-   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.
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/Makefile
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#   Copyright The containerd 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.
-
-
-.PHONY: clean binaries generate lint vet test
-all: vet lint test binaries
-
-binaries: bin/btrfs-test
-
-vet:
-	go vet ./...
-
-lint:
-	golint ./...
-
-test:
-	go test -v ./...
-
-bin/%: ./cmd/% *.go
-	go build -o ./$@ ./$<
-
-clean:
-	rm -rf bin/*
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/doc.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-   Copyright The containerd 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 btrfs provides bindings for working with btrfs partitions from Go.
-package btrfs
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/info.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/info.go
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-   Copyright The containerd 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 btrfs
-
-// Info describes metadata about a btrfs subvolume.
-type Info struct {
-	ID         uint64 // subvolume id
-	ParentID   uint64 // aka ref_tree
-	TopLevelID uint64 // not actually clear what this is, not set for now.
-	Offset     uint64 // key offset for root
-	DirID      uint64
-
-	Generation         uint64
-	OriginalGeneration uint64
-
-	UUID         string
-	ParentUUID   string
-	ReceivedUUID string
-
-	Name string
-	Path string // absolute path of subvolume
-	Root string // path of root mount point
-
-	Readonly bool // true if the snaps hot is readonly, extracted from flags
-}
-
-type infosByID []Info
-
-func (b infosByID) Len() int           { return len(b) }
-func (b infosByID) Less(i, j int) bool { return b[i].ID < b[j].ID }
-func (b infosByID) Swap(i, j int)      { b[i], b[j] = b[j], b[i] }
Index: containerd-2.2.1_dea7da592/vendor/github.com/containerd/btrfs/v2/ioctl.go
===================================================================
--- containerd-2.2.1_dea7da592.orig/vendor/github.com/containerd/btrfs/v2/ioctl.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-   Copyright The containerd 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 btrfs
-
-import "syscall"
-
-func ioctl(fd, request, args uintptr) error {
-	_, _, errno := syscall.Syscall(syscall.SYS_IOCTL, fd, request, args)
-	if errno != 0 {
-		return errno
-	}
-	return nil
-}
openSUSE Build Service is sponsored by