build(deps): bump github.com/containerd/cgroups/v3 from 3.0.2 to 3.0.3
Bumps [github.com/containerd/cgroups/v3](https://github.com/containerd/cgroups) from 3.0.2 to 3.0.3. - [Release notes](https://github.com/containerd/cgroups/releases) - [Commits](https://github.com/containerd/cgroups/compare/v3.0.2...v3.0.3) --- updated-dependencies: - dependency-name: github.com/containerd/cgroups/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
69
vendor/github.com/cilium/ebpf/syscalls.go
generated
vendored
69
vendor/github.com/cilium/ebpf/syscalls.go
generated
vendored
@@ -4,13 +4,25 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/cilium/ebpf/asm"
|
||||
"github.com/cilium/ebpf/internal"
|
||||
"github.com/cilium/ebpf/internal/sys"
|
||||
"github.com/cilium/ebpf/internal/tracefs"
|
||||
"github.com/cilium/ebpf/internal/unix"
|
||||
)
|
||||
|
||||
var (
|
||||
// pre-allocating these here since they may
|
||||
// get called in hot code paths and cause
|
||||
// unnecessary memory allocations
|
||||
sysErrKeyNotExist = sys.Error(ErrKeyNotExist, unix.ENOENT)
|
||||
sysErrKeyExist = sys.Error(ErrKeyExist, unix.EEXIST)
|
||||
sysErrNotSupported = sys.Error(ErrNotSupported, sys.ENOTSUPP)
|
||||
)
|
||||
|
||||
// invalidBPFObjNameChar returns true if char may not appear in
|
||||
// a BPF object name.
|
||||
func invalidBPFObjNameChar(char rune) bool {
|
||||
@@ -47,7 +59,7 @@ func progLoad(insns asm.Instructions, typ ProgramType, license string) (*sys.FD,
|
||||
})
|
||||
}
|
||||
|
||||
var haveNestedMaps = internal.FeatureTest("nested maps", "4.12", func() error {
|
||||
var haveNestedMaps = internal.NewFeatureTest("nested maps", "4.12", func() error {
|
||||
_, err := sys.MapCreate(&sys.MapCreateAttr{
|
||||
MapType: sys.MapType(ArrayOfMaps),
|
||||
KeySize: 4,
|
||||
@@ -65,7 +77,7 @@ var haveNestedMaps = internal.FeatureTest("nested maps", "4.12", func() error {
|
||||
return err
|
||||
})
|
||||
|
||||
var haveMapMutabilityModifiers = internal.FeatureTest("read- and write-only maps", "5.2", func() error {
|
||||
var haveMapMutabilityModifiers = internal.NewFeatureTest("read- and write-only maps", "5.2", func() error {
|
||||
// This checks BPF_F_RDONLY_PROG and BPF_F_WRONLY_PROG. Since
|
||||
// BPF_MAP_FREEZE appeared in 5.2 as well we don't do a separate check.
|
||||
m, err := sys.MapCreate(&sys.MapCreateAttr{
|
||||
@@ -82,7 +94,7 @@ var haveMapMutabilityModifiers = internal.FeatureTest("read- and write-only maps
|
||||
return nil
|
||||
})
|
||||
|
||||
var haveMmapableMaps = internal.FeatureTest("mmapable maps", "5.5", func() error {
|
||||
var haveMmapableMaps = internal.NewFeatureTest("mmapable maps", "5.5", func() error {
|
||||
// This checks BPF_F_MMAPABLE, which appeared in 5.5 for array maps.
|
||||
m, err := sys.MapCreate(&sys.MapCreateAttr{
|
||||
MapType: sys.MapType(Array),
|
||||
@@ -98,7 +110,7 @@ var haveMmapableMaps = internal.FeatureTest("mmapable maps", "5.5", func() error
|
||||
return nil
|
||||
})
|
||||
|
||||
var haveInnerMaps = internal.FeatureTest("inner maps", "5.10", func() error {
|
||||
var haveInnerMaps = internal.NewFeatureTest("inner maps", "5.10", func() error {
|
||||
// This checks BPF_F_INNER_MAP, which appeared in 5.10.
|
||||
m, err := sys.MapCreate(&sys.MapCreateAttr{
|
||||
MapType: sys.MapType(Array),
|
||||
@@ -114,7 +126,7 @@ var haveInnerMaps = internal.FeatureTest("inner maps", "5.10", func() error {
|
||||
return nil
|
||||
})
|
||||
|
||||
var haveNoPreallocMaps = internal.FeatureTest("prealloc maps", "4.6", func() error {
|
||||
var haveNoPreallocMaps = internal.NewFeatureTest("prealloc maps", "4.6", func() error {
|
||||
// This checks BPF_F_NO_PREALLOC, which appeared in 4.6.
|
||||
m, err := sys.MapCreate(&sys.MapCreateAttr{
|
||||
MapType: sys.MapType(Hash),
|
||||
@@ -136,15 +148,15 @@ func wrapMapError(err error) error {
|
||||
}
|
||||
|
||||
if errors.Is(err, unix.ENOENT) {
|
||||
return sys.Error(ErrKeyNotExist, unix.ENOENT)
|
||||
return sysErrKeyNotExist
|
||||
}
|
||||
|
||||
if errors.Is(err, unix.EEXIST) {
|
||||
return sys.Error(ErrKeyExist, unix.EEXIST)
|
||||
return sysErrKeyExist
|
||||
}
|
||||
|
||||
if errors.Is(err, unix.ENOTSUPP) {
|
||||
return sys.Error(ErrNotSupported, unix.ENOTSUPP)
|
||||
if errors.Is(err, sys.ENOTSUPP) {
|
||||
return sysErrNotSupported
|
||||
}
|
||||
|
||||
if errors.Is(err, unix.E2BIG) {
|
||||
@@ -154,7 +166,7 @@ func wrapMapError(err error) error {
|
||||
return err
|
||||
}
|
||||
|
||||
var haveObjName = internal.FeatureTest("object names", "4.15", func() error {
|
||||
var haveObjName = internal.NewFeatureTest("object names", "4.15", func() error {
|
||||
attr := sys.MapCreateAttr{
|
||||
MapType: sys.MapType(Array),
|
||||
KeySize: 4,
|
||||
@@ -172,7 +184,7 @@ var haveObjName = internal.FeatureTest("object names", "4.15", func() error {
|
||||
return nil
|
||||
})
|
||||
|
||||
var objNameAllowsDot = internal.FeatureTest("dot in object names", "5.2", func() error {
|
||||
var objNameAllowsDot = internal.NewFeatureTest("dot in object names", "5.2", func() error {
|
||||
if err := haveObjName(); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -194,7 +206,7 @@ var objNameAllowsDot = internal.FeatureTest("dot in object names", "5.2", func()
|
||||
return nil
|
||||
})
|
||||
|
||||
var haveBatchAPI = internal.FeatureTest("map batch api", "5.6", func() error {
|
||||
var haveBatchAPI = internal.NewFeatureTest("map batch api", "5.6", func() error {
|
||||
var maxEntries uint32 = 2
|
||||
attr := sys.MapCreateAttr{
|
||||
MapType: sys.MapType(Hash),
|
||||
@@ -226,7 +238,7 @@ var haveBatchAPI = internal.FeatureTest("map batch api", "5.6", func() error {
|
||||
return nil
|
||||
})
|
||||
|
||||
var haveProbeReadKernel = internal.FeatureTest("bpf_probe_read_kernel", "5.5", func() error {
|
||||
var haveProbeReadKernel = internal.NewFeatureTest("bpf_probe_read_kernel", "5.5", func() error {
|
||||
insns := asm.Instructions{
|
||||
asm.Mov.Reg(asm.R1, asm.R10),
|
||||
asm.Add.Imm(asm.R1, -8),
|
||||
@@ -244,7 +256,7 @@ var haveProbeReadKernel = internal.FeatureTest("bpf_probe_read_kernel", "5.5", f
|
||||
return nil
|
||||
})
|
||||
|
||||
var haveBPFToBPFCalls = internal.FeatureTest("bpf2bpf calls", "4.16", func() error {
|
||||
var haveBPFToBPFCalls = internal.NewFeatureTest("bpf2bpf calls", "4.16", func() error {
|
||||
insns := asm.Instructions{
|
||||
asm.Call.Label("prog2").WithSymbol("prog1"),
|
||||
asm.Return(),
|
||||
@@ -262,3 +274,32 @@ var haveBPFToBPFCalls = internal.FeatureTest("bpf2bpf calls", "4.16", func() err
|
||||
_ = fd.Close()
|
||||
return nil
|
||||
})
|
||||
|
||||
var haveSyscallWrapper = internal.NewFeatureTest("syscall wrapper", "4.17", func() error {
|
||||
prefix := internal.PlatformPrefix()
|
||||
if prefix == "" {
|
||||
return fmt.Errorf("unable to find the platform prefix for (%s)", runtime.GOARCH)
|
||||
}
|
||||
|
||||
args := tracefs.ProbeArgs{
|
||||
Type: tracefs.Kprobe,
|
||||
Symbol: prefix + "sys_bpf",
|
||||
Pid: -1,
|
||||
}
|
||||
|
||||
var err error
|
||||
args.Group, err = tracefs.RandomGroup("ebpf_probe")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
evt, err := tracefs.NewEvent(args)
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
return internal.ErrNotSupported
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return evt.Close()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user