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

Optimize save_path_to_str_buf in tracee.bpf.c #758

Merged
merged 1 commit into from Jun 9, 2021
Merged

Optimize save_path_to_str_buf in tracee.bpf.c #758

merged 1 commit into from Jun 9, 2021

Conversation

grantseltzer
Copy link
Contributor

Since the large loop gets unrolled, the various variable
allocations caused programs to exceed the stack limit.

Signed-off-by: grantseltzer grantseltzer@gmail.com

Since the large loop gets unrolled, the various variable
allocations caused programs to exceed the stack limit.

Signed-off-by: grantseltzer <grantseltzer@gmail.com>
struct mount *mnt_p = real_mount(vfsmnt);
struct mount mnt;
bpf_probe_read(&mnt, sizeof(struct mount), mnt_p);
bpf_probe_read(&mnt_mountpoint_p, sizeof(struct dentry*), &mnt_p->mnt_mountpoint);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We read into this variable but it never gets used. Do we really need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right :-)

Copy link
Collaborator

@yanivagman yanivagman left a comment

Choose a reason for hiding this comment

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

LGTM

@grantseltzer grantseltzer merged commit 09ef628 into aquasecurity:main Jun 9, 2021
@grantseltzer grantseltzer deleted the optimize-save_path_to_str_buf branch June 9, 2021 20:39
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

2 participants