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

bpf: Add bpf_copy_from_user_task_str kfunc #8326

Closed

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

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

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f44275e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=922717
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f44275e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=922717
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 46c61cb
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=922717
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: bab18c7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=922717
version: 2

Jordan Rome added 2 commits January 8, 2025 09:44
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]>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: bfaac2a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=922717
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=922717 expired. Closing PR.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/922717=>bpf-next branch January 11, 2025 09:18
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.

0 participants