lkml.org 
[lkml]   [2022]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC bpf-next 4/4] selftests/bpf: Add attach bench test
    On Thu, 28 Apr 2022 19:53:03 -0400
    Steven Rostedt <rostedt@goodmis.org> wrote:

    > > But that __fentry__ call is not part of __bpf_tramp_exit, actually.
    > > Whether to call it a bug or limitation is secondary. It marks
    > > __bpf_tramp_exit as attachable through kprobe/ftrace while it really
    > > isn't.
    >
    > I'm confused by what you mean by "marks __bpf_tramp_exit as attachable"?
    > What does? Where does it get that information? Does it read
    > available_filter_functions?

    OK, I think I see the issue you have. Because the functions shown in
    available_filter_functions which uses the simple "%ps" to show the function
    name:

    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/ftrace.c#n3692

    And the code that does the actual matching uses kallsyms_lookup()

    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/ftrace.c#n4017

    Which appears not to match the function for the address, you can't pass in
    __bpf_tramp_exit because it wont match the symbol returned by
    kallsyms_lookup.

    This does indeed look like a bug in %ps.

    But in the mean time, I could open code %ps and see if that fixes it. I'll
    give it try.

    -- Steve

    \
     
     \ /
      Last update: 2022-04-29 02:12    [W:6.749 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site