Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify.sh: Handle when bpf_verride_return is unavailable #2838

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions contrib/verify/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ shopt -s nullglob
RED="\033[31m"
BLUEUNDER="\033[34;4m"
GREEN="\033[32m"
YELLOW="\033[33m"
NOCOLOR="\033[0m"
TETRAGONDIR=/var/lib/tetragon
DEBUG=0
Expand Down Expand Up @@ -83,6 +84,14 @@ for obj in "$TETRAGONDIR"/*.o; do
continue
fi

# Check if bpf_override_return is available
if [[ "$B" == bpf_generic_kprobe* || "$B" == bpf_enforcer* ]]; then
if ! bpftool feature probe | grep -q "bpf_override_return"; then
echo -e "${YELLOW}bpf_override_return not available, skipping $B ...${NOCOLOR}\n"
continue
fi
fi

echo -e -n "Verifying $BLUEUNDER$obj$NOCOLOR... "
OUT="/tmp/tetragon-verify-$B"

Expand Down
Loading