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] [thread-next>] [day] [month] [year] [list]
Message-ID: <86512cfe-3359-4d2c-ab27-8b298f56f15f@kernel.org>
Date: Tue, 18 Jun 2024 08:18:13 +0200
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: Yan Zhai <yan@...udflare.com>, netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
 David Ahern <dsahern@...nel.org>,
 Abhishek Chauhan <quic_abchauha@...cinc.com>,
 Mina Almasry <almasrymina@...gle.com>, Florian Westphal <fw@...len.de>,
 Alexander Lobakin <aleksander.lobakin@...el.com>,
 David Howells <dhowells@...hat.com>, Jiri Pirko <jiri@...nulli.us>,
 Daniel Borkmann <daniel@...earbox.net>,
 Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
 Lorenzo Bianconi <lorenzo@...nel.org>,
 Pavel Begunkov <asml.silence@...il.com>, linux-kernel@...r.kernel.org,
 kernel-team@...udflare.com, Steven Rostedt <rostedt@...dmis.org>,
 Masami Hiramatsu <mhiramat@...nel.org>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Neil Horman <nhorman@...driver.com>, linux-trace-kernel@...r.kernel.org,
 Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [PATCH net-next v5 2/7] net: introduce sk_skb_reason_drop
 function



On 17/06/2024 20.09, Yan Zhai wrote:
> Long used destructors kfree_skb and kfree_skb_reason do not pass
> receiving socket to packet drop tracepoints trace_kfree_skb.
> This makes it hard to track packet drops of a certain netns (container)
> or a socket (user application).
> 
> The naming of these destructors are also not consistent with most sk/skb
> operating functions, i.e. functions named "sk_xxx" or "skb_xxx".
> Introduce a new functions sk_skb_reason_drop as drop-in replacement for
> kfree_skb_reason on local receiving path. Callers can now pass receiving
> sockets to the tracepoints.
> 
> kfree_skb and kfree_skb_reason are still usable but they are now just
> inline helpers that call sk_skb_reason_drop.
> 
> Note it is not feasible to do the same to consume_skb. Packets not
> dropped can flow through multiple receive handlers, and have multiple
> receiving sockets. Leave it untouched for now.
> 
> Suggested-by: Eric Dumazet<edumazet@...gle.com>
> Signed-off-by: Yan Zhai<yan@...udflare.com>
> ---
> v1->v2: changes function names to be more consistent with common sk/skb
> operations
> ---
>   include/linux/skbuff.h | 10 ++++++++--
>   net/core/skbuff.c      | 22 ++++++++++++----------
>   2 files changed, 20 insertions(+), 12 deletions(-)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ