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: handle return value of BPF_PROG_TYPE_STRUCT_OPS prog #1768

Closed
wants to merge 2 commits into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: bpf: handle return value of BPF_PROG_TYPE_STRUCT_OPS prog
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=546241

@kernel-patches-bot
Copy link
Author

Master branch: 43d2b88
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=546241
version: 2

@kernel-patches-bot
Copy link
Author

Master branch: 2865ba8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=546241
version: 2

Nobody and others added 2 commits September 14, 2021 06:45
Currently if a function ptr in struct_ops has a return value, its
caller will get a random return value from it, because the return
value of related BPF_PROG_TYPE_STRUCT_OPS prog is just dropped.

So adding a new flag BPF_TRAMP_F_RET_FENTRY_RET to tell bpf trampoline
to save and return the return value of struct_ops prog if ret_size of
the function ptr is greater than 0. Also restricting the flag to be
used alone.

Fixes: 85d33df ("bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS")
Signed-off-by: Hou Tao <houtao1@huawei.com>
@kernel-patches-bot
Copy link
Author

Master branch: d198b27
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=546241
version: 2

@kernel-patches-bot
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant