-
Notifications
You must be signed in to change notification settings - Fork 454
tetragon: rhel7 changes #3574
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
tetragon: rhel7 changes #3574
Conversation
b1fd3b3
to
2985325
Compare
882bda0
to
dfaa857
Compare
Currently we won't start tetragon if requested namespace is not supported, like: time="2025-04-01T04:31:23-04:00" level=fatal msg="Failed to initialize host namespaces" error="namespace '/proc/1/ns/pid_for_children' readlink /proc/1/ns/pid_for_childy" procfs=/proc/ Instead let's warn user about missing namespace and let tetragon continue. Signed-off-by: Jiri Olsa <[email protected]>
5d01bda
to
0d3b3f0
Compare
Adding rhel7 base sensor bpf object variants for running tetragon on rhel7. Signed-off-by: Jiri Olsa <[email protected]>
Some of the new namespace errors make the tetragon log too loud on rhel7, because they are display for each process, display them just once. Signed-off-by: Jiri Olsa <[email protected]>
The rhel7 kernel uses different context struct name, change it for rhel7 objects. Signed-off-by: Jiri Olsa <[email protected]>
Display object file name in debug mode, like: # sudo DEBUG=1 TETRAGONDIR=/home/jolsa/tetragon/bpf/objs go test contrib/verify/verify_test.go -v === RUN TestVerifyTetragonPrograms [bpf_cgroup.o] tg_cgroup_rmdir: ; struct cgroup *cgrp = (struct cgroup *)ctx->args[0]; 0: LdXMemDW dst: r3 src: r1 off: 0 imm: 0 1: MovImm dst: r6 imm: 0 ; struct kernfs_node *kn = NULL; 2: StXMemDW dst: rfp src: r6 off: -8 imm: 0 Signed-off-by: Jiri Olsa <[email protected]>
Rhel7 is special, *310.o objects load fail on standard kernel. Signed-off-by: Jiri Olsa <[email protected]>
Adding core field checks and use appropriate reads based on that. Signed-off-by: Jiri Olsa <[email protected]>
The cgroup retrieval is bit different on rhel7, disabling it for now in rhel7 objects. Signed-off-by: Jiri Olsa <[email protected]>
0d3b3f0
to
cd88491
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor maybe would have been better to have separate bpf_execve_v310.c source with all branches? hmm don't know... since it misses core functionality... maybe...
well, we use the __RHEL7_BPF_PROG which seems enough atm.. let's see if there are more changes in future |
assorted changes to be able to run on rhel7