Thread (3 messages) flat view 3 messages, 2 authors, 2021-09-14

Re: [PATCH bpf v2 v2] bpf: handle return value of BPF_PROG_TYPE_STRUCT_OPS prog

From: Martin KaFai Lau <hidden>
Date: 2021-09-14 17:06:52
Also in: bpf

On Tue, Sep 14, 2021 at 10:33:51AM +0800, Hou Tao wrote:
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: 85d33df357b6 ("bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS")
Signed-off-by: Hou Tao <redacted>
Acked-by: Martin KaFai Lau <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help