Re: [PATCH v3 4/8] tracing/bpf: guard syscall probe with preempt_notrace

From: Steven Rostedt
Date: Tue Oct 08 2024 - 19:22:39 EST


On Fri, 4 Oct 2024 10:58:14 -0400
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:

> +#define __BPF_DECLARE_TRACE_SYSCALL(call, proto, args) \
> +static notrace void \
> +__bpf_trace_##call(void *__data, proto) \
> +{ \
> + guard(preempt_notrace)(); \
> + CONCATENATE(bpf_trace_run, COUNT_ARGS(args))(__data, CAST_TO_U64(args)); \
> +}
> +

Same here for using guard over just adding preempt_disable/enable_notrace().

-- Steve