-
Notifications
You must be signed in to change notification settings - Fork 416
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
fix(ebpf): hidden_kernel_module fix max iterations #3936
base: main
Are you sure you want to change the base?
Conversation
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.
Looks good
@@ -657,6 +657,7 @@ int tracepoint__sched__sched_process_fork(struct bpf_raw_tracepoint_args *ctx) | |||
|
|||
// number of iterations - value that the verifier was seen to cope with - the higher, the better | |||
#define MAX_NUM_MODULES 450 | |||
#define MAX_NUM_LOOPS_MODULES 100000 |
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.
Its a bit much, no?
Why not 10k or even less?
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.
It stops when finishes - so I want a value that if it happens, it'll certainly indicate a problem. 10k is also probably ok but doesn't make much different than 100k.
99412ce
to
8f82983
Compare
A change was depicted on kernel 6.5 where mod_tree contains duplicate modules and thus MAX_NUM_MODULES is not enough to iterate on the tree, which yielded a warning. The fix is to use bpf_loop helper, which is available on kernels 5.17 and above, and do more iterations.
8f82983
to
ae16a9e
Compare
@OriGlassman is this still in the current milestone? |
1. Explain what the PR does
A change was depicted on kernel 6.5 where mod_tree contains duplicate modules and thus MAX_NUM_MODULES is not enough to iterate on the tree, which yielded a warning.
The fix is to use bpf_loop helper, which is available on kernels 5.17 and above, and do more iterations.
"Replace me with
make check-pr
output"2. Explain how to test it
./dist/tracee -e=hidden_kernel_module
3. Other comments