Repository: kubernetes-sigs/security-profiles-operator
Pull request #1024 (2022-07-08 08:19:36)

Update CRI-O to v1.24.1


#### What type of PR is this?


/kind cleanup


#### What this PR does / why we need it:
Update CRI-O to the latest release.
#### Which issue(s) this PR fixes:

<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.

Fixes #

or

None
-->
None
#### Does this PR have test?
None
<!--
If tests aren't applicable just write N/A.
-->

#### Special notes for your reviewer:
None
#### Does this PR introduce a user-facing change?

<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".

For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
-->

```release-note
None
```


k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/security-profiles-operator/pull/1024#" title="Author self-approved">saschagrunert</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fsecurity-profiles-operator).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/security-profiles-operator/blob/main/OWNERS)~~ [saschagrunert]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
JAORMX: /lgtm
k8s-ci-robot: @saschagrunert: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-security-profiles-operator-test-e2e | 78f7025b5680db5d1065191eb31609ded23282ab | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_security-profiles-operator/1024/pull-security-profiles-operator-test-e2e/1545326746314739712) | true | `/test pull-security-profiles-operator-test-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=security-profiles-operator&pr=1024). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Asaschagrunert). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/security-profiles-operator/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->

Patch:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 5cf27773b..3d6c28611 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -24,7 +24,7 @@ jobs:
     runs-on: macos-11
     steps:
       - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
-      - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923
+      - uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
         with:
           go-version: ${{ env.GO_VERSION }}
       - run: make test-unit
@@ -45,7 +45,7 @@ jobs:
   bpf-btf:
     runs-on: ubuntu-20.04
     steps:
-      - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923
+      - uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
         with:
           go-version: ${{ env.GO_VERSION }}
       - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
diff --git a/Dockerfile.build-image b/Dockerfile.build-image
index bc08f08e8..435556a0a 100644
--- a/Dockerfile.build-image
+++ b/Dockerfile.build-image
@@ -12,15 +12,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# hash below relates to tag: bullseye-v1.0.0
-FROM k8s.gcr.io/build-image/debian-base@sha256:aa2e259dfe202b601b2a94a8b2e1b203a0fe92a601947da3d0c510be4e54c352
+# hash below relates to tag: bullseye-v1.4.0
+FROM k8s.gcr.io/build-image/debian-base@sha256:9a4b40b8837c4b3e4e45716baea6e1461b7c51a3f723aeaf52e8acdcd1aa40b2
 WORKDIR /work
 
 RUN apt-get update && apt-get install -y wget xz-utils libapparmor-dev
 
 ENV USER=root
 
-ARG NIX_VERSION=2.9.0
+ARG NIX_VERSION=2.9.2
 RUN wget https://nixos.org/releases/nix/nix-${NIX_VERSION}/nix-${NIX_VERSION}-x86_64-linux.tar.xz && \
     tar xf nix-${NIX_VERSION}-x86_64-linux.tar.xz && \
     groupadd -r -g 30000 nixbld && \
diff --git a/cloudbuild.yaml b/cloudbuild.yaml
index 70140eb48..8a28c60b6 100644
--- a/cloudbuild.yaml
+++ b/cloudbuild.yaml
@@ -5,7 +5,7 @@ options:
   substitution_option: ALLOW_LOOSE
   machineType: N1_HIGHCPU_8
 steps:
-  - name: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20211118-2f2d816b90
+  - name: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20220617-174ad91c3a
     entrypoint: bash
     env:
       - TAG=$_GIT_TAG
diff --git a/dependencies.yaml b/dependencies.yaml
index c4c04169a..a5145a90f 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -104,31 +104,31 @@ dependencies:
       match: node
 
   - name: debian-base
-    version: sha256:aa2e259dfe202b601b2a94a8b2e1b203a0fe92a601947da3d0c510be4e54c352
+    version: sha256:9a4b40b8837c4b3e4e45716baea6e1461b7c51a3f723aeaf52e8acdcd1aa40b2
     refPaths:
     - path: Dockerfile.build-image
       match: k8s.gcr.io/build-image/debian-base
 
   - name: nix
-    version: 2.9.0
+    version: 2.9.2
     refPaths:
     - path: Dockerfile.build-image
       match: NIX_VERSION
 
   - name: kube-rbac-proxy
-    version: 0.11.0
+    version: 0.13.0
     refPaths:
     - path: internal/pkg/manager/spod/bindata/spod.go
       match: quay.io/brancz/kube-rbac-proxy
 
   - name: gcb-docker-gcloud
-    version: v20211118-2f2d816b90
+    version: v20220617-174ad91c3a
     refPaths:
     - path: cloudbuild.yaml
-      match: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20211118-2f2d816b90
+      match: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud
 
   - name: libbpf
-    version: 0.7.0
+    version: 0.8.0
     refPaths:
     - path: hack/install-libbpf.sh
       match: VERSION
@@ -146,7 +146,7 @@ dependencies:
       match: VERSION
 
   - name: CRI-O
-    version: v1.24.0
+    version: v1.24.1
     refPaths:
     - path: hack/ci/install-cri-o.sh
       match: TAG
diff --git a/go.mod b/go.mod
index 68efa7dda..72ee4cd14 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.18
 require (
 	github.com/ReneKroon/ttlcache/v2 v2.11.0
 	github.com/acobaugh/osrelease v0.0.0-20181218015638-a93a0a55a249
-	github.com/aquasecurity/libbpfgo v0.2.5-libbpf-0.7.0
+	github.com/aquasecurity/libbpfgo v0.3.0-libbpf-0.8.0
 	github.com/cert-manager/cert-manager v1.8.2
 	github.com/containers/common v0.48.1-0.20220510094751-400832f41771
 	github.com/crossplane/crossplane-runtime v0.16.0
@@ -20,7 +20,7 @@ require (
 	github.com/prometheus/client_model v0.2.0
 	github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921
 	github.com/stretchr/testify v1.8.0
-	github.com/urfave/cli/v2 v2.10.3
+	github.com/urfave/cli/v2 v2.11.0
 	golang.org/x/net v0.0.0-20220225172249-27dd8689420f
 	golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
 	google.golang.org/grpc v1.47.0
diff --git a/go.sum b/go.sum
index 0cf160b60..af978743a 100644
--- a/go.sum
+++ b/go.sum
@@ -125,8 +125,8 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo
 github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY=
-github.com/aquasecurity/libbpfgo v0.2.5-libbpf-0.7.0 h1:BpW7qxkveYXx8TCtvYWIvmliPqaTCz/IYs1i+Gyj0MQ=
-github.com/aquasecurity/libbpfgo v0.2.5-libbpf-0.7.0/go.mod h1:/+clceXE103FaXvVTIY2HAkQjxNtkra4DRWvZYr2SKw=
+github.com/aquasecurity/libbpfgo v0.3.0-libbpf-0.8.0 h1:NQEf484vQOshZwZOLTE7kzo62TvYrM906gUjlVg4D2k=
+github.com/aquasecurity/libbpfgo v0.3.0-libbpf-0.8.0/go.mod h1:qu0TVGRvtNMFkuKLscJkY1FwmageNBLqeImAFslqPPc=
 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
 github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
@@ -1047,8 +1047,8 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX
 github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
 github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
 github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
-github.com/urfave/cli/v2 v2.10.3 h1:oi571Fxz5aHugfBAJd5nkwSk3fzATXtMlpxdLylSCMo=
-github.com/urfave/cli/v2 v2.10.3/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo=
+github.com/urfave/cli/v2 v2.11.0 h1:c6bD90aLd2iEsokxhxkY5Er0zA2V9fId2aJfwmrF+do=
+github.com/urfave/cli/v2 v2.11.0/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo=
 github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI=
 github.com/vbauerster/mpb/v7 v7.4.1/go.mod h1:Ygg2mV9Vj9sQBWqsK2m2pidcf9H3s6bNKtqd3/M4gBo=
 github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
@@ -1403,7 +1403,6 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
diff --git a/hack/ci/install-cri-o.sh b/hack/ci/install-cri-o.sh
index c7b724aae..2977b768f 100755
--- a/hack/ci/install-cri-o.sh
+++ b/hack/ci/install-cri-o.sh
@@ -15,8 +15,8 @@
 
 set -euo pipefail
 
-COMMIT_ID=db76322414a7888c7642b707e07dbb9905aa969f
-TAG=v1.24.0
+COMMIT_ID=fa262bc87353c45940931402a76f9175a4e01fa6
+TAG=v1.24.1
 
 curl "https://raw.githubusercontent.com/cri-o/cri-o/$COMMIT_ID/scripts/get" | bash -s -- -t "$TAG"
 
diff --git a/hack/install-libbpf.sh b/hack/install-libbpf.sh
index 9b75b992d..52350608b 100755
--- a/hack/install-libbpf.sh
+++ b/hack/install-libbpf.sh
@@ -15,7 +15,7 @@
 
 set -euo pipefail
 
-VERSION=0.7.0
+VERSION=0.8.0
 curl -sSfL --retry 5 --retry-delay 3 \
     "https://github.com/libbpf/libbpf/archive/refs/tags/v$VERSION.tar.gz" -o- |
     tar xfz -
diff --git a/internal/pkg/manager/spod/bindata/spod.go b/internal/pkg/manager/spod/bindata/spod.go
index f95f5fd83..0de055808 100644
--- a/internal/pkg/manager/spod/bindata/spod.go
+++ b/internal/pkg/manager/spod/bindata/spod.go
@@ -52,7 +52,7 @@ const (
 	SelinuxdPrivateDir                         = "/var/run/selinuxd"
 	SelinuxdSocketPath                         = SelinuxdPrivateDir + "/selinuxd.sock"
 	SelinuxdDBPath                             = SelinuxdPrivateDir + "/selinuxd.db"
-	MetricsImage                               = "quay.io/brancz/kube-rbac-proxy:v0.11.0"
+	MetricsImage                               = "quay.io/brancz/kube-rbac-proxy:v0.13.0"
 	sysKernelDebugPath                         = "/sys/kernel/debug"
 	InitContainerIDNonRootenabler              = 0
 	InitContainerIDSelinuxSharedPoliciesCopier = 1
diff --git a/internal/pkg/version/version_bpf_supported.go b/internal/pkg/version/version_bpf_supported.go
index d5627809a..9724f7324 100644
--- a/internal/pkg/version/version_bpf_supported.go
+++ b/internal/pkg/version/version_bpf_supported.go
@@ -23,5 +23,5 @@ import "github.com/aquasecurity/libbpfgo"
 
 // libbpfVersion returns a human readable string of the libbpf version.
 func libbpfVersion() string {
-	return libbpfgo.VersionString()
+	return libbpfgo.LibbpfVersionString()
 }
diff --git a/nix/derivation-bpf.nix b/nix/derivation-bpf.nix
index 06a257a13..f0c70a7a9 100644
--- a/nix/derivation-bpf.nix
+++ b/nix/derivation-bpf.nix
@@ -19,7 +19,6 @@ with pkgs; buildGo118Module rec {
     glibc
     glibc.static
     libbpf
-    libelf
     zlib.static
   ];
   buildPhase = ''
diff --git a/nix/derivation.nix b/nix/derivation.nix
index cdff2c5cd..5a300cc5b 100644
--- a/nix/derivation.nix
+++ b/nix/derivation.nix
@@ -13,11 +13,11 @@ with pkgs; buildGo118Module rec {
   ];
   buildInputs = [
     (libseccomp.overrideAttrs (x: { dontDisableStatic = true; }))
+    elfutils
     glibc
     glibc.static
-    libbpf
-    libelf
     libapparmor
+    libbpf
     zlib.static
   ];
   buildPhase = ''
diff --git a/nix/nixpkgs.json b/nix/nixpkgs.json
index b8c3bd851..2003b66b5 100644
--- a/nix/nixpkgs.json
+++ b/nix/nixpkgs.json
@@ -1,9 +1,9 @@
 {
   "url": "https://github.com/nixos/nixpkgs",
-  "rev": "152e9283c5b91174be7b33eef68a1496ccbc1507",
-  "date": "2022-06-02T13:43:17+02:00",
-  "path": "/nix/store/2i9fv5zbnyy14h4lyj0niangsqcmk6c6-nixpkgs",
-  "sha256": "1pfyp0jlbn5jvqnainpc165q4m070q9psan73jhax06n97gg7lv0",
+  "rev": "df8f580137e9120ffc60b2cc85d62fcc928c2eab",
+  "date": "2022-07-12T06:23:42+00:00",
+  "path": "/nix/store/7ddkc6rqgnvvhxwi0dqzsga49jrhwqwx-nixpkgs",
+  "sha256": "1ih3xk0vmnr2ywga2fmisvyaz4nrqf647821r811zl7hv37qhv75",
   "fetchLFS": false,
   "fetchSubmodules": false,
   "deepClone": false,
diff --git a/vendor/github.com/aquasecurity/libbpfgo/Makefile b/vendor/github.com/aquasecurity/libbpfgo/Makefile
index 99a34fd79..9d7b8e89d 100644
--- a/vendor/github.com/aquasecurity/libbpfgo/Makefile
+++ b/vendor/github.com/aquasecurity/libbpfgo/Makefile
@@ -5,9 +5,9 @@ SELFTEST = ./selftest
 
 CC = gcc
 CLANG = clang
+GO = go
 
-ARCH := $(shell uname -m)
-ARCH := $(subst x86_64,amd64,$(ARCH))
+ARCH := $(shell uname -m | sed 's/x86_64/amd64/g; s/aarch64/arm64/g')
 
 BTFFILE = /sys/kernel/btf/vmlinux
 BPFTOOL = $(shell which bpftool || /bin/false)
@@ -55,13 +55,13 @@ libbpfgo-dynamic: $(OUTPUT)/libbpf
 	CC=$(CLANG) \
 		CGO_CFLAGS=$(CGO_CFLAGS_DYN) \
 		CGO_LDFLAGS=$(CGO_LDFLAGS_DYN) \
-		go build .
+		$(GO) build .
 
 libbpfgo-dynamic-test: libbpfgo-test-bpf-dynamic
 	CC=$(CLANG) \
 		CGO_CFLAGS=$(CGO_CFLAGS_DYN) \
 		CGO_LDFLAGS=$(CGO_LDFLAGS_DYN) \
-		sudo -E go test .
+		sudo -E $(GO) test .
 
 # libbpf: static
 
@@ -70,7 +70,7 @@ libbpfgo-static: $(VMLINUXH) | $(LIBBPF_OBJ)
 		CGO_CFLAGS=$(CGO_CFLAGS_STATIC) \
 		CGO_LDFLAGS=$(CGO_LDFLAGS_STATIC) \
 		GOOS=linux GOARCH=$(ARCH) \
-		go build \
+		$(GO) build \
 		-tags netgo -ldflags $(CGO_EXTLDFLAGS_STATIC) \
 		.
 
@@ -80,7 +80,7 @@ libbpfgo-static-test: libbpfgo-test-bpf-static
 		CGO_CFLAGS=$(CGO_CFLAGS_STATIC) \
 		CGO_LDFLAGS=$(CGO_LDFLAGS_STATIC) \
 		GOOS=linux GOARCH=$(ARCH) \
-		go test \
+		$(GO) test \
 		-v -tags netgo -ldflags $(CGO_EXTLDFLAGS_STATIC) \
 		.
 
diff --git a/vendor/github.com/aquasecurity/libbpfgo/Readme.md b/vendor/github.com/aquasecurity/libbpfgo/Readme.md
index 8d6df5f90..90ddbcac4 100644
--- a/vendor/github.com/aquasecurity/libbpfgo/Readme.md
+++ b/vendor/github.com/aquasecurity/libbpfgo/Readme.md
@@ -114,5 +114,5 @@ Please check our github milestones for an idea of the project roadmap. The gener
 
 - [How to Build eBPF Programs with libbpfgo](https://blog.aquasec.com/libbpf-ebpf-programs).
 - [selftests](./selftest) are small program using libbpfgo and might be good usage examples.
-- [tracee-ebpf](https://github.com/aquasecurity/tracee/tree/main/tracee-ebpf) is a robust consumer of this project.
+- [tracee-ebpf](https://github.com/aquasecurity/tracee/tree/main/cmd/tracee-ebpf) is a robust consumer of this project.
 - Feel free to ask questions by creating a new [Discussion](https://github.com/aquasecurity/libbpfgo/discussions), we'd love to help.
diff --git a/vendor/github.com/aquasecurity/libbpfgo/helpers/argumentParsers.go b/vendor/github.com/aquasecurity/libbpfgo/helpers/argumentParsers.go
index dc7d127e2..5dff5d560 100644
--- a/vendor/github.com/aquasecurity/libbpfgo/helpers/argumentParsers.go
+++ b/vendor/github.com/aquasecurity/libbpfgo/helpers/argumentParsers.go
@@ -3,6 +3,7 @@ package helpers
 import (
 	"encoding/binary"
 	"fmt"
+	"golang.org/x/sys/unix"
 	"net"
 	"strconv"
 	"strings"
@@ -1366,3 +1367,402 @@ func Parse16BytesSliceIP(in []byte) string {
 
 	return ip.String()
 }
+
+type SocketLevelArgument uint64
+
+const (
+	SOL_SOCKET   SocketLevelArgument = unix.SOL_SOCKET
+	SOL_AAL      SocketLevelArgument = unix.SOL_AAL
+	SOL_ALG      SocketLevelArgument = unix.SOL_ALG
+	SOL_ATM      SocketLevelArgument = unix.SOL_ATM
+	SOL_CAIF     SocketLevelArgument = unix.SOL_CAIF
+	SOL_CAN_BASE SocketLevelArgument = unix.SOL_CAN_BASE
+	SOL_CAN_RAW  SocketLevelArgument = unix.SOL_CAN_RAW
+	SOL_DCCP     SocketLevelArgument = unix.SOL_DCCP
+	SOL_DECNET   SocketLevelArgument = unix.SOL_DECNET
+	SOL_ICMPV6   SocketLevelArgument = unix.SOL_ICMPV6
+	SOL_IP       SocketLevelArgument = unix.SOL_IP
+	SOL_IPV6     SocketLevelArgument = unix.SOL_IPV6
+	SOL_IRDA     SocketLevelArgument = unix.SOL_IRDA
+	SOL_IUCV     SocketLevelArgument = unix.SOL_IUCV
+	SOL_KCM      SocketLevelArgument = unix.SOL_KCM
+	SOL_LLC      SocketLevelArgument = unix.SOL_LLC
+	SOL_NETBEUI  SocketLevelArgument = unix.SOL_NETBEUI
+	SOL_NETLINK  SocketLevelArgument = unix.SOL_NETLINK
+	SOL_NFC      SocketLevelArgument = unix.SOL_NFC
+	SOL_PACKET   SocketLevelArgument = unix.SOL_PACKET
+	SOL_PNPIPE   SocketLevelArgument = unix.SOL_PNPIPE
+	SOL_PPPOL2TP SocketLevelArgument = unix.SOL_PPPOL2TP
+	SOL_RAW      SocketLevelArgument = unix.SOL_RAW
+	SOL_RDS      SocketLevelArgument = unix.SOL_RDS
+	SOL_RXRPC    SocketLevelArgument = unix.SOL_RXRPC
+	SOL_TCP      SocketLevelArgument = unix.SOL_TCP
+	SOL_TIPC     SocketLevelArgument = unix.SOL_TIPC
+	SOL_TLS      SocketLevelArgument = unix.SOL_TLS
+	SOL_X25      SocketLevelArgument = unix.SOL_X25
+	SOL_XDP      SocketLevelArgument = unix.SOL_XDP
+
+	// The following are newer, so aren't included in the unix package
+	SOL_MCTCP SocketLevelArgument = 284
+	SOL_MCTP  SocketLevelArgument = 285
+	SOL_SMC   SocketLevelArgument = 286
+)
+
+func (socketLevel SocketLevelArgument) Value() uint64 { return uint64(socketLevel) }
+
+var socketLevelStringMap = map[SocketLevelArgument]string{
+	SOL_SOCKET:   "SOL_SOCKET",
+	SOL_AAL:      "SOL_AAL",
+	SOL_ALG:      "SOL_ALG",
+	SOL_ATM:      "SOL_ATM",
+	SOL_CAIF:     "SOL_CAIF",
+	SOL_CAN_BASE: "SOL_CAN_BASE",
+	SOL_CAN_RAW:  "SOL_CAN_RAW",
+	SOL_DCCP:     "SOL_DCCP",
+	SOL_DECNET:   "SOL_DECNET",
+	SOL_ICMPV6:   "SOL_ICMPV6",
+	SOL_IP:       "SOL_IP",
+	SOL_IPV6:     "SOL_IPV6",
+	SOL_IRDA:     "SOL_IRDA",
+	SOL_IUCV:     "SOL_IUCV",
+	SOL_KCM:      "SOL_KCM",
+	SOL_LLC:      "SOL_LLC",
+	SOL_NETBEUI:  "SOL_NETBEUI",
+	SOL_NETLINK:  "SOL_NETLINK",
+	SOL_NFC:      "SOL_NFC",
+	SOL_PACKET:   "SOL_PACKET",
+	SOL_PNPIPE:   "SOL_PNPIPE",
+	SOL_PPPOL2TP: "SOL_PPPOL2TP",
+	SOL_RAW:      "SOL_RAW",
+	SOL_RDS:      "SOL_RDS",
+	SOL_RXRPC:    "SOL_RXRPC",
+	SOL_TCP:      "SOL_TCP",
+	SOL_TIPC:     "SOL_TIPC",
+	SOL_TLS:      "SOL_TLS",
+	SOL_X25:      "SOL_X25",
+	SOL_XDP:      "SOL_XDP",
+	SOL_MCTCP:    "SOL_MCTCP",
+	SOL_MCTP:     "SOL_MCTP",
+	SOL_SMC:      "SOL_SMC",
+}
+
+func (socketLevel SocketLevelArgument) String() string {
+	var res string
+
+	if sdName, ok := socketLevelStringMap[socketLevel]; ok {
+		res = sdName
+	} else {
+		res = strconv.Itoa(int(socketLevel))
+	}
+
+	return res
+}
+
+var socketLevelMap = map[uint64]SocketLevelArgument{
+	SOL_SOCKET.Value():   SOL_SOCKET,
+	SOL_AAL.Value():      SOL_AAL,
+	SOL_ALG.Value():      SOL_ALG,
+	SOL_ATM.Value():      SOL_ATM,
+	SOL_CAIF.Value():     SOL_CAIF,
+	SOL_CAN_BASE.Value(): SOL_CAN_BASE,
+	SOL_CAN_RAW.Value():  SOL_CAN_RAW,
+	SOL_DCCP.Value():     SOL_DCCP,
+	SOL_DECNET.Value():   SOL_DECNET,
+	SOL_ICMPV6.Value():   SOL_ICMPV6,
+	SOL_IP.Value():       SOL_IP,
+	SOL_IPV6.Value():     SOL_IPV6,
+	SOL_IRDA.Value():     SOL_IRDA,
+	SOL_IUCV.Value():     SOL_IUCV,
+	SOL_KCM.Value():      SOL_KCM,
+	SOL_LLC.Value():      SOL_LLC,
+	SOL_NETBEUI.Value():  SOL_NETBEUI,
+	SOL_NETLINK.Value():  SOL_NETLINK,
+	SOL_NFC.Value():      SOL_NFC,
+	SOL_PACKET.Value():   SOL_PACKET,
+	SOL_PNPIPE.Value():   SOL_PNPIPE,
+	SOL_PPPOL2TP.Value(): SOL_PPPOL2TP,
+	SOL_RAW.Value():      SOL_RAW,
+	SOL_RDS.Value():      SOL_RDS,
+	SOL_RXRPC.Value():    SOL_RXRPC,
+	SOL_TCP.Value():      SOL_TCP,
+	SOL_TIPC.Value():     SOL_TIPC,
+	SOL_TLS.Value():      SOL_TLS,
+	SOL_X25.Value():      SOL_X25,
+	SOL_XDP.Value():      SOL_XDP,
+	SOL_MCTCP.Value():    SOL_MCTCP,
+	SOL_MCTP.Value():     SOL_MCTP,
+	SOL_SMC.Value():      SOL_SMC,
+}
+
+// ParseSocketLevel parses the `level` argument of the `setsockopt` and `getsockopt` syscalls.
+// https://man7.org/linux/man-pages/man2/setsockopt.2.html
+// https://elixir.bootlin.com/linux/latest/source/include/linux/socket.h
+func ParseSocketLevel(rawValue uint64) (SocketLevelArgument, error) {
+
+	v, ok := socketLevelMap[rawValue]
+	if !ok {
+		return 0, fmt.Errorf("not a valid argument: %d", rawValue)
+	}
+	return v, nil
+}
+
+type SocketOptionArgument uint64
+
+const (
+	SO_DEBUG                         SocketOptionArgument = unix.SO_DEBUG
+	SO_REUSEADDR                     SocketOptionArgument = unix.SO_REUSEADDR
+	SO_TYPE                          SocketOptionArgument = unix.SO_TYPE
+	SO_ERROR                         SocketOptionArgument = unix.SO_ERROR
+	SO_DONTROUTE                     SocketOptionArgument = unix.SO_DONTROUTE
+	SO_BROADCAST                     SocketOptionArgument = unix.SO_BROADCAST
+	SO_SNDBUF                        SocketOptionArgument = unix.SO_SNDBUF
+	SO_RCVBUF                        SocketOptionArgument = unix.SO_RCVBUF
+	SO_SNDBUFFORCE                   SocketOptionArgument = unix.SO_SNDBUFFORCE
+	SO_RCVBUFFORCE                   SocketOptionArgument = unix.SO_RCVBUFFORCE
+	SO_KEEPALIVE                     SocketOptionArgument = unix.SO_KEEPALIVE
+	SO_OOBINLINE                     SocketOptionArgument = unix.SO_OOBINLINE
+	SO_NO_CHECK                      SocketOptionArgument = unix.SO_NO_CHECK
+	SO_PRIORITY                      SocketOptionArgument = unix.SO_PRIORITY
+	SO_LINGER                        SocketOptionArgument = unix.SO_LINGER
+	SO_BSDCOMPAT                     SocketOptionArgument = unix.SO_BSDCOMPAT
+	SO_REUSEPORT                     SocketOptionArgument = unix.SO_REUSEPORT
+	SO_PASSCRED                      SocketOptionArgument = unix.SO_PASSCRED
+	SO_PEERCRED                      SocketOptionArgument = unix.SO_PEERCRED
+	SO_RCVLOWAT                      SocketOptionArgument = unix.SO_RCVLOWAT
+	SO_SNDLOWAT                      SocketOptionArgument = unix.SO_SNDLOWAT
+	SO_SECURITY_AUTHENTICATION       SocketOptionArgument = unix.SO_SECURITY_AUTHENTICATION
+	SO_SECURITY_ENCRYPTION_TRANSPORT SocketOptionArgument = unix.SO_SECURITY_ENCRYPTION_TRANSPORT
+	SO_SECURITY_ENCRYPTION_NETWORK   SocketOptionArgument = unix.SO_SECURITY_ENCRYPTION_NETWORK
+	SO_BINDTODEVICE                  SocketOptionArgument = unix.SO_BINDTODEVICE
+	SO_ATTACH_OR_GET_FILTER          SocketOptionArgument = unix.SO_ATTACH_FILTER
+	SO_DETACH_FILTER_OR_BPF          SocketOptionArgument = unix.SO_DETACH_FILTER
+	SO_PEERNAME                      SocketOptionArgument = unix.SO_PEERNAME
+	SO_ACCEPTCONN                    SocketOptionArgument = unix.SO_ACCEPTCONN
+	SO_PEERSEC                       SocketOptionArgument = unix.SO_PEERSEC
+	SO_PASSSEC                       SocketOptionArgument = unix.SO_PASSSEC
+	SO_MARK                          SocketOptionArgument = unix.SO_MARK
+	SO_PROTOCOL                      SocketOptionArgument = unix.SO_PROTOCOL
+	SO_DOMAIN                        SocketOptionArgument = unix.SO_DOMAIN
+	SO_RXQ_OVFL                      SocketOptionArgument = unix.SO_RXQ_OVFL
+	SO_WIFI_STATUS                   SocketOptionArgument = unix.SO_WIFI_STATUS
+	SO_PEEK_OFF                      SocketOptionArgument = unix.SO_PEEK_OFF
+	SO_NOFCS                         SocketOptionArgument = unix.SO_NOFCS
+	SO_LOCK_FILTER                   SocketOptionArgument = unix.SO_LOCK_FILTER
+	SO_SELECT_ERR_QUEUE              SocketOptionArgument = unix.SO_SELECT_ERR_QUEUE
+	SO_BUSY_POLL                     SocketOptionArgument = unix.SO_BUSY_POLL
+	SO_MAX_PACING_RATE               SocketOptionArgument = unix.SO_MAX_PACING_RATE
+	SO_BPF_EXTENSIONS                SocketOptionArgument = unix.SO_BPF_EXTENSIONS
+	SO_INCOMING_CPU                  SocketOptionArgument = unix.SO_INCOMING_CPU
+	SO_ATTACH_BPF                    SocketOptionArgument = unix.SO_ATTACH_BPF
+	SO_ATTACH_REUSEPORT_CBPF         SocketOptionArgument = unix.SO_ATTACH_REUSEPORT_CBPF
+	SO_ATTACH_REUSEPORT_EBPF         SocketOptionArgument = unix.SO_ATTACH_REUSEPORT_EBPF
+	SO_CNX_ADVICE                    SocketOptionArgument = unix.SO_CNX_ADVICE
+	SCM_TIMESTAMPING_OPT_STATS       SocketOptionArgument = unix.SCM_TIMESTAMPING_OPT_STATS
+	SO_MEMINFO                       SocketOptionArgument = unix.SO_MEMINFO
+	SO_INCOMING_NAPI_ID              SocketOptionArgument = unix.SO_INCOMING_NAPI_ID
+	SO_COOKIE                        SocketOptionArgument = unix.SO_COOKIE
+	SCM_TIMESTAMPING_PKTINFO         SocketOptionArgument = unix.SCM_TIMESTAMPING_PKTINFO
+	SO_PEERGROUPS                    SocketOptionArgument = unix.SO_PEERGROUPS
+	SO_ZEROCOPY                      SocketOptionArgument = unix.SO_ZEROCOPY
+	SO_TXTIME                        SocketOptionArgument = unix.SO_TXTIME
+	SO_BINDTOIFINDEX                 SocketOptionArgument = unix.SO_BINDTOIFINDEX
+	SO_TIMESTAMP_NEW                 SocketOptionArgument = unix.SO_TIMESTAMP_NEW
+	SO_TIMESTAMPNS_NEW               SocketOptionArgument = unix.SO_TIMESTAMPNS_NEW
+	SO_TIMESTAMPING_NEW              SocketOptionArgument = unix.SO_TIMESTAMPING_NEW
+	SO_RCVTIMEO_NEW                  SocketOptionArgument = unix.SO_RCVTIMEO_NEW
+	SO_SNDTIMEO_NEW                  SocketOptionArgument = unix.SO_SNDTIMEO_NEW
+	SO_DETACH_REUSEPORT_BPF          SocketOptionArgument = unix.SO_DETACH_REUSEPORT_BPF
+	SO_PREFER_BUSY_POLL              SocketOptionArgument = unix.SO_PREFER_BUSY_POLL
+	SO_BUSY_POLL_BUDGET              SocketOptionArgument = unix.SO_BUSY_POLL_BUDGET
+	SO_TIMESTAMP                     SocketOptionArgument = unix.SO_TIMESTAMP
+	SO_TIMESTAMPNS                   SocketOptionArgument = unix.SO_TIMESTAMPNS
+	SO_TIMESTAMPING                  SocketOptionArgument = unix.SO_TIMESTAMPING
+	SO_RCVTIMEO                      SocketOptionArgument = unix.SO_RCVTIMEO
+	SO_SNDTIMEO                      SocketOptionArgument = unix.SO_SNDTIMEO
+
+	// The following are newer, so aren't included in the unix package
+	SO_NETNS_COOKIE SocketOptionArgument = 71
+	SO_BUF_LOCK     SocketOptionArgument = 72
+	SO_RESERVE_MEM  SocketOptionArgument = 73
+	SO_TXREHASH     SocketOptionArgument = 74
+)
+
+func (socketOption SocketOptionArgument) Value() uint64 { return uint64(socketOption) }
+
+var socketOptionStringMap = map[SocketOptionArgument]string{
+	SO_DEBUG:                         "SO_DEBUG",
+	SO_REUSEADDR:                     "SO_REUSEADDR",
+	SO_TYPE:                          "SO_TYPE",
+	SO_ERROR:                         "SO_ERROR",
+	SO_DONTROUTE:                     "SO_DONTROUTE",
+	SO_BROADCAST:                     "SO_BROADCAST",
+	SO_SNDBUF:                        "SO_SNDBUF",
+	SO_RCVBUF:                        "SO_RCVBUF",
+	SO_SNDBUFFORCE:                   "SO_SNDBUFFORCE",
+	SO_RCVBUFFORCE:                   "SO_RCVBUFFORCE",
+	SO_KEEPALIVE:                     "SO_KEEPALIVE",
+	SO_OOBINLINE:                     "SO_OOBINLINE",
+	SO_NO_CHECK:                      "SO_NO_CHECK",
+	SO_PRIORITY:                      "SO_PRIORITY",
+	SO_LINGER:                        "SO_LINGER",
+	SO_BSDCOMPAT:                     "SO_BSDCOMPAT",
+	SO_REUSEPORT:                     "SO_REUSEPORT",
+	SO_PASSCRED:                      "SO_PASSCRED",
+	SO_PEERCRED:                      "SO_PEERCRED",
+	SO_RCVLOWAT:                      "SO_RCVLOWAT",
+	SO_SNDLOWAT:                      "SO_SNDLOWAT",
+	SO_SECURITY_AUTHENTICATION:       "SO_SECURITY_AUTHENTICATION",
+	SO_SECURITY_ENCRYPTION_TRANSPORT: "SO_SECURITY_ENCRYPTION_TRANSPORT",
+	SO_SECURITY_ENCRYPTION_NETWORK:   "SO_SECURITY_ENCRYPTION_NETWORK",
+	SO_BINDTODEVICE:                  "SO_BINDTODEVICE",
+	SO_ATTACH_OR_GET_FILTER:          "SO_ATTACH_FILTER or SO_GET_FILTER",
+	SO_DETACH_FILTER_OR_BPF:          "SO_DETACH_FILTER or SO_DETACH_BPF",
+	SO_PEERNAME:                      "SO_PEERNAME",
+	SO_ACCEPTCONN:                    "SO_ACCEPTCONN",
+	SO_PEERSEC:                       "SO_PEERSEC",
+	SO_PASSSEC:                       "SO_PASSSEC",
+	SO_MARK:                          "SO_MARK",
+	SO_PROTOCOL:                      "SO_PROTOCOL",
+	SO_DOMAIN:                        "SO_DOMAIN",
+	SO_RXQ_OVFL:                      "SO_RXQ_OVFL",
+	SO_WIFI_STATUS:                   "SO_WIFI_STATUS",
+	SO_PEEK_OFF:                      "SO_PEEK_OFF",
+	SO_NOFCS:                         "SO_NOFCS",
+	SO_LOCK_FILTER:                   "SO_LOCK_FILTER",
+	SO_SELECT_ERR_QUEUE:              "SO_SELECT_ERR_QUEUE",
+	SO_BUSY_POLL:                     "SO_BUSY_POLL",
+	SO_MAX_PACING_RATE:               "SO_MAX_PACING_RATE",
+	SO_BPF_EXTENSIONS:                "SO_BPF_EXTENSIONS",
+	SO_INCOMING_CPU:                  "SO_INCOMING_CPU",
+	SO_ATTACH_BPF:                    "SO_ATTACH_BPF",
+	SO_ATTACH_REUSEPORT_CBPF:         "SO_ATTACH_REUSEPORT_CBPF",
+	SO_ATTACH_REUSEPORT_EBPF:         "SO_ATTACH_REUSEPORT_EBPF",
+	SO_CNX_ADVICE:                    "SO_CNX_ADVICE",
+	SCM_TIMESTAMPING_OPT_STATS:       "SCM_TIMESTAMPING_OPT_STATS",
+	SO_MEMINFO:                       "SO_MEMINFO",
+	SO_INCOMING_NAPI_ID:              "SO_INCOMING_NAPI_ID",
+	SO_COOKIE:                        "SO_COOKIE",
+	SCM_TIMESTAMPING_PKTINFO:         "SCM_TIMESTAMPING_PKTINFO",
+	SO_PEERGROUPS:                    "SO_PEERGROUPS",
+	SO_ZEROCOPY:                      "SO_ZEROCOPY",
+	SO_TXTIME:                        "SO_TXTIME",
+	SO_BINDTOIFINDEX:                 "SO_BINDTOIFINDEX",
+	SO_TIMESTAMP_NEW:                 "SO_TIMESTAMP_NEW",
+	SO_TIMESTAMPNS_NEW:               "SO_TIMESTAMPNS_NEW",
+	SO_TIMESTAMPING_NEW:              "SO_TIMESTAMPING_NEW",
+	SO_RCVTIMEO_NEW:                  "SO_RCVTIMEO_NEW",
+	SO_SNDTIMEO_NEW:                  "SO_SNDTIMEO_NEW",
+	SO_DETACH_REUSEPORT_BPF:          "SO_DETACH_REUSEPORT_BPF",
+	SO_PREFER_BUSY_POLL:              "SO_PREFER_BUSY_POLL",
+	SO_BUSY_POLL_BUDGET:              "SO_BUSY_POLL_BUDGET",
+	SO_NETNS_COOKIE:                  "SO_NETNS_COOKIE",
+	SO_BUF_LOCK:                      "SO_BUF_LOCK",
+	SO_RESERVE_MEM:                   "SO_RESERVE_MEM",
+	SO_TIMESTAMP:                     "SO_TIMESTAMP",
+	SO_TIMESTAMPNS:                   "SO_TIMESTAMPNS",
+	SO_TIMESTAMPING:                  "SO_TIMESTAMPING",
+	SO_RCVTIMEO:                      "SO_RCVTIMEO",
+	SO_SNDTIMEO:                      "SO_SNDTIMEO",
+	SO_TXREHASH:                      "SO_TXREHASH",
+}
+
+func (socketOption SocketOptionArgument) String() string {
+	var res string
+
+	if sdName, ok := socketOptionStringMap[socketOption]; ok {
+		res = sdName
+	} else {
+		res = strconv.Itoa(int(socketOption))
+	}
+
+	return res
+}
+
+var socketOptionMap = map[uint64]SocketOptionArgument{
+	SO_DEBUG.Value():                         SO_DEBUG,
+	SO_REUSEADDR.Value():                     SO_REUSEADDR,
+	SO_TYPE.Value():                          SO_TYPE,
+	SO_ERROR.Value():                         SO_ERROR,
+	SO_DONTROUTE.Value():                     SO_DONTROUTE,
+	SO_BROADCAST.Value():                     SO_BROADCAST,
+	SO_SNDBUF.Value():                        SO_SNDBUF,
+	SO_RCVBUF.Value():                        SO_RCVBUF,
+	SO_SNDBUFFORCE.Value():                   SO_SNDBUFFORCE,
+	SO_RCVBUFFORCE.Value():                   SO_RCVBUFFORCE,
+	SO_KEEPALIVE.Value():                     SO_KEEPALIVE,
+	SO_OOBINLINE.Value():                     SO_OOBINLINE,
+	SO_NO_CHECK.Value():                      SO_NO_CHECK,
+	SO_PRIORITY.Value():                      SO_PRIORITY,
+	SO_LINGER.Value():                        SO_LINGER,
+	SO_BSDCOMPAT.Value():                     SO_BSDCOMPAT,
+	SO_REUSEPORT.Value():                     SO_REUSEPORT,
+	SO_PASSCRED.Value():                      SO_PASSCRED,
+	SO_PEERCRED.Value():                      SO_PEERCRED,
+	SO_RCVLOWAT.Value():                      SO_RCVLOWAT,
+	SO_SNDLOWAT.Value():                      SO_SNDLOWAT,
+	SO_SECURITY_AUTHENTICATION.Value():       SO_SECURITY_AUTHENTICATION,
+	SO_SECURITY_ENCRYPTION_TRANSPORT.Value(): SO_SECURITY_ENCRYPTION_TRANSPORT,
+	SO_SECURITY_ENCRYPTION_NETWORK.Value():   SO_SECURITY_ENCRYPTION_NETWORK,
+	SO_BINDTODEVICE.Value():                  SO_BINDTODEVICE,
+	SO_ATTACH_OR_GET_FILTER.Value():          SO_ATTACH_OR_GET_FILTER,
+	SO_DETACH_FILTER_OR_BPF.Value():          SO_DETACH_FILTER_OR_BPF,
+	SO_PEERNAME.Value():                      SO_PEERNAME,
+	SO_ACCEPTCONN.Value():                    SO_ACCEPTCONN,
+	SO_PEERSEC.Value():                       SO_PEERSEC,
+	SO_PASSSEC.Value():                       SO_PASSSEC,
+	SO_MARK.Value():                          SO_MARK,
+	SO_PROTOCOL.Value():                      SO_PROTOCOL,
+	SO_DOMAIN.Value():                        SO_DOMAIN,
+	SO_RXQ_OVFL.Value():                      SO_RXQ_OVFL,
+	SO_WIFI_STATUS.Value():                   SO_WIFI_STATUS,
+	SO_PEEK_OFF.Value():                      SO_PEEK_OFF,
+	SO_NOFCS.Value():                         SO_NOFCS,
+	SO_LOCK_FILTER.Value():                   SO_LOCK_FILTER,
+	SO_SELECT_ERR_QUEUE.Value():              SO_SELECT_ERR_QUEUE,
+	SO_BUSY_POLL.Value():                     SO_BUSY_POLL,
+	SO_MAX_PACING_RATE.Value():               SO_MAX_PACING_RATE,
+	SO_BPF_EXTENSIONS.Value():                SO_BPF_EXTENSIONS,
+	SO_INCOMING_CPU.Value():                  SO_INCOMING_CPU,
+	SO_ATTACH_BPF.Value():                    SO_ATTACH_BPF,
+	SO_ATTACH_REUSEPORT_CBPF.Value():         SO_ATTACH_REUSEPORT_CBPF,
+	SO_ATTACH_REUSEPORT_EBPF.Value():         SO_ATTACH_REUSEPORT_EBPF,
+	SO_CNX_ADVICE.Value():                    SO_CNX_ADVICE,
+	SCM_TIMESTAMPING_OPT_STATS.Value():       SCM_TIMESTAMPING_OPT_STATS,
+	SO_MEMINFO.Value():                       SO_MEMINFO,
+	SO_INCOMING_NAPI_ID.Value():              SO_INCOMING_NAPI_ID,
+	SO_COOKIE.Value():                        SO_COOKIE,
+	SCM_TIMESTAMPING_PKTINFO.Value():         SCM_TIMESTAMPING_PKTINFO,
+	SO_PEERGROUPS.Value():                    SO_PEERGROUPS,
+	SO_ZEROCOPY.Value():                      SO_ZEROCOPY,
+	SO_TXTIME.Value():                        SO_TXTIME,
+	SO_BINDTOIFINDEX.Value():                 SO_BINDTOIFINDEX,
+	SO_TIMESTAMP_NEW.Value():                 SO_TIMESTAMP_NEW,
+	SO_TIMESTAMPNS_NEW.Value():               SO_TIMESTAMPNS_NEW,
+	SO_TIMESTAMPING_NEW.Value():              SO_TIMESTAMPING_NEW,
+	SO_RCVTIMEO_NEW.Value():                  SO_RCVTIMEO_NEW,
+	SO_SNDTIMEO_NEW.Value():                  SO_SNDTIMEO_NEW,
+	SO_DETACH_REUSEPORT_BPF.Value():          SO_DETACH_REUSEPORT_BPF,
+	SO_PREFER_BUSY_POLL.Value():              SO_PREFER_BUSY_POLL,
+	SO_BUSY_POLL_BUDGET.Value():              SO_BUSY_POLL_BUDGET,
+	SO_NETNS_COOKIE.Value():                  SO_NETNS_COOKIE,
+	SO_BUF_LOCK.Value():                      SO_BUF_LOCK,
+	SO_RESERVE_MEM.Value():                   SO_RESERVE_MEM,
+	SO_TIMESTAMP.Value():                     SO_TIMESTAMP,
+	SO_TIMESTAMPNS.Value():                   SO_TIMESTAMPNS,
+	SO_TIMESTAMPING.Value():                  SO_TIMESTAMPING,
+	SO_RCVTIMEO.Value():                      SO_RCVTIMEO,
+	SO_SNDTIMEO.Value():                      SO_SNDTIMEO,
+	SO_TXREHASH.Value():                      SO_TXREHASH,
+}
+
+// ParseSocketOption parses the `optname` argument of the `setsockopt` and `getsockopt` syscalls.
+// https://man7.org/linux/man-pages/man2/setsockopt.2.html
+// https://elixir.bootlin.com/linux/latest/source/include/uapi/asm-generic/socket.h
+func ParseSocketOption(rawValue uint64) (SocketOptionArgument, error) {
+
+	v, ok := socketOptionMap[rawValue]
+	if !ok {
+		return 0, fmt.Errorf("not a valid argument: %d", rawValue)
+	}
+	return v, nil
+}
diff --git a/vendor/github.com/aquasecurity/libbpfgo/helpers/btfhub.go b/vendor/github.com/aquasecurity/libbpfgo/helpers/btfhub.go
index dbcbdc787..345b806ac 100644
--- a/vendor/github.com/aquasecurity/libbpfgo/helpers/btfhub.go
+++ b/vendor/github.com/aquasecurity/libbpfgo/helpers/btfhub.go
@@ -1,2 +1,1 @@
 package helpers
-
diff --git a/vendor/github.com/aquasecurity/libbpfgo/helpers/elf.go b/vendor/github.com/aquasecurity/libbpfgo/helpers/elf.go
index 67e1a614b..bdb13a653 100644
--- a/vendor/github.com/aquasecurity/libbpfgo/helpers/elf.go
+++ b/vendor/github.com/aquasecurity/libbpfgo/helpers/elf.go
@@ -19,7 +19,7 @@ func SymbolToOffset(path, symbol string) (uint32, error) {
 
 	// Only if we failed getting both regular and dynamic symbols - then we abort.
 	if regularSymbolsErr != nil && dynamicSymbolsErr != nil {
-		return 0, fmt.Errorf("could not open symbol sections to resolve symbol offset: %w, %w", regularSymbolsErr, dynamicSymbolsErr)
+		return 0, fmt.Errorf("could not open regular or dynamic symbol sections to resolve symbol offset: %w %s", regularSymbolsErr, dynamicSymbolsErr)
 	}
 
 	// Concatenating into a single list.
diff --git a/vendor/github.com/aquasecurity/libbpfgo/helpers/kernel_symbols.go b/vendor/github.com/aquasecurity/libbpfgo/helpers/kernel_symbols.go
index 723427100..50489729d 100644
--- a/vendor/github.com/aquasecurity/libbpfgo/helpers/kernel_symbols.go
+++ b/vendor/github.com/aquasecurity/libbpfgo/helpers/kernel_symbols.go
@@ -2,6 +2,7 @@ package helpers
 
 import (
 	"bufio"
+	"errors"
 	"fmt"
 	"os"
 	"strconv"
@@ -31,7 +32,7 @@ type KernelSymbol struct {
 }
 
 /* NewKernelSymbolsMap initiates  the kernel symbol map by parsing the /proc/kallsyms file.
- * each line continas the symbol's address, segment type, name, module owner (which can be empty in case the symbol is owned by the system)
+ * each line contains the symbol's address, segment type, name, module owner (which can be empty in case the symbol is owned by the system)
  * Note: the key of the map is the symbol owner and the symbol name (with undercase between them)
  */
 func NewKernelSymbolsMap() (*KernelSymbolTable, error) {
@@ -39,7 +40,7 @@ func NewKernelSymbolsMap() (*KernelSymbolTable, error) {
 	KernelSymbols.symbolMap = make(map[string]KernelSymbol)
 	file, err := os.Open("/proc/kallsyms")
 	if err != nil {
-		return nil, fmt.Errorf("Could not open /proc/kallsyms")
+		return nil, fmt.Errorf("could not open /proc/kallsyms: %w", err)
 	}
 	defer file.Close()
 	scanner := bufio.NewScanner(file)
@@ -54,13 +55,18 @@ func NewKernelSymbolsMap() (*KernelSymbolTable, error) {
 		if err != nil {
 			continue
 		}
-		symbolName := line[2]
 		symbolType := line[1]
+		symbolName := line[2]
+
 		symbolOwner := "system"
-		//if the line is only 3 words then the symbol is owned by the system
 		if len(line) > 3 {
+			// When a symbol is contained in a kernel module, it will be specified
+			// within square brackets, otherwise it's part of the system
 			symbolOwner = line[3]
+			symbolOwner = strings.TrimPrefix(symbolOwner, "[")
+			symbolOwner = strings.TrimSuffix(symbolOwner, "]")
 		}
+
 		symbolKey := fmt.Sprintf("%s_%s", symbolOwner, symbolName)
 		KernelSymbols.symbolMap[symbolKey] = KernelSymbol{symbolName, symbolType, symbolAddr, symbolOwner}
 	}
@@ -68,10 +74,11 @@ func NewKernelSymbolsMap() (*KernelSymbolTable, error) {
 	return &KernelSymbols, nil
 }
 
-// TextSegmentContains checks if a given address is in the kernel text segment by compare it to the kernel text segment address boundaries
+// TextSegmentContains checks if a given address is in the kernel text segment
+// by comparing it to the kernel text segment address boundaries
 func (k *KernelSymbolTable) TextSegmentContains(addr uint64) (bool, error) {
 	if !k.initialized {
-		return false, fmt.Errorf("KernelSymbolTable symbols map isnt initialized\n")
+		return false, errors.New("kernel symbols map isnt initialized")
 	}
 	stext, err := k.GetSymbolByName("system", "_stext")
 	if err != nil {
@@ -91,7 +98,7 @@ func (k *KernelSymbolTable) GetSymbolByName(owner string, name string) (*KernelS
 	if exist {
 		return &symbol, nil
 	}
-	return nil, fmt.Errorf("symbol not found")
+	return nil, fmt.Errorf("symbol not found: %s_%s", owner, name)
 }
 
 // GetSymbolByAddr returns a symbol by a given address
diff --git a/vendor/github.com/aquasecurity/libbpfgo/libbpfgo.go b/vendor/github.com/aquasecurity/libbpfgo/libbpfgo.go
index 5f5a44672..6d1cba0c0 100644
--- a/vendor/github.com/aquasecurity/libbpfgo/libbpfgo.go
+++ b/vendor/github.com/aquasecurity/libbpfgo/libbpfgo.go
@@ -36,6 +36,16 @@ int libbpf_print_fn(enum libbpf_print_level level, const char *format,
     if (level != LIBBPF_WARN)
         return 0;
 
+	// BUG: https://github.com/aquasecurity/tracee/issues/1676
+
+	va_list check; va_copy(check, args);
+	char *str = va_arg(check, char *);
+	if (strstr(str, "Exclusivity flag on") != NULL) {
+		va_end(check);
+		return 0;
+	}
+	va_end(check);
+
     return vfprintf(stderr, format, args);
 }
 
@@ -105,8 +115,9 @@ func MinorVersion() int {
 	return C.LIBBPF_MINOR_VERSION
 }
 
-// VersionString returns the string representation of the libbpf version.
-func VersionString() string {
+// LibbpfVersionString returns the string representation of the libbpf version which
+// libbpfgo is linked against
+func LibbpfVersionString() string {
 	return fmt.Sprintf("v%d.%d", MajorVersion(), MinorVersion())
 }
 
@@ -124,6 +135,88 @@ type BPFMap struct {
 	module *Module
 }
 
+type MapType uint32
+
+const (
+	MapTypeUnspec MapType = iota
+	MapTypeHash
+	MapTypeArray
+	MapTypeProgArray
+	MapTypePerfEventArray
+	MapTypePerCPUHash
+	MapTypePerCPUArray
+	MapTypeStackTrace
+	MapTypeCgroupArray
+	MapTypeLRUHash
+	MapTypeLRUPerCPUHash
+	MapTypeLPMTrie
+	MapTypeArrayOfMaps
+	MapTypeHashOfMaps
+	MapTypeDevMap
+	MapTypeSockMap
+	MapTypeCPUMap
+	MapTypeXSKMap
+	MapTypeSockHash
+	MapTypeCgroupStorage
+	MapTypeReusePortSockArray
+	MapTypePerCPUCgroupStorage
+	MapTypeQueue
+	MapTypeStack
+	MapTypeSKStorage
+	MapTypeDevmapHash
+	MapTypeStructOps
+	MapTypeRingbuf
+	MapTypeInodeStorage
+	MapTypeTaskStorage
+	MapTypeBloomFilter
+)
+
+type MapFlag uint32
+
+const (
+	MapFlagUpdateAny     MapFlag = iota // create new element or update existing
+	MapFlagUpdateNoExist                // create new element if it didn't exist
+	MapFlagUpdateExist                  // update existing element
+	MapFlagFLock                        // spin_lock-ed map_lookup/map_update
+)
+
+func (m MapType) String() string {
+	x := map[MapType]string{
+		MapTypeUnspec:              "BPF_MAP_TYPE_UNSPEC",
+		MapTypeHash:                "BPF_MAP_TYPE_HASH",
+		MapTypeArray:               "BPF_MAP_TYPE_ARRAY",
+		MapTypeProgArray:           "BPF_MAP_TYPE_PROG_ARRAY",
+		MapTypePerfEventArray:      "BPF_MAP_TYPE_PERF_EVENT_ARRAY",
+		MapTypePerCPUHash:          "BPF_MAP_TYPE_PERCPU_HASH",
+		MapTypePerCPUArray:         "BPF_MAP_TYPE_PERCPU_ARRAY",
+		MapTypeStackTrace:          "BPF_MAP_TYPE_STACK_TRACE",
+		MapTypeCgroupArray:         "BPF_MAP_TYPE_CGROUP_ARRAY",
+		MapTypeLRUHash:             "BPF_MAP_TYPE_LRU_HASH",
+		MapTypeLRUPerCPUHash:       "BPF_MAP_TYPE_LRU_PERCPU_HASH",
+		MapTypeLPMTrie:             "BPF_MAP_TYPE_LPM_TRIE",
+		MapTypeArrayOfMaps:         "BPF_MAP_TYPE_ARRAY_OF_MAPS",
+		MapTypeHashOfMaps:          "BPF_MAP_TYPE_HASH_OF_MAPS",
+		MapTypeDevMap:              "BPF_MAP_TYPE_DEVMAP",
+		MapTypeSockMap:             "BPF_MAP_TYPE_SOCKMAP",
+		MapTypeCPUMap:              "BPF_MAP_TYPE_CPUMAP",
+		MapTypeXSKMap:              "BPF_MAP_TYPE_XSKMAP",
+		MapTypeSockHash:            "BPF_MAP_TYPE_SOCKHASH",
+		MapTypeCgroupStorage:       "BPF_MAP_TYPE_CGROUP_STORAGE",
+		MapTypeReusePortSockArray:  "BPF_MAP_TYPE_REUSEPORT_SOCKARRAY",
+		MapTypePerCPUCgroupStorage: "BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE",
+		MapTypeQueue:               "BPF_MAP_TYPE_QUEUE",
+		MapTypeStack:               "BPF_MAP_TYPE_STACK",
+		MapTypeSKStorage:           "BPF_MAP_TYPE_SK_STORAGE",
+		MapTypeDevmapHash:          "BPF_MAP_TYPE_DEVMAP_HASH",
+		MapTypeStructOps:           "BPF_MAP_TYPE_STRUCT_OPS",
+		MapTypeRingbuf:             "BPF_MAP_TYPE_RINGBUF",
+		MapTypeInodeStorage:        "BPF_MAP_TYPE_INODE_STORAGE",
+		MapTypeTaskStorage:         "BPF_MAP_TYPE_TASK_STORAGE",
+		MapTypeBloomFilter:         "BPF_MAP_TYPE_BLOOM_FILTER",
+	}
+	return x[m]
+}
+
 type BPFProg struct {
 	name       string
 	prog       *C.struct_bpf_program
@@ -142,6 +235,8 @@ const (
 	PerfEvent
 	Uprobe
 	Uretprobe
+	Tracing
+	XDP
 )
 
 type BPFLink struct {
@@ -156,6 +251,8 @@ func (l *BPFLink) Destroy() error {
 	if ret < 0 {
 		return syscall.Errno(-ret)
 	}
+	l.link = nil
+
 	return nil
 }
 
@@ -163,6 +260,26 @@ func (l *BPFLink) GetFd() int {
 	return int(C.bpf_link__fd(l.link))
 }
 
+func (l *BPFLink) Pin(pinPath string) error {
+	path := C.CString(pinPath)
+	errC := C.bpf_link__pin(l.link, path)
+	C.free(unsafe.Pointer(path))
+	if errC != 0 {
+		return fmt.Errorf("failed to pin link %s to path %s: %w", l.eventName, pinPath, syscall.Errno(-errC))
+	}
+	return nil
+}
+
+func (l *BPFLink) Unpin(pinPath string) error {
+	path := C.CString(pinPath)
+	errC := C.bpf_link__unpin(l.link)
+	C.free(unsafe.Pointer(path))
+	if errC != 0 {
+		return fmt.Errorf("failed to unpin link %s from path %s: %w", l.eventName, pinPath, syscall.Errno(-errC))
+	}
+	return nil
+}
+
 type PerfBuffer struct {
 	pb         *C.struct_perf_buffer
 	bpfMap     *BPFMap
@@ -222,6 +339,43 @@ func NewModuleFromFile(bpfObjPath string) (*Module, error) {
 	})
 }
 
+// LibbpfStrictMode is an enum as defined in https://github.com/libbpf/libbpf/blob/2cd2d03f63242c048a896179398c68d2dbefe3d6/src/libbpf_legacy.h#L23
+type LibbpfStrictMode uint32
+
+const (
+	LibbpfStrictModeAll               LibbpfStrictMode = C.LIBBPF_STRICT_ALL
+	LibbpfStrictModeNone              LibbpfStrictMode = C.LIBBPF_STRICT_NONE
+	LibbpfStrictModeCleanPtrs         LibbpfStrictMode = C.LIBBPF_STRICT_CLEAN_PTRS
+	LibbpfStrictModeDirectErrs        LibbpfStrictMode = C.LIBBPF_STRICT_DIRECT_ERRS
+	LibbpfStrictModeSecName           LibbpfStrictMode = C.LIBBPF_STRICT_SEC_NAME
+	LibbpfStrictModeNoObjectList      LibbpfStrictMode = C.LIBBPF_STRICT_NO_OBJECT_LIST
+	LibbpfStrictModeAutoRlimitMemlock LibbpfStrictMode = C.LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK
+	LibbpfStrictModeMapDefinitions    LibbpfStrictMode = C.LIBBPF_STRICT_MAP_DEFINITIONS
+)
+
+func (b LibbpfStrictMode) String() (str string) {
+	x := map[LibbpfStrictMode]string{
+		LibbpfStrictModeAll:               "LIBBPF_STRICT_ALL",
+		LibbpfStrictModeNone:              "LIBBPF_STRICT_NONE",
+		LibbpfStrictModeCleanPtrs:         "LIBBPF_STRICT_CLEAN_PTRS",
+		LibbpfStrictModeDirectErrs:        "LIBBPF_STRICT_DIRECT_ERRS",
+		LibbpfStrictModeSecName:           "LIBBPF_STRICT_SEC_NAME",
+		LibbpfStrictModeNoObjectList:      "LIBBPF_STRICT_NO_OBJECT_LIST",
+		LibbpfStrictModeAutoRlimitMemlock: "LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK",
+		LibbpfStrictModeMapDefinitions:    "LIBBPF_STRICT_MAP_DEFINITIONS",
+	}
+
+	str, ok := x[b]
+	if !ok {
+		str = LibbpfStrictModeNone.String()
+	}
+	return str
+}
+
+func SetStrictMode(mode LibbpfStrictMode) {
+	C.libbpf_set_strict_mode(uint32(mode))
+}
+
 func NewModuleFromFileArgs(args NewModuleArgs) (*Module, error) {
 	C.set_print_fn()
 	if err := bumpMemlockRlimit(); err != nil {
@@ -311,7 +465,9 @@ func (m *Module) Close() {
 		rb.Close()
 	}
 	for _, link := range m.links {
-		C.bpf_link__destroy(link.link)
+		if link.link != nil {
+			C.bpf_link__destroy(link.link)
+		}
 	}
 	C.bpf_object__close(m.obj)
 }
@@ -325,6 +481,62 @@ func (m *Module) BPFLoadObject() error {
 	return nil
 }
 
+// BPFMapCreateOpts mirrors the C structure bpf_map_create_opts
+type BPFMapCreateOpts struct {
+	Size                  uint64
+	BtfFD                 uint32
+	BtfKeyTypeID          uint32
+	BtfValueTypeID        uint32
+	BtfVmlinuxValueTypeID uint32
+	InnerMapFD            uint32
+	MapFlags              uint32
+	MapExtra              uint64
+	NumaNode              uint32
+	MapIfIndex            uint32
+}
+
+func bpfMapCreateOptsToC(createOpts *BPFMapCreateOpts) *C.struct_bpf_map_create_opts {
+	if createOpts == nil {
+		return nil
+	}
+	opts := C.struct_bpf_map_create_opts{}
+	opts.sz = C.ulong(createOpts.Size)
+	opts.btf_fd = C.uint(createOpts.BtfFD)
+	opts.btf_key_type_id = C.uint(createOpts.BtfKeyTypeID)
+	opts.btf_value_type_id = C.uint(createOpts.BtfValueTypeID)
+	opts.btf_vmlinux_value_type_id = C.uint(createOpts.BtfVmlinuxValueTypeID)
+	opts.inner_map_fd = C.uint(createOpts.InnerMapFD)
+	opts.map_flags = C.uint(createOpts.MapFlags)
+	opts.map_extra = C.ulonglong(createOpts.MapExtra)
+	opts.numa_node = C.uint(createOpts.NumaNode)
+	opts.map_ifindex = C.uint(createOpts.MapIfIndex)
+
+	return &opts
+}
+
+// CreateMap creates a BPF map from userspace. This can be used for populating
+// BPF array of maps or hash of maps. However, this function uses a low-level
+// libbpf API; maps created in this way do not conform to libbpf map formats,
+// and therefore do not have access to libbpf high level bpf_map__* APIS
+// which causes different behavior from maps created in the kernel side code
+//
+// See usage of `bpf_map_create()` in kernel selftests for more info
+func CreateMap(mapType MapType, mapName string, keySize, valueSize, maxEntries int, opts *BPFMapCreateOpts) (*BPFMap, error) {
+	cs := C.CString(mapName)
+	fdOrError := C.bpf_map_create(uint32(mapType), cs, C.uint(keySize), C.uint(valueSize), C.uint(maxEntries), bpfMapCreateOptsToC(opts))
+	C.free(unsafe.Pointer(cs))
+	if fdOrError < 0 {
+		return nil, fmt.Errorf("could not create map: %w", syscall.Errno(-fdOrError))
+	}
+
+	return &BPFMap{
+		name:   mapName,
+		fd:     fdOrError,
+		module: nil,
+		bpfMap: nil,
+	}, nil
+}
+
 func (m *Module) GetMap(mapName string) (*BPFMap, error) {
 	cs := C.CString(mapName)
 	bpfMap, errno := C.bpf_object__find_map_by_name(m.obj, cs)
@@ -341,32 +553,56 @@ func (m *Module) GetMap(mapName string) (*BPFMap, error) {
 	}, nil
 }
 
+func (b *BPFMap) Name() string {
+	cs := C.bpf_map__name(b.bpfMap)
+	if cs == nil {
+		return ""
+	}
+	s := C.GoString(cs)
+	return s
+}
+
+func (b *BPFMap) Type() MapType {
+	return MapType(C.bpf_map__type(b.bpfMap))
+}
+
+// SetType is used to set the type of a bpf map that isn't associated
+// with a file descriptor already. If the map is already associated
+// with a file descriptor the libbpf API will return error code EBUSY
+func (b *BPFMap) SetType(mapType MapType) error {
+	errC := C.bpf_map__set_type(b.bpfMap, C.enum_bpf_map_type(int(mapType)))
+	if errC != 0 {
+		return fmt.Errorf("could not set bpf map type: %w", syscall.Errno(-errC))
+	}
+	return nil
+}
+
 func (b *BPFMap) Pin(pinPath string) error {
 	path := C.CString(pinPath)
-	errC := C.bpf_map__pin(b.bpfMap, path)
+	ret, errC := C.bpf_map__pin(b.bpfMap, path)
 	C.free(unsafe.Pointer(path))
-	if errC != 0 {
-		return fmt.Errorf("failed to pin map %s to path %s: %w", b.name, pinPath, syscall.Errno(-errC))
+	if ret != 0 {
+		return fmt.Errorf("failed to pin map %s to path %s: %w", b.name, pinPath, errC)
 	}
 	return nil
 }
 
 func (b *BPFMap) Unpin(pinPath string) error {
 	path := C.CString(pinPath)
-	errC := C.bpf_map__unpin(b.bpfMap, path)
+	ret, errC := C.bpf_map__unpin(b.bpfMap, path)
 	C.free(unsafe.Pointer(path))
-	if errC != 0 {
-		return fmt.Errorf("failed to unpin map %s from path %s: %w", b.name, pinPath, syscall.Errno(-errC))
+	if ret != 0 {
+		return fmt.Errorf("failed to unpin map %s from path %s: %w", b.name, pinPath, errC)
 	}
 	return nil
 }
 
 func (b *BPFMap) SetPinPath(pinPath string) error {
 	path := C.CString(pinPath)
-	errC := C.bpf_map__set_pin_path(b.bpfMap, path)
+	ret, errC := C.bpf_map__set_pin_path(b.bpfMap, path)
 	C.free(unsafe.Pointer(path))
-	if errC != 0 {
-		return fmt.Errorf("failed to set pin for map %s to path %s: %w", b.name, pinPath, syscall.Errno(-errC))
+	if ret != 0 {
+		return fmt.Errorf("failed to set pin for map %s to path %s: %w", b.name, pinPath, errC)
 	}
 	return nil
 }
@@ -377,9 +613,9 @@ func (b *BPFMap) SetPinPath(pinPath string) error {
 // Note: for ring buffer and perf buffer, maxEntries is the
 // capacity in bytes.
 func (b *BPFMap) Resize(maxEntries uint32) error {
-	errC := C.bpf_map__set_max_entries(b.bpfMap, C.uint(maxEntries))
-	if errC != 0 {
-		return fmt.Errorf("failed to resize map %s to %v: %w", b.name, maxEntries, syscall.Errno(-errC))
+	ret, errC := C.bpf_map__set_max_entries(b.bpfMap, C.uint(maxEntries))
+	if ret != 0 {
+		return fmt.Errorf("failed to resize map %s to %v: %w", b.name, maxEntries, errC)
 	}
 	return nil
 }
@@ -411,34 +647,7 @@ func (b *BPFMap) GetPinPath() string {
 
 func (b *BPFMap) IsPinned() bool {
 	isPinned := C.bpf_map__is_pinned(b.bpfMap)
-	if isPinned == C.bool(true) {
-		return true
-	}
-	return false
-}
-
-func GetUnsafePointer(data interface{}) (unsafe.Pointer, error) {
-	var dataPtr unsafe.Pointer
-	switch k := data.(type) {
-	case int8:
-		dataPtr = unsafe.Pointer(&k)
-	case uint8:
-		dataPtr = unsafe.Pointer(&k)
-	case int32:
-		dataPtr = unsafe.Pointer(&k)
-	case uint32:
-		dataPtr = unsafe.Pointer(&k)
-	case int64:
-		dataPtr = unsafe.Pointer(&k)
-	case uint64:
-		dataPtr = unsafe.Pointer(&k)
-	case []byte:
-		dataPtr = unsafe.Pointer(&k[0])
-	default:
-		return nil, fmt.Errorf("unknown data type %T", data)
-	}
-
-	return dataPtr, nil
+	return isPinned == C.bool(true)
 }
 
 func (b *BPFMap) KeySize() int {
@@ -449,6 +658,14 @@ func (b *BPFMap) ValueSize() int {
 	return int(C.bpf_map__value_size(b.bpfMap))
 }
 
+func (b *BPFMap) SetValueSize(size uint32) error {
+	errC := C.bpf_map__set_value_size(b.bpfMap, C.uint(size))
+	if errC != 0 {
+		return fmt.Errorf("could not set map value size: %w", syscall.Errno(-errC))
+	}
+	return nil
+}
+
 // GetValue takes a pointer to the key which is stored in the map.
 // It returns the associated value as a slice of bytes.
 // All basic types, and structs are supported as keys.
@@ -461,13 +678,39 @@ func (b *BPFMap) GetValue(key unsafe.Pointer) ([]byte, error) {
 	value := make([]byte, b.ValueSize())
 	valuePtr := unsafe.Pointer(&value[0])
 
-	errC := C.bpf_map_lookup_elem(b.fd, key, valuePtr)
+	ret, errC := C.bpf_map_lookup_elem(b.fd, key, valuePtr)
+	if ret != 0 {
+		return nil, fmt.Errorf("failed to lookup value %v in map %s: %w", key, b.name, errC)
+	}
+	return value, nil
+}
+
+func (b *BPFMap) GetValueFlags(key unsafe.Pointer, flags MapFlag) ([]byte, error) {
+	value := make([]byte, b.ValueSize())
+	valuePtr := unsafe.Pointer(&value[0])
+
+	errC := C.bpf_map_lookup_elem_flags(b.fd, key, valuePtr, C.ulonglong(flags))
 	if errC != 0 {
 		return nil, fmt.Errorf("failed to lookup value %v in map %s: %w", key, b.name, syscall.Errno(-errC))
 	}
 	return value, nil
 }
 
+// GetValueReadInto is like GetValue, except it allows the caller to pass in
+// a pointer to the slice of bytes that the value would be read into from the
+// map.
+// This is useful for reading from maps with variable sizes, especially
+// per-cpu arrays and hash maps where the size of each value depends on the
+// number of CPUs
+func (b *BPFMap) GetValueReadInto(key unsafe.Pointer, value *[]byte) error {
+	valuePtr := unsafe.Pointer(&(*value)[0])
+	errC := C.bpf_map__lookup_elem(b.bpfMap, key, C.ulong(b.KeySize()), valuePtr, C.ulong(len(*value)), 0)
+	if errC != 0 {
+		return fmt.Errorf("failed to lookup value %v in map %s: %w", key, b.name, syscall.Errno(-errC))
+	}
+	return nil
+}
+
 // BPFMapBatchOpts mirrors the C structure bpf_map_batch_opts.
 type BPFMapBatchOpts struct {
 	Sz        uint64
@@ -487,13 +730,21 @@ func bpfMapBatchOptsToC(batchOpts *BPFMapBatchOpts) *C.struct_bpf_map_batch_opts
 	return &opts
 }
 
-// GetValueBatch allows for batch lookups of multiple keys.
-// The first argument is a pointer to an array or slice of keys which will be populated with the keys returned from this operation.
+// GetValueBatch allows for batch lookups of multiple keys from the map.
+//
+// The first argument, keys, is a pointer to an array or slice of keys which will be populated with the keys returned from this operation.
 // It returns the associated values as a slice of slices of bytes.
+//
 // This API allows for batch lookups of multiple keys, potentially in steps over multiple iterations. For example,
 // you provide the last key seen (or nil) for the startKey, and the first key to start the next iteration with in nextKey.
 // Once the first iteration is complete you can provide the last key seen in the previous iteration as the startKey for the next iteration
 // and repeat until nextKey is nil.
+//
+// The last argument, count, is the number of keys to lookup. Passing an argument that greater than the number of keys
+// in the map will cause the function to return a syscall.EPERM as an error.
+//
+// The API can return partial results even though an error is returned.
+// In this case the keys that were successfully retrieved until an error occurred will be in the result slice.
 func (b *BPFMap) GetValueBatch(keys unsafe.Pointer, startKey, nextKey unsafe.Pointer, count uint32) ([][]byte, error) {
 	var (
 		values    = make([]byte, b.ValueSize()*int(count))
@@ -509,15 +760,34 @@ func (b *BPFMap) GetValueBatch(keys unsafe.Pointer, startKey, nextKey unsafe.Poi
 
 	errC := C.bpf_map_lookup_batch(b.fd, startKey, nextKey, keys, valuesPtr, &countC, bpfMapBatchOptsToC(opts))
 	if errC != 0 {
+		sc := syscall.Errno(-errC)
+		if sc != syscall.EFAULT {
+			if uint32(countC) != count {
+				return collectBatchValues(values, uint32(countC), b.ValueSize()),
+					fmt.Errorf("failed to retrieve ALL elements in map %s, fetched (%d/%d): %w", b.name, uint32(countC), count, sc)
+			}
+		}
 		return nil, fmt.Errorf("failed to batch lookup values %v in map %s: %w", keys, b.name, syscall.Errno(-errC))
 	}
 
-	parsedVals := collectBatchValues(values, count, b.ValueSize())
-
-	return parsedVals, nil
+	return collectBatchValues(values, count, b.ValueSize()), nil
 }
 
-// GetValueAndDeleteBatch allows for batch lookups of multiple keys and deletes those keys.
+// GetValueAndDeleteBatch allows for batch lookup and deletion of elements where each element is deleted after being retrieved from the map.
+//
+// The first argument, keys, is a pointer to an array or slice of keys which will be populated with the keys returned from this operation.
+// It returns the associated values as a slice of slices of bytes.
+//
+// This API allows for batch lookups and deletion of multiple keys, potentially in steps over multiple iterations. For example,
+// you provide the last key seen (or nil) for the startKey, and the first key to start the next iteration with in nextKey.
+// Once the first iteration is complete you can provide the last key seen in the previous iteration as the startKey for the next iteration
+// and repeat until nextKey is nil.
+//
+// The last argument, count, is the number of keys to lookup and delete. The kernel will update it with the count of the elements that were
+// retrieved and deleted.
+//
+// The API can return partial results even though an -1 is returned. In this case, errno will be set to `ENOENT` and the values slice and count
+// will be filled in with the elements that were read. See the comment below for more context.
 func (b *BPFMap) GetValueAndDeleteBatch(keys, startKey, nextKey unsafe.Pointer, count uint32) ([][]byte, error) {
 	var (
 		values    = make([]byte, b.ValueSize()*int(count))
@@ -531,13 +801,37 @@ func (b *BPFMap) GetValueAndDeleteBatch(keys, startKey, nextKey unsafe.Pointer,
 		Flags:     C.BPF_ANY,
 	}
 
-	errC := C.bpf_map_lookup_and_delete_batch(b.fd, startKey, nextKey, keys, valuesPtr, &countC, bpfMapBatchOptsToC(opts))
-	if errC != 0 {
-		return nil, fmt.Errorf("failed to batch lookup and delete values %v in map %s: %w", keys, b.name, syscall.Errno(-errC))
-	}
-
-	parsedVals := collectBatchValues(values, count, b.ValueSize())
-
+	// Before libbpf 1.0 (without LIBBPF_STRICT_DIRECT_ERRS), the return value
+	// and errno are not modified [1]. On error, we will get a return value of
+	// -1 and errno will be set accordingly with most BPF calls.
+	//
+	// The batch APIs are a bit different in which they can return an error, but
+	// depending on the errno code, it might mean a complete error (nothing was
+	// done) or a partial success (some elements were processed).
+	//
+	// - On complete sucess, it will return 0, and errno won't be set.
+	// - On partial sucess, it will return -1, and errno will be set to ENOENT.
+	// - On error, it will return -1, and an errno different to ENOENT.
+	//
+	// [1] https://github.com/libbpf/libbpf/blob/b69f8ee93ef6aa3518f8fbfd9d1df6c2c84fd08f/src/libbpf_internal.h#L496
+	ret, errC := C.bpf_map_lookup_and_delete_batch(
+		b.fd,
+		startKey,
+		nextKey,
+		keys,
+		valuesPtr,
+		&countC,
+		bpfMapBatchOptsToC(opts))
+
+	processed := uint32(countC)
+
+	if ret != 0 && errC != syscall.ENOENT {
+		// ret = -1 && errno == syscall.ENOENT indicates a partial read and delete.
+		return nil, fmt.Errorf("failed to batch lookup and delete values %v in map %s: ret %d (err: %s)", keys, b.name, ret, errC)
+	}
+
+	// Either some or all entries were read and deleted.
+	parsedVals := collectBatchValues(values, processed, b.ValueSize())
 	return parsedVals, nil
 }
 
@@ -551,34 +845,60 @@ func collectBatchValues(values []byte, count uint32, valueSize int) [][]byte {
 	return collected
 }
 
-// UpdateBatch takes a pointer to an array of keys and values which are then stored in the map.
+// UpdateBatch updates multiple elements in the map by specified keys and their corresponding values.
+//
+// The first argument, keys, is a pointer to an array or slice of keys which will be updated using the second argument, values.
+// It returns the associated error if any occurred.
+//
+// The last argument, count, is the number of keys to update. Passing an argument that greater than the number of keys
+// in the map will cause the function to return a syscall.EPERM as an error.
 func (b *BPFMap) UpdateBatch(keys, values unsafe.Pointer, count uint32) error {
 	countC := C.uint(count)
+
 	opts := BPFMapBatchOpts{
 		Sz:        uint64(unsafe.Sizeof(BPFMapBatchOpts{})),
 		ElemFlags: C.BPF_ANY,
 		Flags:     C.BPF_ANY,
 	}
+
 	errC := C.bpf_map_update_batch(b.fd, keys, values, &countC, bpfMapBatchOptsToC(&opts))
 	if errC != 0 {
-		return fmt.Errorf("failed to update map %s: %w", b.name, errC)
+		sc := syscall.Errno(-errC)
+		if sc != syscall.EFAULT {
+			if uint32(countC) != count {
+				return fmt.Errorf("failed to update ALL elements in map %s, updated (%d/%d): %w", b.name, uint32(countC), count, sc)
+			}
+		}
+		return fmt.Errorf("failed to batch update elements in map %s: %w", b.name, syscall.Errno(-errC))
 	}
+
 	return nil
 }
 
-// DeleteKeyBatch will delete `count` keys from the map, returning the keys deleted in the
-// slice pointed to by `keys`.
+// DeleteKeyBatch allows for batch deletion of multiple elements in the map.
+//
+// `count` number of keys will be deleted from the map. Passing an argument that greater than the number of keys
+// in the map will cause the function to return a syscall.EPERM as an error.
 func (b *BPFMap) DeleteKeyBatch(keys unsafe.Pointer, count uint32) error {
 	countC := C.uint(count)
+
 	opts := &BPFMapBatchOpts{
 		Sz:        uint64(unsafe.Sizeof(BPFMapBatchOpts{})),
 		ElemFlags: C.BPF_ANY,
 		Flags:     C.BPF_ANY,
 	}
+
 	errC := C.bpf_map_delete_batch(b.fd, keys, &countC, bpfMapBatchOptsToC(opts))
 	if errC != 0 {
-		return fmt.Errorf("failed to get lookup key %d from map %s: %w", keys, b.name, syscall.Errno(-errC))
+		sc := syscall.Errno(-errC)
+		if sc != syscall.EFAULT {
+			if uint32(countC) != count {
+				return fmt.Errorf("failed to batch delete ALL keys from map %s, deleted (%d/%d): %w", b.name, uint32(countC), count, sc)
+			}
+		}
+		return fmt.Errorf("failed to batch delete keys from map %s: %w", b.name, syscall.Errno(-errC))
 	}
+
 	return nil
 }
 
@@ -591,9 +911,9 @@ func (b *BPFMap) DeleteKeyBatch(keys unsafe.Pointer, count uint32) error {
 // in the slice or array instead of the slice/array itself, as to
 // avoid undefined behavior.
 func (b *BPFMap) DeleteKey(key unsafe.Pointer) error {
-	errC := C.bpf_map_delete_elem(b.fd, key)
-	if errC != 0 {
-		return fmt.Errorf("failed to get lookup key %d from map %s: %w", key, b.name, syscall.Errno(-errC))
+	ret, errC := C.bpf_map_delete_elem(b.fd, key)
+	if ret != 0 {
+		return fmt.Errorf("failed to get lookup key %d from map %s: %w", key, b.name, errC)
 	}
 	return nil
 }
@@ -614,13 +934,77 @@ func (b *BPFMap) DeleteKey(key unsafe.Pointer) error {
 //  bpfmap.Update(keyPtr, valuePtr)
 //
 func (b *BPFMap) Update(key, value unsafe.Pointer) error {
-	errC := C.bpf_map_update_elem(b.fd, key, value, C.BPF_ANY)
+	return b.UpdateValueFlags(key, value, MapFlagUpdateAny)
+}
+
+func (b *BPFMap) UpdateValueFlags(key, value unsafe.Pointer, flags MapFlag) error {
+	errC := C.bpf_map_update_elem(b.fd, key, value, C.ulonglong(flags))
 	if errC != 0 {
 		return fmt.Errorf("failed to update map %s: %w", b.name, syscall.Errno(-errC))
 	}
 	return nil
 }
 
+// BPFObjectProgramIterator iterates over maps in a BPF object
+type BPFObjectIterator struct {
+	m        *Module
+	prevProg *BPFProg
+	prevMap  *BPFMap
+}
+
+func (m *Module) Iterator() *BPFObjectIterator {
+	return &BPFObjectIterator{
+		m:        m,
+		prevProg: nil,
+		prevMap:  nil,
+	}
+}
+
+func (it *BPFObjectIterator) NextMap() *BPFMap {
+	var startMap *C.struct_bpf_map
+	if it.prevMap != nil && it.prevMap.bpfMap != nil {
+		startMap = it.prevMap.bpfMap
+	}
+
+	m := C.bpf_object__next_map(it.m.obj, startMap)
+	if m == nil {
+		return nil
+	}
+	cName := C.bpf_map__name(m)
+
+	bpfMap := &BPFMap{
+		name:   C.GoString(cName),
+		bpfMap: m,
+		module: it.m,
+	}
+
+	it.prevMap = bpfMap
+	return bpfMap
+}
+
+func (it *BPFObjectIterator) NextProgram() *BPFProg {
+
+	var startProg *C.struct_bpf_program
+	if it.prevProg != nil && it.prevProg.prog != nil {
+		startProg = it.prevProg.prog
+	}
+
+	p := C.bpf_object__next_program(it.m.obj, startProg)
+	if p == nil {
+		return nil
+	}
+	cName := C.bpf_program__name(p)
+
+	prog := &BPFProg{
+		name:   C.GoString(cName),
+		prog:   p,
+		module: it.m,
+	}
+	it.prevProg = prog
+	return prog
+}
+
+// BPFMapIterator iterates over keys in a BPF map
 type BPFMapIterator struct {
 	b    *BPFMap
 	err  error
@@ -677,10 +1061,10 @@ func (it *BPFMapIterator) Err() error {
 
 func (m *Module) GetProgram(progName string) (*BPFProg, error) {
 	cs := C.CString(progName)
-	prog, errno := C.bpf_object__find_program_by_name(m.obj, cs)
+	prog, errC := C.bpf_object__find_program_by_name(m.obj, cs)
 	C.free(unsafe.Pointer(cs))
 	if prog == nil {
-		return nil, fmt.Errorf("failed to find BPF program %s: %w", progName, errno)
+		return nil, fmt.Errorf("failed to find BPF program %s: %w", progName, errC)
 	}
 
 	return &BPFProg{
@@ -702,10 +1086,10 @@ func (p *BPFProg) Pin(path string) error {
 	}
 
 	cs := C.CString(absPath)
-	errC := C.bpf_program__pin(p.prog, cs)
+	ret, errC := C.bpf_program__pin(p.prog, cs)
 	C.free(unsafe.Pointer(cs))
-	if errC != 0 {
-		return fmt.Errorf("failed to pin program %s to %s: %w", p.name, path, syscall.Errno(-errC))
+	if ret != 0 {
+		return fmt.Errorf("failed to pin program %s to %s: %w", p.name, path, errC)
 	}
 	p.pinnedPath = absPath
 	return nil
@@ -713,9 +1097,9 @@ func (p *BPFProg) Pin(path string) error {
 
 func (p *BPFProg) Unpin(path string) error {
 	cs := C.CString(path)
-	errC := C.bpf_program__unpin(p.prog, cs)
+	ret, errC := C.bpf_program__unpin(p.prog, cs)
 	C.free(unsafe.Pointer(cs))
-	if errC != 0 {
+	if ret != 0 {
 		return fmt.Errorf("failed to unpin program %s to %s: %w", p.name, path, errC)
 	}
 	p.pinnedPath = ""
@@ -730,6 +1114,12 @@ func (p *BPFProg) GetName() string {
 	return p.name
 }
 
+func (p *BPFProg) GetSectionName() string {
+	cs := C.bpf_program__section_name(p.prog)
+	gs := C.GoString(cs)
+	return gs
+}
+
 func (p *BPFProg) GetPinPath() string {
 	return p.pinnedPath
 }
@@ -738,7 +1128,7 @@ func (p *BPFProg) GetPinPath() string {
 type BPFProgType uint32
 
 const (
-	BPFProgTypeUnspec uint32 = iota
+	BPFProgTypeUnspec BPFProgType = iota
 	BPFProgTypeSocketFilter
 	BPFProgTypeKprobe
 	BPFProgTypeSchedCls
@@ -769,29 +1159,169 @@ const (
 	BPFProgTypeExt
 	BPFProgTypeLsm
 	BPFProgTypeSkLookup
+	BPFProgTypeSyscall
+)
+
+func (b BPFProgType) String() (str string) {
+	x := map[BPFProgType]string{
+		BPFProgTypeUnspec:                "BPF_PROG_TYPE_UNSPEC",
+		BPFProgTypeSocketFilter:          "BPF_PROG_TYPE_SOCKET_FILTER",
+		BPFProgTypeKprobe:                "BPF_PROG_TYPE_KPROBE",
+		BPFProgTypeSchedCls:              "BPF_PROG_TYPE_SCHED_CLS",
+		BPFProgTypeSchedAct:              "BPF_PROG_TYPE_SCHED_ACT",
+		BPFProgTypeTracepoint:            "BPF_PROG_TYPE_TRACEPOINT",
+		BPFProgTypeXdp:                   "BPF_PROG_TYPE_XDP",
+		BPFProgTypePerfEvent:             "BPF_PROG_TYPE_PERF_EVENT",
+		BPFProgTypeCgroupSkb:             "BPF_PROG_TYPE_CGROUP_SKB",
+		BPFProgTypeCgroupSock:            "BPF_PROG_TYPE_CGROUP_SOCK",
+		BPFProgTypeLwtIn:                 "BPF_PROG_TYPE_LWT_IN",
+		BPFProgTypeLwtOut:                "BPF_PROG_TYPE_LWT_OUT",
+		BPFProgTypeLwtXmit:               "BPF_PROG_TYPE_LWT_XMIT",
+		BPFProgTypeSockOps:               "BPF_PROG_TYPE_SOCK_OPS",
+		BPFProgTypeSkSkb:                 "BPF_PROG_TYPE_SK_SKB",
+		BPFProgTypeCgroupDevice:          "BPF_PROG_TYPE_CGROUP_DEVICE",
+		BPFProgTypeSkMsg:                 "BPF_PROG_TYPE_SK_MSG",
+		BPFProgTypeRawTracepoint:         "BPF_PROG_TYPE_RAW_TRACEPOINT",
+		BPFProgTypeCgroupSockAddr:        "BPF_PROG_TYPE_CGROUP_SOCK_ADDR",
+		BPFProgTypeLwtSeg6Local:          "BPF_PROG_TYPE_LWT_SEG6LOCAL",
+		BPFProgTypeLircMode2:             "BPF_PROG_TYPE_LIRC_MODE2",
+		BPFProgTypeSkReuseport:           "BPF_PROG_TYPE_SK_REUSEPORT",
+		BPFProgTypeFlowDissector:         "BPF_PROG_TYPE_FLOW_DISSECTOR",
+		BPFProgTypeCgroupSysctl:          "BPF_PROG_TYPE_CGROUP_SYSCTL",
+		BPFProgTypeRawTracepointWritable: "BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE",
+		BPFProgTypeCgroupSockopt:         "BPF_PROG_TYPE_CGROUP_SOCKOPT",
+		BPFProgTypeTracing:               "BPF_PROG_TYPE_TRACING",
+		BPFProgTypeStructOps:             "BPF_PROG_TYPE_STRUCT_OPS",
+		BPFProgTypeExt:                   "BPF_PROG_TYPE_EXT",
+		BPFProgTypeLsm:                   "BPF_PROG_TYPE_LSM",
+		BPFProgTypeSkLookup:              "BPF_PROG_TYPE_SK_LOOKUP",
+		BPFProgTypeSyscall:               "BPF_PROG_TYPE_SYSCALL",
+	}
+	str = x[b]
+	if str == "" {
+		str = BPFProgTypeUnspec.String()
+	}
+	return str
+}
+
+type BPFAttachType uint32
+
+const (
+	BPFAttachTypeCgroupInetIngress BPFAttachType = iota
+	BPFAttachTypeCgroupInetEgress
+	BPFAttachTypeCgroupInetSockCreate
+	BPFAttachTypeCgroupSockOps
+	BPFAttachTypeSKSKBStreamParser
+	BPFAttachTypeSKSKBStreamVerdict
+	BPFAttachTypeCgroupDevice
+	BPFAttachTypeSKMSGVerdict
+	BPFAttachTypeCgroupInet4Bind
+	BPFAttachTypeCgroupInet6Bind
+	BPFAttachTypeCgroupInet4Connect
+	BPFAttachTypeCgroupInet6Connect
+	BPFAttachTypeCgroupInet4PostBind
+	BPFAttachTypeCgroupInet6PostBind
+	BPFAttachTypeCgroupUDP4SendMsg
+	BPFAttachTypeCgroupUDP6SendMsg
+	BPFAttachTypeLircMode2
+	BPFAttachTypeFlowDissector
+	BPFAttachTypeCgroupSysctl
+	BPFAttachTypeCgroupUDP4RecvMsg
+	BPFAttachTypeCgroupUDP6RecvMsg
+	BPFAttachTypeCgroupGetSockOpt
+	BPFAttachTypeCgroupSetSockOpt
+	BPFAttachTypeTraceRawTP
+	BPFAttachTypeTraceFentry
+	BPFAttachTypeTraceFexit
+	BPFAttachTypeModifyReturn
+	BPFAttachTypeLSMMac
+	BPFAttachTypeTraceIter
+	BPFAttachTypeCgroupInet4GetPeerName
+	BPFAttachTypeCgroupInet6GetPeerName
+	BPFAttachTypeCgroupInet4GetSockName
+	BPFAttachTypeCgroupInet6GetSockName
+	BPFAttachTypeXDPDevMap
+	BPFAttachTypeCgroupInetSockRelease
+	BPFAttachTypeXDPCPUMap
+	BPFAttachTypeSKLookup
+	BPFAttachTypeXDP
+	BPFAttachTypeSKSKBVerdict
+	BPFAttachTypeSKReusePortSelect
+	BPFAttachTypeSKReusePortSelectorMigrate
+	BPFAttachTypePerfEvent
+	BPFAttachTypeTraceKprobeMulti
 )
 
-func (p *BPFProg) GetType() uint32 {
-	return C.bpf_program__get_type(p.prog)
+func (p *BPFProg) GetType() BPFProgType {
+	return BPFProgType(C.bpf_program__get_type(p.prog))
 }
 
 func (p *BPFProg) SetAutoload(autoload bool) error {
 	cbool := C.bool(autoload)
-	errC := C.bpf_program__set_autoload(p.prog, cbool)
-	if errC != 0 {
-		return fmt.Errorf("failed to set bpf program autoload: %w", syscall.Errno(-errC))
+	ret, errC := C.bpf_program__set_autoload(p.prog, cbool)
+	if ret != 0 {
+		return fmt.Errorf("failed to set bpf program autoload: %w", errC)
 	}
 	return nil
 }
 
-func (p *BPFProg) SetTracepoint() error {
-	errC := C.bpf_program__set_tracepoint(p.prog)
-	if errC != 0 {
-		return fmt.Errorf("failed to set bpf program as tracepoint: %w", syscall.Errno(-errC))
+// AttachGeneric is used to attach the BPF program using autodetection
+// for the attach target. You can specify the destination in BPF code
+// via the SEC() such as `SEC("fentry/some_kernel_func")`
+func (p *BPFProg) AttachGeneric() (*BPFLink, error) {
+	link, errno := C.bpf_program__attach(p.prog)
+	if C.IS_ERR_OR_NULL(unsafe.Pointer(link)) {
+		return nil, fmt.Errorf("failed to attach program: %w", errno)
+	}
+	bpfLink := &BPFLink{
+		link:      link,
+		prog:      p,
+		linkType:  Tracing,
+		eventName: fmt.Sprintf("tracing-%s", p.name),
+	}
+	return bpfLink, nil
+}
+
+// SetAttachTarget can be used to specify the program and/or function to attach
+// the BPF program to. To attach to a kernel function specify attachProgFD as 0
+func (p *BPFProg) SetAttachTarget(attachProgFD int, attachFuncName string) error {
+	cs := C.CString(attachFuncName)
+	ret, errC := C.bpf_program__set_attach_target(p.prog, C.int(attachProgFD), cs)
+	C.free(unsafe.Pointer(cs))
+	if ret != 0 {
+		return fmt.Errorf("failed to set attach target for program %s %s %w", p.name, attachFuncName, errC)
 	}
 	return nil
 }
 
+func (p *BPFProg) SetProgramType(progType BPFProgType) {
+	C.bpf_program__set_type(p.prog, C.enum_bpf_prog_type(int(progType)))
+}
+
+func (p *BPFProg) SetAttachType(attachType BPFAttachType) {
+	C.bpf_program__set_expected_attach_type(p.prog, C.enum_bpf_attach_type(int(attachType)))
+}
+
+func (p *BPFProg) AttachXDP(deviceName string) (*BPFLink, error) {
+	iface, err := net.InterfaceByName(deviceName)
+	if err != nil {
+		return nil, fmt.Errorf("failed to find device by name %s: %w", deviceName, err)
+	}
+	link := C.bpf_program__attach_xdp(p.prog, C.int(iface.Index))
+	if C.IS_ERR_OR_NULL(unsafe.Pointer(link)) {
+		return nil, errptrError(unsafe.Pointer(link), "failed to attach xdp on device %s to program %s", deviceName, p.name)
+	}
+
+	bpfLink := &BPFLink{
+		link:      link,
+		prog:      p,
+		linkType:  XDP,
+		eventName: fmt.Sprintf("xdp-%s-%s", p.name, deviceName),
+	}
+	p.module.links = append(p.module.links, bpfLink)
+	return bpfLink, nil
+}
+
 func (p *BPFProg) AttachTracepoint(category, name string) (*BPFLink, error) {
 	tpCategory := C.CString(category)
 	tpName := C.CString(name)
@@ -1111,7 +1641,9 @@ func (pb *PerfBuffer) Stop() {
 		// Close the channel -- this is useful for the consumer but
 		// also to terminate the drain goroutine above.
 		close(pb.eventsChan)
-		close(pb.lostChan)
+		if pb.lostChan != nil {
+			close(pb.lostChan)
+		}
 
 		// This allows Stop() to be called multiple times safely
 		pb.stop = nil
@@ -1287,3 +1819,19 @@ func (hook *TcHook) Query(tcOpts *TcOpts) error {
 
 	return nil
 }
+
+func BPFMapTypeIsSupported(mapType MapType) (bool, error) {
+	cSupported := C.libbpf_probe_bpf_map_type(C.enum_bpf_map_type(int(mapType)), nil)
+	if cSupported < 1 {
+		return false, syscall.Errno(-cSupported)
+	}
+	return cSupported == 1, nil
+}
+
+func BPFProgramTypeIsSupported(progType BPFProgType) (bool, error) {
+	cSupported := C.libbpf_probe_bpf_prog_type(C.enum_bpf_prog_type(int(progType)), nil)
+	if cSupported < 1 {
+		return false, syscall.Errno(-cSupported)
+	}
+	return cSupported == 1, nil
+}
diff --git a/vendor/github.com/urfave/cli/v2/app.go b/vendor/github.com/urfave/cli/v2/app.go
index 333bd57b0..7e64c2d9f 100644
--- a/vendor/github.com/urfave/cli/v2/app.go
+++ b/vendor/github.com/urfave/cli/v2/app.go
@@ -7,6 +7,7 @@ import (
 	"io"
 	"os"
 	"path/filepath"
+	"reflect"
 	"sort"
 	"time"
 )
@@ -43,6 +44,9 @@ type App struct {
 	Version string
 	// Description of the program
 	Description string
+	// DefaultCommand is the (optional) name of a command
+	// to run if no command names are passed as CLI arguments.
+	DefaultCommand string
 	// List of commands to execute
 	Commands []*Command
 	// List of flags to parse
@@ -333,13 +337,45 @@ func (a *App) RunContext(ctx context.Context, arguments []string) (err error) {
 		}
 	}
 
+	var c *Command
 	args := cCtx.Args()
 	if args.Present() {
 		name := args.First()
-		c := a.Command(name)
-		if c != nil {
-			return c.Run(cCtx)
+		if a.validCommandName(name) {
+			c = a.Command(name)
+		} else {
+			hasDefault := a.DefaultCommand != ""
+			isFlagName := checkStringSliceIncludes(name, cCtx.FlagNames())
+
+			var (
+				isDefaultSubcommand   = false
+				defaultHasSubcommands = false
+			)
+
+			if hasDefault {
+				dc := a.Command(a.DefaultCommand)
+				defaultHasSubcommands = len(dc.Subcommands) > 0
+				for _, dcSub := range dc.Subcommands {
+					if checkStringSliceIncludes(name, dcSub.Names()) {
+						isDefaultSubcommand = true
+						break
+					}
+				}
+			}
+
+			if isFlagName || (hasDefault && (defaultHasSubcommands && isDefaultSubcommand)) {
+				argsWithDefault := a.argsWithDefaultCommand(args)
+				if !reflect.DeepEqual(args, argsWithDefault) {
+					c = a.Command(argsWithDefault.First())
+				}
+			}
 		}
+	} else if a.DefaultCommand != "" {
+		c = a.Command(a.DefaultCommand)
+	}
+
+	if c != nil {
+		return c.Run(cCtx)
 	}
 
 	if a.Action == nil {
@@ -570,6 +606,41 @@ func (a *App) handleExitCoder(cCtx *Context, err error) {
 	}
 }
 
+func (a *App) commandNames() []string {
+	var cmdNames []string
+
+	for _, cmd := range a.Commands {
+		cmdNames = append(cmdNames, cmd.Names()...)
+	}
+
+	return cmdNames
+}
+
+func (a *App) validCommandName(checkCmdName string) bool {
+	valid := false
+	allCommandNames := a.commandNames()
+
+	for _, cmdName := range allCommandNames {
+		if checkCmdName == cmdName {
+			valid = true
+			break
+		}
+	}
+
+	return valid
+}
+
+func (a *App) argsWithDefaultCommand(oldArgs Args) Args {
+	if a.DefaultCommand != "" {
+		rawArgs := append([]string{a.DefaultCommand}, oldArgs.Slice()...)
+		newArgs := args(rawArgs)
+
+		return &newArgs
+	}
+
+	return oldArgs
+}
+
 // Author represents someone who has contributed to a cli project.
 type Author struct {
 	Name  string // The Authors name
@@ -602,3 +673,15 @@ func HandleAction(action interface{}, cCtx *Context) (err error) {
 
 	return errInvalidActionType
 }
+
+func checkStringSliceIncludes(want string, sSlice []string) bool {
+	found := false
+	for _, s := range sSlice {
+		if want == s {
+			found = true
+			break
+		}
+	}
+
+	return found
+}
diff --git a/vendor/github.com/urfave/cli/v2/flag-spec.yaml b/vendor/github.com/urfave/cli/v2/flag-spec.yaml
index d85fa30bd..45f054d6e 100644
--- a/vendor/github.com/urfave/cli/v2/flag-spec.yaml
+++ b/vendor/github.com/urfave/cli/v2/flag-spec.yaml
@@ -43,6 +43,7 @@ flag_types:
     value_pointer: true
     struct_fields:
       - { name: Layout, type: string }
+      - { name: Timezone, type: "*time.Location" }
 
   # TODO: enable UintSlice
   # UintSlice: {}
diff --git a/vendor/github.com/urfave/cli/v2/flag_timestamp.go b/vendor/github.com/urfave/cli/v2/flag_timestamp.go
index 052247795..80e1f470b 100644
--- a/vendor/github.com/urfave/cli/v2/flag_timestamp.go
+++ b/vendor/github.com/urfave/cli/v2/flag_timestamp.go
@@ -11,6 +11,7 @@ type Timestamp struct {
 	timestamp  *time.Time
 	hasBeenSet bool
 	layout     string
+	location   *time.Location
 }
 
 // Timestamp constructor
@@ -31,9 +32,22 @@ func (t *Timestamp) SetLayout(layout string) {
 	t.layout = layout
 }
 
+// Set perceived timezone of the to-be parsed time string
+func (t *Timestamp) SetLocation(loc *time.Location) {
+	t.location = loc
+}
+
 // Parses the string value to timestamp
 func (t *Timestamp) Set(value string) error {
-	timestamp, err := time.Parse(t.layout, value)
+	var timestamp time.Time
+	var err error
+
+	if t.location != nil {
+		timestamp, err = time.ParseInLocation(t.layout, value, t.location)
+	} else {
+		timestamp, err = time.Parse(t.layout, value)
+	}
+
 	if err != nil {
 		return err
 	}
@@ -104,9 +118,11 @@ func (f *TimestampFlag) Apply(set *flag.FlagSet) error {
 		f.Value = &Timestamp{}
 	}
 	f.Value.SetLayout(f.Layout)
+	f.Value.SetLocation(f.Timezone)
 
 	if f.Destination != nil {
 		f.Destination.SetLayout(f.Layout)
+		f.Destination.SetLocation(f.Timezone)
 	}
 
 	if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
diff --git a/vendor/github.com/urfave/cli/v2/godoc-current.txt b/vendor/github.com/urfave/cli/v2/godoc-current.txt
index a3a7faca1..1ba48cc65 100644
--- a/vendor/github.com/urfave/cli/v2/godoc-current.txt
+++ b/vendor/github.com/urfave/cli/v2/godoc-current.txt
@@ -269,6 +269,9 @@ type App struct {
 	Version string
 	// Description of the program
 	Description string
+	// DefaultCommand is the (optional) name of a command
+	// to run if no command names are passed as CLI arguments.
+	DefaultCommand string
 	// List of commands to execute
 	Commands []*Command
 	// List of flags to parse
@@ -1754,6 +1757,9 @@ func (t *Timestamp) Set(value string) error
 func (t *Timestamp) SetLayout(layout string)
     Set the timestamp string layout for future parsing
 
+func (t *Timestamp) SetLocation(loc *time.Location)
+    Set perceived timezone of the to-be parsed time string
+
 func (t *Timestamp) SetTimestamp(value time.Time)
     Set the timestamp value directly
 
@@ -1782,6 +1788,8 @@ type TimestampFlag struct {
 	EnvVars []string
 
 	Layout string
+
+	Timezone *time.Location
 }
     TimestampFlag is a flag with type *Timestamp
 
diff --git a/vendor/github.com/urfave/cli/v2/zz_generated.flags.go b/vendor/github.com/urfave/cli/v2/zz_generated.flags.go
index 3cae978c0..b89566f90 100644
--- a/vendor/github.com/urfave/cli/v2/zz_generated.flags.go
+++ b/vendor/github.com/urfave/cli/v2/zz_generated.flags.go
@@ -280,6 +280,8 @@ type TimestampFlag struct {
 	EnvVars []string
 
 	Layout string
+
+	Timezone *time.Location
 }
 
 // String returns a readable representation of this value (for usage defaults)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 8ad61fe98..24cdd3704 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -39,8 +39,8 @@ github.com/acobaugh/osrelease
 # github.com/acomagu/bufpipe v1.0.3
 ## explicit; go 1.12
 github.com/acomagu/bufpipe
-# github.com/aquasecurity/libbpfgo v0.2.5-libbpf-0.7.0
-## explicit; go 1.16
+# github.com/aquasecurity/libbpfgo v0.3.0-libbpf-0.8.0
+## explicit; go 1.18
 github.com/aquasecurity/libbpfgo
 github.com/aquasecurity/libbpfgo/helpers
 # github.com/aws/aws-sdk-go v1.40.21
@@ -407,7 +407,7 @@ github.com/spf13/pflag
 github.com/stretchr/testify/assert
 github.com/stretchr/testify/require
 github.com/stretchr/testify/suite
-# github.com/urfave/cli/v2 v2.10.3
+# github.com/urfave/cli/v2 v2.11.0
 ## explicit; go 1.18
 github.com/urfave/cli/v2
 # github.com/xanzy/go-gitlab v0.43.0


Test patch:
diff --git a/.github/workflows/olm_tests.yaml b/.github/workflows/olm_tests.yaml
index 2c307f2f7..e7c072c7e 100644
--- a/.github/workflows/olm_tests.yaml
+++ b/.github/workflows/olm_tests.yaml
@@ -35,7 +35,7 @@ jobs:
         make operator-sdk
         make opm
 
-    - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923
+    - uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
       with:
         go-version: ${{ env.GO_VERSION }}
     - name: Install dependencies
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 14cbc3535..c9866ef0e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -39,7 +39,7 @@ jobs:
     runs-on: ubuntu-20.04
     steps:
       - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
-      - uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923
+      - uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
         with:
           go-version: ${{ env.GO_VERSION }}
       - name: Install dependencies