-
Notifications
You must be signed in to change notification settings - Fork 120
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
bpf: Add bpf_copy_from_user_task_str kfunc #8326
Conversation
Upstream branch: f44275e |
Upstream branch: f44275e |
4b2637a
to
a8d60de
Compare
2410e16
to
28f14d5
Compare
Upstream branch: 46c61cb |
a8d60de
to
acb192c
Compare
28f14d5
to
9632415
Compare
Upstream branch: bab18c7 |
acb192c
to
da8927b
Compare
9632415
to
21a4297
Compare
This new kfunc will be able to copy a string from another process's/task's address space. This is similar to `bpf_copy_from_user_str` but accepts a `struct task_struct*` argument. This required adding an additional function in memory.c, namely `copy_str_from_process_vm`, which works similar to `access_process_vm` but utilizes the `strncpy_from_user` helper and only supports reading/copying and not writing. Signed-off-by: Jordan Rome <[email protected]>
This adds tests for both the happy path and the error path (with and without the BPF_F_PAD_ZEROS flag). Signed-off-by: Jordan Rome <[email protected]>
Upstream branch: bfaac2a |
da8927b
to
20f988f
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=922717 expired. Closing PR. |
Pull request for series with
subject: bpf: Add bpf_copy_from_user_task_str kfunc
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=922717