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 <houtao1@xxxxxxxxxx> Acked-by: Martin KaFai Lau <kafai@xxxxxx>