-
Notifications
You must be signed in to change notification settings - Fork 151
bpf: Add bpf_get_task_cmdline kfunc #10327
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
base: bpf-next_base
Are you sure you want to change the base?
Conversation
|
Upstream branch: 7dc211c |
1efb39d to
5b97b4a
Compare
|
Upstream branch: ec12ab2 |
95950fb to
19d8120
Compare
5b97b4a to
7b6b51d
Compare
|
Upstream branch: d6ec090 |
19d8120 to
b8c2dc8
Compare
7b6b51d to
2412df8
Compare
|
Upstream branch: d6ec090 |
b8c2dc8 to
5c96320
Compare
2412df8 to
bfb0726
Compare
|
Upstream branch: d088da9 |
5c96320 to
5a93f11
Compare
bfb0726 to
b0a5b86
Compare
|
Upstream branch: e0940c6 |
Add the bpf_get_task_cmdline kfunc. One use case is as follows: In production environments, there are often short-lived script tasks executed, and sometimes these tasks may cause stability issues. It is desirable to detect these script tasks via eBPF. The common approach is to check the process name, but it can be difficult to distinguish specific tasks in some cases. Take the shell as an example: some tasks are started via bash xxx.sh – their process name is bash, but the script name of the task can be obtained through the cmdline. Additionally, myabe this is helpful for security auditing purposes. Signed-off-by: Tao Chen <[email protected]>
Create a task, call bpf_get_task_cmdline to retrieve the cmdline, and check if it succeeds. Signed-off-by: Tao Chen <[email protected]>
5a93f11 to
a899337
Compare
Pull request for series with
subject: bpf: Add bpf_get_task_cmdline kfunc
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1024855