├── .cirrus.yml ├── .clang-format ├── .codespellrc ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ └── config.yml ├── dependabot.yml └── workflows │ ├── scheduled.yml │ ├── test.yml │ └── validate.yml ├── .gitignore ├── .golangci-extra.yml ├── .golangci.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Dockerfile ├── EMERITUS.md ├── LICENSE ├── MAINTAINERS ├── MAINTAINERS_GUIDE.md ├── Makefile ├── NOTICE ├── PRINCIPLES.md ├── README.md ├── RELEASES.md ├── SECURITY.md ├── VERSION ├── checkpoint.go ├── contrib ├── cmd │ └── memfd-bind │ │ ├── README.md │ │ ├── memfd-bind.go │ │ └── memfd-bind@.service └── completions │ └── bash │ └── runc ├── create.go ├── delete.go ├── docs ├── Security-Audit.pdf ├── cgroup-v2.md ├── checkpoint-restore.md ├── experimental.md ├── spec-conformance.md ├── systemd.md └── terminals.md ├── events.go ├── exec.go ├── features.go ├── go.mod ├── go.sum ├── init.go ├── internal └── linux │ ├── eintr.go │ └── linux.go ├── kill.go ├── libcontainer ├── README.md ├── SPEC.md ├── apparmor │ ├── apparmor.go │ ├── apparmor_linux.go │ └── apparmor_unsupported.go ├── capabilities │ ├── capabilities.go │ ├── capabilities_linux_test.go │ └── capabilities_unsupported.go ├── configs │ ├── cgroup_deprecated.go │ ├── config.go │ ├── config_linux.go │ ├── config_linux_test.go │ ├── config_test.go │ ├── configs_fuzzer.go │ ├── intelrdt.go │ ├── mount.go │ ├── mount_linux.go │ ├── mount_unsupported.go │ ├── namespaces.go │ ├── namespaces_linux.go │ ├── namespaces_syscall.go │ ├── namespaces_syscall_unsupported.go │ ├── namespaces_unsupported.go │ ├── network.go │ ├── tocpuset_test.go │ └── validate │ │ ├── rootless.go │ │ ├── rootless_test.go │ │ ├── validator.go │ │ └── validator_test.go ├── console_linux.go ├── container.go ├── container_linux.go ├── container_linux_test.go ├── criu_disabled_linux.go ├── criu_linux.go ├── criu_opts_linux.go ├── devices │ ├── device_deprecated.go │ ├── device_unix.go │ └── device_unix_test.go ├── env.go ├── env_test.go ├── error.go ├── exeseal │ ├── cloned_binary_linux.go │ └── overlayfs_linux.go ├── factory_linux.go ├── factory_linux_test.go ├── init_linux.go ├── integration │ ├── bench_test.go │ ├── checkpoint_test.go │ ├── doc.go │ ├── exec_test.go │ ├── execin_test.go │ ├── init_test.go │ ├── seccomp_test.go │ ├── template_test.go │ ├── update_test.go │ └── utils_test.go ├── intelrdt │ ├── cmt.go │ ├── cmt_test.go │ ├── intelrdt.go │ ├── intelrdt_test.go │ ├── mbm.go │ ├── mbm_test.go │ ├── monitoring.go │ ├── monitoring_test.go │ ├── stats.go │ └── util_test.go ├── internal │ └── userns │ │ ├── userns_maps_linux.c │ │ ├── userns_maps_linux.go │ │ ├── usernsfd_linux.go │ │ └── usernsfd_linux_test.go ├── keys │ └── keyctl.go ├── logs │ ├── logs.go │ └── logs_linux_test.go ├── message_linux.go ├── mount_linux.go ├── mount_linux_test.go ├── network_linux.go ├── notify_linux.go ├── notify_linux_test.go ├── notify_v2_linux.go ├── nsenter │ ├── README.md │ ├── escape.c │ ├── getenv.c │ ├── getenv.h │ ├── log.c │ ├── log.h │ ├── namespace.h │ ├── nsenter.go │ ├── nsenter_gccgo.go │ ├── nsenter_test.go │ ├── nsexec.c │ └── test │ │ ├── escape.c │ │ ├── escape.go │ │ └── escape_test.go ├── process.go ├── process_linux.go ├── restored_process.go ├── rootfs_linux.go ├── rootfs_linux_test.go ├── seccomp │ ├── config.go │ ├── patchbpf │ │ ├── enosys_linux.go │ │ ├── enosys_linux_test.go │ │ └── enosys_unsupported.go │ ├── seccomp_linux.go │ └── seccomp_unsupported.go ├── setns_init_linux.go ├── specconv │ ├── example.go │ ├── spec_linux.go │ └── spec_linux_test.go ├── standard_init_linux.go ├── state_linux.go ├── state_linux_test.go ├── stats_linux.go ├── sync.go ├── sync_unix.go ├── system │ ├── kernelversion │ │ ├── kernel_linux.go │ │ └── kernel_linux_test.go │ ├── linux.go │ ├── proc.go │ ├── proc_test.go │ └── rlimit_linux.go ├── user │ ├── lookup_deprecated.go │ └── user_deprecated.go ├── userns │ └── userns_deprecated.go └── utils │ ├── cmsg.go │ ├── utils.go │ ├── utils_test.go │ └── utils_unix.go ├── list.go ├── main.go ├── man ├── README.md ├── md2man-all.sh ├── runc-checkpoint.8.md ├── runc-create.8.md ├── runc-delete.8.md ├── runc-events.8.md ├── runc-exec.8.md ├── runc-kill.8.md ├── runc-list.8.md ├── runc-pause.8.md ├── runc-ps.8.md ├── runc-restore.8.md ├── runc-resume.8.md ├── runc-run.8.md ├── runc-spec.8.md ├── runc-start.8.md ├── runc-state.8.md ├── runc-update.8.md └── runc.8.md ├── notify_socket.go ├── notify_socket_test.go ├── pause.go ├── ps.go ├── restore.go ├── rlimit_linux.go ├── rootless_linux.go ├── run.go ├── runc.keyring ├── script ├── check-config.sh ├── keyring_addkey.sh ├── keyring_validate.sh ├── lib.sh ├── prepare-cgroup-v2.sh ├── release_build.sh ├── release_sign.sh ├── seccomp.sh ├── setup_host_fedora.sh └── setup_rootless.sh ├── signals.go ├── spec.go ├── start.go ├── state.go ├── tests ├── cmd │ ├── README.md │ ├── fs-idmap │ │ └── fs-idmap.go │ ├── key_label │ │ └── key_label.go │ ├── pidfd-kill │ │ └── pidfd-kill.go │ ├── recvtty │ │ └── recvtty.go │ ├── remap-rootfs │ │ └── remap-rootfs.go │ ├── sd-helper │ │ └── helper.go │ └── seccompagent │ │ ├── README.md │ │ ├── gen-seccomp-example-cfg.sh │ │ ├── seccompagent.go │ │ └── unsupported.go ├── fuzzing │ └── oss_fuzz_build.sh ├── integration │ ├── README.md │ ├── bootstrap-get-images.sh │ ├── capabilities.bats │ ├── cgroup_delegation.bats │ ├── cgroups.bats │ ├── checkpoint.bats │ ├── cpu_affinity.bats │ ├── create.bats │ ├── cwd.bats │ ├── debug.bats │ ├── delete.bats │ ├── dev.bats │ ├── env.bats │ ├── events.bats │ ├── exec.bats │ ├── get-images.sh │ ├── help.bats │ ├── helpers.bash │ ├── hooks.bats │ ├── hooks_so.bats │ ├── host-mntns.bats │ ├── idmap.bats │ ├── ioprio.bats │ ├── kill.bats │ ├── list.bats │ ├── mask.bats │ ├── mounts.bats │ ├── mounts_propagation.bats │ ├── mounts_recursive.bats │ ├── mounts_sshfs.bats │ ├── no_pivot.bats │ ├── pause.bats │ ├── personality.bats │ ├── pidfd-socket.bats │ ├── ps.bats │ ├── rlimits.bats │ ├── root.bats │ ├── run.bats │ ├── scheduler.bats │ ├── seccomp-notify-compat.bats │ ├── seccomp-notify.bats │ ├── seccomp.bats │ ├── selinux.bats │ ├── spec.bats │ ├── start.bats │ ├── start_detached.bats │ ├── start_hello.bats │ ├── state.bats │ ├── testdata │ │ ├── .gitignore │ │ ├── dev_access_test.c │ │ ├── seccomp_syscall_test1.c │ │ ├── seccomp_syscall_test1.json │ │ ├── seccomp_syscall_test2.c │ │ └── seccomp_syscall_test2.json │ ├── timens.bats │ ├── tty.bats │ ├── umask.bats │ ├── update.bats │ ├── userns.bats │ └── version.bats └── rootless.sh ├── tty.go ├── types ├── events.go └── features │ └── features.go ├── update.go ├── utils.go ├── utils_linux.go └── vendor ├── github.com ├── checkpoint-restore │ └── go-criu │ │ └── v7 │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── Makefile │ │ ├── README.md │ │ ├── codecov.yml │ │ ├── features.go │ │ ├── main.go │ │ ├── notify.go │ │ └── rpc │ │ ├── rpc.pb.go │ │ └── rpc.proto ├── cilium │ └── ebpf │ │ ├── .clang-format │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .golangci.yaml │ │ ├── .vimto.toml │ │ ├── CODEOWNERS │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS.md │ │ ├── Makefile │ │ ├── README.md │ │ ├── asm │ │ ├── alu.go │ │ ├── alu_string.go │ │ ├── doc.go │ │ ├── func.go │ │ ├── func_string.go │ │ ├── instruction.go │ │ ├── jump.go │ │ ├── jump_string.go │ │ ├── load_store.go │ │ ├── load_store_string.go │ │ ├── metadata.go │ │ ├── opcode.go │ │ ├── opcode_string.go │ │ └── register.go │ │ ├── attachtype_string.go │ │ ├── btf │ │ ├── btf.go │ │ ├── btf_types.go │ │ ├── btf_types_string.go │ │ ├── core.go │ │ ├── doc.go │ │ ├── ext_info.go │ │ ├── feature.go │ │ ├── format.go │ │ ├── handle.go │ │ ├── kernel.go │ │ ├── marshal.go │ │ ├── strings.go │ │ ├── traversal.go │ │ ├── types.go │ │ └── workarounds.go │ │ ├── collection.go │ │ ├── cpu.go │ │ ├── doc.go │ │ ├── elf_reader.go │ │ ├── elf_sections.go │ │ ├── info.go │ │ ├── internal │ │ ├── buffer.go │ │ ├── deque.go │ │ ├── elf.go │ │ ├── endian_be.go │ │ ├── endian_le.go │ │ ├── errors.go │ │ ├── feature.go │ │ ├── goos.go │ │ ├── io.go │ │ ├── kallsyms │ │ │ ├── cache.go │ │ │ ├── kallsyms.go │ │ │ └── reader.go │ │ ├── kconfig │ │ │ └── kconfig.go │ │ ├── linux │ │ │ ├── auxv.go │ │ │ ├── doc.go │ │ │ ├── kconfig.go │ │ │ ├── platform.go │ │ │ ├── statfs.go │ │ │ ├── vdso.go │ │ │ └── version.go │ │ ├── math.go │ │ ├── output.go │ │ ├── prog.go │ │ ├── sys │ │ │ ├── doc.go │ │ │ ├── fd.go │ │ │ ├── pinning.go │ │ │ ├── ptr.go │ │ │ ├── ptr_32_be.go │ │ │ ├── ptr_32_le.go │ │ │ ├── ptr_64.go │ │ │ ├── signals.go │ │ │ ├── syscall.go │ │ │ └── types.go │ │ ├── sysenc │ │ │ ├── buffer.go │ │ │ ├── doc.go │ │ │ ├── layout.go │ │ │ └── marshal.go │ │ ├── testutils │ │ │ └── fdtrace │ │ │ │ ├── fd_trace.go │ │ │ │ └── main.go │ │ ├── tracefs │ │ │ ├── kprobe.go │ │ │ ├── probetype_string.go │ │ │ └── uprobe.go │ │ ├── unix │ │ │ ├── doc.go │ │ │ ├── errno_linux.go │ │ │ ├── errno_other.go │ │ │ ├── errno_string_windows.go │ │ │ ├── errno_windows.go │ │ │ ├── error.go │ │ │ ├── strings_other.go │ │ │ ├── strings_windows.go │ │ │ ├── types_linux.go │ │ │ └── types_other.go │ │ └── version.go │ │ ├── link │ │ ├── anchor.go │ │ ├── cgroup.go │ │ ├── doc.go │ │ ├── iter.go │ │ ├── kprobe.go │ │ ├── kprobe_multi.go │ │ ├── link.go │ │ ├── netfilter.go │ │ ├── netkit.go │ │ ├── netns.go │ │ ├── perf_event.go │ │ ├── program.go │ │ ├── query.go │ │ ├── raw_tracepoint.go │ │ ├── socket_filter.go │ │ ├── syscalls.go │ │ ├── tcx.go │ │ ├── tracepoint.go │ │ ├── tracing.go │ │ ├── uprobe.go │ │ ├── uprobe_multi.go │ │ └── xdp.go │ │ ├── linker.go │ │ ├── map.go │ │ ├── marshalers.go │ │ ├── memory.go │ │ ├── netlify.toml │ │ ├── prog.go │ │ ├── syscalls.go │ │ ├── types.go │ │ ├── types_string.go │ │ └── variable.go ├── containerd │ └── console │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── console.go │ │ ├── console_linux.go │ │ ├── console_other.go │ │ ├── console_unix.go │ │ ├── console_windows.go │ │ ├── pty_freebsd_cgo.go │ │ ├── pty_freebsd_nocgo.go │ │ ├── pty_unix.go │ │ ├── pty_zos.go │ │ ├── tc_darwin.go │ │ ├── tc_freebsd_cgo.go │ │ ├── tc_freebsd_nocgo.go │ │ ├── tc_linux.go │ │ ├── tc_netbsd.go │ │ ├── tc_openbsd_cgo.go │ │ ├── tc_openbsd_nocgo.go │ │ ├── tc_unix.go │ │ └── tc_zos.go ├── coreos │ └── go-systemd │ │ └── v22 │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── activation │ │ ├── files_unix.go │ │ ├── files_windows.go │ │ ├── listeners.go │ │ └── packetconns.go │ │ └── dbus │ │ ├── dbus.go │ │ ├── methods.go │ │ ├── properties.go │ │ ├── set.go │ │ ├── subscription.go │ │ └── subscription_set.go ├── cpuguy83 │ └── go-md2man │ │ └── v2 │ │ ├── LICENSE.md │ │ └── md2man │ │ ├── debug.go │ │ ├── md2man.go │ │ └── roff.go ├── cyphar │ └── filepath-securejoin │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── VERSION │ │ ├── doc.go │ │ ├── gocompat_errors_go120.go │ │ ├── gocompat_errors_unsupported.go │ │ ├── gocompat_generics_go121.go │ │ ├── gocompat_generics_unsupported.go │ │ ├── join.go │ │ ├── lookup_linux.go │ │ ├── mkdir_linux.go │ │ ├── open_linux.go │ │ ├── openat2_linux.go │ │ ├── openat_linux.go │ │ ├── procfs_linux.go │ │ └── vfs.go ├── docker │ └── go-units │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── circle.yml │ │ ├── duration.go │ │ ├── size.go │ │ └── ulimit.go ├── godbus │ └── dbus │ │ └── v5 │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── auth.go │ │ ├── auth_anonymous.go │ │ ├── auth_external.go │ │ ├── auth_sha1.go │ │ ├── call.go │ │ ├── conn.go │ │ ├── conn_darwin.go │ │ ├── conn_other.go │ │ ├── conn_unix.go │ │ ├── conn_windows.go │ │ ├── dbus.go │ │ ├── decoder.go │ │ ├── default_handler.go │ │ ├── doc.go │ │ ├── encoder.go │ │ ├── escape.go │ │ ├── export.go │ │ ├── homedir.go │ │ ├── match.go │ │ ├── message.go │ │ ├── object.go │ │ ├── sequence.go │ │ ├── sequential_handler.go │ │ ├── server_interfaces.go │ │ ├── sig.go │ │ ├── transport_darwin.go │ │ ├── transport_generic.go │ │ ├── transport_nonce_tcp.go │ │ ├── transport_tcp.go │ │ ├── transport_unix.go │ │ ├── transport_unixcred_dragonfly.go │ │ ├── transport_unixcred_freebsd.go │ │ ├── transport_unixcred_linux.go │ │ ├── transport_unixcred_netbsd.go │ │ ├── transport_unixcred_openbsd.go │ │ ├── transport_zos.go │ │ ├── variant.go │ │ ├── variant_lexer.go │ │ └── variant_parser.go ├── moby │ └── sys │ │ ├── capability │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── capability.go │ │ ├── capability_linux.go │ │ ├── capability_noop.go │ │ ├── enum.go │ │ ├── enum_gen.go │ │ └── syscall_linux.go │ │ ├── mountinfo │ │ ├── LICENSE │ │ ├── doc.go │ │ ├── mounted_linux.go │ │ ├── mounted_unix.go │ │ ├── mountinfo.go │ │ ├── mountinfo_bsd.go │ │ ├── mountinfo_filters.go │ │ ├── mountinfo_freebsdlike.go │ │ ├── mountinfo_linux.go │ │ ├── mountinfo_openbsd.go │ │ ├── mountinfo_unsupported.go │ │ └── mountinfo_windows.go │ │ ├── user │ │ ├── LICENSE │ │ ├── idtools.go │ │ ├── idtools_unix.go │ │ ├── idtools_windows.go │ │ ├── lookup_unix.go │ │ ├── user.go │ │ └── user_fuzzer.go │ │ └── userns │ │ ├── LICENSE │ │ ├── userns.go │ │ ├── userns_linux.go │ │ ├── userns_linux_fuzzer.go │ │ └── userns_unsupported.go ├── mrunalp │ └── fileutils │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── fileutils.go │ │ └── idtools.go ├── opencontainers │ ├── cgroups │ │ ├── CODEOWNERS │ │ ├── CONTRIBUTING.md │ │ ├── GOVERNANCE.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── MAINTAINERS_GUIDE.md │ │ ├── README.md │ │ ├── RELEASES.md │ │ ├── cgroups.go │ │ ├── config_blkio_device.go │ │ ├── config_hugepages.go │ │ ├── config_ifprio_map.go │ │ ├── config_linux.go │ │ ├── config_rdma.go │ │ ├── config_unsupported.go │ │ ├── devices │ │ │ ├── config │ │ │ │ ├── device.go │ │ │ │ └── mknod_unix.go │ │ │ ├── devicefilter.go │ │ │ ├── devices.go │ │ │ ├── devices_emulator.go │ │ │ ├── ebpf_linux.go │ │ │ ├── systemd.go │ │ │ ├── v1.go │ │ │ └── v2.go │ │ ├── file.go │ │ ├── fs │ │ │ ├── blkio.go │ │ │ ├── cpu.go │ │ │ ├── cpuacct.go │ │ │ ├── cpuset.go │ │ │ ├── devices.go │ │ │ ├── error.go │ │ │ ├── freezer.go │ │ │ ├── fs.go │ │ │ ├── hugetlb.go │ │ │ ├── memory.go │ │ │ ├── name.go │ │ │ ├── net_cls.go │ │ │ ├── net_prio.go │ │ │ ├── paths.go │ │ │ ├── perf_event.go │ │ │ ├── pids.go │ │ │ └── rdma.go │ │ ├── fs2 │ │ │ ├── cpu.go │ │ │ ├── cpuset.go │ │ │ ├── create.go │ │ │ ├── defaultpath.go │ │ │ ├── freezer.go │ │ │ ├── fs2.go │ │ │ ├── hugetlb.go │ │ │ ├── io.go │ │ │ ├── memory.go │ │ │ ├── misc.go │ │ │ ├── pids.go │ │ │ └── psi.go │ │ ├── fscommon │ │ │ ├── rdma.go │ │ │ └── utils.go │ │ ├── getallpids.go │ │ ├── internal │ │ │ └── path │ │ │ │ └── path.go │ │ ├── manager │ │ │ └── new.go │ │ ├── stats.go │ │ ├── systemd │ │ │ ├── common.go │ │ │ ├── cpuset.go │ │ │ ├── dbus.go │ │ │ ├── devices.go │ │ │ ├── user.go │ │ │ ├── v1.go │ │ │ └── v2.go │ │ ├── utils.go │ │ └── v1_utils.go │ ├── runtime-spec │ │ ├── LICENSE │ │ └── specs-go │ │ │ ├── config.go │ │ │ ├── features │ │ │ └── features.go │ │ │ ├── state.go │ │ │ └── version.go │ └── selinux │ │ ├── LICENSE │ │ ├── go-selinux │ │ ├── doc.go │ │ ├── label │ │ │ ├── label.go │ │ │ ├── label_linux.go │ │ │ └── label_stub.go │ │ ├── selinux.go │ │ ├── selinux_linux.go │ │ ├── selinux_stub.go │ │ └── xattrs_linux.go │ │ └── pkg │ │ └── pwalkdir │ │ ├── README.md │ │ └── pwalkdir.go ├── russross │ └── blackfriday │ │ └── v2 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── block.go │ │ ├── doc.go │ │ ├── entities.go │ │ ├── esc.go │ │ ├── html.go │ │ ├── inline.go │ │ ├── markdown.go │ │ ├── node.go │ │ └── smartypants.go ├── seccomp │ └── libseccomp-golang │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── CHANGELOG │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── seccomp.go │ │ └── seccomp_internal.go ├── sirupsen │ └── logrus │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── alt_exit.go │ │ ├── appveyor.yml │ │ ├── buffer_pool.go │ │ ├── doc.go │ │ ├── entry.go │ │ ├── exported.go │ │ ├── formatter.go │ │ ├── hooks.go │ │ ├── hooks │ │ └── test │ │ │ └── test.go │ │ ├── json_formatter.go │ │ ├── logger.go │ │ ├── logrus.go │ │ ├── terminal_check_appengine.go │ │ ├── terminal_check_bsd.go │ │ ├── terminal_check_js.go │ │ ├── terminal_check_no_terminal.go │ │ ├── terminal_check_notappengine.go │ │ ├── terminal_check_solaris.go │ │ ├── terminal_check_unix.go │ │ ├── terminal_check_windows.go │ │ ├── text_formatter.go │ │ └── writer.go ├── urfave │ └── cli │ │ ├── .flake8 │ │ ├── .gitignore │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── app.go │ │ ├── category.go │ │ ├── cli.go │ │ ├── command.go │ │ ├── context.go │ │ ├── docs.go │ │ ├── errors.go │ │ ├── fish.go │ │ ├── flag.go │ │ ├── flag_bool.go │ │ ├── flag_bool_t.go │ │ ├── flag_duration.go │ │ ├── flag_float64.go │ │ ├── flag_generic.go │ │ ├── flag_int.go │ │ ├── flag_int64.go │ │ ├── flag_int64_slice.go │ │ ├── flag_int_slice.go │ │ ├── flag_string.go │ │ ├── flag_string_slice.go │ │ ├── flag_uint.go │ │ ├── flag_uint64.go │ │ ├── funcs.go │ │ ├── help.go │ │ ├── parse.go │ │ ├── sort.go │ │ └── template.go └── vishvananda │ ├── netlink │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── addr.go │ ├── addr_linux.go │ ├── bpf_linux.go │ ├── bridge_linux.go │ ├── chain.go │ ├── chain_linux.go │ ├── class.go │ ├── class_linux.go │ ├── conntrack_linux.go │ ├── conntrack_unspecified.go │ ├── devlink_linux.go │ ├── filter.go │ ├── filter_linux.go │ ├── fou.go │ ├── fou_linux.go │ ├── fou_unspecified.go │ ├── genetlink_linux.go │ ├── genetlink_unspecified.go │ ├── gtp_linux.go │ ├── handle_linux.go │ ├── handle_unspecified.go │ ├── inet_diag.go │ ├── ioctl_linux.go │ ├── ipset_linux.go │ ├── link.go │ ├── link_linux.go │ ├── link_tuntap_linux.go │ ├── neigh.go │ ├── neigh_linux.go │ ├── netlink.go │ ├── netlink_linux.go │ ├── netlink_unspecified.go │ ├── netns_linux.go │ ├── netns_unspecified.go │ ├── nl │ │ ├── addr_linux.go │ │ ├── bridge_linux.go │ │ ├── conntrack_linux.go │ │ ├── devlink_linux.go │ │ ├── genetlink_linux.go │ │ ├── ip6tnl_linux.go │ │ ├── ipset_linux.go │ │ ├── link_linux.go │ │ ├── lwt_linux.go │ │ ├── mpls_linux.go │ │ ├── nl_linux.go │ │ ├── nl_unspecified.go │ │ ├── parse_attr_linux.go │ │ ├── rdma_link_linux.go │ │ ├── route_linux.go │ │ ├── seg6_linux.go │ │ ├── seg6local_linux.go │ │ ├── syscall.go │ │ ├── tc_linux.go │ │ ├── vdpa_linux.go │ │ ├── xfrm_linux.go │ │ ├── xfrm_monitor_linux.go │ │ ├── xfrm_policy_linux.go │ │ └── xfrm_state_linux.go │ ├── order.go │ ├── proc_event_linux.go │ ├── protinfo.go │ ├── protinfo_linux.go │ ├── qdisc.go │ ├── qdisc_linux.go │ ├── rdma_link_linux.go │ ├── route.go │ ├── route_linux.go │ ├── route_unspecified.go │ ├── rule.go │ ├── rule_linux.go │ ├── rule_nonlinux.go │ ├── socket.go │ ├── socket_linux.go │ ├── socket_xdp_linux.go │ ├── tcp.go │ ├── tcp_linux.go │ ├── unix_diag.go │ ├── vdpa_linux.go │ ├── virtio.go │ ├── xdp_diag.go │ ├── xdp_linux.go │ ├── xfrm_linux.go │ ├── xfrm_monitor_linux.go │ ├── xfrm_policy_linux.go │ ├── xfrm_state_linux.go │ └── xfrm_unspecified.go │ └── netns │ ├── .golangci.yml │ ├── .yamllint.yml │ ├── LICENSE │ ├── README.md │ ├── doc.go │ ├── netns_linux.go │ ├── netns_others.go │ ├── nshandle_linux.go │ └── nshandle_others.go ├── golang.org └── x │ ├── net │ ├── LICENSE │ ├── PATENTS │ └── bpf │ │ ├── asm.go │ │ ├── constants.go │ │ ├── doc.go │ │ ├── instructions.go │ │ ├── setter.go │ │ ├── vm.go │ │ └── vm_instructions.go │ └── sys │ ├── LICENSE │ ├── PATENTS │ ├── unix │ ├── .gitignore │ ├── README.md │ ├── affinity_linux.go │ ├── aliases.go │ ├── asm_aix_ppc64.s │ ├── asm_bsd_386.s │ ├── asm_bsd_amd64.s │ ├── asm_bsd_arm.s │ ├── asm_bsd_arm64.s │ ├── asm_bsd_ppc64.s │ ├── asm_bsd_riscv64.s │ ├── asm_linux_386.s │ ├── asm_linux_amd64.s │ ├── asm_linux_arm.s │ ├── asm_linux_arm64.s │ ├── asm_linux_loong64.s │ ├── asm_linux_mips64x.s │ ├── asm_linux_mipsx.s │ ├── asm_linux_ppc64x.s │ ├── asm_linux_riscv64.s │ ├── asm_linux_s390x.s │ ├── asm_openbsd_mips64.s │ ├── asm_solaris_amd64.s │ ├── asm_zos_s390x.s │ ├── auxv.go │ ├── auxv_unsupported.go │ ├── bluetooth_linux.go │ ├── bpxsvc_zos.go │ ├── bpxsvc_zos.s │ ├── cap_freebsd.go │ ├── constants.go │ ├── dev_aix_ppc.go │ ├── dev_aix_ppc64.go │ ├── dev_darwin.go │ ├── dev_dragonfly.go │ ├── dev_freebsd.go │ ├── dev_linux.go │ ├── dev_netbsd.go │ ├── dev_openbsd.go │ ├── dev_zos.go │ ├── dirent.go │ ├── endian_big.go │ ├── endian_little.go │ ├── env_unix.go │ ├── fcntl.go │ ├── fcntl_darwin.go │ ├── fcntl_linux_32bit.go │ ├── fdset.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── ifreq_linux.go │ ├── ioctl_linux.go │ ├── ioctl_signed.go │ ├── ioctl_unsigned.go │ ├── ioctl_zos.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── mmap_nomremap.go │ ├── mremap.go │ ├── pagesize_unix.go │ ├── pledge_openbsd.go │ ├── ptrace_darwin.go │ ├── ptrace_ios.go │ ├── race.go │ ├── race0.go │ ├── readdirent_getdents.go │ ├── readdirent_getdirentries.go │ ├── sockcmsg_dragonfly.go │ ├── sockcmsg_linux.go │ ├── sockcmsg_unix.go │ ├── sockcmsg_unix_other.go │ ├── sockcmsg_zos.go │ ├── symaddr_zos_s390x.s │ ├── syscall.go │ ├── syscall_aix.go │ ├── syscall_aix_ppc.go │ ├── syscall_aix_ppc64.go │ ├── syscall_bsd.go │ ├── syscall_darwin.go │ ├── syscall_darwin_amd64.go │ ├── syscall_darwin_arm64.go │ ├── syscall_darwin_libSystem.go │ ├── syscall_dragonfly.go │ ├── syscall_dragonfly_amd64.go │ ├── syscall_freebsd.go │ ├── syscall_freebsd_386.go │ ├── syscall_freebsd_amd64.go │ ├── syscall_freebsd_arm.go │ ├── syscall_freebsd_arm64.go │ ├── syscall_freebsd_riscv64.go │ ├── syscall_hurd.go │ ├── syscall_hurd_386.go │ ├── syscall_illumos.go │ ├── syscall_linux.go │ ├── syscall_linux_386.go │ ├── syscall_linux_alarm.go │ ├── syscall_linux_amd64.go │ ├── syscall_linux_amd64_gc.go │ ├── syscall_linux_arm.go │ ├── syscall_linux_arm64.go │ ├── syscall_linux_gc.go │ ├── syscall_linux_gc_386.go │ ├── syscall_linux_gc_arm.go │ ├── syscall_linux_gccgo_386.go │ ├── syscall_linux_gccgo_arm.go │ ├── syscall_linux_loong64.go │ ├── syscall_linux_mips64x.go │ ├── syscall_linux_mipsx.go │ ├── syscall_linux_ppc.go │ ├── syscall_linux_ppc64x.go │ ├── syscall_linux_riscv64.go │ ├── syscall_linux_s390x.go │ ├── syscall_linux_sparc64.go │ ├── syscall_netbsd.go │ ├── syscall_netbsd_386.go │ ├── syscall_netbsd_amd64.go │ ├── syscall_netbsd_arm.go │ ├── syscall_netbsd_arm64.go │ ├── syscall_openbsd.go │ ├── syscall_openbsd_386.go │ ├── syscall_openbsd_amd64.go │ ├── syscall_openbsd_arm.go │ ├── syscall_openbsd_arm64.go │ ├── syscall_openbsd_libc.go │ ├── syscall_openbsd_mips64.go │ ├── syscall_openbsd_ppc64.go │ ├── syscall_openbsd_riscv64.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── syscall_unix_gc_ppc64x.go │ ├── syscall_zos_s390x.go │ ├── sysvshm_linux.go │ ├── sysvshm_unix.go │ ├── sysvshm_unix_other.go │ ├── timestruct.go │ ├── unveil_openbsd.go │ ├── vgetrandom_linux.go │ ├── vgetrandom_unsupported.go │ ├── xattr_bsd.go │ ├── zerrors_aix_ppc.go │ ├── zerrors_aix_ppc64.go │ ├── zerrors_darwin_amd64.go │ ├── zerrors_darwin_arm64.go │ ├── zerrors_dragonfly_amd64.go │ ├── zerrors_freebsd_386.go │ ├── zerrors_freebsd_amd64.go │ ├── zerrors_freebsd_arm.go │ ├── zerrors_freebsd_arm64.go │ ├── zerrors_freebsd_riscv64.go │ ├── zerrors_linux.go │ ├── zerrors_linux_386.go │ ├── zerrors_linux_amd64.go │ ├── zerrors_linux_arm.go │ ├── zerrors_linux_arm64.go │ ├── zerrors_linux_loong64.go │ ├── zerrors_linux_mips.go │ ├── zerrors_linux_mips64.go │ ├── zerrors_linux_mips64le.go │ ├── zerrors_linux_mipsle.go │ ├── zerrors_linux_ppc.go │ ├── zerrors_linux_ppc64.go │ ├── zerrors_linux_ppc64le.go │ ├── zerrors_linux_riscv64.go │ ├── zerrors_linux_s390x.go │ ├── zerrors_linux_sparc64.go │ ├── zerrors_netbsd_386.go │ ├── zerrors_netbsd_amd64.go │ ├── zerrors_netbsd_arm.go │ ├── zerrors_netbsd_arm64.go │ ├── zerrors_openbsd_386.go │ ├── zerrors_openbsd_amd64.go │ ├── zerrors_openbsd_arm.go │ ├── zerrors_openbsd_arm64.go │ ├── zerrors_openbsd_mips64.go │ ├── zerrors_openbsd_ppc64.go │ ├── zerrors_openbsd_riscv64.go │ ├── zerrors_solaris_amd64.go │ ├── zerrors_zos_s390x.go │ ├── zptrace_armnn_linux.go │ ├── zptrace_linux_arm64.go │ ├── zptrace_mipsnn_linux.go │ ├── zptrace_mipsnnle_linux.go │ ├── zptrace_x86_linux.go │ ├── zsymaddr_zos_s390x.s │ ├── zsyscall_aix_ppc.go │ ├── zsyscall_aix_ppc64.go │ ├── zsyscall_aix_ppc64_gc.go │ ├── zsyscall_aix_ppc64_gccgo.go │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_amd64.s │ ├── zsyscall_darwin_arm64.go │ ├── zsyscall_darwin_arm64.s │ ├── zsyscall_dragonfly_amd64.go │ ├── zsyscall_freebsd_386.go │ ├── zsyscall_freebsd_amd64.go │ ├── zsyscall_freebsd_arm.go │ ├── zsyscall_freebsd_arm64.go │ ├── zsyscall_freebsd_riscv64.go │ ├── zsyscall_illumos_amd64.go │ ├── zsyscall_linux.go │ ├── zsyscall_linux_386.go │ ├── zsyscall_linux_amd64.go │ ├── zsyscall_linux_arm.go │ ├── zsyscall_linux_arm64.go │ ├── zsyscall_linux_loong64.go │ ├── zsyscall_linux_mips.go │ ├── zsyscall_linux_mips64.go │ ├── zsyscall_linux_mips64le.go │ ├── zsyscall_linux_mipsle.go │ ├── zsyscall_linux_ppc.go │ ├── zsyscall_linux_ppc64.go │ ├── zsyscall_linux_ppc64le.go │ ├── zsyscall_linux_riscv64.go │ ├── zsyscall_linux_s390x.go │ ├── zsyscall_linux_sparc64.go │ ├── zsyscall_netbsd_386.go │ ├── zsyscall_netbsd_amd64.go │ ├── zsyscall_netbsd_arm.go │ ├── zsyscall_netbsd_arm64.go │ ├── zsyscall_openbsd_386.go │ ├── zsyscall_openbsd_386.s │ ├── zsyscall_openbsd_amd64.go │ ├── zsyscall_openbsd_amd64.s │ ├── zsyscall_openbsd_arm.go │ ├── zsyscall_openbsd_arm.s │ ├── zsyscall_openbsd_arm64.go │ ├── zsyscall_openbsd_arm64.s │ ├── zsyscall_openbsd_mips64.go │ ├── zsyscall_openbsd_mips64.s │ ├── zsyscall_openbsd_ppc64.go │ ├── zsyscall_openbsd_ppc64.s │ ├── zsyscall_openbsd_riscv64.go │ ├── zsyscall_openbsd_riscv64.s │ ├── zsyscall_solaris_amd64.go │ ├── zsyscall_zos_s390x.go │ ├── zsysctl_openbsd_386.go │ ├── zsysctl_openbsd_amd64.go │ ├── zsysctl_openbsd_arm.go │ ├── zsysctl_openbsd_arm64.go │ ├── zsysctl_openbsd_mips64.go │ ├── zsysctl_openbsd_ppc64.go │ ├── zsysctl_openbsd_riscv64.go │ ├── zsysnum_darwin_amd64.go │ ├── zsysnum_darwin_arm64.go │ ├── zsysnum_dragonfly_amd64.go │ ├── zsysnum_freebsd_386.go │ ├── zsysnum_freebsd_amd64.go │ ├── zsysnum_freebsd_arm.go │ ├── zsysnum_freebsd_arm64.go │ ├── zsysnum_freebsd_riscv64.go │ ├── zsysnum_linux_386.go │ ├── zsysnum_linux_amd64.go │ ├── zsysnum_linux_arm.go │ ├── zsysnum_linux_arm64.go │ ├── zsysnum_linux_loong64.go │ ├── zsysnum_linux_mips.go │ ├── zsysnum_linux_mips64.go │ ├── zsysnum_linux_mips64le.go │ ├── zsysnum_linux_mipsle.go │ ├── zsysnum_linux_ppc.go │ ├── zsysnum_linux_ppc64.go │ ├── zsysnum_linux_ppc64le.go │ ├── zsysnum_linux_riscv64.go │ ├── zsysnum_linux_s390x.go │ ├── zsysnum_linux_sparc64.go │ ├── zsysnum_netbsd_386.go │ ├── zsysnum_netbsd_amd64.go │ ├── zsysnum_netbsd_arm.go │ ├── zsysnum_netbsd_arm64.go │ ├── zsysnum_openbsd_386.go │ ├── zsysnum_openbsd_amd64.go │ ├── zsysnum_openbsd_arm.go │ ├── zsysnum_openbsd_arm64.go │ ├── zsysnum_openbsd_mips64.go │ ├── zsysnum_openbsd_ppc64.go │ ├── zsysnum_openbsd_riscv64.go │ ├── zsysnum_zos_s390x.go │ ├── ztypes_aix_ppc.go │ ├── ztypes_aix_ppc64.go │ ├── ztypes_darwin_amd64.go │ ├── ztypes_darwin_arm64.go │ ├── ztypes_dragonfly_amd64.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ ├── ztypes_freebsd_arm.go │ ├── ztypes_freebsd_arm64.go │ ├── ztypes_freebsd_riscv64.go │ ├── ztypes_linux.go │ ├── ztypes_linux_386.go │ ├── ztypes_linux_amd64.go │ ├── ztypes_linux_arm.go │ ├── ztypes_linux_arm64.go │ ├── ztypes_linux_loong64.go │ ├── ztypes_linux_mips.go │ ├── ztypes_linux_mips64.go │ ├── ztypes_linux_mips64le.go │ ├── ztypes_linux_mipsle.go │ ├── ztypes_linux_ppc.go │ ├── ztypes_linux_ppc64.go │ ├── ztypes_linux_ppc64le.go │ ├── ztypes_linux_riscv64.go │ ├── ztypes_linux_s390x.go │ ├── ztypes_linux_sparc64.go │ ├── ztypes_netbsd_386.go │ ├── ztypes_netbsd_amd64.go │ ├── ztypes_netbsd_arm.go │ ├── ztypes_netbsd_arm64.go │ ├── ztypes_openbsd_386.go │ ├── ztypes_openbsd_amd64.go │ ├── ztypes_openbsd_arm.go │ ├── ztypes_openbsd_arm64.go │ ├── ztypes_openbsd_mips64.go │ ├── ztypes_openbsd_ppc64.go │ ├── ztypes_openbsd_riscv64.go │ ├── ztypes_solaris_amd64.go │ └── ztypes_zos_s390x.go │ └── windows │ ├── aliases.go │ ├── dll_windows.go │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── memory_windows.go │ ├── mkerrors.bash │ ├── mkknownfolderids.bash │ ├── mksyscall.go │ ├── race.go │ ├── race0.go │ ├── security_windows.go │ ├── service.go │ ├── setupapi_windows.go │ ├── str.go │ ├── syscall.go │ ├── syscall_windows.go │ ├── types_windows.go │ ├── types_windows_386.go │ ├── types_windows_amd64.go │ ├── types_windows_arm.go │ ├── types_windows_arm64.go │ ├── zerrors_windows.go │ ├── zknownfolderids_windows.go │ └── zsyscall_windows.go ├── google.golang.org └── protobuf │ ├── LICENSE │ ├── PATENTS │ ├── encoding │ ├── prototext │ │ ├── decode.go │ │ ├── doc.go │ │ └── encode.go │ └── protowire │ │ └── wire.go │ ├── internal │ ├── descfmt │ │ └── stringer.go │ ├── descopts │ │ └── options.go │ ├── detrand │ │ └── rand.go │ ├── editiondefaults │ │ ├── defaults.go │ │ └── editions_defaults.binpb │ ├── encoding │ │ ├── defval │ │ │ └── default.go │ │ ├── messageset │ │ │ └── messageset.go │ │ ├── tag │ │ │ └── tag.go │ │ └── text │ │ │ ├── decode.go │ │ │ ├── decode_number.go │ │ │ ├── decode_string.go │ │ │ ├── decode_token.go │ │ │ ├── doc.go │ │ │ └── encode.go │ ├── errors │ │ └── errors.go │ ├── filedesc │ │ ├── build.go │ │ ├── desc.go │ │ ├── desc_init.go │ │ ├── desc_lazy.go │ │ ├── desc_list.go │ │ ├── desc_list_gen.go │ │ ├── editions.go │ │ └── placeholder.go │ ├── filetype │ │ └── build.go │ ├── flags │ │ ├── flags.go │ │ ├── proto_legacy_disable.go │ │ └── proto_legacy_enable.go │ ├── genid │ │ ├── any_gen.go │ │ ├── api_gen.go │ │ ├── descriptor_gen.go │ │ ├── doc.go │ │ ├── duration_gen.go │ │ ├── empty_gen.go │ │ ├── field_mask_gen.go │ │ ├── go_features_gen.go │ │ ├── goname.go │ │ ├── map_entry.go │ │ ├── name.go │ │ ├── source_context_gen.go │ │ ├── struct_gen.go │ │ ├── timestamp_gen.go │ │ ├── type_gen.go │ │ ├── wrappers.go │ │ └── wrappers_gen.go │ ├── impl │ │ ├── api_export.go │ │ ├── api_export_opaque.go │ │ ├── bitmap.go │ │ ├── bitmap_race.go │ │ ├── checkinit.go │ │ ├── codec_extension.go │ │ ├── codec_field.go │ │ ├── codec_field_opaque.go │ │ ├── codec_gen.go │ │ ├── codec_map.go │ │ ├── codec_message.go │ │ ├── codec_message_opaque.go │ │ ├── codec_messageset.go │ │ ├── codec_tables.go │ │ ├── codec_unsafe.go │ │ ├── convert.go │ │ ├── convert_list.go │ │ ├── convert_map.go │ │ ├── decode.go │ │ ├── encode.go │ │ ├── enum.go │ │ ├── equal.go │ │ ├── extension.go │ │ ├── lazy.go │ │ ├── legacy_enum.go │ │ ├── legacy_export.go │ │ ├── legacy_extension.go │ │ ├── legacy_file.go │ │ ├── legacy_message.go │ │ ├── merge.go │ │ ├── merge_gen.go │ │ ├── message.go │ │ ├── message_opaque.go │ │ ├── message_opaque_gen.go │ │ ├── message_reflect.go │ │ ├── message_reflect_field.go │ │ ├── message_reflect_field_gen.go │ │ ├── message_reflect_gen.go │ │ ├── pointer_unsafe.go │ │ ├── pointer_unsafe_opaque.go │ │ ├── presence.go │ │ └── validate.go │ ├── order │ │ ├── order.go │ │ └── range.go │ ├── pragma │ │ └── pragma.go │ ├── protolazy │ │ ├── bufferreader.go │ │ ├── lazy.go │ │ └── pointer_unsafe.go │ ├── set │ │ └── ints.go │ ├── strs │ │ ├── strings.go │ │ └── strings_unsafe.go │ └── version │ │ └── version.go │ ├── proto │ ├── checkinit.go │ ├── decode.go │ ├── decode_gen.go │ ├── doc.go │ ├── encode.go │ ├── encode_gen.go │ ├── equal.go │ ├── extension.go │ ├── merge.go │ ├── messageset.go │ ├── proto.go │ ├── proto_methods.go │ ├── proto_reflect.go │ ├── reset.go │ ├── size.go │ ├── size_gen.go │ ├── wrapperopaque.go │ └── wrappers.go │ ├── reflect │ ├── protoreflect │ │ ├── methods.go │ │ ├── proto.go │ │ ├── source.go │ │ ├── source_gen.go │ │ ├── type.go │ │ ├── value.go │ │ ├── value_equal.go │ │ ├── value_union.go │ │ └── value_unsafe.go │ └── protoregistry │ │ └── registry.go │ └── runtime │ ├── protoiface │ ├── legacy.go │ └── methods.go │ └── protoimpl │ ├── impl.go │ └── version.go └── modules.txt /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # We use GNU indent from the Makefile to format C code in this project. Alas, 3 | # there is no way to map indent options to clang-format style options in a way 4 | # to achieve identical results for both formatters. 5 | # 6 | # Therefore, let's disable clang-format entirely. 7 | DisableFormat: true 8 | ... 9 | -------------------------------------------------------------------------------- /.codespellrc: -------------------------------------------------------------------------------- 1 | [codespell] 2 | skip = ./vendor,./.git,./go.sum 3 | ignore-words-list = clos,mis 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is used by shfmt. See https://EditorConfig.org 2 | 3 | # This is a top-most EditorConfig file. 4 | root = true 5 | 6 | # Ignore the entire "vendor" directory. 7 | [vendor/**] 8 | ignore = true 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | # Forked from https://github.com/containerd/nerdctl/blob/main/.github/ISSUE_TEMPLATE/config.yml 2 | blank_issues_enabled: true 3 | contact_links: 4 | - name: Ask a question (GitHub Discussions) 5 | url: https://github.com/opencontainers/runc/discussions 6 | about: | 7 | Please do not submit "a bug report" for asking a question. 8 | In most cases, GitHub Discussions is the best place to ask a question. 9 | If you are not sure whether you are going to report a bug or ask a question, 10 | please consider asking in GitHub Discussions first. 11 | - name: Slack (opencontainers.slack.com) 12 | url: https://communityinviter.com/apps/opencontainers/join-the-oci-community 13 | # GitHub requires the `about` property to be set 14 | about: Slack 15 | - name: Mailing list 16 | url: https://groups.google.com/a/opencontainers.org/forum/#!forum/dev 17 | about: Mailing list 18 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Please see the documentation for all configuration options: 2 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 3 | 4 | version: 2 5 | updates: 6 | # Dependencies listed in go.mod 7 | - package-ecosystem: "gomod" 8 | directory: "/" # Location of package manifests 9 | schedule: 10 | interval: "daily" 11 | 12 | # Dependencies listed in .github/workflows/*.yml 13 | - package-ecosystem: "github-actions" 14 | directory: "/" 15 | schedule: 16 | interval: "daily" 17 | 18 | # Dependencies listed in Dockerfile 19 | - package-ecosystem: "docker" 20 | directory: "/" 21 | schedule: 22 | interval: "daily" 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | vendor/pkg 2 | /runc 3 | /runc-* 4 | /contrib/cmd/memfd-bind/memfd-bind 5 | /tests/cmd/_bin 6 | man/man8 7 | release 8 | Vagrantfile 9 | .vagrant 10 | -------------------------------------------------------------------------------- /.golangci-extra.yml: -------------------------------------------------------------------------------- 1 | # This is golangci-lint config file which is used to check new code in 2 | # github PRs only (see lint-extra in .github/workflows/validate.yml). 3 | # 4 | # For the default linter config, see .golangci.yml. This config should 5 | # only enable additional linters not enabled in the default config. 6 | version: "2" 7 | 8 | run: 9 | build-tags: 10 | - seccomp 11 | 12 | linters: 13 | default: none 14 | enable: 15 | - godot 16 | - revive 17 | - staticcheck 18 | settings: 19 | staticcheck: 20 | checks: 21 | - all 22 | - -QF1008 # https://staticcheck.dev/docs/checks/#QF1008 Omit embedded fields from selector expression. 23 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | run: 4 | build-tags: 5 | - seccomp 6 | 7 | formatters: 8 | enable: 9 | - gofumpt 10 | 11 | linters: 12 | enable: 13 | - errorlint 14 | - nolintlint 15 | - unconvert 16 | - unparam 17 | settings: 18 | govet: 19 | enable: 20 | - nilness 21 | staticcheck: 22 | checks: 23 | - all 24 | - -ST1000 # https://staticcheck.dev/docs/checks/#ST1000 Incorrect or missing package comment. 25 | - -ST1003 # https://staticcheck.dev/docs/checks/#ST1003 Poorly chosen identifier. 26 | - -ST1005 # https://staticcheck.dev/docs/checks/#ST1005 Incorrectly formatted error string. 27 | - -QF1008 # https://staticcheck.dev/docs/checks/#QF1008 Omit embedded fields from selector expression. 28 | exclusions: 29 | presets: 30 | - std-error-handling 31 | -------------------------------------------------------------------------------- /EMERITUS.md: -------------------------------------------------------------------------------- 1 | ## Emeritus ## 2 | 3 | We would like to acknowledge previous runc maintainers and their huge 4 | contributions to our collective success: 5 | 6 | * Alexander Morozov (@lk4d4) 7 | * Andrei Vagin (@avagin) 8 | * Rohit Jnagal (@rjnagal) 9 | * Victor Marmol (@vmarmol) 10 | * Michael Crosby (@crosbymichael) 11 | * Daniel, Dao Quang Minh (@dqminh) 12 | * Qiang Huang (@hqhq) 13 | 14 | We thank these members for their service to the OCI community. 15 | -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- 1 | Mrunal Patel (@mrunalp) 2 | Aleksa Sarai (@cyphar) 3 | Akihiro Suda (@AkihiroSuda) 4 | Kir Kolyshkin (@kolyshkin) 5 | Sebastiaan van Stijn (@thaJeztah) 6 | Li Fu Bang (@lifubang) 7 | Rodrigo Campos (@rata) 8 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | runc 2 | 3 | Copyright 2012-2015 Docker, Inc. 4 | 5 | This product includes software developed at Docker, Inc. (http://www.docker.com). 6 | 7 | The following is courtesy of our legal counsel: 8 | 9 | 10 | Use and transfer of Docker may be subject to certain restrictions by the 11 | United States and other governments. 12 | It is your responsibility to ensure that your use and/or transfer does not 13 | violate applicable laws. 14 | 15 | For more information, please see http://www.bis.doc.gov 16 | 17 | See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. 18 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security 2 | 3 | When reporting a security issue, do not create an issue or file a pull request on GitHub. 4 | The reporting process and disclosure communications are outlined [here](https://github.com/opencontainers/org/blob/master/SECURITY.md). 5 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 1.3.0-rc.1+dev 2 | -------------------------------------------------------------------------------- /contrib/cmd/memfd-bind/memfd-bind@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Manage memfd-bind of %f 3 | Documentation=https://github.com/opencontainers/runc/blob/main/contrib/cmd/memfd-bind/README.md 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=memfd-bind "%f" 8 | ExecStop=memfd-bind --cleanup "%f" 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /docs/Security-Audit.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencontainers/runc/cdf953070162f400d75d2e0e83b506b3fb8cee5e/docs/Security-Audit.pdf -------------------------------------------------------------------------------- /docs/experimental.md: -------------------------------------------------------------------------------- 1 | # Experimental features 2 | 3 | The following features were experimental in the past: 4 | 5 | Feature | Experimental release | Graduation release 6 | ---------------------------------------- | -------------------- | ------------------ 7 | cgroup v2 | v1.0.0-rc91 | v1.0.0-rc93 8 | The `runc features` command | v1.1.0 | v1.2.0 9 | runc-dmz | v1.2.0-rc1 | Dropped in v1.2.1 10 | -------------------------------------------------------------------------------- /init.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/opencontainers/runc/libcontainer" 7 | _ "github.com/opencontainers/runc/libcontainer/nsenter" 8 | ) 9 | 10 | func init() { 11 | if len(os.Args) > 1 && os.Args[1] == "init" { 12 | // This is the golang entry point for runc init, executed 13 | // before main() but after libcontainer/nsenter's nsexec(). 14 | libcontainer.Init() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /internal/linux/eintr.go: -------------------------------------------------------------------------------- 1 | package linux 2 | 3 | import ( 4 | "errors" 5 | 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | // retryOnEINTR takes a function that returns an error and calls it 10 | // until the error returned is not EINTR. 11 | func retryOnEINTR(fn func() error) error { 12 | for { 13 | err := fn() 14 | if !errors.Is(err, unix.EINTR) { 15 | return err 16 | } 17 | } 18 | } 19 | 20 | // retryOnEINTR2 is like retryOnEINTR, but it returns 2 values. 21 | func retryOnEINTR2[T any](fn func() (T, error)) (T, error) { 22 | for { 23 | val, err := fn() 24 | if !errors.Is(err, unix.EINTR) { 25 | return val, err 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /libcontainer/apparmor/apparmor.go: -------------------------------------------------------------------------------- 1 | package apparmor 2 | 3 | import "errors" 4 | 5 | // IsEnabled returns true if apparmor is enabled for the host. 6 | func IsEnabled() bool { 7 | return isEnabled() 8 | } 9 | 10 | // ApplyProfile will apply the profile with the specified name to the process 11 | // after the next exec. It is only supported on Linux and produces an 12 | // [ErrApparmorNotEnabled] on other platforms. 13 | func ApplyProfile(name string) error { 14 | return applyProfile(name) 15 | } 16 | 17 | // ErrApparmorNotEnabled indicates that AppArmor is not enabled or not supported. 18 | var ErrApparmorNotEnabled = errors.New("apparmor: config provided but apparmor not supported") 19 | -------------------------------------------------------------------------------- /libcontainer/apparmor/apparmor_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | 3 | package apparmor 4 | 5 | func isEnabled() bool { 6 | return false 7 | } 8 | 9 | func applyProfile(name string) error { 10 | if name != "" { 11 | return ErrApparmorNotEnabled 12 | } 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /libcontainer/capabilities/capabilities_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | 3 | package capabilities 4 | -------------------------------------------------------------------------------- /libcontainer/configs/cgroup_deprecated.go: -------------------------------------------------------------------------------- 1 | package configs // Deprecated: use [github.com/opencontainers/cgroups]. 2 | 3 | import "github.com/opencontainers/cgroups" 4 | 5 | type ( 6 | Cgroup = cgroups.Cgroup 7 | Resources = cgroups.Resources 8 | FreezerState = cgroups.FreezerState 9 | LinuxRdma = cgroups.LinuxRdma 10 | BlockIODevice = cgroups.BlockIODevice 11 | WeightDevice = cgroups.WeightDevice 12 | ThrottleDevice = cgroups.ThrottleDevice 13 | HugepageLimit = cgroups.HugepageLimit 14 | IfPrioMap = cgroups.IfPrioMap 15 | ) 16 | 17 | const ( 18 | Undefined = cgroups.Undefined 19 | Frozen = cgroups.Frozen 20 | Thawed = cgroups.Thawed 21 | ) 22 | 23 | var ( 24 | NewWeightDevice = cgroups.NewWeightDevice 25 | NewThrottleDevice = cgroups.NewThrottleDevice 26 | ) 27 | -------------------------------------------------------------------------------- /libcontainer/configs/configs_fuzzer.go: -------------------------------------------------------------------------------- 1 | //go:build gofuzz 2 | 3 | package configs 4 | 5 | func FuzzUnmarshalJSON(data []byte) int { 6 | hooks := Hooks{} 7 | _ = hooks.UnmarshalJSON(data) 8 | return 1 9 | } 10 | -------------------------------------------------------------------------------- /libcontainer/configs/intelrdt.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | type IntelRdt struct { 4 | // The identity for RDT Class of Service 5 | ClosID string `json:"closID,omitempty"` 6 | 7 | // The schema for L3 cache id and capacity bitmask (CBM) 8 | // Format: "L3:=;=;..." 9 | L3CacheSchema string `json:"l3_cache_schema,omitempty"` 10 | 11 | // The schema of memory bandwidth per L3 cache id 12 | // Format: "MB:=bandwidth0;=bandwidth1;..." 13 | // The unit of memory bandwidth is specified in "percentages" by 14 | // default, and in "MBps" if MBA Software Controller is enabled. 15 | MemBwSchema string `json:"memBwSchema,omitempty"` 16 | } 17 | -------------------------------------------------------------------------------- /libcontainer/configs/mount.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | const ( 4 | // EXT_COPYUP is a directive to copy up the contents of a directory when 5 | // a tmpfs is mounted over it. 6 | EXT_COPYUP = 1 << iota //nolint:golint,revive // ignore "don't use ALL_CAPS" warning 7 | ) 8 | -------------------------------------------------------------------------------- /libcontainer/configs/mount_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | 3 | package configs 4 | 5 | type Mount struct{} 6 | 7 | func (m *Mount) IsBind() bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /libcontainer/configs/namespaces.go: -------------------------------------------------------------------------------- 1 | package configs 2 | 3 | type NamespaceType string 4 | 5 | type Namespaces []Namespace 6 | -------------------------------------------------------------------------------- /libcontainer/configs/namespaces_syscall_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux && !windows 2 | 3 | package configs 4 | 5 | func (n *Namespace) Syscall() int { 6 | panic("No namespace syscall support") 7 | } 8 | 9 | // CloneFlags parses the container's Namespaces options to set the correct 10 | // flags on clone, unshare. This function returns flags only for new namespaces. 11 | func (n *Namespaces) CloneFlags() uintptr { 12 | panic("No namespace syscall support") 13 | } 14 | -------------------------------------------------------------------------------- /libcontainer/configs/namespaces_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | 3 | package configs 4 | 5 | // Namespace defines configuration for each namespace. It specifies an 6 | // alternate path that is able to be joined via setns. 7 | type Namespace struct{} 8 | -------------------------------------------------------------------------------- /libcontainer/console_linux.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/opencontainers/runc/internal/linux" 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // mount initializes the console inside the rootfs mounting with the specified mount label 11 | // and applying the correct ownership of the console. 12 | func mountConsole(slavePath string) error { 13 | f, err := os.Create("/dev/console") 14 | if err != nil && !os.IsExist(err) { 15 | return err 16 | } 17 | if f != nil { 18 | // Ensure permission bits (can be different because of umask). 19 | if err := f.Chmod(0o666); err != nil { 20 | return err 21 | } 22 | f.Close() 23 | } 24 | return mount(slavePath, "/dev/console", "bind", unix.MS_BIND, "") 25 | } 26 | 27 | // dupStdio opens the slavePath for the console and dups the fds to the current 28 | // processes stdio, fd 0,1,2. 29 | func dupStdio(slavePath string) error { 30 | fd, err := linux.Open(slavePath, unix.O_RDWR, 0) 31 | if err != nil { 32 | return err 33 | } 34 | for _, i := range []int{0, 1, 2} { 35 | if err := linux.Dup3(fd, i, 0); err != nil { 36 | return err 37 | } 38 | } 39 | return nil 40 | } 41 | -------------------------------------------------------------------------------- /libcontainer/criu_disabled_linux.go: -------------------------------------------------------------------------------- 1 | //go:build runc_nocriu 2 | 3 | package libcontainer 4 | 5 | import "errors" 6 | 7 | var ErrNoCR = errors.New("this runc binary has not been compiled with checkpoint/restore support enabled (runc_nocriu)") 8 | 9 | func (c *Container) Restore(process *Process, criuOpts *CriuOpts) error { 10 | return ErrNoCR 11 | } 12 | 13 | func (c *Container) Checkpoint(criuOpts *CriuOpts) error { 14 | return ErrNoCR 15 | } 16 | -------------------------------------------------------------------------------- /libcontainer/devices/device_deprecated.go: -------------------------------------------------------------------------------- 1 | package devices 2 | 3 | import "github.com/opencontainers/cgroups/devices/config" 4 | 5 | // Deprecated: use [github.com/opencontainers/cgroups/devices/config]. 6 | const ( 7 | Wildcard = config.Wildcard 8 | WildcardDevice = config.WildcardDevice 9 | BlockDevice = config.BlockDevice 10 | CharDevice = config.CharDevice 11 | FifoDevice = config.FifoDevice 12 | ) 13 | 14 | // Deprecated: use [github.com/opencontainers/cgroups/devices/config]. 15 | type ( 16 | Device = config.Device 17 | Permissions = config.Permissions 18 | Type = config.Type 19 | Rule = config.Rule 20 | ) 21 | -------------------------------------------------------------------------------- /libcontainer/error.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | import "errors" 4 | 5 | var ( 6 | ErrExist = errors.New("container with given ID already exists") 7 | ErrInvalidID = errors.New("invalid container ID format") 8 | ErrNotExist = errors.New("container does not exist") 9 | ErrPaused = errors.New("container paused") 10 | ErrRunning = errors.New("container still running") 11 | ErrNotRunning = errors.New("container not running") 12 | ErrNotPaused = errors.New("container not paused") 13 | ErrCgroupNotExist = errors.New("cgroup not exist") 14 | ) 15 | -------------------------------------------------------------------------------- /libcontainer/integration/doc.go: -------------------------------------------------------------------------------- 1 | // integration is used for integration testing of libcontainer 2 | package integration 3 | -------------------------------------------------------------------------------- /libcontainer/integration/init_test.go: -------------------------------------------------------------------------------- 1 | package integration 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/opencontainers/runc/libcontainer" 8 | //nolint:revive // Enable cgroup manager to manage devices 9 | _ "github.com/opencontainers/cgroups/devices" 10 | _ "github.com/opencontainers/runc/libcontainer/nsenter" 11 | ) 12 | 13 | // Same as ../../init.go but for libcontainer/integration. 14 | func init() { 15 | if len(os.Args) > 1 && os.Args[1] == "init" { 16 | libcontainer.Init() 17 | } 18 | } 19 | 20 | func TestMain(m *testing.M) { 21 | ret := m.Run() 22 | os.Exit(ret) 23 | } 24 | -------------------------------------------------------------------------------- /libcontainer/intelrdt/cmt.go: -------------------------------------------------------------------------------- 1 | package intelrdt 2 | 3 | var cmtEnabled bool 4 | 5 | // IsCMTEnabled checks if Intel RDT/CMT is enabled. 6 | func IsCMTEnabled() bool { 7 | featuresInit() 8 | return cmtEnabled 9 | } 10 | 11 | func getCMTNumaNodeStats(numaPath string) (*CMTNumaNodeStats, error) { 12 | stats := &CMTNumaNodeStats{} 13 | 14 | if enabledMonFeatures.llcOccupancy { 15 | llcOccupancy, err := getIntelRdtParamUint(numaPath, "llc_occupancy") 16 | if err != nil { 17 | return nil, err 18 | } 19 | stats.LLCOccupancy = llcOccupancy 20 | } 21 | 22 | return stats, nil 23 | } 24 | -------------------------------------------------------------------------------- /libcontainer/intelrdt/mbm.go: -------------------------------------------------------------------------------- 1 | package intelrdt 2 | 3 | // The flag to indicate if Intel RDT/MBM is enabled 4 | var mbmEnabled bool 5 | 6 | // IsMBMEnabled checks if Intel RDT/MBM is enabled. 7 | func IsMBMEnabled() bool { 8 | featuresInit() 9 | return mbmEnabled 10 | } 11 | 12 | func getMBMNumaNodeStats(numaPath string) (*MBMNumaNodeStats, error) { 13 | stats := &MBMNumaNodeStats{} 14 | if enabledMonFeatures.mbmTotalBytes { 15 | mbmTotalBytes, err := getIntelRdtParamUint(numaPath, "mbm_total_bytes") 16 | if err != nil { 17 | return nil, err 18 | } 19 | stats.MBMTotalBytes = mbmTotalBytes 20 | } 21 | 22 | if enabledMonFeatures.mbmLocalBytes { 23 | mbmLocalBytes, err := getIntelRdtParamUint(numaPath, "mbm_local_bytes") 24 | if err != nil { 25 | return nil, err 26 | } 27 | stats.MBMLocalBytes = mbmLocalBytes 28 | } 29 | 30 | return stats, nil 31 | } 32 | -------------------------------------------------------------------------------- /libcontainer/nsenter/getenv.c: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #include 3 | #include 4 | #include "getenv.h" 5 | #include "log.h" 6 | 7 | int getenv_int(const char *name) 8 | { 9 | char *val, *endptr; 10 | int ret; 11 | 12 | val = getenv(name); 13 | /* Treat empty value as unset variable. */ 14 | if (val == NULL || *val == '\0') 15 | return -ENOENT; 16 | 17 | ret = strtol(val, &endptr, 10); 18 | if (val == endptr || *endptr != '\0') 19 | bail("unable to parse %s=%s", name, val); 20 | /* 21 | * Sanity check: this must be a non-negative number. 22 | */ 23 | if (ret < 0) 24 | bail("bad value for %s=%s (%d)", name, val, ret); 25 | 26 | return ret; 27 | } 28 | -------------------------------------------------------------------------------- /libcontainer/nsenter/getenv.h: -------------------------------------------------------------------------------- 1 | #ifndef NSENTER_GETENV_H 2 | #define NSENTER_GETENV_H 3 | 4 | /* 5 | * Returns an environment variable value as a non-negative integer, or -ENOENT 6 | * if the variable was not found or has an empty value. 7 | * 8 | * If the value can not be converted to an integer, or the result is out of 9 | * range, the function bails out. 10 | */ 11 | int getenv_int(const char *name); 12 | 13 | #endif /* NSENTER_GETENV_H */ 14 | -------------------------------------------------------------------------------- /libcontainer/nsenter/namespace.h: -------------------------------------------------------------------------------- 1 | #ifndef NSENTER_NAMESPACE_H 2 | #define NSENTER_NAMESPACE_H 3 | 4 | #ifndef _GNU_SOURCE 5 | # define _GNU_SOURCE 6 | #endif 7 | #include 8 | 9 | /* All of these are taken from include/uapi/linux/sched.h */ 10 | #ifndef CLONE_NEWNS 11 | # define CLONE_NEWNS 0x00020000 /* New mount namespace group */ 12 | #endif 13 | #ifndef CLONE_NEWCGROUP 14 | # define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */ 15 | #endif 16 | #ifndef CLONE_NEWUTS 17 | # define CLONE_NEWUTS 0x04000000 /* New utsname namespace */ 18 | #endif 19 | #ifndef CLONE_NEWIPC 20 | # define CLONE_NEWIPC 0x08000000 /* New ipc namespace */ 21 | #endif 22 | #ifndef CLONE_NEWUSER 23 | # define CLONE_NEWUSER 0x10000000 /* New user namespace */ 24 | #endif 25 | #ifndef CLONE_NEWPID 26 | # define CLONE_NEWPID 0x20000000 /* New pid namespace */ 27 | #endif 28 | #ifndef CLONE_NEWNET 29 | # define CLONE_NEWNET 0x40000000 /* New network namespace */ 30 | #endif 31 | #ifndef CLONE_NEWTIME 32 | # define CLONE_NEWTIME 0x00000080 /* New time namespace */ 33 | #endif 34 | 35 | #endif /* NSENTER_NAMESPACE_H */ 36 | -------------------------------------------------------------------------------- /libcontainer/nsenter/nsenter.go: -------------------------------------------------------------------------------- 1 | //go:build linux && !gccgo 2 | 3 | package nsenter 4 | 5 | /* 6 | #cgo CFLAGS: -Wall 7 | extern void nsexec(); 8 | void __attribute__((constructor)) init(void) { 9 | nsexec(); 10 | } 11 | */ 12 | import "C" 13 | -------------------------------------------------------------------------------- /libcontainer/nsenter/nsenter_gccgo.go: -------------------------------------------------------------------------------- 1 | //go:build linux && gccgo 2 | 3 | package nsenter 4 | 5 | /* 6 | #cgo CFLAGS: -Wall 7 | extern void nsexec(); 8 | void __attribute__((constructor)) init(void) { 9 | nsexec(); 10 | } 11 | */ 12 | import "C" 13 | 14 | // AlwaysFalse is here to stay false 15 | // (and be exported so the compiler doesn't optimize out its reference) 16 | var AlwaysFalse bool 17 | 18 | func init() { 19 | if AlwaysFalse { 20 | // by referencing this C init() in a noop test, it will ensure the compiler 21 | // links in the C function. 22 | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65134 23 | C.init() 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /libcontainer/nsenter/test/escape.c: -------------------------------------------------------------------------------- 1 | ../escape.c -------------------------------------------------------------------------------- /libcontainer/nsenter/test/escape_test.go: -------------------------------------------------------------------------------- 1 | package escapetest 2 | 3 | import "testing" 4 | 5 | // The actual test function is in escape.go 6 | // so that it can use cgo (import "C"). 7 | // This wrapper is here for gotest to find. 8 | 9 | func TestEscapeJSON(t *testing.T) { 10 | testEscapeJSON(t) 11 | } 12 | -------------------------------------------------------------------------------- /libcontainer/seccomp/patchbpf/enosys_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux || !cgo || !seccomp 2 | 3 | package patchbpf 4 | -------------------------------------------------------------------------------- /libcontainer/seccomp/seccomp_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux || !cgo || !seccomp 2 | 3 | package seccomp 4 | 5 | import ( 6 | "errors" 7 | 8 | "github.com/opencontainers/runc/libcontainer/configs" 9 | "github.com/opencontainers/runtime-spec/specs-go" 10 | ) 11 | 12 | var ErrSeccompNotEnabled = errors.New("seccomp: config provided but seccomp not supported") 13 | 14 | // InitSeccomp does nothing because seccomp is not supported. 15 | func InitSeccomp(config *configs.Seccomp) (int, error) { 16 | if config != nil { 17 | return -1, ErrSeccompNotEnabled 18 | } 19 | return -1, nil 20 | } 21 | 22 | // FlagSupported tells if a provided seccomp flag is supported. 23 | func FlagSupported(_ specs.LinuxSeccompFlag) error { 24 | return ErrSeccompNotEnabled 25 | } 26 | 27 | // Version returns major, minor, and micro. 28 | func Version() (uint, uint, uint) { 29 | return 0, 0, 0 30 | } 31 | 32 | // Enabled is true if seccomp support is compiled in. 33 | const Enabled = false 34 | -------------------------------------------------------------------------------- /libcontainer/stats_linux.go: -------------------------------------------------------------------------------- 1 | package libcontainer 2 | 3 | import ( 4 | "github.com/opencontainers/cgroups" 5 | "github.com/opencontainers/runc/libcontainer/intelrdt" 6 | "github.com/opencontainers/runc/types" 7 | ) 8 | 9 | type Stats struct { 10 | Interfaces []*types.NetworkInterface 11 | CgroupStats *cgroups.Stats 12 | IntelRdtStats *intelrdt.Stats 13 | } 14 | -------------------------------------------------------------------------------- /libcontainer/system/rlimit_linux.go: -------------------------------------------------------------------------------- 1 | //go:build go1.23 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // ClearRlimitNofileCache clears go runtime's nofile rlimit cache. The argument 10 | // is process RLIMIT_NOFILE values. Relies on go.dev/cl/588076. 11 | func ClearRlimitNofileCache(lim *syscall.Rlimit) { 12 | // Ignore the return values since we only need to clean the cache, 13 | // the limit is going to be set via unix.Prlimit elsewhere. 14 | _ = syscall.Setrlimit(syscall.RLIMIT_NOFILE, lim) 15 | } 16 | -------------------------------------------------------------------------------- /libcontainer/userns/userns_deprecated.go: -------------------------------------------------------------------------------- 1 | // Deprecated: use github.com/moby/sys/userns 2 | package userns 3 | 4 | import "github.com/moby/sys/userns" 5 | 6 | // RunningInUserNS detects whether we are currently running in a Linux 7 | // user namespace and memoizes the result. It returns false on non-Linux 8 | // platforms. 9 | // 10 | // Deprecated: use [userns.RunningInUserNS]. 11 | func RunningInUserNS() bool { 12 | return userns.RunningInUserNS() 13 | } 14 | -------------------------------------------------------------------------------- /man/README.md: -------------------------------------------------------------------------------- 1 | runc man pages 2 | ==================== 3 | 4 | This directory contains man pages for runc in markdown format. 5 | 6 | To generate man pages from it, use this command 7 | 8 | ./md2man-all.sh 9 | 10 | You will see man pages generated under the man8 directory. 11 | 12 | -------------------------------------------------------------------------------- /man/md2man-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # get into this script's directory 5 | cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" 6 | 7 | [ "$1" = '-q' ] || { 8 | set -x 9 | pwd 10 | } 11 | 12 | if ! type go-md2man; then 13 | echo "To install man pages, please install 'go-md2man'." 14 | exit 0 15 | fi 16 | 17 | for FILE in *.md; do 18 | base="$(basename "$FILE")" 19 | name="${base%.md}" 20 | num="${name##*.}" 21 | if [ -z "$num" ] || [ "$name" = "$num" ]; then 22 | # skip files that aren't of the format xxxx.N.md (like README.md) 23 | continue 24 | fi 25 | mkdir -p "./man${num}" 26 | go-md2man -in "$FILE" -out "./man${num}/${name}" 27 | done 28 | -------------------------------------------------------------------------------- /man/runc-delete.8.md: -------------------------------------------------------------------------------- 1 | % runc-delete "8" 2 | 3 | # NAME 4 | **runc-delete** - delete any resources held by the container 5 | 6 | # SYNOPSIS 7 | **runc delete** [**--force**|**-f**] _container-id_ 8 | 9 | # OPTIONS 10 | **--force**|**-f** 11 | : Forcibly delete the running container, using **SIGKILL** **signal**(7) 12 | to stop it first. 13 | 14 | # EXAMPLES 15 | If the container id is **ubuntu01** and **runc list** currently shows 16 | its status as **stopped**, the following will delete resources held for 17 | **ubuntu01**, removing it from the **runc list**: 18 | 19 | # runc delete ubuntu01 20 | 21 | # SEE ALSO 22 | 23 | **runc-kill**(8), 24 | **runc**(8). 25 | -------------------------------------------------------------------------------- /man/runc-events.8.md: -------------------------------------------------------------------------------- 1 | % runc-events "8" 2 | 3 | # NAME 4 | **runc-events** - display container events and statistics. 5 | 6 | # SYNOPSIS 7 | **runc events** [_option_ ...] _container-id_ 8 | 9 | # DESCRIPTION 10 | The **events** command displays information about the container. By default, 11 | it works continuously, displaying stats every 5 seconds, and container events 12 | as they occur. 13 | 14 | # OPTIONS 15 | **--interval** _time_ 16 | : Set the stats collection interval. Default is **5s**. 17 | 18 | **--stats** 19 | : Show the container's stats once then exit. 20 | 21 | # SEE ALSO 22 | 23 | **runc**(8). 24 | -------------------------------------------------------------------------------- /man/runc-kill.8.md: -------------------------------------------------------------------------------- 1 | % runc-kill "8" 2 | 3 | # NAME 4 | **runc-kill** - send a specified signal to container 5 | 6 | # SYNOPSIS 7 | **runc kill** _container-id_ [_signal_] 8 | 9 | # DESCRIPTION 10 | 11 | By default, **runc kill** sends **SIGTERM** to the container's initial process 12 | only. 13 | 14 | A different signal can be specified either by its name (with or without the 15 | **SIG** prefix), or its numeric value. Use **kill**(1) with **-l** option 16 | to list available signals. 17 | 18 | # EXAMPLES 19 | 20 | The following will send a **KILL** signal to the init process of the 21 | **ubuntu01** container: 22 | 23 | # runc kill ubuntu01 KILL 24 | 25 | # SEE ALSO 26 | 27 | **runc**(1). 28 | -------------------------------------------------------------------------------- /man/runc-list.8.md: -------------------------------------------------------------------------------- 1 | % runc-list "8" 2 | 3 | # NAME 4 | **runc-list** - lists containers 5 | 6 | # SYNOPSIS 7 | **runc list** [_option_ ...] 8 | 9 | # DESCRIPTION 10 | 11 | The **list** commands lists containers. Note that a global **--root** 12 | option can be specified to change the default root. For the description 13 | of **--root**, see **runc**(8). 14 | 15 | # OPTIONS 16 | **--format**|**-f** **table**|**json** 17 | : Specify the format. Default is **table**. The **json** format provides 18 | more details. 19 | 20 | **--quiet**|**-q** 21 | : Only display container IDs. 22 | 23 | # EXAMPLES 24 | To list containers created with the default root: 25 | 26 | # runc list 27 | 28 | To list containers in a human-readable JSON (with the help of **jq**(1) 29 | utility): 30 | 31 | # runc list -f json | jq 32 | 33 | To list containers created with the root of **/tmp/myroot**: 34 | 35 | # runc --root /tmp/myroot 36 | 37 | # SEE ALSO 38 | 39 | **runc**(8). 40 | -------------------------------------------------------------------------------- /man/runc-pause.8.md: -------------------------------------------------------------------------------- 1 | % runc-pause "8" 2 | 3 | # NAME 4 | **runc-pause** - suspend all processes inside the container 5 | 6 | # SYNOPSIS 7 | **runc pause** _container-id_ 8 | 9 | # DESCRIPTION 10 | The **pause** command suspends all processes in the instance of the container 11 | identified by _container-id_. 12 | 13 | Use **runc list** to identify instances of containers and their current status. 14 | 15 | # SEE ALSO 16 | **runc-list**(8), 17 | **runc-resume**(8), 18 | **runc**(8). 19 | -------------------------------------------------------------------------------- /man/runc-ps.8.md: -------------------------------------------------------------------------------- 1 | % runc-ps "8" 2 | 3 | # NAME 4 | **runc-ps** - display the processes inside a container 5 | 6 | # SYNOPSIS 7 | **runc ps** [_option_ ...] _container-id_ [_ps-option_ ...] 8 | 9 | # DESCRIPTION 10 | The command **ps** is a wrapper around the stock **ps**(1) utility, 11 | which filters its output to only contain processes belonging to a specified 12 | _container-id_. Therefore, the PIDs shown are the host PIDs. 13 | 14 | Any **ps**(1) options can be used, but some might break the filtering. 15 | In particular, if PID column is not available, an error is returned, 16 | and if there are columns with values containing spaces before the PID 17 | column, the result is undefined. 18 | 19 | # OPTIONS 20 | **--format**|**-f** **table**|**json** 21 | : Output format. Default is **table**. The **json** format shows a mere array 22 | of PIDs belonging to a container; if used, all **ps** options are gnored. 23 | 24 | # SEE ALSO 25 | **runc-list**(8), 26 | **runc**(8). 27 | -------------------------------------------------------------------------------- /man/runc-resume.8.md: -------------------------------------------------------------------------------- 1 | % runc-resume "8" 2 | 3 | # NAME 4 | **runc-resume** - resume all processes that have been previously paused 5 | 6 | # SYNOPSIS 7 | **runc resume** _container-id_ 8 | 9 | # DESCRIPTION 10 | The **resume** command resumes all processes in the instance of the container 11 | identified by _container-id_. 12 | 13 | Use **runc list** to identify instances of containers and their current status. 14 | 15 | # SEE ALSO 16 | **runc-list**(8), 17 | **runc-pause**(8), 18 | **runc**(8). 19 | -------------------------------------------------------------------------------- /man/runc-start.8.md: -------------------------------------------------------------------------------- 1 | % runc-start "8" 2 | 3 | # NAME 4 | **runc start** - start a previously created container 5 | 6 | # SYNOPSIS 7 | **runc start** _container-id_ 8 | 9 | # DESCRIPTION 10 | The **start** command executes the process defined in _config.json_ in a 11 | container previously created by **runc-create**(8). 12 | 13 | # SEE ALSO 14 | **runc-create**(8), 15 | **runc**(8). 16 | -------------------------------------------------------------------------------- /man/runc-state.8.md: -------------------------------------------------------------------------------- 1 | % runc-state "8" 2 | 3 | # NAME 4 | **runc-state** - show the state of a container 5 | 6 | # SYNOPSIS 7 | **runc state** _container-id_ 8 | 9 | # DESCRIPTION 10 | The **state** command outputs current state information for the specified 11 | _container-id_ in a JSON format. 12 | 13 | # SEE ALSO 14 | 15 | **runc**(8). 16 | -------------------------------------------------------------------------------- /rlimit_linux.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | var rlimitMap = map[string]int{ 10 | "RLIMIT_CPU": unix.RLIMIT_CPU, 11 | "RLIMIT_FSIZE": unix.RLIMIT_FSIZE, 12 | "RLIMIT_DATA": unix.RLIMIT_DATA, 13 | "RLIMIT_STACK": unix.RLIMIT_STACK, 14 | "RLIMIT_CORE": unix.RLIMIT_CORE, 15 | "RLIMIT_RSS": unix.RLIMIT_RSS, 16 | "RLIMIT_NPROC": unix.RLIMIT_NPROC, 17 | "RLIMIT_NOFILE": unix.RLIMIT_NOFILE, 18 | "RLIMIT_MEMLOCK": unix.RLIMIT_MEMLOCK, 19 | "RLIMIT_AS": unix.RLIMIT_AS, 20 | "RLIMIT_LOCKS": unix.RLIMIT_LOCKS, 21 | "RLIMIT_SIGPENDING": unix.RLIMIT_SIGPENDING, 22 | "RLIMIT_MSGQUEUE": unix.RLIMIT_MSGQUEUE, 23 | "RLIMIT_NICE": unix.RLIMIT_NICE, 24 | "RLIMIT_RTPRIO": unix.RLIMIT_RTPRIO, 25 | "RLIMIT_RTTIME": unix.RLIMIT_RTTIME, 26 | } 27 | 28 | func strToRlimit(key string) (int, error) { 29 | rl, ok := rlimitMap[key] 30 | if !ok { 31 | return 0, fmt.Errorf("wrong rlimit value: %s", key) 32 | } 33 | return rl, nil 34 | } 35 | -------------------------------------------------------------------------------- /script/prepare-cgroup-v2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script is used from ../Dockerfile as the ENTRYPOINT. It sets up cgroup 4 | # delegation for cgroup v2 to make sure runc tests can be properly run inside 5 | # a container. 6 | 7 | # Only do this for cgroup v2. 8 | if [ -f /sys/fs/cgroup/cgroup.controllers ]; then 9 | set -x 10 | # Move the current process to a sub-cgroup. 11 | mkdir /sys/fs/cgroup/init 12 | echo 0 >/sys/fs/cgroup/init/cgroup.procs 13 | # Enable all controllers. 14 | sed 's/\b\w/+\0/g' <"/sys/fs/cgroup/cgroup.controllers" >"/sys/fs/cgroup/cgroup.subtree_control" 15 | fi 16 | 17 | exec "$@" 18 | -------------------------------------------------------------------------------- /script/setup_rootless.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eux -o pipefail 3 | 4 | # Add a user for rootless tests. 5 | sudo useradd -u2000 -m -d/home/rootless -s/bin/bash rootless 6 | 7 | # Allow both the current user and rootless itself to use 8 | # ssh rootless@localhost in tests/rootless.sh. 9 | # shellcheck disable=SC2174 # Silence "-m only applies to the deepest directory". 10 | mkdir -p -m 0700 "$HOME/.ssh" 11 | ssh-keygen -t ecdsa -N "" -f "$HOME/.ssh/rootless.key" 12 | sudo mkdir -p -m 0700 /home/rootless/.ssh 13 | sudo cp "$HOME/.ssh/rootless.key" /home/rootless/.ssh/id_ecdsa 14 | sudo cp "$HOME/.ssh/rootless.key.pub" /home/rootless/.ssh/authorized_keys 15 | sudo chown -R rootless.rootless /home/rootless 16 | -------------------------------------------------------------------------------- /tests/cmd/README.md: -------------------------------------------------------------------------------- 1 | These are helpers used by [integration tests](/tests/integration). 2 | 3 | They are compiled from the top-level Makefile via `make test-binaries`, 4 | and the resulting binaries can be found in `./_bin`. 5 | -------------------------------------------------------------------------------- /tests/cmd/key_label/key_label.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | "strings" 6 | 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // This is a simple program to print the current session keyring name and its 11 | // security label, to be run inside container (see selinux.bats). Can be 12 | // thought of poor man's keyctl. Written in Go so we can have a static binary 13 | // (a program in C would require libkeyutils which is usually provided only as 14 | // a dynamic library). 15 | func main() { 16 | id, err := unix.KeyctlGetKeyringID(unix.KEY_SPEC_SESSION_KEYRING, false) 17 | if err != nil { 18 | log.Fatalf("GetKeyringID: %v", err) 19 | } 20 | 21 | desc, err := unix.KeyctlString(unix.KEYCTL_DESCRIBE, id) 22 | if err != nil { 23 | log.Fatalf("KeyctlDescribe: %v", err) 24 | } 25 | // keyring;1000;1000;3f030000;_ses 26 | name := desc[strings.LastIndexByte(desc, ';')+1:] 27 | 28 | label, err := unix.KeyctlString(unix.KEYCTL_GET_SECURITY, id) 29 | if err != nil { 30 | log.Fatalf("KeyctlGetSecurity: %v", err) 31 | } 32 | 33 | println(name, label) 34 | } 35 | -------------------------------------------------------------------------------- /tests/cmd/seccompagent/unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux || !seccomp 2 | 3 | package main 4 | 5 | import "fmt" 6 | 7 | func main() { 8 | fmt.Println("Not supported, to use this compile with build tag: seccomp.") 9 | } 10 | -------------------------------------------------------------------------------- /tests/fuzzing/oss_fuzz_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This file is only meant to be run by OSS-fuzz and will not work 4 | # if run outside of it. 5 | # The api, compile_go_fuzzer() is provided by the OSS-fuzz 6 | # environment and is a high level helper function for a series 7 | # of compilation and linking steps to build the fuzzers in the 8 | # OSS-fuzz environment. 9 | # More info about compile_go_fuzzer() can be found here: 10 | # https://google.github.io/oss-fuzz/getting-started/new-project-guide/go-lang/#buildsh 11 | compile_go_fuzzer github.com/opencontainers/runc/libcontainer/user FuzzUser user_fuzzer 12 | compile_go_fuzzer github.com/opencontainers/runc/libcontainer/configs FuzzUnmarshalJSON configs_fuzzer 13 | -------------------------------------------------------------------------------- /tests/integration/host-mntns.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load helpers 4 | 5 | function setup() { 6 | requires root 7 | setup_busybox 8 | } 9 | 10 | function teardown() { 11 | [ ! -v ROOT ] && return 0 # nothing to teardown 12 | 13 | # XXX runc does not unmount a container which 14 | # shares mount namespace with the host. 15 | umount -R --lazy "$ROOT"/bundle/rootfs 16 | 17 | teardown_bundle 18 | } 19 | 20 | @test "runc run [host mount ns + hooks]" { 21 | update_config ' .process.args = ["/bin/echo", "Hello World"] 22 | | .hooks |= . + {"createRuntime": [{"path": "/bin/sh", "args": ["/bin/sh", "-c", "touch createRuntimeHook.$$"]}]} 23 | | .linux.namespaces -= [{"type": "mount"}] 24 | | .linux.maskedPaths = [] 25 | | .linux.readonlyPaths = []' 26 | runc run test_host_mntns 27 | [ "$status" -eq 0 ] 28 | runc delete -f test_host_mntns 29 | 30 | # There should be one such file. 31 | run -0 ls createRuntimeHook.* 32 | [ "$(echo "$output" | wc -w)" -eq 1 ] 33 | } 34 | -------------------------------------------------------------------------------- /tests/integration/mounts_propagation.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load helpers 4 | 5 | function setup() { 6 | requires root 7 | setup_debian 8 | } 9 | 10 | function teardown() { 11 | teardown_bundle 12 | } 13 | 14 | @test "runc run [rootfsPropagation shared]" { 15 | update_config ' .linux.rootfsPropagation = "shared" ' 16 | 17 | update_config ' .process.args = ["findmnt", "--noheadings", "-o", "PROPAGATION", "/"] ' 18 | 19 | runc run test_shared_rootfs 20 | [ "$status" -eq 0 ] 21 | [ "$output" = "shared" ] 22 | } 23 | -------------------------------------------------------------------------------- /tests/integration/no_pivot.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load helpers 4 | 5 | function setup() { 6 | setup_busybox 7 | } 8 | 9 | function teardown() { 10 | teardown_bundle 11 | } 12 | 13 | @test "runc run --no-pivot must not expose bare /proc" { 14 | requires root 15 | 16 | update_config ' .process.args |= ["unshare", "-mrpf", "sh", "-euxc", "mount -t proc none /proc && echo h > /proc/sysrq-trigger"] 17 | | .process.capabilities.bounding += ["CAP_SETFCAP"] 18 | | .process.capabilities.permitted += ["CAP_SETFCAP"]' 19 | 20 | runc run --no-pivot test_no_pivot 21 | [ "$status" -eq 1 ] 22 | [[ "$output" == *"mount: permission denied"* ]] 23 | } 24 | -------------------------------------------------------------------------------- /tests/integration/seccomp-notify-compat.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load helpers 4 | 5 | function setup() { 6 | if is_kernel_gte 5.6; then 7 | skip "requires kernel < 5.6" 8 | fi 9 | 10 | requires arch_x86_64 11 | 12 | setup_seccompagent 13 | setup_busybox 14 | } 15 | 16 | function teardown() { 17 | teardown_seccompagent 18 | teardown_bundle 19 | } 20 | 21 | # Support for seccomp notify requires Linux > 5.6, check that on older kernels 22 | # return an error. 23 | @test "runc run [seccomp] (SCMP_ACT_NOTIFY old kernel)" { 24 | # Use just any seccomp profile with a notify action. 25 | update_config ' .linux.seccomp = { 26 | "defaultAction": "SCMP_ACT_ALLOW", 27 | "listenerPath": "'"$SECCCOMP_AGENT_SOCKET"'", 28 | "architectures": [ "SCMP_ARCH_X86","SCMP_ARCH_X32", "SCMP_ARCH_X86_64" ], 29 | "syscalls": [{ "names": [ "mkdir" ], "action": "SCMP_ACT_NOTIFY" }] 30 | }' 31 | 32 | runc run test_busybox 33 | [ "$status" -ne 0 ] 34 | [[ "$output" == *"seccomp notify unsupported:"* ]] 35 | } 36 | -------------------------------------------------------------------------------- /tests/integration/start.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load helpers 4 | 5 | function setup() { 6 | setup_busybox 7 | } 8 | 9 | function teardown() { 10 | teardown_bundle 11 | } 12 | 13 | @test "runc start" { 14 | runc create --console-socket "$CONSOLE_SOCKET" test_busybox 15 | [ "$status" -eq 0 ] 16 | 17 | testcontainer test_busybox created 18 | 19 | # start container test_busybox 20 | runc start test_busybox 21 | [ "$status" -eq 0 ] 22 | 23 | testcontainer test_busybox running 24 | 25 | # delete test_busybox 26 | runc delete --force test_busybox 27 | 28 | runc state test_busybox 29 | [ "$status" -ne 0 ] 30 | } 31 | -------------------------------------------------------------------------------- /tests/integration/testdata/.gitignore: -------------------------------------------------------------------------------- 1 | busybox-*.tar.xz 2 | debian-*.tar.xz 3 | -------------------------------------------------------------------------------- /tests/integration/testdata/dev_access_test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | const char *dev_name = "/dev/kmsg"; 7 | 8 | if (argc > 1) 9 | dev_name = argv[1]; 10 | 11 | if (access(dev_name, F_OK) < 0) { 12 | perror(dev_name); 13 | return 1; 14 | } 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /tests/integration/testdata/seccomp_syscall_test2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | if (chdir("/") < 0 && errno == ENXIO) 9 | exit(EXIT_SUCCESS); 10 | fprintf(stderr, "got errno=%m\n"); 11 | exit(EXIT_FAILURE); 12 | } 13 | -------------------------------------------------------------------------------- /tests/integration/umask.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load helpers 4 | 5 | function setup() { 6 | setup_busybox 7 | } 8 | 9 | function teardown() { 10 | teardown_bundle 11 | } 12 | 13 | @test "umask" { 14 | update_config '.process.user += {"umask":63}' 15 | 16 | # run busybox detached 17 | runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox 18 | [ "$status" -eq 0 ] 19 | 20 | runc exec test_busybox grep '^Umask:' "/proc/1/status" 21 | [ "$status" -eq 0 ] 22 | # umask 63 decimal = umask 77 octal 23 | [[ "${output}" == *"77"* ]] 24 | 25 | runc exec test_busybox grep '^Umask:' "/proc/self/status" 26 | [ "$status" -eq 0 ] 27 | # umask 63 decimal = umask 77 octal 28 | [[ "${output}" == *"77"* ]] 29 | } 30 | -------------------------------------------------------------------------------- /tests/integration/version.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load helpers 4 | 5 | @test "runc version" { 6 | runc -v 7 | [ "$status" -eq 0 ] 8 | [[ ${lines[0]} =~ runc\ version\ [0-9]+\.[0-9]+\.[0-9]+ ]] 9 | [[ ${lines[1]} =~ commit:+ ]] 10 | [[ ${lines[2]} =~ spec:\ [0-9]+\.[0-9]+\.[0-9]+ ]] 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/checkpoint-restore/go-criu/v7/.gitignore: -------------------------------------------------------------------------------- 1 | test/test 2 | test/test.coverage 3 | test/piggie/piggie 4 | test/phaul/phaul 5 | test/phaul/phaul.coverage 6 | test/loop/loop 7 | test/mmapper/mmapper 8 | test/crit/crit-test 9 | test/crit/test-imgs 10 | test/crit/crit-test.coverage 11 | test/.coverage/ 12 | image 13 | scripts/magic-gen/*.h 14 | scripts/magic-gen/expected.go 15 | scripts/magic-gen/output.go 16 | crit/bin 17 | crit/test-imgs/ 18 | __pycache__ 19 | -------------------------------------------------------------------------------- /vendor/github.com/checkpoint-restore/go-criu/v7/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | presets: 3 | - bugs 4 | - performance 5 | - unused 6 | - format 7 | disable: 8 | - musttag 9 | enable: 10 | - whitespace 11 | - misspell 12 | - dupl 13 | - gosimple 14 | - stylecheck 15 | 16 | linters-settings: 17 | exhaustive: 18 | default-signifies-exhaustive: true 19 | gosec: 20 | excludes: 21 | # https://github.com/securego/gosec/issues/1185 22 | - G115 23 | -------------------------------------------------------------------------------- /vendor/github.com/checkpoint-restore/go-criu/v7/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Adrian Reber 2 | Kir Kolyshkin 3 | Prajwal S N 4 | Radostin Stoyanov 5 | -------------------------------------------------------------------------------- /vendor/github.com/checkpoint-restore/go-criu/v7/Makefile: -------------------------------------------------------------------------------- 1 | SHELL = /bin/bash 2 | GO ?= go 3 | CC ?= gcc 4 | 5 | all: build 6 | 7 | lint: 8 | golangci-lint run ./... 9 | 10 | build: rpc/rpc.pb.go stats/stats.pb.go 11 | $(GO) build -v ./... 12 | # Build crit binary 13 | $(MAKE) -C crit bin/crit 14 | 15 | test: build 16 | $(MAKE) -C test 17 | 18 | coverage: 19 | $(MAKE) -C test coverage 20 | 21 | rpc/rpc.proto: 22 | curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/rpc.proto -o $@ 23 | 24 | rpc/rpc.pb.go: rpc/rpc.proto 25 | protoc --go_out=. --go_opt=M$^=rpc/ $^ 26 | 27 | stats/stats.proto: 28 | curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/stats.proto -o $@ 29 | 30 | stats/stats.pb.go: stats/stats.proto 31 | protoc --go_out=. --go_opt=M$^=stats/ $^ 32 | 33 | vendor: 34 | $(GO) mod tidy 35 | $(GO) mod vendor 36 | $(GO) mod verify 37 | 38 | clean: 39 | $(MAKE) -C crit/ clean 40 | $(MAKE) -C test/ clean 41 | 42 | .PHONY: build test lint vendor coverage clean 43 | -------------------------------------------------------------------------------- /vendor/github.com/checkpoint-restore/go-criu/v7/codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "test" 3 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: LLVM 4 | AlignAfterOpenBracket: DontAlign 5 | AlignConsecutiveAssignments: true 6 | AlignEscapedNewlines: DontAlign 7 | # mkdocs annotations in source code are written as trailing comments 8 | # and alignment pushes these really far away from the content. 9 | AlignTrailingComments: false 10 | AlwaysBreakBeforeMultilineStrings: true 11 | AlwaysBreakTemplateDeclarations: false 12 | AllowAllParametersOfDeclarationOnNextLine: false 13 | AllowShortFunctionsOnASingleLine: false 14 | BreakBeforeBraces: Attach 15 | IndentWidth: 4 16 | KeepEmptyLinesAtTheStartOfBlocks: false 17 | TabWidth: 4 18 | UseTab: ForContinuationAndIndentation 19 | ColumnLimit: 1000 20 | # Go compiler comments need to stay unindented. 21 | CommentPragmas: '^go:.*' 22 | # linux/bpf.h needs to be included before bpf/bpf_helpers.h for types like __u64 23 | # and sorting makes this impossible. 24 | SortIncludes: false 25 | ... 26 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/.gitattributes: -------------------------------------------------------------------------------- 1 | internal/sys/types.go linguist-generated=false 2 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | *.o 8 | !*_bpf*.o 9 | 10 | # Test binary, build with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/.golangci.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | linters: 3 | disable-all: true 4 | enable: 5 | - goimports 6 | - gosimple 7 | - govet 8 | - ineffassign 9 | - misspell 10 | - staticcheck 11 | - typecheck 12 | - unused 13 | - gofmt 14 | - depguard 15 | linters-settings: 16 | goimports: 17 | # A comma-separated list of prefixes, which, if set, checks import paths 18 | # with the given prefixes are grouped after 3rd-party packages. 19 | # Default: "" 20 | local-prefixes: github.com/cilium/ebpf 21 | depguard: 22 | rules: 23 | no-x-sys-unix: 24 | files: 25 | # Filenames are matched against absolute paths, include **/ at the start. 26 | - '!**/internal/unix/*.go' 27 | - '!**/examples/**/*.go' 28 | - '!**/docs/**/*.go' 29 | deny: 30 | - pkg: golang.org/x/sys/unix 31 | desc: use internal/unix instead 32 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/.vimto.toml: -------------------------------------------------------------------------------- 1 | kernel="ghcr.io/cilium/ci-kernels:stable" 2 | smp="cpus=2" 3 | memory="1G" 4 | user="root" 5 | setup=[ 6 | "mount -t cgroup2 -o nosuid,noexec,nodev cgroup2 /sys/fs/cgroup", 7 | "/bin/sh -c 'modprobe bpf_testmod || true'", 8 | "dmesg --clear", 9 | ] 10 | teardown=[ 11 | "dmesg --read-clear", 12 | ] 13 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @cilium/ebpf-lib-maintainers 2 | 3 | features/ @rgo3 4 | link/ @mmat11 5 | 6 | perf/ @florianl 7 | ringbuf/ @florianl 8 | 9 | btf/ @dylandreimerink 10 | 11 | cmd/bpf2go/ @mejedi 12 | 13 | docs/ @ti-mo 14 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to ebpf-go 2 | 3 | Want to contribute to ebpf-go? There are a few things you need to know. 4 | 5 | We wrote a [contribution guide](https://ebpf-go.dev/contributing/) to help you get started. 6 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | # Maintainers 2 | 3 | Maintainers can be found in the [Cilium Maintainers file](https://github.com/cilium/community/blob/main/roles/Maintainers.md) 4 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/asm/doc.go: -------------------------------------------------------------------------------- 1 | // Package asm is an assembler for eBPF bytecode. 2 | package asm 3 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/asm/opcode_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -output opcode_string.go -type=Class"; DO NOT EDIT. 2 | 3 | package asm 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[LdClass-0] 12 | _ = x[LdXClass-1] 13 | _ = x[StClass-2] 14 | _ = x[StXClass-3] 15 | _ = x[ALUClass-4] 16 | _ = x[JumpClass-5] 17 | _ = x[Jump32Class-6] 18 | _ = x[ALU64Class-7] 19 | } 20 | 21 | const _Class_name = "LdClassLdXClassStClassStXClassALUClassJumpClassJump32ClassALU64Class" 22 | 23 | var _Class_index = [...]uint8{0, 7, 15, 22, 30, 38, 47, 58, 68} 24 | 25 | func (i Class) String() string { 26 | if i >= Class(len(_Class_index)-1) { 27 | return "Class(" + strconv.FormatInt(int64(i), 10) + ")" 28 | } 29 | return _Class_name[_Class_index[i]:_Class_index[i+1]] 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/asm/register.go: -------------------------------------------------------------------------------- 1 | package asm 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // Register is the source or destination of most operations. 8 | type Register uint8 9 | 10 | // R0 contains return values. 11 | const R0 Register = 0 12 | 13 | // Registers for function arguments. 14 | const ( 15 | R1 Register = R0 + 1 + iota 16 | R2 17 | R3 18 | R4 19 | R5 20 | ) 21 | 22 | // Callee saved registers preserved by function calls. 23 | const ( 24 | R6 Register = R5 + 1 + iota 25 | R7 26 | R8 27 | R9 28 | ) 29 | 30 | // Read-only frame pointer to access stack. 31 | const ( 32 | R10 Register = R9 + 1 33 | RFP = R10 34 | ) 35 | 36 | // Pseudo registers used by 64bit loads and jumps 37 | const ( 38 | PseudoMapFD = R1 // BPF_PSEUDO_MAP_FD 39 | PseudoMapValue = R2 // BPF_PSEUDO_MAP_VALUE 40 | PseudoCall = R1 // BPF_PSEUDO_CALL 41 | PseudoFunc = R4 // BPF_PSEUDO_FUNC 42 | PseudoKfuncCall = R2 // BPF_PSEUDO_KFUNC_CALL 43 | ) 44 | 45 | func (r Register) String() string { 46 | v := uint8(r) 47 | if v == 10 { 48 | return "rfp" 49 | } 50 | return fmt.Sprintf("r%d", v) 51 | } 52 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/btf/doc.go: -------------------------------------------------------------------------------- 1 | // Package btf handles data encoded according to the BPF Type Format. 2 | // 3 | // The canonical documentation lives in the Linux kernel repository and is 4 | // available at https://www.kernel.org/doc/html/latest/bpf/btf.html 5 | package btf 6 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/btf/workarounds.go: -------------------------------------------------------------------------------- 1 | package btf 2 | 3 | // datasecResolveWorkaround ensures that certain vars in a Datasec are added 4 | // to a Spec before the Datasec. This avoids a bug in kernel BTF validation. 5 | // 6 | // See https://lore.kernel.org/bpf/20230302123440.1193507-1-lmb@isovalent.com/ 7 | func datasecResolveWorkaround(b *Builder, ds *Datasec) error { 8 | for _, vsi := range ds.Vars { 9 | v, ok := vsi.Type.(*Var) 10 | if !ok { 11 | continue 12 | } 13 | 14 | switch v.Type.(type) { 15 | case *Typedef, *Volatile, *Const, *Restrict, *TypeTag: 16 | // NB: We must never call Add on a Datasec, otherwise we risk 17 | // infinite recursion. 18 | _, err := b.Add(v.Type) 19 | if err != nil { 20 | return err 21 | } 22 | } 23 | } 24 | 25 | return nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/buffer.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import ( 4 | "bytes" 5 | "sync" 6 | ) 7 | 8 | var bytesBufferPool = sync.Pool{ 9 | New: func() interface{} { 10 | return new(bytes.Buffer) 11 | }, 12 | } 13 | 14 | // NewBuffer retrieves a [bytes.Buffer] from a pool an re-initialises it. 15 | // 16 | // The returned buffer should be passed to [PutBuffer]. 17 | func NewBuffer(buf []byte) *bytes.Buffer { 18 | wr := bytesBufferPool.Get().(*bytes.Buffer) 19 | // Reinitialize the Buffer with a new backing slice since it is returned to 20 | // the caller by wr.Bytes() below. Pooling is faster despite calling 21 | // NewBuffer. The pooled alloc is still reused, it only needs to be zeroed. 22 | *wr = *bytes.NewBuffer(buf) 23 | return wr 24 | } 25 | 26 | // PutBuffer releases a buffer to the pool. 27 | func PutBuffer(buf *bytes.Buffer) { 28 | // Release reference to the backing buffer. 29 | *buf = *bytes.NewBuffer(nil) 30 | bytesBufferPool.Put(buf) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/endian_be.go: -------------------------------------------------------------------------------- 1 | //go:build armbe || arm64be || mips || mips64 || mips64p32 || ppc64 || s390 || s390x || sparc || sparc64 2 | 3 | package internal 4 | 5 | import "encoding/binary" 6 | 7 | // NativeEndian is set to either binary.BigEndian or binary.LittleEndian, 8 | // depending on the host's endianness. 9 | var NativeEndian = binary.BigEndian 10 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/endian_le.go: -------------------------------------------------------------------------------- 1 | //go:build 386 || amd64 || amd64p32 || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || ppc64le || riscv64 2 | 3 | package internal 4 | 5 | import "encoding/binary" 6 | 7 | // NativeEndian is set to either binary.BigEndian or binary.LittleEndian, 8 | // depending on the host's endianness. 9 | var NativeEndian = binary.LittleEndian 10 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/goos.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import "runtime" 4 | 5 | const ( 6 | OnLinux = runtime.GOOS == "linux" 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/kallsyms/cache.go: -------------------------------------------------------------------------------- 1 | package kallsyms 2 | 3 | import "sync" 4 | 5 | type cache[K, V comparable] struct { 6 | m sync.Map 7 | } 8 | 9 | func (c *cache[K, V]) Load(key K) (value V, _ bool) { 10 | v, ok := c.m.Load(key) 11 | if !ok { 12 | return value, false 13 | } 14 | value = v.(V) 15 | return value, true 16 | } 17 | 18 | func (c *cache[K, V]) Store(key K, value V) { 19 | c.m.Store(key, value) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/linux/doc.go: -------------------------------------------------------------------------------- 1 | // Package linux contains OS specific wrappers around package unix. 2 | package linux 3 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/linux/kconfig.go: -------------------------------------------------------------------------------- 1 | package linux 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | ) 7 | 8 | // FindKConfig searches for a kconfig file on the host. 9 | // 10 | // It first reads from /boot/config- of the current running kernel and tries 11 | // /proc/config.gz if nothing was found in /boot. 12 | // If none of the file provide a kconfig, it returns an error. 13 | func FindKConfig() (*os.File, error) { 14 | kernelRelease, err := KernelRelease() 15 | if err != nil { 16 | return nil, fmt.Errorf("cannot get kernel release: %w", err) 17 | } 18 | 19 | path := "/boot/config-" + kernelRelease 20 | f, err := os.Open(path) 21 | if err == nil { 22 | return f, nil 23 | } 24 | 25 | f, err = os.Open("/proc/config.gz") 26 | if err == nil { 27 | return f, nil 28 | } 29 | 30 | return nil, fmt.Errorf("neither %s nor /proc/config.gz provide a kconfig", path) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/linux/platform.go: -------------------------------------------------------------------------------- 1 | package linux 2 | 3 | import ( 4 | "runtime" 5 | ) 6 | 7 | // PlatformPrefix returns the platform-dependent syscall wrapper prefix used by 8 | // the linux kernel. 9 | // 10 | // Based on https://github.com/golang/go/blob/master/src/go/build/syslist.go 11 | // and https://github.com/libbpf/libbpf/blob/master/src/libbpf.c#L10047 12 | func PlatformPrefix() string { 13 | switch runtime.GOARCH { 14 | case "386": 15 | return "__ia32_" 16 | case "amd64", "amd64p32": 17 | return "__x64_" 18 | 19 | case "arm", "armbe": 20 | return "__arm_" 21 | case "arm64", "arm64be": 22 | return "__arm64_" 23 | 24 | case "mips", "mipsle", "mips64", "mips64le", "mips64p32", "mips64p32le": 25 | return "__mips_" 26 | 27 | case "s390": 28 | return "__s390_" 29 | case "s390x": 30 | return "__s390x_" 31 | 32 | case "riscv", "riscv64": 33 | return "__riscv_" 34 | 35 | case "ppc": 36 | return "__powerpc_" 37 | case "ppc64", "ppc64le": 38 | return "__powerpc64_" 39 | 40 | default: 41 | return "" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/linux/statfs.go: -------------------------------------------------------------------------------- 1 | package linux 2 | 3 | import ( 4 | "unsafe" 5 | 6 | "github.com/cilium/ebpf/internal/unix" 7 | ) 8 | 9 | func FSType(path string) (int64, error) { 10 | var statfs unix.Statfs_t 11 | if err := unix.Statfs(path, &statfs); err != nil { 12 | return 0, err 13 | } 14 | 15 | fsType := int64(statfs.Type) 16 | if unsafe.Sizeof(statfs.Type) == 4 { 17 | // We're on a 32 bit arch, where statfs.Type is int32. bpfFSType is a 18 | // negative number when interpreted as int32 so we need to cast via 19 | // uint32 to avoid sign extension. 20 | fsType = int64(uint32(statfs.Type)) 21 | } 22 | return fsType, nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/linux/version.go: -------------------------------------------------------------------------------- 1 | package linux 2 | 3 | import ( 4 | "fmt" 5 | "sync" 6 | 7 | "github.com/cilium/ebpf/internal" 8 | "github.com/cilium/ebpf/internal/unix" 9 | ) 10 | 11 | // KernelVersion returns the version of the currently running kernel. 12 | var KernelVersion = sync.OnceValues(detectKernelVersion) 13 | 14 | // detectKernelVersion returns the version of the running kernel. 15 | func detectKernelVersion() (internal.Version, error) { 16 | vc, err := vdsoVersion() 17 | if err != nil { 18 | return internal.Version{}, err 19 | } 20 | return internal.NewVersionFromCode(vc), nil 21 | } 22 | 23 | // KernelRelease returns the release string of the running kernel. 24 | // Its format depends on the Linux distribution and corresponds to directory 25 | // names in /lib/modules by convention. Some examples are 5.15.17-1-lts and 26 | // 4.19.0-16-amd64. 27 | func KernelRelease() (string, error) { 28 | var uname unix.Utsname 29 | if err := unix.Uname(&uname); err != nil { 30 | return "", fmt.Errorf("uname failed: %w", err) 31 | } 32 | 33 | return unix.ByteSliceToString(uname.Release[:]), nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/prog.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | // EmptyBPFContext is the smallest-possible BPF input context to be used for 4 | // invoking `Program.{Run,Benchmark,Test}`. 5 | // 6 | // Programs require a context input buffer of at least 15 bytes. Looking in 7 | // net/bpf/test_run.c, bpf_test_init() requires that the input is at least 8 | // ETH_HLEN (14) bytes. As of Linux commit fd18942 ("bpf: Don't redirect packets 9 | // with invalid pkt_len"), it also requires the skb to be non-empty after 10 | // removing the Layer 2 header. 11 | var EmptyBPFContext = make([]byte, 15) 12 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/sys/doc.go: -------------------------------------------------------------------------------- 1 | // Package sys contains bindings for the BPF syscall. 2 | package sys 3 | 4 | // Regenerate types.go by invoking go generate in the current directory. 5 | 6 | //go:generate go run github.com/cilium/ebpf/internal/cmd/gentypes ../../btf/testdata/vmlinux.btf.gz 7 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/sys/ptr_32_be.go: -------------------------------------------------------------------------------- 1 | //go:build armbe || mips || mips64p32 2 | 3 | package sys 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | // Pointer wraps an unsafe.Pointer to be 64bit to 10 | // conform to the syscall specification. 11 | type Pointer struct { 12 | pad uint32 13 | ptr unsafe.Pointer 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/sys/ptr_32_le.go: -------------------------------------------------------------------------------- 1 | //go:build 386 || amd64p32 || arm || mipsle || mips64p32le 2 | 3 | package sys 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | // Pointer wraps an unsafe.Pointer to be 64bit to 10 | // conform to the syscall specification. 11 | type Pointer struct { 12 | ptr unsafe.Pointer 13 | pad uint32 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/sys/ptr_64.go: -------------------------------------------------------------------------------- 1 | //go:build !386 && !amd64p32 && !arm && !mipsle && !mips64p32le && !armbe && !mips && !mips64p32 2 | 3 | package sys 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | // Pointer wraps an unsafe.Pointer to be 64bit to 10 | // conform to the syscall specification. 11 | type Pointer struct { 12 | ptr unsafe.Pointer 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/sysenc/doc.go: -------------------------------------------------------------------------------- 1 | // Package sysenc provides efficient conversion of Go values to system 2 | // call interfaces. 3 | package sysenc 4 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/testutils/fdtrace/main.go: -------------------------------------------------------------------------------- 1 | package fdtrace 2 | 3 | import ( 4 | "os" 5 | "sync" 6 | ) 7 | 8 | type testingM interface { 9 | Run() int 10 | } 11 | 12 | // TestMain runs m with fd tracing enabled. 13 | // 14 | // The function calls [os.Exit] and does not return. 15 | func TestMain(m testingM) { 16 | fds = new(sync.Map) 17 | 18 | ret := m.Run() 19 | 20 | if fs := flushFrames(); len(fs) != 0 { 21 | for _, f := range fs { 22 | onLeakFD(f) 23 | } 24 | } 25 | 26 | if foundLeak.Load() { 27 | ret = 99 28 | } 29 | 30 | os.Exit(ret) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/tracefs/probetype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=ProbeType -linecomment"; DO NOT EDIT. 2 | 3 | package tracefs 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[Kprobe-0] 12 | _ = x[Uprobe-1] 13 | } 14 | 15 | const _ProbeType_name = "kprobeuprobe" 16 | 17 | var _ProbeType_index = [...]uint8{0, 6, 12} 18 | 19 | func (i ProbeType) String() string { 20 | if i >= ProbeType(len(_ProbeType_index)-1) { 21 | return "ProbeType(" + strconv.FormatInt(int64(i), 10) + ")" 22 | } 23 | return _ProbeType_name[_ProbeType_index[i]:_ProbeType_index[i+1]] 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/tracefs/uprobe.go: -------------------------------------------------------------------------------- 1 | package tracefs 2 | 3 | import "fmt" 4 | 5 | // UprobeToken creates the PATH:OFFSET(REF_CTR_OFFSET) token for the tracefs api. 6 | func UprobeToken(args ProbeArgs) string { 7 | po := fmt.Sprintf("%s:%#x", args.Path, args.Offset) 8 | 9 | if args.RefCtrOffset != 0 { 10 | // This is not documented in Documentation/trace/uprobetracer.txt. 11 | // elixir.bootlin.com/linux/v5.15-rc7/source/kernel/trace/trace.c#L5564 12 | po += fmt.Sprintf("(%#x)", args.RefCtrOffset) 13 | } 14 | 15 | return po 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/unix/doc.go: -------------------------------------------------------------------------------- 1 | // Package unix re-exports Linux specific parts of golang.org/x/sys/unix. 2 | // 3 | // It avoids breaking compilation on other OS by providing stubs as follows: 4 | // - Invoking a function always returns an error. 5 | // - Errnos have distinct, non-zero values. 6 | // - Constants have distinct but meaningless values. 7 | // - Types use the same names for members, but may or may not follow the 8 | // Linux layout. 9 | package unix 10 | 11 | // Note: please don't add any custom API to this package. Use internal/sys instead. 12 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/unix/errno_linux.go: -------------------------------------------------------------------------------- 1 | package unix 2 | 3 | import ( 4 | "syscall" 5 | 6 | linux "golang.org/x/sys/unix" 7 | ) 8 | 9 | type Errno = syscall.Errno 10 | 11 | const ( 12 | E2BIG = linux.E2BIG 13 | EACCES = linux.EACCES 14 | EAGAIN = linux.EAGAIN 15 | EBADF = linux.EBADF 16 | EEXIST = linux.EEXIST 17 | EFAULT = linux.EFAULT 18 | EILSEQ = linux.EILSEQ 19 | EINTR = linux.EINTR 20 | EINVAL = linux.EINVAL 21 | ENODEV = linux.ENODEV 22 | ENOENT = linux.ENOENT 23 | ENOSPC = linux.ENOSPC 24 | EOPNOTSUPP = linux.EOPNOTSUPP 25 | EPERM = linux.EPERM 26 | EPOLLIN = linux.EPOLLIN 27 | ESRCH = linux.ESRCH 28 | ESTALE = linux.ESTALE 29 | ) 30 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/unix/errno_other.go: -------------------------------------------------------------------------------- 1 | //go:build !linux && !windows 2 | 3 | package unix 4 | 5 | import "syscall" 6 | 7 | type Errno = syscall.Errno 8 | 9 | // Errnos are distinct and non-zero. 10 | const ( 11 | E2BIG Errno = iota + 1 12 | EACCES 13 | EAGAIN 14 | EBADF 15 | EEXIST 16 | EFAULT 17 | EILSEQ 18 | EINTR 19 | EINVAL 20 | ENODEV 21 | ENOENT 22 | ENOSPC 23 | ENOTSUP 24 | ENOTSUPP 25 | EOPNOTSUPP 26 | EPERM 27 | ESRCH 28 | ESTALE 29 | ) 30 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/unix/error.go: -------------------------------------------------------------------------------- 1 | package unix 2 | 3 | import ( 4 | "fmt" 5 | "runtime" 6 | "strings" 7 | 8 | "github.com/cilium/ebpf/internal" 9 | ) 10 | 11 | // errNonLinux returns an error which wraps [internal.ErrNotSupportedOnOS] and 12 | // includes the name of the calling function. 13 | func errNonLinux() error { 14 | name := "unknown" 15 | pc, _, _, ok := runtime.Caller(1) 16 | if ok { 17 | name = runtime.FuncForPC(pc).Name() 18 | if pos := strings.LastIndexByte(name, '.'); pos != -1 { 19 | name = name[pos+1:] 20 | } 21 | } 22 | return fmt.Errorf("unix: %s: %w", name, internal.ErrNotSupportedOnOS) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/unix/strings_other.go: -------------------------------------------------------------------------------- 1 | //go:build !linux && !windows 2 | 3 | package unix 4 | 5 | func BytePtrFromString(s string) (*byte, error) { 6 | return nil, errNonLinux() 7 | } 8 | 9 | func ByteSliceToString(s []byte) string { 10 | return "" 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/internal/unix/strings_windows.go: -------------------------------------------------------------------------------- 1 | package unix 2 | 3 | import ( 4 | "syscall" 5 | 6 | "golang.org/x/sys/windows" 7 | ) 8 | 9 | func BytePtrFromString(s string) (*byte, error) { 10 | p, err := windows.BytePtrFromString(s) 11 | if err == syscall.EINVAL { 12 | err = EINVAL 13 | } 14 | return p, err 15 | } 16 | 17 | func ByteSliceToString(s []byte) string { 18 | return windows.ByteSliceToString(s) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/link/doc.go: -------------------------------------------------------------------------------- 1 | // Package link allows attaching eBPF programs to various kernel hooks. 2 | package link 3 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/link/socket_filter.go: -------------------------------------------------------------------------------- 1 | package link 2 | 3 | import ( 4 | "syscall" 5 | 6 | "github.com/cilium/ebpf" 7 | "github.com/cilium/ebpf/internal/unix" 8 | ) 9 | 10 | // AttachSocketFilter attaches a SocketFilter BPF program to a socket. 11 | func AttachSocketFilter(conn syscall.Conn, program *ebpf.Program) error { 12 | rawConn, err := conn.SyscallConn() 13 | if err != nil { 14 | return err 15 | } 16 | var ssoErr error 17 | err = rawConn.Control(func(fd uintptr) { 18 | ssoErr = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_ATTACH_BPF, program.FD()) 19 | }) 20 | if ssoErr != nil { 21 | return ssoErr 22 | } 23 | return err 24 | } 25 | 26 | // DetachSocketFilter detaches a SocketFilter BPF program from a socket. 27 | func DetachSocketFilter(conn syscall.Conn) error { 28 | rawConn, err := conn.SyscallConn() 29 | if err != nil { 30 | return err 31 | } 32 | var ssoErr error 33 | err = rawConn.Control(func(fd uintptr) { 34 | ssoErr = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_DETACH_BPF, 0) 35 | }) 36 | if ssoErr != nil { 37 | return ssoErr 38 | } 39 | return err 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/cilium/ebpf/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | base = "docs/" 3 | publish = "site/" 4 | command = "mkdocs build" 5 | environment = { PYTHON_VERSION = "3.13" } 6 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/console/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | enable: 3 | - gofmt 4 | - goimports 5 | - ineffassign 6 | - misspell 7 | - revive 8 | - staticcheck 9 | - structcheck 10 | - unconvert 11 | - unused 12 | - varcheck 13 | - vet 14 | disable: 15 | - errcheck 16 | 17 | run: 18 | timeout: 3m 19 | skip-dirs: 20 | - vendor 21 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/console/pty_unix.go: -------------------------------------------------------------------------------- 1 | //go:build darwin || linux || netbsd || openbsd 2 | // +build darwin linux netbsd openbsd 3 | 4 | /* 5 | Copyright The containerd Authors. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | */ 19 | 20 | package console 21 | 22 | import ( 23 | "os" 24 | 25 | "golang.org/x/sys/unix" 26 | ) 27 | 28 | // openpt allocates a new pseudo-terminal by opening the /dev/ptmx device 29 | func openpt() (*os.File, error) { 30 | return os.OpenFile("/dev/ptmx", unix.O_RDWR|unix.O_NOCTTY|unix.O_CLOEXEC, 0) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/containerd/console/tc_zos.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The containerd Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package console 18 | 19 | import ( 20 | "strings" 21 | 22 | "golang.org/x/sys/unix" 23 | ) 24 | 25 | const ( 26 | cmdTcGet = unix.TCGETS 27 | cmdTcSet = unix.TCSETS 28 | ) 29 | 30 | // unlockpt is a no-op on zos. 31 | func unlockpt(File) error { 32 | return nil 33 | } 34 | 35 | // ptsname retrieves the name of the first available pts for the given master. 36 | func ptsname(f File) (string, error) { 37 | return "/dev/ttyp" + strings.TrimPrefix(f.Name(), "/dev/ptyp"), nil 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/go-systemd/v22/NOTICE: -------------------------------------------------------------------------------- 1 | CoreOS Project 2 | Copyright 2018 CoreOS, Inc 3 | 4 | This product includes software developed at CoreOS, Inc. 5 | (http://www.coreos.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/go-systemd/v22/activation/files_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 CoreOS, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package activation 16 | 17 | import "os" 18 | 19 | func Files(unsetEnv bool) []*os.File { 20 | return nil 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go: -------------------------------------------------------------------------------- 1 | package md2man 2 | 3 | import ( 4 | "os" 5 | "strconv" 6 | 7 | "github.com/russross/blackfriday/v2" 8 | ) 9 | 10 | // Render converts a markdown document into a roff formatted document. 11 | func Render(doc []byte) []byte { 12 | renderer := NewRoffRenderer() 13 | var r blackfriday.Renderer = renderer 14 | if v, _ := strconv.ParseBool(os.Getenv("MD2MAN_DEBUG")); v { 15 | r = &debugDecorator{Renderer: r} 16 | } 17 | 18 | return blackfriday.Run(doc, 19 | []blackfriday.Option{ 20 | blackfriday.WithRenderer(r), 21 | blackfriday.WithExtensions(renderer.GetExtensions()), 22 | }...) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/cyphar/filepath-securejoin/VERSION: -------------------------------------------------------------------------------- 1 | 0.4.1 2 | -------------------------------------------------------------------------------- /vendor/github.com/cyphar/filepath-securejoin/gocompat_errors_go120.go: -------------------------------------------------------------------------------- 1 | //go:build linux && go1.20 2 | 3 | // Copyright (C) 2024 SUSE LLC. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package securejoin 8 | 9 | import ( 10 | "fmt" 11 | ) 12 | 13 | // wrapBaseError is a helper that is equivalent to fmt.Errorf("%w: %w"), except 14 | // that on pre-1.20 Go versions only errors.Is() works properly (errors.Unwrap) 15 | // is only guaranteed to give you baseErr. 16 | func wrapBaseError(baseErr, extraErr error) error { 17 | return fmt.Errorf("%w: %w", extraErr, baseErr) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/cyphar/filepath-securejoin/gocompat_errors_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build linux && !go1.20 2 | 3 | // Copyright (C) 2024 SUSE LLC. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package securejoin 8 | 9 | import ( 10 | "fmt" 11 | ) 12 | 13 | type wrappedError struct { 14 | inner error 15 | isError error 16 | } 17 | 18 | func (err wrappedError) Is(target error) bool { 19 | return err.isError == target 20 | } 21 | 22 | func (err wrappedError) Unwrap() error { 23 | return err.inner 24 | } 25 | 26 | func (err wrappedError) Error() string { 27 | return fmt.Sprintf("%v: %v", err.isError, err.inner) 28 | } 29 | 30 | // wrapBaseError is a helper that is equivalent to fmt.Errorf("%w: %w"), except 31 | // that on pre-1.20 Go versions only errors.Is() works properly (errors.Unwrap) 32 | // is only guaranteed to give you baseErr. 33 | func wrapBaseError(baseErr, extraErr error) error { 34 | return wrappedError{ 35 | inner: baseErr, 36 | isError: extraErr, 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/cyphar/filepath-securejoin/gocompat_generics_go121.go: -------------------------------------------------------------------------------- 1 | //go:build linux && go1.21 2 | 3 | // Copyright (C) 2024 SUSE LLC. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package securejoin 8 | 9 | import ( 10 | "slices" 11 | "sync" 12 | ) 13 | 14 | func slices_DeleteFunc[S ~[]E, E any](slice S, delFn func(E) bool) S { 15 | return slices.DeleteFunc(slice, delFn) 16 | } 17 | 18 | func slices_Contains[S ~[]E, E comparable](slice S, val E) bool { 19 | return slices.Contains(slice, val) 20 | } 21 | 22 | func slices_Clone[S ~[]E, E any](slice S) S { 23 | return slices.Clone(slice) 24 | } 25 | 26 | func sync_OnceValue[T any](f func() T) func() T { 27 | return sync.OnceValue(f) 28 | } 29 | 30 | func sync_OnceValues[T1, T2 any](f func() (T1, T2)) func() (T1, T2) { 31 | return sync.OnceValues(f) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. 14 | 15 | go-units is licensed under the Apache License, Version 2.0. 16 | See [LICENSE](LICENSE) for the full text of the license. 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | post: 3 | # install golint 4 | - go get golang.org/x/lint/golint 5 | 6 | test: 7 | pre: 8 | # run analysis before tests 9 | - go vet ./... 10 | - test -z "$(golint ./... | tee /dev/stderr)" 11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 12 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Brandon Philips (@philips) 2 | Brian Waldon (@bcwaldon) 3 | John Southworth (@jsouthworth) 4 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/auth_anonymous.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | // AuthAnonymous returns an Auth that uses the ANONYMOUS mechanism. 4 | func AuthAnonymous() Auth { 5 | return &authAnonymous{} 6 | } 7 | 8 | type authAnonymous struct{} 9 | 10 | func (a *authAnonymous) FirstData() (name, resp []byte, status AuthStatus) { 11 | return []byte("ANONYMOUS"), nil, AuthOk 12 | } 13 | 14 | func (a *authAnonymous) HandleData(data []byte) (resp []byte, status AuthStatus) { 15 | return nil, AuthError 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/auth_external.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "encoding/hex" 5 | ) 6 | 7 | // AuthExternal returns an Auth that authenticates as the given user with the 8 | // EXTERNAL mechanism. 9 | func AuthExternal(user string) Auth { 10 | return authExternal{user} 11 | } 12 | 13 | // AuthExternal implements the EXTERNAL authentication mechanism. 14 | type authExternal struct { 15 | user string 16 | } 17 | 18 | func (a authExternal) FirstData() ([]byte, []byte, AuthStatus) { 19 | b := make([]byte, 2*len(a.user)) 20 | hex.Encode(b, []byte(a.user)) 21 | return []byte("EXTERNAL"), b, AuthOk 22 | } 23 | 24 | func (a authExternal) HandleData(b []byte) ([]byte, AuthStatus) { 25 | return nil, AuthError 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/conn_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "os" 7 | "os/exec" 8 | ) 9 | 10 | const defaultSystemBusAddress = "unix:path=/opt/local/var/run/dbus/system_bus_socket" 11 | 12 | func getSessionBusPlatformAddress() (string, error) { 13 | cmd := exec.Command("launchctl", "getenv", "DBUS_LAUNCHD_SESSION_BUS_SOCKET") 14 | b, err := cmd.CombinedOutput() 15 | 16 | if err != nil { 17 | return "", err 18 | } 19 | 20 | if len(b) == 0 { 21 | return "", errors.New("dbus: couldn't determine address of session bus") 22 | } 23 | 24 | return "unix:path=" + string(b[:len(b)-1]), nil 25 | } 26 | 27 | func getSystemBusPlatformAddress() string { 28 | address := os.Getenv("DBUS_LAUNCHD_SESSION_BUS_SOCKET") 29 | if address != "" { 30 | return fmt.Sprintf("unix:path=%s", address) 31 | } 32 | return defaultSystemBusAddress 33 | } 34 | 35 | func tryDiscoverDbusSessionBusAddress() string { 36 | return "" 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/conn_unix.go: -------------------------------------------------------------------------------- 1 | //+build !windows,!solaris,!darwin 2 | 3 | package dbus 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | const defaultSystemBusAddress = "unix:path=/var/run/dbus/system_bus_socket" 10 | 11 | func getSystemBusPlatformAddress() string { 12 | address := os.Getenv("DBUS_SYSTEM_BUS_ADDRESS") 13 | if address != "" { 14 | return address 15 | } 16 | return defaultSystemBusAddress 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/conn_windows.go: -------------------------------------------------------------------------------- 1 | //+build windows 2 | 3 | package dbus 4 | 5 | import "os" 6 | 7 | const defaultSystemBusAddress = "tcp:host=127.0.0.1,port=12434" 8 | 9 | func getSystemBusPlatformAddress() string { 10 | address := os.Getenv("DBUS_SYSTEM_BUS_ADDRESS") 11 | if address != "" { 12 | return address 13 | } 14 | return defaultSystemBusAddress 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/homedir.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "os" 5 | "os/user" 6 | ) 7 | 8 | // Get returns the home directory of the current user, which is usually the 9 | // value of HOME environment variable. In case it is not set or empty, os/user 10 | // package is used. 11 | // 12 | // If linking statically with cgo enabled against glibc, make sure the 13 | // osusergo build tag is used. 14 | // 15 | // If needing to do nss lookups, do not disable cgo or set osusergo. 16 | func getHomeDir() string { 17 | homeDir := os.Getenv("HOME") 18 | if homeDir != "" { 19 | return homeDir 20 | } 21 | if u, err := user.Current(); err == nil { 22 | return u.HomeDir 23 | } 24 | return "/" 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/sequence.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | // Sequence represents the value of a monotonically increasing counter. 4 | type Sequence uint64 5 | 6 | const ( 7 | // NoSequence indicates the absence of a sequence value. 8 | NoSequence Sequence = 0 9 | ) 10 | 11 | // sequenceGenerator represents a monotonically increasing counter. 12 | type sequenceGenerator struct { 13 | nextSequence Sequence 14 | } 15 | 16 | func (generator *sequenceGenerator) next() Sequence { 17 | result := generator.nextSequence 18 | generator.nextSequence++ 19 | return result 20 | } 21 | 22 | func newSequenceGenerator() *sequenceGenerator { 23 | return &sequenceGenerator{nextSequence: 1} 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_darwin.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | func (t *unixTransport) SendNullByte() error { 4 | _, err := t.Write([]byte{0}) 5 | return err 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_nonce_tcp.go: -------------------------------------------------------------------------------- 1 | //+build !windows 2 | 3 | package dbus 4 | 5 | import ( 6 | "errors" 7 | "io/ioutil" 8 | "net" 9 | ) 10 | 11 | func init() { 12 | transports["nonce-tcp"] = newNonceTcpTransport 13 | } 14 | 15 | func newNonceTcpTransport(keys string) (transport, error) { 16 | host := getKey(keys, "host") 17 | port := getKey(keys, "port") 18 | noncefile := getKey(keys, "noncefile") 19 | if host == "" || port == "" || noncefile == "" { 20 | return nil, errors.New("dbus: unsupported address (must set host, port and noncefile)") 21 | } 22 | protocol, err := tcpFamily(keys) 23 | if err != nil { 24 | return nil, err 25 | } 26 | socket, err := net.Dial(protocol, net.JoinHostPort(host, port)) 27 | if err != nil { 28 | return nil, err 29 | } 30 | b, err := ioutil.ReadFile(noncefile) 31 | if err != nil { 32 | return nil, err 33 | } 34 | _, err = socket.Write(b) 35 | if err != nil { 36 | return nil, err 37 | } 38 | return NewConn(socket) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_tcp.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import ( 4 | "errors" 5 | "net" 6 | ) 7 | 8 | func init() { 9 | transports["tcp"] = newTcpTransport 10 | } 11 | 12 | func tcpFamily(keys string) (string, error) { 13 | switch getKey(keys, "family") { 14 | case "": 15 | return "tcp", nil 16 | case "ipv4": 17 | return "tcp4", nil 18 | case "ipv6": 19 | return "tcp6", nil 20 | default: 21 | return "", errors.New("dbus: invalid tcp family (must be ipv4 or ipv6)") 22 | } 23 | } 24 | 25 | func newTcpTransport(keys string) (transport, error) { 26 | host := getKey(keys, "host") 27 | port := getKey(keys, "port") 28 | if host == "" || port == "" { 29 | return nil, errors.New("dbus: unsupported address (must set host and port)") 30 | } 31 | 32 | protocol, err := tcpFamily(keys) 33 | if err != nil { 34 | return nil, err 35 | } 36 | socket, err := net.Dial(protocol, net.JoinHostPort(host, port)) 37 | if err != nil { 38 | return nil, err 39 | } 40 | return NewConn(socket) 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_unixcred_linux.go: -------------------------------------------------------------------------------- 1 | // The UnixCredentials system call is currently only implemented on Linux 2 | // http://golang.org/src/pkg/syscall/sockcmsg_linux.go 3 | // https://golang.org/s/go1.4-syscall 4 | // http://code.google.com/p/go/source/browse/unix/sockcmsg_linux.go?repo=sys 5 | 6 | package dbus 7 | 8 | import ( 9 | "io" 10 | "os" 11 | "syscall" 12 | ) 13 | 14 | func (t *unixTransport) SendNullByte() error { 15 | ucred := &syscall.Ucred{Pid: int32(os.Getpid()), Uid: uint32(os.Getuid()), Gid: uint32(os.Getgid())} 16 | b := syscall.UnixCredentials(ucred) 17 | _, oobn, err := t.UnixConn.WriteMsgUnix([]byte{0}, b, nil) 18 | if err != nil { 19 | return err 20 | } 21 | if oobn != len(b) { 22 | return io.ErrShortWrite 23 | } 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_unixcred_netbsd.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import "io" 4 | 5 | func (t *unixTransport) SendNullByte() error { 6 | n, _, err := t.UnixConn.WriteMsgUnix([]byte{0}, nil, nil) 7 | if err != nil { 8 | return err 9 | } 10 | if n != 1 { 11 | return io.ErrShortWrite 12 | } 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_unixcred_openbsd.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | import "io" 4 | 5 | func (t *unixTransport) SendNullByte() error { 6 | n, _, err := t.UnixConn.WriteMsgUnix([]byte{0}, nil, nil) 7 | if err != nil { 8 | return err 9 | } 10 | if n != 1 { 11 | return io.ErrShortWrite 12 | } 13 | return nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/godbus/dbus/v5/transport_zos.go: -------------------------------------------------------------------------------- 1 | package dbus 2 | 3 | func (t *unixTransport) SendNullByte() error { 4 | _, err := t.Write([]byte{0}) 5 | return err 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/capability/README.md: -------------------------------------------------------------------------------- 1 | This is a fork of (apparently no longer maintained) 2 | https://github.com/syndtr/gocapability package. It provides basic primitives to 3 | work with [Linux capabilities][capabilities(7)]. 4 | 5 | For changes, see [CHANGELOG.md](./CHANGELOG.md). 6 | 7 | [![Go Reference](https://pkg.go.dev/badge/github.com/moby/sys/capability/capability.svg)](https://pkg.go.dev/github.com/moby/sys/capability) 8 | 9 | ## Alternatives 10 | 11 | * https://pkg.go.dev/kernel.org/pub/linux/libs/security/libcap/cap 12 | 13 | [capabilities(7)]: https://man7.org/linux/man-pages/man7/capabilities.7.html 14 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/capability/capability_noop.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Capability Authors. 2 | // Copyright 2013 Suryandaru Triandana 3 | // All rights reserved. 4 | // 5 | // Use of this source code is governed by a BSD-style 6 | // license that can be found in the LICENSE file. 7 | 8 | //go:build !linux 9 | 10 | package capability 11 | 12 | import "errors" 13 | 14 | var errNotSup = errors.New("not supported") 15 | 16 | func newPid(_ int) (Capabilities, error) { 17 | return nil, errNotSup 18 | } 19 | 20 | func newFile(_ string) (Capabilities, error) { 21 | return nil, errNotSup 22 | } 23 | 24 | func lastCap() (Cap, error) { 25 | return -1, errNotSup 26 | } 27 | 28 | func getAmbient(_ Cap) (bool, error) { 29 | return false, errNotSup 30 | } 31 | 32 | func setAmbient(_ bool, _ ...Cap) error { 33 | return errNotSup 34 | } 35 | 36 | func resetAmbient() error { 37 | return errNotSup 38 | } 39 | 40 | func getBound(_ Cap) (bool, error) { 41 | return false, errNotSup 42 | } 43 | 44 | func dropBound(_ ...Cap) error { 45 | return errNotSup 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/mountinfo/mountinfo_freebsdlike.go: -------------------------------------------------------------------------------- 1 | //go:build freebsd || darwin 2 | // +build freebsd darwin 3 | 4 | package mountinfo 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | func getMountinfo(entry *unix.Statfs_t) *Info { 9 | return &Info{ 10 | Mountpoint: unix.ByteSliceToString(entry.Mntonname[:]), 11 | FSType: unix.ByteSliceToString(entry.Fstypename[:]), 12 | Source: unix.ByteSliceToString(entry.Mntfromname[:]), 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/mountinfo/mountinfo_openbsd.go: -------------------------------------------------------------------------------- 1 | package mountinfo 2 | 3 | import "golang.org/x/sys/unix" 4 | 5 | func getMountinfo(entry *unix.Statfs_t) *Info { 6 | return &Info{ 7 | Mountpoint: unix.ByteSliceToString(entry.F_mntonname[:]), 8 | FSType: unix.ByteSliceToString(entry.F_fstypename[:]), 9 | Source: unix.ByteSliceToString(entry.F_mntfromname[:]), 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/mountinfo/mountinfo_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !windows && !linux && !freebsd && !openbsd && !darwin 2 | // +build !windows,!linux,!freebsd,!openbsd,!darwin 3 | 4 | package mountinfo 5 | 6 | import ( 7 | "fmt" 8 | "runtime" 9 | ) 10 | 11 | var errNotImplemented = fmt.Errorf("not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 12 | 13 | func parseMountTable(_ FilterFunc) ([]*Info, error) { 14 | return nil, errNotImplemented 15 | } 16 | 17 | func mounted(path string) (bool, error) { 18 | return false, errNotImplemented 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/mountinfo/mountinfo_windows.go: -------------------------------------------------------------------------------- 1 | package mountinfo 2 | 3 | func parseMountTable(_ FilterFunc) ([]*Info, error) { 4 | // Do NOT return an error! 5 | return nil, nil 6 | } 7 | 8 | func mounted(_ string) (bool, error) { 9 | return false, nil 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/user/idtools_windows.go: -------------------------------------------------------------------------------- 1 | package user 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | // This is currently a wrapper around [os.MkdirAll] since currently 8 | // permissions aren't set through this path, the identity isn't utilized. 9 | // Ownership is handled elsewhere, but in the future could be support here 10 | // too. 11 | func mkdirAs(path string, _ os.FileMode, _, _ int, _, _ bool) error { 12 | return os.MkdirAll(path, 0) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/user/user_fuzzer.go: -------------------------------------------------------------------------------- 1 | //go:build gofuzz 2 | // +build gofuzz 3 | 4 | package user 5 | 6 | import ( 7 | "io" 8 | "strings" 9 | ) 10 | 11 | func IsDivisbleBy(n int, divisibleby int) bool { 12 | return (n % divisibleby) == 0 13 | } 14 | 15 | func FuzzUser(data []byte) int { 16 | if len(data) == 0 { 17 | return -1 18 | } 19 | if !IsDivisbleBy(len(data), 5) { 20 | return -1 21 | } 22 | 23 | var divided [][]byte 24 | 25 | chunkSize := len(data) / 5 26 | 27 | for i := 0; i < len(data); i += chunkSize { 28 | end := i + chunkSize 29 | 30 | divided = append(divided, data[i:end]) 31 | } 32 | 33 | _, _ = ParsePasswdFilter(strings.NewReader(string(divided[0])), nil) 34 | 35 | var passwd, group io.Reader 36 | 37 | group = strings.NewReader(string(divided[1])) 38 | _, _ = GetAdditionalGroups([]string{string(divided[2])}, group) 39 | 40 | passwd = strings.NewReader(string(divided[3])) 41 | _, _ = GetExecUser(string(divided[4]), nil, passwd, group) 42 | return 1 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/userns/userns.go: -------------------------------------------------------------------------------- 1 | // Package userns provides utilities to detect whether we are currently running 2 | // in a Linux user namespace. 3 | // 4 | // This code was migrated from [libcontainer/runc], which based its implementation 5 | // on code from [lcx/incus]. 6 | // 7 | // [libcontainer/runc]: https://github.com/opencontainers/runc/blob/3778ae603c706494fd1e2c2faf83b406e38d687d/libcontainer/userns/userns_linux.go#L12-L49 8 | // [lcx/incus]: https://github.com/lxc/incus/blob/e45085dd42f826b3c8c3228e9733c0b6f998eafe/shared/util.go#L678-L700 9 | package userns 10 | 11 | // RunningInUserNS detects whether we are currently running in a Linux 12 | // user namespace and memoizes the result. It returns false on non-Linux 13 | // platforms. 14 | func RunningInUserNS() bool { 15 | return inUserNS() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/userns/userns_linux_fuzzer.go: -------------------------------------------------------------------------------- 1 | //go:build linux && gofuzz 2 | 3 | package userns 4 | 5 | func FuzzUIDMap(uidmap []byte) int { 6 | _ = uidMapInUserNS(string(uidmap)) 7 | return 1 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/moby/sys/userns/userns_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | 3 | package userns 4 | 5 | // inUserNS is a stub for non-Linux systems. Always returns false. 6 | func inUserNS() bool { return false } 7 | -------------------------------------------------------------------------------- /vendor/github.com/mrunalp/fileutils/.gitignore: -------------------------------------------------------------------------------- 1 | /gocp 2 | -------------------------------------------------------------------------------- /vendor/github.com/mrunalp/fileutils/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Mrunal Patel (@mrunalp) 2 | -------------------------------------------------------------------------------- /vendor/github.com/mrunalp/fileutils/README.md: -------------------------------------------------------------------------------- 1 | # fileutils 2 | 3 | Collection of utilities for file manipulation in golang 4 | 5 | The library is based on docker pkg/archive pkg/idtools but does copies instead of handling archive formats. 6 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @maintainer1 @maintainer2 @maintainer3 2 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Akihiro Suda (@AkihiroSuda) 2 | Aleksa Sarai (@cyphar) 3 | Kir Kolyshkin (@kolyshkin) 4 | Mrunal Patel (@mrunalp) 5 | Sebastiaan van Stijn (@thaJeztah) 6 | Odin Ugedal (@odinuge) 7 | Peter Hunt (@haircommander) 8 | Davanum Srinivas (@dims) 9 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/README.md: -------------------------------------------------------------------------------- 1 | # OCI Project Template 2 | 3 | Useful boilerplate and organizational information for all OCI projects. 4 | 5 | * README (this file) 6 | * [The Apache License, Version 2.0](LICENSE) 7 | * [A list of maintainers](MAINTAINERS) 8 | * [Maintainer guidelines](MAINTAINERS_GUIDE.md) 9 | * [Contributor guidelines](CONTRIBUTING.md) 10 | * [Project governance](GOVERNANCE.md) 11 | * [Release procedures](RELEASES.md) 12 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/config_hugepages.go: -------------------------------------------------------------------------------- 1 | package cgroups 2 | 3 | type HugepageLimit struct { 4 | // which type of hugepage to limit. 5 | Pagesize string `json:"page_size"` 6 | 7 | // usage limit for hugepage. 8 | Limit uint64 `json:"limit"` 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/config_ifprio_map.go: -------------------------------------------------------------------------------- 1 | package cgroups 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type IfPrioMap struct { 8 | Interface string `json:"interface"` 9 | Priority int64 `json:"priority"` 10 | } 11 | 12 | func (i *IfPrioMap) CgroupString() string { 13 | return fmt.Sprintf("%s %d", i.Interface, i.Priority) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/config_rdma.go: -------------------------------------------------------------------------------- 1 | package cgroups 2 | 3 | // LinuxRdma for Linux cgroup 'rdma' resource management (Linux 4.11) 4 | type LinuxRdma struct { 5 | // Maximum number of HCA handles that can be opened. Default is "no limit". 6 | HcaHandles *uint32 `json:"hca_handles,omitempty"` 7 | // Maximum number of HCA objects that can be created. Default is "no limit". 8 | HcaObjects *uint32 `json:"hca_objects,omitempty"` 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/config_unsupported.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | 3 | package cgroups 4 | 5 | // Cgroup holds properties of a cgroup on Linux 6 | // TODO Windows: This can ultimately be entirely factored out on Windows as 7 | // cgroups are a Unix-specific construct. 8 | type Cgroup struct{} 9 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/devices/config/mknod_unix.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "errors" 5 | 6 | "golang.org/x/sys/unix" 7 | ) 8 | 9 | func mkDev(d *Rule) (uint64, error) { 10 | if d.Major == Wildcard || d.Minor == Wildcard { 11 | return 0, errors.New("cannot mkdev() device with wildcards") 12 | } 13 | return unix.Mkdev(uint32(d.Major), uint32(d.Minor)), nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/devices/devices.go: -------------------------------------------------------------------------------- 1 | // Package devices contains functionality to manage cgroup devices, which 2 | // is exposed indirectly via libcontainer/cgroups managers. 3 | // 4 | // To enable cgroup managers to manage devices, this package must be imported. 5 | package devices 6 | 7 | import ( 8 | "github.com/opencontainers/cgroups" 9 | "github.com/opencontainers/cgroups/systemd" 10 | ) 11 | 12 | func init() { 13 | cgroups.DevicesSetV1 = setV1 14 | cgroups.DevicesSetV2 = setV2 15 | systemd.GenerateDeviceProps = systemdProperties 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/fs/devices.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "github.com/opencontainers/cgroups" 5 | ) 6 | 7 | type DevicesGroup struct{} 8 | 9 | func (s *DevicesGroup) Name() string { 10 | return "devices" 11 | } 12 | 13 | func (s *DevicesGroup) Apply(path string, r *cgroups.Resources, pid int) error { 14 | if r.SkipDevices { 15 | return nil 16 | } 17 | if path == "" { 18 | // Return error here, since devices cgroup 19 | // is a hard requirement for container's security. 20 | return errSubsystemDoesNotExist 21 | } 22 | 23 | return apply(path, pid) 24 | } 25 | 26 | func (s *DevicesGroup) Set(path string, r *cgroups.Resources) error { 27 | if cgroups.DevicesSetV1 == nil { 28 | if len(r.Devices) == 0 { 29 | return nil 30 | } 31 | return cgroups.ErrDevicesUnsupported 32 | } 33 | return cgroups.DevicesSetV1(path, r) 34 | } 35 | 36 | func (s *DevicesGroup) GetStats(path string, stats *cgroups.Stats) error { 37 | return nil 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/fs/error.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/opencontainers/cgroups/fscommon" 7 | ) 8 | 9 | type parseError = fscommon.ParseError 10 | 11 | // malformedLine is used by all cgroupfs file parsers that expect a line 12 | // in a particular format but get some garbage instead. 13 | func malformedLine(path, file, line string) error { 14 | return &parseError{Path: path, File: file, Err: fmt.Errorf("malformed line: %s", line)} 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/fs/name.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "github.com/opencontainers/cgroups" 5 | ) 6 | 7 | type NameGroup struct { 8 | GroupName string 9 | Join bool 10 | } 11 | 12 | func (s *NameGroup) Name() string { 13 | return s.GroupName 14 | } 15 | 16 | func (s *NameGroup) Apply(path string, _ *cgroups.Resources, pid int) error { 17 | if s.Join { 18 | // Ignore errors if the named cgroup does not exist. 19 | _ = apply(path, pid) 20 | } 21 | return nil 22 | } 23 | 24 | func (s *NameGroup) Set(_ string, _ *cgroups.Resources) error { 25 | return nil 26 | } 27 | 28 | func (s *NameGroup) GetStats(path string, stats *cgroups.Stats) error { 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/fs/net_cls.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/opencontainers/cgroups" 7 | ) 8 | 9 | type NetClsGroup struct{} 10 | 11 | func (s *NetClsGroup) Name() string { 12 | return "net_cls" 13 | } 14 | 15 | func (s *NetClsGroup) Apply(path string, _ *cgroups.Resources, pid int) error { 16 | return apply(path, pid) 17 | } 18 | 19 | func (s *NetClsGroup) Set(path string, r *cgroups.Resources) error { 20 | if r.NetClsClassid != 0 { 21 | if err := cgroups.WriteFile(path, "net_cls.classid", strconv.FormatUint(uint64(r.NetClsClassid), 10)); err != nil { 22 | return err 23 | } 24 | } 25 | 26 | return nil 27 | } 28 | 29 | func (s *NetClsGroup) GetStats(path string, stats *cgroups.Stats) error { 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/fs/net_prio.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "github.com/opencontainers/cgroups" 5 | ) 6 | 7 | type NetPrioGroup struct{} 8 | 9 | func (s *NetPrioGroup) Name() string { 10 | return "net_prio" 11 | } 12 | 13 | func (s *NetPrioGroup) Apply(path string, _ *cgroups.Resources, pid int) error { 14 | return apply(path, pid) 15 | } 16 | 17 | func (s *NetPrioGroup) Set(path string, r *cgroups.Resources) error { 18 | for _, prioMap := range r.NetPrioIfpriomap { 19 | if err := cgroups.WriteFile(path, "net_prio.ifpriomap", prioMap.CgroupString()); err != nil { 20 | return err 21 | } 22 | } 23 | 24 | return nil 25 | } 26 | 27 | func (s *NetPrioGroup) GetStats(path string, stats *cgroups.Stats) error { 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/fs/perf_event.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "github.com/opencontainers/cgroups" 5 | ) 6 | 7 | type PerfEventGroup struct{} 8 | 9 | func (s *PerfEventGroup) Name() string { 10 | return "perf_event" 11 | } 12 | 13 | func (s *PerfEventGroup) Apply(path string, _ *cgroups.Resources, pid int) error { 14 | return apply(path, pid) 15 | } 16 | 17 | func (s *PerfEventGroup) Set(_ string, _ *cgroups.Resources) error { 18 | return nil 19 | } 20 | 21 | func (s *PerfEventGroup) GetStats(path string, stats *cgroups.Stats) error { 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/fs/rdma.go: -------------------------------------------------------------------------------- 1 | package fs 2 | 3 | import ( 4 | "github.com/opencontainers/cgroups" 5 | "github.com/opencontainers/cgroups/fscommon" 6 | ) 7 | 8 | type RdmaGroup struct{} 9 | 10 | func (s *RdmaGroup) Name() string { 11 | return "rdma" 12 | } 13 | 14 | func (s *RdmaGroup) Apply(path string, _ *cgroups.Resources, pid int) error { 15 | return apply(path, pid) 16 | } 17 | 18 | func (s *RdmaGroup) Set(path string, r *cgroups.Resources) error { 19 | return fscommon.RdmaSet(path, r) 20 | } 21 | 22 | func (s *RdmaGroup) GetStats(path string, stats *cgroups.Stats) error { 23 | return fscommon.RdmaGetStats(path, stats) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/fs2/cpuset.go: -------------------------------------------------------------------------------- 1 | package fs2 2 | 3 | import ( 4 | "github.com/opencontainers/cgroups" 5 | ) 6 | 7 | func isCpusetSet(r *cgroups.Resources) bool { 8 | return r.CpusetCpus != "" || r.CpusetMems != "" 9 | } 10 | 11 | func setCpuset(dirPath string, r *cgroups.Resources) error { 12 | if !isCpusetSet(r) { 13 | return nil 14 | } 15 | 16 | if r.CpusetCpus != "" { 17 | if err := cgroups.WriteFile(dirPath, "cpuset.cpus", r.CpusetCpus); err != nil { 18 | return err 19 | } 20 | } 21 | if r.CpusetMems != "" { 22 | if err := cgroups.WriteFile(dirPath, "cpuset.mems", r.CpusetMems); err != nil { 23 | return err 24 | } 25 | } 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/fs2/misc.go: -------------------------------------------------------------------------------- 1 | package fs2 2 | 3 | import ( 4 | "bufio" 5 | "os" 6 | "strings" 7 | 8 | "github.com/opencontainers/cgroups" 9 | "github.com/opencontainers/cgroups/fscommon" 10 | ) 11 | 12 | func statMisc(dirPath string, stats *cgroups.Stats) error { 13 | for _, file := range []string{"current", "events"} { 14 | fd, err := cgroups.OpenFile(dirPath, "misc."+file, os.O_RDONLY) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | s := bufio.NewScanner(fd) 20 | for s.Scan() { 21 | key, value, err := fscommon.ParseKeyValue(s.Text()) 22 | if err != nil { 23 | fd.Close() 24 | return err 25 | } 26 | 27 | key = strings.TrimSuffix(key, ".max") 28 | 29 | if _, ok := stats.MiscStats[key]; !ok { 30 | stats.MiscStats[key] = cgroups.MiscStats{} 31 | } 32 | 33 | tmp := stats.MiscStats[key] 34 | 35 | switch file { 36 | case "current": 37 | tmp.Usage = value 38 | case "events": 39 | tmp.Events = value 40 | } 41 | 42 | stats.MiscStats[key] = tmp 43 | } 44 | fd.Close() 45 | 46 | if err := s.Err(); err != nil { 47 | return err 48 | } 49 | } 50 | 51 | return nil 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/cgroups/getallpids.go: -------------------------------------------------------------------------------- 1 | package cgroups 2 | 3 | import ( 4 | "io/fs" 5 | "path/filepath" 6 | ) 7 | 8 | // GetAllPids returns all pids from the cgroup identified by path, and all its 9 | // sub-cgroups. 10 | func GetAllPids(path string) ([]int, error) { 11 | var pids []int 12 | err := filepath.WalkDir(path, func(p string, d fs.DirEntry, iErr error) error { 13 | if iErr != nil { 14 | return iErr 15 | } 16 | if !d.IsDir() { 17 | return nil 18 | } 19 | cPids, err := readProcsFile(p) 20 | if err != nil { 21 | return err 22 | } 23 | pids = append(pids, cPids...) 24 | return nil 25 | }) 26 | return pids, err 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runtime-spec/specs-go/version.go: -------------------------------------------------------------------------------- 1 | package specs 2 | 3 | import "fmt" 4 | 5 | const ( 6 | // VersionMajor is for an API incompatible changes 7 | VersionMajor = 1 8 | // VersionMinor is for functionality in a backwards-compatible manner 9 | VersionMinor = 2 10 | // VersionPatch is for backwards-compatible bug fixes 11 | VersionPatch = 1 12 | 13 | // VersionDev indicates development branch. Releases will be empty string. 14 | VersionDev = "" 15 | ) 16 | 17 | // Version is the specification version that the package types support. 18 | var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev) 19 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/selinux/go-selinux/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package selinux provides a high-level interface for interacting with selinux. 3 | 4 | Usage: 5 | 6 | import "github.com/opencontainers/selinux/go-selinux" 7 | 8 | // Ensure that selinux is enforcing mode. 9 | if selinux.EnforceMode() != selinux.Enforcing { 10 | selinux.SetEnforceMode(selinux.Enforcing) 11 | } 12 | */ 13 | package selinux 14 | -------------------------------------------------------------------------------- /vendor/github.com/russross/blackfriday/v2/.gitignore: -------------------------------------------------------------------------------- 1 | *.out 2 | *.swp 3 | *.8 4 | *.6 5 | _obj 6 | _test* 7 | markdown 8 | tags 9 | -------------------------------------------------------------------------------- /vendor/github.com/russross/blackfriday/v2/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 4 | - "1.10.x" 5 | - "1.11.x" 6 | - tip 7 | matrix: 8 | fast_finish: true 9 | allow_failures: 10 | - go: tip 11 | install: 12 | - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). 13 | script: 14 | - go get -t -v ./... 15 | - diff -u <(echo -n) <(gofmt -d -s .) 16 | - go tool vet . 17 | - go test -v ./... 18 | -------------------------------------------------------------------------------- /vendor/github.com/seccomp/libseccomp-golang/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | *.orig 4 | tags 5 | -------------------------------------------------------------------------------- /vendor/github.com/seccomp/libseccomp-golang/.golangci.yml: -------------------------------------------------------------------------------- 1 | # For documentation, see https://golangci-lint.run/usage/configuration/ 2 | version: "2" 3 | 4 | formatters: 5 | enable: 6 | - gofumpt 7 | 8 | linters: 9 | exclusions: 10 | generated: disable 11 | presets: 12 | - std-error-handling 13 | -------------------------------------------------------------------------------- /vendor/github.com/seccomp/libseccomp-golang/Makefile: -------------------------------------------------------------------------------- 1 | # libseccomp-golang 2 | 3 | .PHONY: all check check-build check-syntax fix-syntax vet test lint 4 | 5 | all: check-build 6 | 7 | check: lint test 8 | 9 | check-build: 10 | go build 11 | 12 | check-syntax: 13 | gofmt -d . 14 | 15 | fix-syntax: 16 | gofmt -w . 17 | 18 | vet: 19 | go vet -v ./... 20 | 21 | # Previous bugs have made the tests freeze until the timeout. Golang default 22 | # timeout for tests is 10 minutes, which is too long, considering current tests 23 | # can be executed in less than 1 second. Reduce the timeout, so problems can 24 | # be noticed earlier in the CI. 25 | TEST_TIMEOUT=10s 26 | 27 | test: 28 | go test -v -timeout $(TEST_TIMEOUT) 29 | 30 | lint: 31 | golangci-lint run . 32 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | 4 | .idea/ 5 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | # do not run on test files yet 3 | tests: false 4 | 5 | # all available settings of specific linters 6 | linters-settings: 7 | errcheck: 8 | # report about not checking of errors in type assetions: `a := b.(MyStruct)`; 9 | # default is false: such cases aren't reported by default. 10 | check-type-assertions: false 11 | 12 | # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; 13 | # default is false: such cases aren't reported by default. 14 | check-blank: false 15 | 16 | lll: 17 | line-length: 100 18 | tab-width: 4 19 | 20 | prealloc: 21 | simple: false 22 | range-loops: false 23 | for-loops: false 24 | 25 | whitespace: 26 | multi-if: false # Enforces newlines (or comments) after every multi-line if statement 27 | multi-func: false # Enforces newlines (or comments) after every multi-line function signature 28 | 29 | linters: 30 | enable: 31 | - megacheck 32 | - govet 33 | disable: 34 | - maligned 35 | - prealloc 36 | disable-all: false 37 | presets: 38 | - bugs 39 | - unused 40 | fast: false 41 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/sirupsen/logrus 3 | git: 4 | depth: 1 5 | env: 6 | - GO111MODULE=on 7 | go: 1.15.x 8 | os: linux 9 | install: 10 | - ./travis/install.sh 11 | script: 12 | - cd ci 13 | - go run mage.go -v -w ../ crossBuild 14 | - go run mage.go -v -w ../ lint 15 | - go run mage.go -v -w ../ test 16 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/buffer_pool.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bytes" 5 | "sync" 6 | ) 7 | 8 | var ( 9 | bufferPool BufferPool 10 | ) 11 | 12 | type BufferPool interface { 13 | Put(*bytes.Buffer) 14 | Get() *bytes.Buffer 15 | } 16 | 17 | type defaultPool struct { 18 | pool *sync.Pool 19 | } 20 | 21 | func (p *defaultPool) Put(buf *bytes.Buffer) { 22 | p.pool.Put(buf) 23 | } 24 | 25 | func (p *defaultPool) Get() *bytes.Buffer { 26 | return p.pool.Get().(*bytes.Buffer) 27 | } 28 | 29 | // SetBufferPool allows to replace the default logrus buffer pool 30 | // to better meets the specific needs of an application. 31 | func SetBufferPool(bp BufferPool) { 32 | bufferPool = bp 33 | } 34 | 35 | func init() { 36 | SetBufferPool(&defaultPool{ 37 | pool: &sync.Pool{ 38 | New: func() interface{} { 39 | return new(bytes.Buffer) 40 | }, 41 | }, 42 | }) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package logrus 4 | 5 | func isTerminal(fd int) bool { 6 | return false 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go: -------------------------------------------------------------------------------- 1 | // +build js nacl plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,!nacl,!plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func checkIfTerminal(w io.Writer) bool { 11 | switch v := w.(type) { 12 | case *os.File: 13 | return isTerminal(int(v.Fd())) 14 | default: 15 | return false 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_solaris.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | // IsTerminal returns true if the given file descriptor is a terminal. 8 | func isTerminal(fd int) bool { 9 | _, err := unix.IoctlGetTermio(fd, unix.TCGETA) 10 | return err == nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux aix zos 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TCGETS 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/sys/windows" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | handle := windows.Handle(v.Fd()) 16 | var mode uint32 17 | if err := windows.GetConsoleMode(handle, &mode); err != nil { 18 | return false 19 | } 20 | mode |= windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING 21 | if err := windows.SetConsoleMode(handle, mode); err != nil { 22 | return false 23 | } 24 | return true 25 | } 26 | return false 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 120 3 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | coverage.txt 3 | node_modules/ 4 | vendor 5 | .idea 6 | /.local/ 7 | /internal/ 8 | /site/ 9 | package.json 10 | package-lock.json 11 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Jeremy Saenz & Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/cli.go: -------------------------------------------------------------------------------- 1 | // Package cli provides a minimal framework for creating and organizing command line 2 | // Go applications. cli is designed to be easy to understand and write, the most simple 3 | // cli application can be written as follows: 4 | // func main() { 5 | // cli.NewApp().Run(os.Args) 6 | // } 7 | // 8 | // Of course this application does not do much, so let's make this an actual application: 9 | // func main() { 10 | // app := cli.NewApp() 11 | // app.Name = "greet" 12 | // app.Usage = "say a greeting" 13 | // app.Action = func(c *cli.Context) error { 14 | // println("Greetings") 15 | // return nil 16 | // } 17 | // 18 | // app.Run(os.Args) 19 | // } 20 | package cli 21 | 22 | //go:generate go run flag-gen/main.go flag-gen/assets_vfsdata.go 23 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/sort.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import "unicode" 4 | 5 | // lexicographicLess compares strings alphabetically considering case. 6 | func lexicographicLess(i, j string) bool { 7 | iRunes := []rune(i) 8 | jRunes := []rune(j) 9 | 10 | lenShared := len(iRunes) 11 | if lenShared > len(jRunes) { 12 | lenShared = len(jRunes) 13 | } 14 | 15 | for index := 0; index < lenShared; index++ { 16 | ir := iRunes[index] 17 | jr := jRunes[index] 18 | 19 | if lir, ljr := unicode.ToLower(ir), unicode.ToLower(jr); lir != ljr { 20 | return lir < ljr 21 | } 22 | 23 | if ir != jr { 24 | return ir < jr 25 | } 26 | } 27 | 28 | return i < j 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vscode/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 1.0.0 (2018-03-15) 4 | 5 | Initial release tagging -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/Makefile: -------------------------------------------------------------------------------- 1 | DIRS := \ 2 | . \ 3 | nl 4 | 5 | DEPS = \ 6 | github.com/vishvananda/netns \ 7 | golang.org/x/sys/unix 8 | 9 | uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) 10 | testdirs = $(call uniq,$(foreach d,$(1),$(dir $(wildcard $(d)/*_test.go)))) 11 | goroot = $(addprefix ../../../,$(1)) 12 | unroot = $(subst ../../../,,$(1)) 13 | fmt = $(addprefix fmt-,$(1)) 14 | 15 | all: test 16 | 17 | $(call goroot,$(DEPS)): 18 | go get $(call unroot,$@) 19 | 20 | .PHONY: $(call testdirs,$(DIRS)) 21 | $(call testdirs,$(DIRS)): 22 | go test -test.exec sudo -test.parallel 4 -timeout 60s -test.v github.com/vishvananda/netlink/$@ 23 | 24 | $(call fmt,$(call testdirs,$(DIRS))): 25 | ! gofmt -l $(subst fmt-,,$@)/*.go | grep -q . 26 | 27 | .PHONY: fmt 28 | fmt: $(call fmt,$(call testdirs,$(DIRS))) 29 | 30 | test: fmt $(call goroot,$(DEPS)) $(call testdirs,$(DIRS)) 31 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/chain.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | // Chain contains the attributes of a Chain 8 | type Chain struct { 9 | Parent uint32 10 | Chain uint32 11 | } 12 | 13 | func (c Chain) String() string { 14 | return fmt.Sprintf("{Parent: %d, Chain: %d}", c.Parent, c.Chain) 15 | } 16 | 17 | func NewChain(parent uint32, chain uint32) Chain { 18 | return Chain{ 19 | Parent: parent, 20 | Chain: chain, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/fou.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import ( 4 | "net" 5 | ) 6 | 7 | type Fou struct { 8 | Family int 9 | Port int 10 | Protocol int 11 | EncapType int 12 | Local net.IP 13 | Peer net.IP 14 | PeerPort int 15 | IfIndex int 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/fou_unspecified.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | // +build !linux 3 | 4 | package netlink 5 | 6 | func FouAdd(f Fou) error { 7 | return ErrNotImplemented 8 | } 9 | 10 | func FouDel(f Fou) error { 11 | return ErrNotImplemented 12 | } 13 | 14 | func FouList(fam int) ([]Fou, error) { 15 | return nil, ErrNotImplemented 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/genetlink_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package netlink 4 | 5 | type GenlOp struct{} 6 | 7 | type GenlMulticastGroup struct{} 8 | 9 | type GenlFamily struct{} 10 | 11 | func (h *Handle) GenlFamilyList() ([]*GenlFamily, error) { 12 | return nil, ErrNotImplemented 13 | } 14 | 15 | func GenlFamilyList() ([]*GenlFamily, error) { 16 | return nil, ErrNotImplemented 17 | } 18 | 19 | func (h *Handle) GenlFamilyGet(name string) (*GenlFamily, error) { 20 | return nil, ErrNotImplemented 21 | } 22 | 23 | func GenlFamilyGet(name string) (*GenlFamily, error) { 24 | return nil, ErrNotImplemented 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/inet_diag.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | // INET_DIAG constatns 4 | const ( 5 | INET_DIAG_NONE = iota 6 | INET_DIAG_MEMINFO 7 | INET_DIAG_INFO 8 | INET_DIAG_VEGASINFO 9 | INET_DIAG_CONG 10 | INET_DIAG_TOS 11 | INET_DIAG_TCLASS 12 | INET_DIAG_SKMEMINFO 13 | INET_DIAG_SHUTDOWN 14 | INET_DIAG_DCTCPINFO 15 | INET_DIAG_PROTOCOL 16 | INET_DIAG_SKV6ONLY 17 | INET_DIAG_LOCALS 18 | INET_DIAG_PEERS 19 | INET_DIAG_PAD 20 | INET_DIAG_MARK 21 | INET_DIAG_BBRINFO 22 | INET_DIAG_CLASS_ID 23 | INET_DIAG_MD5SIG 24 | INET_DIAG_ULP_INFO 25 | INET_DIAG_SK_BPF_STORAGES 26 | INET_DIAG_CGROUP_ID 27 | INET_DIAG_SOCKOPT 28 | INET_DIAG_MAX 29 | ) 30 | 31 | type InetDiagTCPInfoResp struct { 32 | InetDiagMsg *Socket 33 | TCPInfo *TCPInfo 34 | TCPBBRInfo *TCPBBRInfo 35 | } 36 | 37 | type InetDiagUDPInfoResp struct { 38 | InetDiagMsg *Socket 39 | Memory *MemInfo 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/netlink_linux.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import "github.com/vishvananda/netlink/nl" 4 | 5 | // Family type definitions 6 | const ( 7 | FAMILY_ALL = nl.FAMILY_ALL 8 | FAMILY_V4 = nl.FAMILY_V4 9 | FAMILY_V6 = nl.FAMILY_V6 10 | FAMILY_MPLS = nl.FAMILY_MPLS 11 | ) 12 | 13 | // ErrDumpInterrupted is an alias for [nl.ErrDumpInterrupted]. 14 | var ErrDumpInterrupted = nl.ErrDumpInterrupted 15 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/netns_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package netlink 4 | 5 | func GetNetNsIdByPid(pid int) (int, error) { 6 | return 0, ErrNotImplemented 7 | } 8 | 9 | func SetNetNsIdByPid(pid, nsid int) error { 10 | return ErrNotImplemented 11 | } 12 | 13 | func GetNetNsIdByFd(fd int) (int, error) { 14 | return 0, ErrNotImplemented 15 | } 16 | 17 | func SetNetNsIdByFd(fd, nsid int) error { 18 | return ErrNotImplemented 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/nl/ip6tnl_linux.go: -------------------------------------------------------------------------------- 1 | package nl 2 | 3 | // id's of route attribute from https://elixir.bootlin.com/linux/v5.17.3/source/include/uapi/linux/lwtunnel.h#L38 4 | // the value's size are specified in https://elixir.bootlin.com/linux/v5.17.3/source/net/ipv4/ip_tunnel_core.c#L928 5 | 6 | const ( 7 | LWTUNNEL_IP6_UNSPEC = iota 8 | LWTUNNEL_IP6_ID 9 | LWTUNNEL_IP6_DST 10 | LWTUNNEL_IP6_SRC 11 | LWTUNNEL_IP6_HOPLIMIT 12 | LWTUNNEL_IP6_TC 13 | LWTUNNEL_IP6_FLAGS 14 | LWTUNNEL_IP6_PAD // not implemented 15 | LWTUNNEL_IP6_OPTS // not implemented 16 | __LWTUNNEL_IP6_MAX 17 | ) 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/nl/lwt_linux.go: -------------------------------------------------------------------------------- 1 | package nl 2 | 3 | const ( 4 | LWT_BPF_PROG_UNSPEC = iota 5 | LWT_BPF_PROG_FD 6 | LWT_BPF_PROG_NAME 7 | __LWT_BPF_PROG_MAX 8 | ) 9 | 10 | const ( 11 | LWT_BPF_PROG_MAX = __LWT_BPF_PROG_MAX - 1 12 | ) 13 | 14 | const ( 15 | LWT_BPF_UNSPEC = iota 16 | LWT_BPF_IN 17 | LWT_BPF_OUT 18 | LWT_BPF_XMIT 19 | LWT_BPF_XMIT_HEADROOM 20 | __LWT_BPF_MAX 21 | ) 22 | 23 | const ( 24 | LWT_BPF_MAX = __LWT_BPF_MAX - 1 25 | ) 26 | 27 | const ( 28 | LWT_BPF_MAX_HEADROOM = 256 29 | ) 30 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/nl/mpls_linux.go: -------------------------------------------------------------------------------- 1 | package nl 2 | 3 | import "encoding/binary" 4 | 5 | const ( 6 | MPLS_LS_LABEL_SHIFT = 12 7 | MPLS_LS_S_SHIFT = 8 8 | ) 9 | 10 | func EncodeMPLSStack(labels ...int) []byte { 11 | b := make([]byte, 4*len(labels)) 12 | for idx, label := range labels { 13 | l := label << MPLS_LS_LABEL_SHIFT 14 | if idx == len(labels)-1 { 15 | l |= 1 << MPLS_LS_S_SHIFT 16 | } 17 | binary.BigEndian.PutUint32(b[idx*4:], uint32(l)) 18 | } 19 | return b 20 | } 21 | 22 | func DecodeMPLSStack(buf []byte) []int { 23 | if len(buf)%4 != 0 { 24 | return nil 25 | } 26 | stack := make([]int, 0, len(buf)/4) 27 | for len(buf) > 0 { 28 | l := binary.BigEndian.Uint32(buf[:4]) 29 | buf = buf[4:] 30 | stack = append(stack, int(l)>>MPLS_LS_LABEL_SHIFT) 31 | if (l>>MPLS_LS_S_SHIFT)&1 > 0 { 32 | break 33 | } 34 | } 35 | return stack 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/nl/nl_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package nl 4 | 5 | import "encoding/binary" 6 | 7 | var SupportedNlFamilies = []int{} 8 | 9 | func NativeEndian() binary.ByteOrder { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/nl/vdpa_linux.go: -------------------------------------------------------------------------------- 1 | package nl 2 | 3 | const ( 4 | VDPA_GENL_NAME = "vdpa" 5 | VDPA_GENL_VERSION = 0x1 6 | ) 7 | 8 | const ( 9 | VDPA_CMD_UNSPEC = iota 10 | VDPA_CMD_MGMTDEV_NEW 11 | VDPA_CMD_MGMTDEV_GET /* can dump */ 12 | VDPA_CMD_DEV_NEW 13 | VDPA_CMD_DEV_DEL 14 | VDPA_CMD_DEV_GET /* can dump */ 15 | VDPA_CMD_DEV_CONFIG_GET /* can dump */ 16 | VDPA_CMD_DEV_VSTATS_GET 17 | ) 18 | 19 | const ( 20 | VDPA_ATTR_UNSPEC = iota 21 | VDPA_ATTR_MGMTDEV_BUS_NAME 22 | VDPA_ATTR_MGMTDEV_DEV_NAME 23 | VDPA_ATTR_MGMTDEV_SUPPORTED_CLASSES 24 | VDPA_ATTR_DEV_NAME 25 | VDPA_ATTR_DEV_ID 26 | VDPA_ATTR_DEV_VENDOR_ID 27 | VDPA_ATTR_DEV_MAX_VQS 28 | VDPA_ATTR_DEV_MAX_VQ_SIZE 29 | VDPA_ATTR_DEV_MIN_VQ_SIZE 30 | VDPA_ATTR_DEV_NET_CFG_MACADDR 31 | VDPA_ATTR_DEV_NET_STATUS 32 | VDPA_ATTR_DEV_NET_CFG_MAX_VQP 33 | VDPA_ATTR_DEV_NET_CFG_MTU 34 | VDPA_ATTR_DEV_NEGOTIATED_FEATURES 35 | VDPA_ATTR_DEV_MGMTDEV_MAX_VQS 36 | VDPA_ATTR_DEV_SUPPORTED_FEATURES 37 | VDPA_ATTR_DEV_QUEUE_INDEX 38 | VDPA_ATTR_DEV_VENDOR_ATTR_NAME 39 | VDPA_ATTR_DEV_VENDOR_ATTR_VALUE 40 | VDPA_ATTR_DEV_FEATURES 41 | ) 42 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/nl/xfrm_monitor_linux.go: -------------------------------------------------------------------------------- 1 | package nl 2 | 3 | import ( 4 | "unsafe" 5 | ) 6 | 7 | const ( 8 | SizeofXfrmUserExpire = 0xe8 9 | ) 10 | 11 | // struct xfrm_user_expire { 12 | // struct xfrm_usersa_info state; 13 | // __u8 hard; 14 | // }; 15 | 16 | type XfrmUserExpire struct { 17 | XfrmUsersaInfo XfrmUsersaInfo 18 | Hard uint8 19 | Pad [7]byte 20 | } 21 | 22 | func (msg *XfrmUserExpire) Len() int { 23 | return SizeofXfrmUserExpire 24 | } 25 | 26 | func DeserializeXfrmUserExpire(b []byte) *XfrmUserExpire { 27 | return (*XfrmUserExpire)(unsafe.Pointer(&b[0:SizeofXfrmUserExpire][0])) 28 | } 29 | 30 | func (msg *XfrmUserExpire) Serialize() []byte { 31 | return (*(*[SizeofXfrmUserExpire]byte)(unsafe.Pointer(msg)))[:] 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/order.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | import ( 4 | "encoding/binary" 5 | 6 | "github.com/vishvananda/netlink/nl" 7 | ) 8 | 9 | var ( 10 | native = nl.NativeEndian() 11 | networkOrder = binary.BigEndian 12 | ) 13 | 14 | func htonl(val uint32) []byte { 15 | bytes := make([]byte, 4) 16 | binary.BigEndian.PutUint32(bytes, val) 17 | return bytes 18 | } 19 | 20 | func htons(val uint16) []byte { 21 | bytes := make([]byte, 2) 22 | binary.BigEndian.PutUint16(bytes, val) 23 | return bytes 24 | } 25 | 26 | func ntohl(buf []byte) uint32 { 27 | return binary.BigEndian.Uint32(buf) 28 | } 29 | 30 | func ntohs(buf []byte) uint16 { 31 | return binary.BigEndian.Uint16(buf) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/route_unspecified.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package netlink 4 | 5 | import "strconv" 6 | 7 | func (r *Route) ListFlags() []string { 8 | return []string{} 9 | } 10 | 11 | func (n *NexthopInfo) ListFlags() []string { 12 | return []string{} 13 | } 14 | 15 | func (s Scope) String() string { 16 | return "unknown" 17 | } 18 | 19 | func (p RouteProtocol) String() string { 20 | return strconv.Itoa(int(p)) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/rule_nonlinux.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | // +build !linux 3 | 4 | package netlink 5 | 6 | func (r Rule) typeString() string { 7 | return "" 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/unix_diag.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | // According to linux/include/uapi/linux/unix_diag.h 4 | const ( 5 | UNIX_DIAG_NAME = iota 6 | UNIX_DIAG_VFS 7 | UNIX_DIAG_PEER 8 | UNIX_DIAG_ICONS 9 | UNIX_DIAG_RQLEN 10 | UNIX_DIAG_MEMINFO 11 | UNIX_DIAG_SHUTDOWN 12 | UNIX_DIAG_UID 13 | UNIX_DIAG_MAX 14 | ) 15 | 16 | type UnixDiagInfoResp struct { 17 | DiagMsg *UnixSocket 18 | Name *string 19 | Peer *uint32 20 | Queue *QueueInfo 21 | Shutdown *uint8 22 | } 23 | 24 | type QueueInfo struct { 25 | RQueue uint32 26 | WQueue uint32 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netlink/xfrm_unspecified.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | // +build !linux 3 | 4 | package netlink 5 | 6 | type XfrmPolicy struct{} 7 | type XfrmState struct{} 8 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netns/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters: 2 | enable: 3 | - errcheck 4 | - errorlint 5 | - gocritic 6 | - gosec 7 | - gosimple 8 | - govet 9 | - gci 10 | - misspell 11 | - nonamedreturns 12 | - staticcheck 13 | - unconvert 14 | - unparam 15 | - unused 16 | - whitespace 17 | 18 | linters-settings: 19 | gci: 20 | sections: 21 | - standard 22 | - default 23 | - prefix(github.com/vishvananda) 24 | 25 | run: 26 | timeout: 5m 27 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netns/.yamllint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | extends: default 3 | 4 | rules: 5 | document-start: disable 6 | line-length: disable 7 | truthy: 8 | ignore: | 9 | .github/workflows/*.yml 10 | -------------------------------------------------------------------------------- /vendor/github.com/vishvananda/netns/doc.go: -------------------------------------------------------------------------------- 1 | // Package netns allows ultra-simple network namespace handling. NsHandles 2 | // can be retrieved and set. Note that the current namespace is thread 3 | // local so actions that set and reset namespaces should use LockOSThread 4 | // to make sure the namespace doesn't change due to a goroutine switch. 5 | // It is best to close NsHandles when you are done with them. This can be 6 | // accomplished via a `defer ns.Close()` on the handle. Changing namespaces 7 | // requires elevated privileges, so in most cases this code needs to be run 8 | // as root. 9 | package netns 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/bpf/setter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bpf 6 | 7 | // A Setter is a type which can attach a compiled BPF filter to itself. 8 | type Setter interface { 9 | SetBPF(filter []RawInstruction) error 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for 386 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for AMD64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | B syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | B syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | B syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ppc64, BSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for RISCV64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64 || ppc64le) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 17 | BL runtime·entersyscall(SB) 18 | MOVD a1+8(FP), R3 19 | MOVD a2+16(FP), R4 20 | MOVD a3+24(FP), R5 21 | MOVD R0, R6 22 | MOVD R0, R7 23 | MOVD R0, R8 24 | MOVD trap+0(FP), R9 // syscall entry 25 | SYSCALL R9 26 | MOVD R3, r1+32(FP) 27 | MOVD R4, r2+40(FP) 28 | BL runtime·exitsyscall(SB) 29 | RET 30 | 31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 32 | MOVD a1+8(FP), R3 33 | MOVD a2+16(FP), R4 34 | MOVD a3+24(FP), R5 35 | MOVD R0, R6 36 | MOVD R0, R7 37 | MOVD R0, R8 38 | MOVD trap+0(FP), R9 // syscall entry 39 | SYSCALL R9 40 | MOVD R3, r1+32(FP) 41 | MOVD R4, r2+40(FP) 42 | RET 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/auxv_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Auxv() ([][2]uintptr, error) { 12 | return nil, syscall.ENOTSUP 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc64 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev & 0x3fffffff00000000) >> 32) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32((dev & 0x00000000ffffffff) >> 0) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | var DEVNO64 uint64 26 | DEVNO64 = 0x8000000000000000 27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by z/OS. 9 | // 10 | // The information below is extracted and adapted from macros. 11 | 12 | package unix 13 | 14 | // Major returns the major component of a z/OS device number. 15 | func Major(dev uint64) uint32 { 16 | return uint32((dev >> 16) & 0x0000FFFF) 17 | } 18 | 19 | // Minor returns the minor component of a z/OS device number. 20 | func Minor(dev uint64) uint32 { 21 | return uint32(dev & 0x0000FFFF) 22 | } 23 | 24 | // Mkdev returns a z/OS device number generated from the given major and minor 25 | // components. 26 | func Mkdev(major, minor uint32) uint64 { 27 | return (uint64(major) << 16) | uint64(minor) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | import "unsafe" 15 | 16 | func ioctl(fd int, req uint, arg uintptr) (err error) { 17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 18 | if r0 == -1 && er != nil { 19 | err = er 20 | } 21 | return 22 | } 23 | 24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 26 | if r0 == -1 && er != nil { 27 | err = er 28 | } 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && hurd 6 | 7 | package unix 8 | 9 | const ( 10 | TIOCGETA = 0x62251713 11 | ) 12 | 13 | type Winsize struct { 14 | Row uint16 15 | Col uint16 16 | Xpixel uint16 17 | Ypixel uint16 18 | } 19 | 20 | type Termios struct { 21 | Iflag uint32 22 | Oflag uint32 23 | Cflag uint32 24 | Lflag uint32 25 | Cc [20]uint8 26 | Ispeed int32 27 | Ospeed int32 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && 386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | func setTimespec(sec, nsec int64) Timespec { 8 | return Timespec{Sec: sec, Nsec: nsec} 9 | } 10 | 11 | func setTimeval(sec, usec int64) Timeval { 12 | return Timeval{Sec: sec, Usec: usec} 13 | } 14 | 15 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 16 | k.Ident = uint64(fd) 17 | k.Filter = int16(mode) 18 | k.Flags = uint16(flags) 19 | } 20 | 21 | func (iov *Iovec) SetLen(length int) { 22 | iov.Len = uint64(length) 23 | } 24 | 25 | func (msghdr *Msghdr) SetControllen(length int) { 26 | msghdr.Controllen = uint32(length) 27 | } 28 | 29 | func (msghdr *Msghdr) SetIovlen(length int) { 30 | msghdr.Iovlen = uint32(length) 31 | } 32 | 33 | func (cmsg *Cmsghdr) SetLen(length int) { 34 | cmsg.Len = uint32(length) 35 | } 36 | 37 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 38 | // of OpenBSD the syscall is called sysctl instead of __sysctl. 39 | const SYS___SYSCTL = SYS_SYSCTL 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64le || ppc64) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 12 | return syscall.Syscall(trap, a1, a2, a3) 13 | } 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 16 | } 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.RawSyscall(trap, a1, a2, a3) 19 | } 20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && go1.24 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | //go:linkname vgetrandom runtime.vgetrandom 12 | //go:noescape 13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux || !go1.24 6 | 7 | package unix 8 | 9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { 10 | return -1, false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && !race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/encoding/prototext/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package prototext marshals and unmarshals protocol buffer messages as the 6 | // textproto format. 7 | package prototext 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package editiondefaults contains the binary representation of the editions 6 | // defaults. 7 | package editiondefaults 8 | 9 | import _ "embed" 10 | 11 | //go:embed editions_defaults.binpb 12 | var Defaults []byte 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opencontainers/runc/cdf953070162f400d75d2e0e83b506b3fb8cee5e/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !protolegacy 6 | // +build !protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = false 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build protolegacy 6 | // +build protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = true 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package genid contains constants for declarations in descriptor.proto 6 | // and the well-known types. 7 | package genid 8 | 9 | import "google.golang.org/protobuf/reflect/protoreflect" 10 | 11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/empty_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto" 14 | 15 | // Names for google.protobuf.Empty. 16 | const ( 17 | Empty_message_name protoreflect.Name = "Empty" 18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_field_mask_proto = "google/protobuf/field_mask.proto" 14 | 15 | // Names for google.protobuf.FieldMask. 16 | const ( 17 | FieldMask_message_name protoreflect.Name = "FieldMask" 18 | FieldMask_message_fullname protoreflect.FullName = "google.protobuf.FieldMask" 19 | ) 20 | 21 | // Field names for google.protobuf.FieldMask. 22 | const ( 23 | FieldMask_Paths_field_name protoreflect.Name = "paths" 24 | 25 | FieldMask_Paths_field_fullname protoreflect.FullName = "google.protobuf.FieldMask.paths" 26 | ) 27 | 28 | // Field numbers for google.protobuf.FieldMask. 29 | const ( 30 | FieldMask_Paths_field_number protoreflect.FieldNumber = 1 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/goname.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | // Go names of implementation-specific struct fields in generated messages. 8 | const ( 9 | State_goname = "state" 10 | 11 | SizeCache_goname = "sizeCache" 12 | SizeCacheA_goname = "XXX_sizecache" 13 | 14 | UnknownFields_goname = "unknownFields" 15 | UnknownFieldsA_goname = "XXX_unrecognized" 16 | 17 | ExtensionFields_goname = "extensionFields" 18 | ExtensionFieldsA_goname = "XXX_InternalExtensions" 19 | ExtensionFieldsB_goname = "XXX_extensions" 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/map_entry.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field names and numbers for synthetic map entry messages. 10 | const ( 11 | MapEntry_Key_field_name protoreflect.Name = "key" 12 | MapEntry_Value_field_name protoreflect.Name = "value" 13 | 14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1 15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/name.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | const ( 8 | NoUnkeyedLiteral_goname = "noUnkeyedLiteral" 9 | NoUnkeyedLiteralA_goname = "XXX_NoUnkeyedLiteral" 10 | 11 | BuilderSuffix_goname = "_builder" 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_source_context_proto = "google/protobuf/source_context.proto" 14 | 15 | // Names for google.protobuf.SourceContext. 16 | const ( 17 | SourceContext_message_name protoreflect.Name = "SourceContext" 18 | SourceContext_message_fullname protoreflect.FullName = "google.protobuf.SourceContext" 19 | ) 20 | 21 | // Field names for google.protobuf.SourceContext. 22 | const ( 23 | SourceContext_FileName_field_name protoreflect.Name = "file_name" 24 | 25 | SourceContext_FileName_field_fullname protoreflect.FullName = "google.protobuf.SourceContext.file_name" 26 | ) 27 | 28 | // Field numbers for google.protobuf.SourceContext. 29 | const ( 30 | SourceContext_FileName_field_number protoreflect.FieldNumber = 1 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/wrappers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field name and number for messages in wrappers.proto. 10 | const ( 11 | WrapperValue_Value_field_name protoreflect.Name = "value" 12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package impl 6 | 7 | // When using unsafe pointers, we can just treat enum values as int32s. 8 | 9 | var ( 10 | coderEnumNoZero = coderInt32NoZero 11 | coderEnum = coderInt32 12 | coderEnumPtr = coderInt32Ptr 13 | coderEnumSlice = coderInt32Slice 14 | coderEnumPackedSlice = coderInt32PackedSlice 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/enum.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package impl 6 | 7 | import ( 8 | "reflect" 9 | 10 | "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | type EnumInfo struct { 14 | GoReflectType reflect.Type // int32 kind 15 | Desc protoreflect.EnumDescriptor 16 | } 17 | 18 | func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum { 19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum) 20 | } 21 | func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc } 22 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protolazy 6 | 7 | import ( 8 | "sync/atomic" 9 | "unsafe" 10 | ) 11 | 12 | func atomicLoadIndex(p **[]IndexEntry) *[]IndexEntry { 13 | return (*[]IndexEntry)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) 14 | } 15 | func atomicStoreIndex(p **[]IndexEntry, v *[]IndexEntry) { 16 | atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_methods.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build !protoreflect 7 | // +build !protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = true 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return m.ProtoMethods() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_reflect.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build protoreflect 7 | // +build protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = false 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protoiface 6 | 7 | type MessageV1 interface { 8 | Reset() 9 | String() string 10 | ProtoMessage() 11 | } 12 | 13 | type ExtensionRangeV1 struct { 14 | Start, End int32 // both inclusive 15 | } 16 | --------------------------------------------------------------------------------