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

Use strace's --seccomp-bpf option #2

Open
i-ky opened this issue Apr 16, 2023 · 4 comments
Open

Use strace's --seccomp-bpf option #2

i-ky opened this issue Apr 16, 2023 · 4 comments

Comments

@i-ky
Copy link
Contributor

i-ky commented Apr 16, 2023

Newer versions of strace support --seccomp-bpf option introduced in version 5.3:

Implemented usage of seccomp-bpf for stopping tracees only for filtered
syscalls. Use --seccomp-bpf option to enable.

It has huge impact on performance. According to my tests, strace command currently used by compile-db-gen adds ~100% overhead (i.e. build time doubles under strace). Simply adding --seccomp-bpf reduces overhead to ~10% making it almost unnoticeable.

I honestly don't know why strace developers did not make --seccomp-bpf a new default, but it definitely makes sense to use it in compile-db-gen, if available.

@i-ky i-ky changed the title Use srtace's --seccomp-bpf option Use strace's --seccomp-bpf option Apr 18, 2023
@sunlin7
Copy link
Owner

sunlin7 commented Jan 16, 2024

I'm still working on CentOS 7, kernel 3.10.0, strace 4.24.
Will update to the Ubuntu 20.04 this year, then will work on feature. :)

@sunlin7 sunlin7 closed this as completed Dec 30, 2024
@sunlin7
Copy link
Owner

sunlin7 commented Dec 30, 2024

Close this ticket and won't enable seccomp-bpf as the explanation in the strace/strace#274.

@i-ky
Copy link
Contributor Author

i-ky commented Dec 30, 2024

Not even allow user to enable it at their own risk via an option flag?

@sunlin7
Copy link
Owner

sunlin7 commented Dec 30, 2024

Okay, I'm going to take a look, give me some time, will update this week. Thanks

@sunlin7 sunlin7 reopened this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants