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: <87v7ovluwh.fsf@toke.dk>
Date: Mon, 16 Jun 2025 14:42:54 +0200
From: Toke Høiland-Jørgensen <toke@...nel.org>
To: Jesper Dangaard Brouer <hawk@...nel.org>, 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>, John Fastabend
 <john.fastabend@...il.com>, Andrii Nakryiko <andrii@...nel.org>
Subject: Re: [PATCH] xdp: Remove unused events xdp_redirect_map and
 xdp_redirect_map_err

Jesper Dangaard Brouer <hawk@...nel.org> writes:

> On 12/06/2025 12.54, Jesper Dangaard Brouer wrote:
>> 
>> 
>> On 12/06/2025 12.30, Toke Høiland-Jørgensen wrote:
>>> Steven Rostedt <rostedt@...dmis.org> writes:
>>>
>>>> From: Steven Rostedt <rostedt@...dmis.org>
>>>>
>>>> Each TRACE_EVENT() defined can take up around 5K of text and meta data
>>>> regardless if they are used or not. New code is being developed that 
>>>> will
>>>> warn when a tracepoint is defined but not used.
>>>>
>>>> The trace events xdp_redirect_map and xdp_redirect_map_err are 
>>>> defined but
>>>> not used, but there's also a comment that states these are kept 
>>>> around for
>>>> backward compatibility. Which is interesting because since they are not
>>>> used, any old BPF program that expects them to exist will get incorrect
>>>> data (no data) when they use them. It's worse than not working, it's
>>>> silently failing.
>>>>
>>>> Remove them as they will soon cause warnings, or if they really need to
>>>> stick around, then code needs to be added to use them.
>>>>
>>>> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
>>>
>>> I guess that makes sense; I have no objections to getting rid of them.
>>>
>>> Reviewed-by: Toke Høiland-Jørgensen <toke@...nel.org>
>> 
>> Make sense.
>> 
>> 
>> Toke we have to check how XDP-tools handle when these tracepoints 
>> disappears.
>
> To Toke, notice that userspace tools expect this tracepoint to be
> available will fail as below (for kernel release v6.16):
>
>   $ sudo ./xdp-bench redirect mlx5p1 veth41
>    libbpf: prog 'tp_xdp_redirect_map_err': failed to find kernel BTF 
> type ID of 'xdp_redirect_map_err': -3
>    libbpf: prog 'tp_xdp_redirect_map_err': failed to prepare load 
> attributes: -3
>    libbpf: prog 'tp_xdp_redirect_map_err': failed to load: -3
>    libbpf: failed to load object 'xdp_redirect_basic'
>   Failed to attach XDP program: No such process
>
> IMHO this is a userspace problem, that needs to be more flexible and
> adapt to this change.
>
> This was changed in kernel v5.6 (Jan 2020) commit 1d233886dd90 ("xdp:
> Use bulking for non-map XDP_REDIRECT and consolidate code paths").
> So, I'm thinking that xdp-tools could just remove monitoring for these
> tracepoints?

Yeah, let's just get rid of them:
https://github.com/xdp-project/xdp-tools/pull/513

-Toke

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ