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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67ce5ce1722a4_20941f294a0@willemb.c.googlers.com.notmuch>
Date: Sun, 09 Mar 2025 23:30:41 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Paolo Abeni <pabeni@...hat.com>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>, 
 netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>, 
 Eric Dumazet <edumazet@...gle.com>, 
 Jakub Kicinski <kuba@...nel.org>, 
 Simon Horman <horms@...nel.org>, 
 David Ahern <dsahern@...nel.org>
Subject: Re: [PATCH v2 net-next 2/2] udp_tunnel: use static call for GRO hooks
 when possible

Paolo Abeni wrote:
> On 3/8/25 7:40 PM, Willem de Bruijn wrote:
> > Paolo Abeni wrote:
> >> diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
> >> index 054d4d4a8927f..f06dd82d28562 100644
> >> --- a/net/ipv4/udp_offload.c
> >> +++ b/net/ipv4/udp_offload.c
> >> @@ -15,6 +15,39 @@
> >>  #include <net/udp_tunnel.h>
> >>  
> >>  #if IS_ENABLED(CONFIG_NET_UDP_TUNNEL)
> >> +
> >> +/*
> >> + * Dummy GRO tunnel callback; should never be invoked, exists
> >> + * mainly to avoid dangling/NULL values for the udp tunnel
> >> + * static call.
> >> + */
> >> +static struct sk_buff *dummy_gro_rcv(struct sock *sk,
> >> +				     struct list_head *head,
> >> +				     struct sk_buff *skb)
> >> +{
> >> +	WARN_ON_ONCE(1);
> >> +	NAPI_GRO_CB(skb)->flush = 1;
> >> +	return NULL;
> >> +}
> >> +
> >> +typedef struct sk_buff *(*udp_tunnel_gro_rcv_t)(struct sock *sk,
> >> +						struct list_head *head,
> >> +						struct sk_buff *skb);
> >> +
> >> +struct udp_tunnel_type_entry {
> >> +	udp_tunnel_gro_rcv_t gro_receive;
> >> +	refcount_t count;
> >> +};
> >> +
> >> +#define UDP_MAX_TUNNEL_TYPES (IS_ENABLED(CONFIG_GENEVE) + \
> >> +			      IS_ENABLED(CONFIG_VXLAN) * 2 + \
> >> +			      IS_ENABLED(CONFIG_FOE) * 2)
> > 
> > CONFIG_BAREUDP
> 
> Why? AFAICS BAREUDP does not implement the gro_receive callback. UDP
> tunnel without such callback are irrelevant here.

You're right, of course. I looked at the wrong callback. Sorry.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ