lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f73a08e2-7793-447a-b7be-07909aa80425@kernel.org>
Date: Thu, 12 Jun 2025 17:53:28 +0200
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>, LKML
 <linux-kernel@...r.kernel.org>,
 Linux trace kernel <linux-trace-kernel@...r.kernel.org>, bpf@...r.kernel.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
 "David S. Miller\"" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
 Jesper Dangaard Brouer <hawk@...nel.org>,
 John Fastabend <john.fastabend@...il.com>
Subject: Re: [PATCH] xdp: tracing: Hide some xdp events under
 CONFIG_BPF_SYSCALL



On 12/06/2025 16.16, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@...dmis.org>
> 
> The events xdp_cpumap_kthread, xdp_cpumap_enqueue and xdp_devmap_xmit are
> only called when CONFIG_BPF_SYSCALL is defined.  As each event can take up
> to 5K regardless if they are used or not, it's best not to define them
> when they are not used. Add #ifdef around these events when they are not
> used.
> 
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
> Note, I will be adding code soon that will make unused events cause a waring.
> 
>   include/trace/events/xdp.h | 2 ++
>   1 file changed, 2 insertions(+)

LGTM

Acked-by: Jesper Dangaard Brouer <hawk@...nel.org>


> diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
> index 0fe0893c2567..18c0ac514fcb 100644
> --- a/include/trace/events/xdp.h
> +++ b/include/trace/events/xdp.h
> @@ -168,6 +168,7 @@ DEFINE_EVENT(xdp_redirect_template, xdp_redirect_err,
>   #define _trace_xdp_redirect_map_err(dev, xdp, to, map_type, map_id, index, err) \
>   	 trace_xdp_redirect_err(dev, xdp, to, err, map_type, map_id, index)
>   
> +#ifdef CONFIG_BPF_SYSCALL
>   TRACE_EVENT(xdp_cpumap_kthread,
>   
>   	TP_PROTO(int map_id, unsigned int processed,  unsigned int drops,
> @@ -281,6 +282,7 @@ TRACE_EVENT(xdp_devmap_xmit,
>   		  __entry->sent, __entry->drops,
>   		  __entry->err)
>   );
> +#endif /* CONFIG_BPF_SYSCALL */
>   
>   /* Expect users already include <net/xdp.h>, but not xdp_priv.h */
>   #include <net/xdp_priv.h>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ