diff --git a/.github/actions/build-dependencies/action.yaml b/.github/actions/build-dependencies/action.yaml index 8cf58bb0..c12c9731 100644 --- a/.github/actions/build-dependencies/action.yaml +++ b/.github/actions/build-dependencies/action.yaml @@ -4,12 +4,12 @@ description: | inputs: go-version: description: go version - default: "1.21" + default: "1.22.3" runs: using: composite steps: - name: Setup Go - uses: actions/setup-go@v5 + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: go-version: "${{ inputs.go-version }}" - name: Install Compilers & Formatters @@ -18,12 +18,11 @@ runs: sudo apt-get install --yes bsdutils sudo apt-get install --yes build-essential sudo apt-get install --yes pkgconf - sudo apt-get install --yes llvm-12 clang-12 - sudo apt-get install --yes clang-format-12 + sudo apt-get install --yes llvm-14 clang-14 clang-format-14 sudo apt-get install --yes zlib1g-dev libelf-dev - for tool in "clang" "llc" "llvm-strip" "clang-format" + for tool in "clang" "clang-format" "llc" "llvm-strip" do sudo rm -f /usr/bin/$tool - sudo ln -s /usr/bin/$tool-12 /usr/bin/$tool + sudo ln -s /usr/bin/$tool-14 /usr/bin/$tool done shell: bash diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 98757df1..21601cde 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -8,10 +8,10 @@ on: jobs: analyze-code: name: Analyze Code - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Install Dependencies uses: ./.github/actions/build-dependencies - name: Lint @@ -54,13 +54,13 @@ jobs: shell: bash libbpfgo-unit-tests: name: libbpfgo Unit Tests - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: - go-version: [ 1.18, 1.19, '1.20', '1.21', 'stable' ] + go-version: [ '1.21', '1.22', 'stable' ] steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Install Dependencies uses: ./.github/actions/build-dependencies with: @@ -70,13 +70,13 @@ jobs: make libbpfgo-static-test helpers-unit-tests: name: Helpers Unit Tests - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: - go-version: [ 1.18, 1.19, '1.20', '1.21', 'stable' ] + go-version: [ '1.21', '1.22', 'stable' ] steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Install Dependencies uses: ./.github/actions/build-dependencies with: @@ -86,13 +86,13 @@ jobs: make helpers-test-static-run self-tests: name: Selftests - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: - go-version: [ 1.18, 1.19, '1.20', '1.21', 'stable' ] + go-version: [ '1.21', '1.22', 'stable' ] steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - name: Install Dependencies uses: ./.github/actions/build-dependencies with: diff --git a/Makefile b/Makefile index 0e6620a1..b1bae250 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,10 @@ CLANG := clang CC := $(CLANG) GO := go VAGRANT := vagrant -CLANG_FMT := clang-format-12 +CLANG_FMT := clang-format-14 GIT := $(shell which git || /bin/false) REVIVE := revive +PKGCONFIG := pkg-config HOSTOS = $(shell uname) ARCH ?= $(shell uname -m | sed 's/x86_64/amd64/g; s/aarch64/arm64/g') @@ -33,11 +34,11 @@ LDFLAGS = # golang CGO_CFLAGS_STATIC = "-I$(abspath $(OUTPUT))" -CGO_LDFLAGS_STATIC = "-lelf -lz $(LIBBPF_OBJ)" +CGO_LDFLAGS_STATIC = "$(shell PKG_CONFIG_PATH=$(LIBBPF_OBJDIR) $(PKGCONFIG) --static --libs libbpf)" CGO_EXTLDFLAGS_STATIC = '-w -extldflags "-static"' CGO_CFLAGS_DYN = "-I. -I/usr/include/" -CGO_LDFLAGS_DYN = "-lelf -lz -lbpf" +CGO_LDFLAGS_DYN = "$(shell $(PKGCONFIG) --shared --libs libbpf)" # default == shared lib from OS package @@ -110,8 +111,9 @@ $(LIBBPF_OBJ): $(LIBBPF_SRC) $(wildcard $(LIBBPF_SRC)/*.[ch]) | $(OUTPUT)/libbpf $(MAKE) -C $(LIBBPF_SRC) \ BUILD_STATIC_ONLY=1 \ OBJDIR=$(LIBBPF_OBJDIR) \ + LIBDIR=$(LIBBPF_OBJDIR) \ DESTDIR=$(LIBBPF_DESTDIR) \ - INCLUDEDIR= LIBDIR= UAPIDIR= install + INCLUDEDIR= UAPIDIR= install $(LIBBPF_SRC): ifeq ($(wildcard $@), ) diff --git a/builder/Vagrantfile-ubuntu b/builder/Vagrantfile-ubuntu index 960c87b5..6f73184c 100644 --- a/builder/Vagrantfile-ubuntu +++ b/builder/Vagrantfile-ubuntu @@ -17,9 +17,9 @@ VM_SOURCE = "/vagrant" Vagrant.configure("2") do |config| case ARCH when "amd64" - config.vm.box = "ubuntu/jammy64" + config.vm.box = "bento/ubuntu-24.04" when "arm64" - config.vm.box = "bento/ubuntu-22.04-arm64" + config.vm.box = "bento/ubuntu-24.04" end case HOSTOS diff --git a/builder/prepare-ubuntu.sh b/builder/prepare-ubuntu.sh index dc0cc41c..a7cba0d0 100755 --- a/builder/prepare-ubuntu.sh +++ b/builder/prepare-ubuntu.sh @@ -7,9 +7,21 @@ # variables -[ -z "${GO_VERSION}" ] && GO_VERSION="1.21" -[ -z "${CLANG_VERSION}" ] && CLANG_VERSION="12" -[ -z "${ARCH}" ] && ARCH="amd64" +[ -z "${GO_VERSION}" ] && GO_VERSION="1.22" +[ -z "${CLANG_VERSION}" ] && CLANG_VERSION="14" +[ -z "${ARCH}" ] && ARCH=$(uname -m) + +case "${ARCH}" in + x86_64|amd64) + ARCH="amd64" + ;; + aarch64|arm64) + ARCH="arm64" + ;; + *) + die "unsupported architecture ${ARCH}" + ;; +esac # functions @@ -59,7 +71,7 @@ setup_go() { setup_clang() { info "Setting Clang ${CLANG_VERSION} as default" - local tools="clang llc llvm-strip clang-format" + local tools="clang clang-format llc llvm-strip" for tool in ${tools} do sudo -E update-alternatives --install "/usr/bin/${tool}" "${tool}" "/usr/bin/${tool}-${CLANG_VERSION}" 100 @@ -82,7 +94,7 @@ install_pkgs \ llvm-"${CLANG_VERSION}" clang-"${CLANG_VERSION}" clang-format-"${CLANG_VERSION}" \ linux-headers-generic \ linux-tools-generic linux-tools-"$(uname -r)" \ - zlib1g-dev libelf-dev libbpf-dev + libbpf-dev libelf-dev libzstd-dev zlib1g-dev setup_go setup_clang diff --git a/docs/Vagrantfile.md b/docs/Vagrantfile.md index c20876de..88e4f832 100644 --- a/docs/Vagrantfile.md +++ b/docs/Vagrantfile.md @@ -2,12 +2,11 @@ ## Boxes -Currently there are two boxes available in [Vagrantfile-ubuntu](./../builder/Vagrantfile-ubuntu): +Currently there is one box available in [Vagrantfile-ubuntu](./../builder/Vagrantfile-ubuntu): -| Box | Providers | -|----------------------------------------------------------------------------------------------|--------------------------| -| [generic/ubuntu2204](https://app.vagrantup.com/generic/boxes/ubuntu2204) (amd64) | virtualbox, parallels | -| [jharoian3/ubuntu-22.04-arm64](https://app.vagrantup.com/jharoian3/boxes/ubuntu-22.04-arm64) | parallels | +| Box | Providers | +|--------------------------------------------------------------------------|--------------------------| +| [bento/ubuntu-24.04](https://app.vagrantup.com/bento/boxes/ubuntu-24.04) | virtualbox (amd64), parallels (arm64,amd64), ...| It is recommended to use them through the respective [Makefile rules](../Readme.md#contributing) as they are or overriding the `ARCH` environment variable if your architecture and provider allow such virtualization. E.g.: `make vagrant-up ARCH=amd64`. diff --git a/go.mod b/go.mod index 32476030..2f2e4739 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/aquasecurity/libbpfgo -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/stretchr/testify v1.9.0 diff --git a/go.work b/go.work index edc7b36d..02cfe69a 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,6 @@ -go 1.21 +go 1.22.0 + +toolchain go1.22.3 use ( . diff --git a/helpers/go.mod b/helpers/go.mod index c479e775..960ca48c 100644 --- a/helpers/go.mod +++ b/helpers/go.mod @@ -1,6 +1,8 @@ module github.com/aquasecurity/libbpfgo/helpers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require ( github.com/stretchr/testify v1.9.0 diff --git a/selftest/attachgenericfd/go.mod b/selftest/attachgenericfd/go.mod index 2bef5812..26d5734a 100644 --- a/selftest/attachgenericfd/go.mod +++ b/selftest/attachgenericfd/go.mod @@ -1,9 +1,15 @@ module github.com/aquasecurity/libbpfgo/selftest/attachgenericfd -go 1.21 +go 1.22.0 -require github.com/aquasecurity/libbpfgo v0.0.0 +toolchain go1.22.3 -require golang.org/x/sys v0.9.0 +require ( + github.com/aquasecurity/libbpfgo v0.0.0 + golang.org/x/sys v0.20.0 +) -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/attachgenericfd/go.sum b/selftest/attachgenericfd/go.sum index d6a01bbd..bf9b925f 100644 --- a/selftest/attachgenericfd/go.sum +++ b/selftest/attachgenericfd/go.sum @@ -4,7 +4,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/selftest/cgroup-legacy/go.mod b/selftest/cgroup-legacy/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/cgroup-legacy/go.mod +++ b/selftest/cgroup-legacy/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/cgroup/go.mod b/selftest/cgroup/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/cgroup/go.mod +++ b/selftest/cgroup/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/common/Makefile b/selftest/common/Makefile index 48545eee..0ad26aef 100644 --- a/selftest/common/Makefile +++ b/selftest/common/Makefile @@ -8,18 +8,23 @@ LIBBPF_OBJ = $(abspath $(OUTPUT)/libbpf.a) CLANG = clang CC = $(CLANG) GO = go +PKGCONFIG = pkg-config ARCH := $(shell uname -m | sed 's/x86_64/amd64/g; s/aarch64/arm64/g') +# libbpf + +LIBBPF_OBJDIR = $(abspath ./$(OUTPUT)/libbpf) + CFLAGS = -g -O2 -Wall -fpie -I$(abspath ../common) LDFLAGS = CGO_CFLAGS_STATIC = "-I$(abspath $(OUTPUT)) -I$(abspath ../common)" -CGO_LDFLAGS_STATIC = "-lelf -lz $(LIBBPF_OBJ)" +CGO_LDFLAGS_STATIC = "$(shell PKG_CONFIG_PATH=$(LIBBPF_OBJDIR) $(PKGCONFIG) --static --libs libbpf)" CGO_EXTLDFLAGS_STATIC = '-w -extldflags "-static"' CGO_CFLAGS_DYN = "-I. -I/usr/include/" -CGO_LDFLAGS_DYN = "-lelf -lz -lbpf" +CGO_LDFLAGS_DYN = "$(shell $(PKGCONFIG) --shared --libs libbpf)" MAIN = main diff --git a/selftest/common/vmlinux.h b/selftest/common/vmlinux.h index b251ad92..a2e4d745 100644 --- a/selftest/common/vmlinux.h +++ b/selftest/common/vmlinux.h @@ -87,13 +87,11 @@ struct bpf_raw_tracepoint_args { __u64 args[0]; }; -enum -{ +enum { BPF_F_CURRENT_CPU = 4294967295, }; -enum bpf_map_type -{ +enum bpf_map_type { BPF_MAP_TYPE_UNSPEC = 0, BPF_MAP_TYPE_HASH = 1, BPF_MAP_TYPE_ARRAY = 2, @@ -182,8 +180,7 @@ struct sock_common { #define ETH_P_IP 0x0800 -enum xdp_action -{ +enum xdp_action { XDP_ABORTED = 0, XDP_DROP = 1, XDP_PASS = 2, @@ -202,8 +199,7 @@ enum xdp_action // or, at least, should be, immutable among different kernel versions. // -enum -{ +enum { TCP_ESTABLISHED = 1, TCP_SYN_SENT = 2, TCP_SYN_RECV = 3, @@ -219,8 +215,7 @@ enum TCP_MAX_STATES = 13, }; -enum sock_type -{ +enum sock_type { SOCK_STREAM = 1, SOCK_DGRAM = 2, SOCK_RAW = 3, @@ -230,8 +225,7 @@ enum sock_type SOCK_PACKET = 10, }; -enum -{ +enum { IPPROTO_IP = 0, IPPROTO_ICMP = 1, IPPROTO_IGMP = 2, @@ -262,8 +256,7 @@ enum IPPROTO_MAX = 263, }; -enum -{ +enum { TCPF_ESTABLISHED = 2, TCPF_SYN_SENT = 4, TCPF_FIN_WAIT1 = 16, @@ -316,8 +309,7 @@ struct __sk_buff { __u32 gso_size; }; -enum bpf_hdr_start_off -{ +enum bpf_hdr_start_off { BPF_HDR_START_MAC = 0, BPF_HDR_START_NET = 1, }; diff --git a/selftest/create-map/go.mod b/selftest/create-map/go.mod index 8493bf67..b118a92d 100644 --- a/selftest/create-map/go.mod +++ b/selftest/create-map/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-pin-info -go 1.21 +go 1.22.0 -replace github.com/aquasecurity/libbpfgo => ../../ +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 + +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/error-handling/go.mod b/selftest/error-handling/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/error-handling/go.mod +++ b/selftest/error-handling/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/getbtffdbyid/go.mod b/selftest/getbtffdbyid/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/getbtffdbyid/go.mod +++ b/selftest/getbtffdbyid/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/global-variable/go.mod b/selftest/global-variable/go.mod index 9ea64497..d8eb0537 100644 --- a/selftest/global-variable/go.mod +++ b/selftest/global-variable/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/global-variable -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/iter/go.mod b/selftest/iter/go.mod index 8fad274e..2824f554 100644 --- a/selftest/iter/go.mod +++ b/selftest/iter/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/iter -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/iterators/go.mod b/selftest/iterators/go.mod index d77f98e7..b6805fb1 100644 --- a/selftest/iterators/go.mod +++ b/selftest/iterators/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/iterators -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/log-callbacks/go.mod b/selftest/log-callbacks/go.mod index 7ba42200..924f2032 100644 --- a/selftest/log-callbacks/go.mod +++ b/selftest/log-callbacks/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/log-callbacks -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-autocreate/go.mod b/selftest/map-autocreate/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-autocreate/go.mod +++ b/selftest/map-autocreate/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-batch/go.mod b/selftest/map-batch/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-batch/go.mod +++ b/selftest/map-batch/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-getbyid/go.mod b/selftest/map-getbyid/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-getbyid/go.mod +++ b/selftest/map-getbyid/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-getfdbyid/go.mod b/selftest/map-getfdbyid/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-getfdbyid/go.mod +++ b/selftest/map-getfdbyid/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-getmapsbyname/go.mod b/selftest/map-getmapsbyname/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-getmapsbyname/go.mod +++ b/selftest/map-getmapsbyname/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-innerinfo/go.mod b/selftest/map-innerinfo/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-innerinfo/go.mod +++ b/selftest/map-innerinfo/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-keysize/go.mod b/selftest/map-keysize/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-keysize/go.mod +++ b/selftest/map-keysize/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-of-maps-outer-high-inner-high/go.mod b/selftest/map-of-maps-outer-high-inner-high/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-of-maps-outer-high-inner-high/go.mod +++ b/selftest/map-of-maps-outer-high-inner-high/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-of-maps-outer-high-inner-low/go.mod b/selftest/map-of-maps-outer-high-inner-low/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-of-maps-outer-high-inner-low/go.mod +++ b/selftest/map-of-maps-outer-high-inner-low/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-of-maps-outer-low-inner-low/go.mod b/selftest/map-of-maps-outer-low-inner-low/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-of-maps-outer-low-inner-low/go.mod +++ b/selftest/map-of-maps-outer-low-inner-low/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-pin-info/go.mod b/selftest/map-pin-info/go.mod index 12f3e9ca..b118a92d 100644 --- a/selftest/map-pin-info/go.mod +++ b/selftest/map-pin-info/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-pin-info -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-setinner/go.mod b/selftest/map-setinner/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-setinner/go.mod +++ b/selftest/map-setinner/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/map-update/go.mod b/selftest/map-update/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/map-update/go.mod +++ b/selftest/map-update/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/module-attach-detach/go.mod b/selftest/module-attach-detach/go.mod index 97710baf..5b9aafee 100644 --- a/selftest/module-attach-detach/go.mod +++ b/selftest/module-attach-detach/go.mod @@ -1,9 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/module-attach-detach -go 1.21 +go 1.22.0 -require github.com/aquasecurity/libbpfgo v0.0.0 +toolchain go1.22.3 -replace github.com/aquasecurity/libbpfgo => ../../ +require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo/helpers => ../../helpers +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/multiple-objects/Makefile b/selftest/multiple-objects/Makefile index 0eea5857..db2af8bf 100644 --- a/selftest/multiple-objects/Makefile +++ b/selftest/multiple-objects/Makefile @@ -8,18 +8,23 @@ LIBBPF_OBJ = $(abspath $(OUTPUT)/libbpf.a) CC = gcc CLANG = clang GO = go +PKGCONFIG = pkg-config ARCH := $(shell uname -m | sed 's/x86_64/amd64/g; s/aarch64/arm64/g') +# libbpf + +LIBBPF_OBJDIR = $(abspath ./$(OUTPUT)/libbpf) + CFLAGS = -g -O2 -Wall -fpie LDFLAGS = CGO_CFLAGS_STATIC = "-I$(abspath $(OUTPUT)) -I$(abspath ../common)" -CGO_LDFLAGS_STATIC = "-lelf -lz $(LIBBPF_OBJ)" +CGO_LDFLAGS_STATIC = "$(shell PKG_CONFIG_PATH=$(LIBBPF_OBJDIR) $(PKGCONFIG) --static --libs libbpf)" CGO_EXTLDFLAGS_STATIC = '-w -extldflags "-static"' CGO_CFLAGS_DYN = "-I. -I/usr/include/" -CGO_LDFLAGS_DYN = "-lelf -lz -lbpf" +CGO_LDFLAGS_DYN = "$(shell $(PKGCONFIG) --shared --libs libbpf)" MAIN = main FIRST = first diff --git a/selftest/multiple-objects/go.mod b/selftest/multiple-objects/go.mod index d4920d84..6faaae22 100644 --- a/selftest/multiple-objects/go.mod +++ b/selftest/multiple-objects/go.mod @@ -1,9 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/tracing -go 1.21 +go 1.22.0 -require github.com/aquasecurity/libbpfgo v0.0.0 +toolchain go1.22.3 -replace github.com/aquasecurity/libbpfgo => ../../ +require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo/helpers => ../../helpers +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/netns/go.mod b/selftest/netns/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/netns/go.mod +++ b/selftest/netns/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/object-iterator/go.mod b/selftest/object-iterator/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/object-iterator/go.mod +++ b/selftest/object-iterator/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/percpu/go.mod b/selftest/percpu/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/percpu/go.mod +++ b/selftest/percpu/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/perfbuffers/go.mod b/selftest/perfbuffers/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/perfbuffers/go.mod +++ b/selftest/perfbuffers/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/probe-features/go.mod b/selftest/probe-features/go.mod index 12f3e9ca..b118a92d 100644 --- a/selftest/probe-features/go.mod +++ b/selftest/probe-features/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-pin-info -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/reuse-fd/go.mod b/selftest/reuse-fd/go.mod index e4b855d8..d5f957bb 100644 --- a/selftest/reuse-fd/go.mod +++ b/selftest/reuse-fd/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/map-update -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/ringbuffers/go.mod b/selftest/ringbuffers/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/ringbuffers/go.mod +++ b/selftest/ringbuffers/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/set-attach/go.mod b/selftest/set-attach/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/set-attach/go.mod +++ b/selftest/set-attach/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/spinlocks/go.mod b/selftest/spinlocks/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/spinlocks/go.mod +++ b/selftest/spinlocks/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/tc/go.mod b/selftest/tc/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/tc/go.mod +++ b/selftest/tc/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/tracing-by-offset/go.mod b/selftest/tracing-by-offset/go.mod index 6abf9d51..3ce9a6aa 100644 --- a/selftest/tracing-by-offset/go.mod +++ b/selftest/tracing-by-offset/go.mod @@ -1,14 +1,17 @@ module github.com/aquasecurity/libbpfgo/selftest/tracing-by-offset -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require ( github.com/aquasecurity/libbpfgo v0.0.0 - github.com/aquasecurity/libbpfgo/helpers v0.4.5 + github.com/aquasecurity/libbpfgo/helpers v0.0.0 ) -require golang.org/x/sys v0.18.0 // indirect - -replace github.com/aquasecurity/libbpfgo => ../../ +require golang.org/x/sys v0.20.0 // indirect -replace github.com/aquasecurity/libbpfgo/helpers => ../../helpers +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/tracing-by-offset/go.sum b/selftest/tracing-by-offset/go.sum index 56d1d2ec..bf9b925f 100644 --- a/selftest/tracing-by-offset/go.sum +++ b/selftest/tracing-by-offset/go.sum @@ -4,7 +4,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/selftest/tracing/go.mod b/selftest/tracing/go.mod index ed6089c7..f23a147f 100644 --- a/selftest/tracing/go.mod +++ b/selftest/tracing/go.mod @@ -1,14 +1,17 @@ module github.com/aquasecurity/libbpfgo/selftest/tracing -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require ( github.com/aquasecurity/libbpfgo v0.0.0 - github.com/aquasecurity/libbpfgo/helpers v0.4.5 + github.com/aquasecurity/libbpfgo/helpers v0.0.0 ) -require golang.org/x/sys v0.18.0 // indirect - -replace github.com/aquasecurity/libbpfgo => ../../ +require golang.org/x/sys v0.20.0 // indirect -replace github.com/aquasecurity/libbpfgo/helpers => ../../helpers +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/tracing/go.sum b/selftest/tracing/go.sum index 56d1d2ec..bf9b925f 100644 --- a/selftest/tracing/go.sum +++ b/selftest/tracing/go.sum @@ -4,7 +4,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/selftest/uprobe/Makefile b/selftest/uprobe/Makefile index eb6864d5..a20de2ae 100644 --- a/selftest/uprobe/Makefile +++ b/selftest/uprobe/Makefile @@ -8,18 +8,23 @@ LIBBPF_OBJ = $(abspath $(OUTPUT)/libbpf.a) CC = gcc CLANG = clang GO = go +PKGCONFIG = pkg-config ARCH := $(shell uname -m | sed 's/x86_64/amd64/g; s/aarch64/arm64/g') +# libbpf + +LIBBPF_OBJDIR = $(abspath ./$(OUTPUT)/libbpf) + CFLAGS = -g -O2 -Wall -fpie LDFLAGS = CGO_CFLAGS_STATIC = "-I$(abspath $(OUTPUT)) -I$(abspath ../common)" -CGO_LDFLAGS_STATIC = "-lelf -lz $(LIBBPF_OBJ)" +CGO_LDFLAGS_STATIC = "$(shell PKG_CONFIG_PATH=$(LIBBPF_OBJDIR) $(PKGCONFIG) --static --libs libbpf)" CGO_EXTLDFLAGS_STATIC = '-w -extldflags "-static"' CGO_CFLAGS_DYN = "-I. -I/usr/include/" -CGO_LDFLAGS_DYN = "-lelf -lz -lbpf" +CGO_LDFLAGS_DYN = "$(shell $(PKGCONFIG) --shared --libs libbpf)" TEST = main diff --git a/selftest/uprobe/go.mod b/selftest/uprobe/go.mod index 0088c8db..874fe06f 100644 --- a/selftest/uprobe/go.mod +++ b/selftest/uprobe/go.mod @@ -1,13 +1,15 @@ module github.com/aquasecurity/libbpfgo/selftest/uprobe -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require ( github.com/aquasecurity/libbpfgo v0.0.0 - github.com/aquasecurity/libbpfgo/helpers v0.4.5 + github.com/aquasecurity/libbpfgo/helpers v0.0.0 ) -require golang.org/x/sys v0.18.0 // indirect +require golang.org/x/sys v0.20.0 // indirect replace github.com/aquasecurity/libbpfgo => ../../ diff --git a/selftest/uprobe/go.sum b/selftest/uprobe/go.sum index 56d1d2ec..bf9b925f 100644 --- a/selftest/uprobe/go.sum +++ b/selftest/uprobe/go.sum @@ -4,7 +4,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/selftest/version/go.mod b/selftest/version/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/version/go.mod +++ b/selftest/version/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +) diff --git a/selftest/xdp/go.mod b/selftest/xdp/go.mod index 72a57bd7..2e784cbb 100644 --- a/selftest/xdp/go.mod +++ b/selftest/xdp/go.mod @@ -1,7 +1,12 @@ module github.com/aquasecurity/libbpfgo/selftest/perfbuffers -go 1.21 +go 1.22.0 + +toolchain go1.22.3 require github.com/aquasecurity/libbpfgo v0.0.0 -replace github.com/aquasecurity/libbpfgo => ../../ +replace ( + github.com/aquasecurity/libbpfgo => ../../ + github.com/aquasecurity/libbpfgo/helpers => ../../helpers +)