On Wed, 26 Jun 2024 14:59:39 -0400 Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote: > @@ -2443,9 +2443,15 @@ static int __bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog * > if (prog->aux->max_tp_access > btp->writable_size) > return -EINVAL; > > - return tracepoint_probe_register_prio_flags(tp, (void *)btp->bpf_func, > - prog, TRACEPOINT_DEFAULT_PRIO, > - TRACEPOINT_MAY_EXIST); > + if (tp->flags & TRACEPOINT_MAY_FAULT) { > + return tracepoint_probe_register_prio_flags(tp, (void *)btp->bpf_func, > + prog, TRACEPOINT_DEFAULT_PRIO, > + TRACEPOINT_MAY_EXIST | TRACEPOINT_MAY_FAULT); > + } else { > + return tracepoint_probe_register_prio_flags(tp, (void *)btp->bpf_func, > + prog, TRACEPOINT_DEFAULT_PRIO, > + TRACEPOINT_MAY_EXIST); > + } nit: you can also just pass the flag directly, return tracepoint_probe_register_prio_flags(tp, (void *)btp->bpf_func, prog, TRACEPOINT_DEFAULT_PRIO, TRACEPOINT_MAY_EXIST | (tp->flags & TRACEPOINT_MAY_FAULT)); But others looks good to me. Reviewed-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> Thank you, -- Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>