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

fix(ebpf): fix hidden_kernel_module error in some kernels #3797

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

OriGlassman
Copy link
Collaborator

@OriGlassman OriGlassman commented Jan 7, 2024

On some kernels, while iterating module_kset, we need to check if we've encountered the first module we iterated on, marking we iterated over all modules instead of continuing iterating indefinitely (max amount of iterations - causing a BPF_LOG_ID_UNSPEC error message)

1. Explain what the PR does

On some kernels, while iterating module_kset, we need to check if we've encountered the first module we iterated on, marking we iterated over all modules instead of continuing iterating indefinitely.

2. Explain how to test it

/tracee -e=hidden_kernel_module

3. Other comments

pkg/ebpf/c/tracee.bpf.c Outdated Show resolved Hide resolved
On some kernels, while iterating module_kset, we need to check if we've
encountered the first module we iterated on, marking we iterated over
all modules instead of continuing iterating indefinitely.
Copy link
Contributor

@rafaeldtinoco rafaeldtinoco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafaeldtinoco
Copy link
Contributor

Is this solving the recently reported issue (from an user) where IR code wasn't unrolling this loop more than 60 times (other than the 600 default) ? @AlonZivony @OriGlassman

@rafaeldtinoco rafaeldtinoco merged commit f8aa0d6 into aquasecurity:main Jan 8, 2024
29 checks passed
@OriGlassman
Copy link
Collaborator Author

OriGlassman commented Jan 9, 2024

@rafaeldtinoco

Is this solving the recently reported issue (from an user) where IR code wasn't unrolling this loop more than 60 times (other than the 600 default) ?

Not aware of such issue, can you provide a link?

@rafaeldtinoco
Copy link
Contributor

@rafaeldtinoco

Is this solving the recently reported issue (from an user) where IR code wasn't unrolling this loop more than 60 times (other than the 600 default) ?

Not aware of such issue, can you provide a link?

https://aquasecurity.slack.com/archives/C03MEDREVL7/p1703659096759989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants