lkml.org 
[lkml]   [2022]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.10 23/46] uprobe: gate bpf call behind BPF_EVENTS
    Date
    From: Delyan Kratunov <delyank@fb.com>

    [ Upstream commit aca80dd95e20f1fa0daa212afc83c9fa0ad239e5 ]

    The call into bpf from uprobes needs to be gated now that it doesn't use
    the trace_events.h helpers.

    Randy found this as a randconfig build failure on linux-next [1].

    [1]: https://lore.kernel.org/linux-next/2de99180-7d55-2fdf-134d-33198c27cc58@infradead.org/

    Reported-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Delyan Kratunov <delyank@fb.com>
    Tested-by: Randy Dunlap <rdunlap@infradead.org>
    Acked-by: Randy Dunlap <rdunlap@infradead.org>
    Link: https://lore.kernel.org/r/cb8bfbbcde87ed5d811227a393ef4925f2aadb7b.camel@fb.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    kernel/trace/trace_uprobe.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
    index 9900d4e3808c..4d62342ff970 100644
    --- a/kernel/trace/trace_uprobe.c
    +++ b/kernel/trace/trace_uprobe.c
    @@ -1351,6 +1351,7 @@ static void __uprobe_perf_func(struct trace_uprobe *tu,
    int size, esize;
    int rctx;

    +#ifdef CONFIG_BPF_EVENTS
    if (bpf_prog_array_valid(call)) {
    u32 ret;

    @@ -1360,6 +1361,7 @@ static void __uprobe_perf_func(struct trace_uprobe *tu,
    if (!ret)
    return;
    }
    +#endif /* CONFIG_BPF_EVENTS */

    esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu));

    --
    2.35.1
    \
     
     \ /
      Last update: 2022-08-11 18:28    [W:4.065 / U:0.196 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site