• Yonghong Song's avatar
    bpf: btf: support proper non-jit func info · ba64e7d8
    Yonghong Song authored
    Commit 838e9690 ("bpf: Introduce bpf_func_info")
    added bpf func info support. The userspace is able
    to get better ksym's for bpf programs with jit, and
    is able to print out func prototypes.
    
    For a program containing func-to-func calls, the existing
    implementation returns user specified number of function
    calls and BTF types if jit is enabled. If the jit is not
    enabled, it only returns the type for the main function.
    
    This is undesirable. Interpreter may still be used
    and we should keep feature identical regardless of
    whether jit is enabled or not.
    This patch fixed this discrepancy.
    
    Fixes: 838e9690 ("bpf: Introduce bpf_func_info")
    Signed-off-by: default avatarYonghong Song <yhs@fb.com>
    Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    ba64e7d8
syscall.c 59.4 KB