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]
Date: Mon, 3 Jun 2024 20:33:50 -0600
From: David Ahern <dsahern@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, pabeni@...hat.com,
 Jaroslav Pulchart <jaroslav.pulchart@...ddata.com>
Subject: Re: [PATCH net v3] rtnetlink: make the "split" NLM_DONE handling
 generic

On 6/3/24 12:48 PM, Jakub Kicinski wrote:
> @@ -6694,7 +6734,7 @@ void __init rtnetlink_init(void)
>  	register_netdevice_notifier(&rtnetlink_dev_notifier);
>  
>  	rtnl_register(PF_UNSPEC, RTM_GETLINK, rtnl_getlink,
> -		      rtnl_dump_ifinfo, 0);
> +		      rtnl_dump_ifinfo, RTNL_FLAG_DUMP_SPLIT_NLM_DONE);
>  	rtnl_register(PF_UNSPEC, RTM_SETLINK, rtnl_setlink, NULL, 0);
>  	rtnl_register(PF_UNSPEC, RTM_NEWLINK, rtnl_newlink, NULL, 0);
>  	rtnl_register(PF_UNSPEC, RTM_DELLINK, rtnl_dellink, NULL, 0);
> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> index f3892ee9dfb3..d09f557eaa77 100644
> --- a/net/ipv4/devinet.c
> +++ b/net/ipv4/devinet.c
> @@ -2805,7 +2805,7 @@ void __init devinet_init(void)
>  	rtnl_register(PF_INET, RTM_NEWADDR, inet_rtm_newaddr, NULL, 0);
>  	rtnl_register(PF_INET, RTM_DELADDR, inet_rtm_deladdr, NULL, 0);
>  	rtnl_register(PF_INET, RTM_GETADDR, NULL, inet_dump_ifaddr,
> -		      RTNL_FLAG_DUMP_UNLOCKED);
> +		      RTNL_FLAG_DUMP_UNLOCKED | RTNL_FLAG_DUMP_SPLIT_NLM_DONE);
>  	rtnl_register(PF_INET, RTM_GETNETCONF, inet_netconf_get_devconf,
>  		      inet_netconf_dump_devconf,
>  		      RTNL_FLAG_DOIT_UNLOCKED | RTNL_FLAG_DUMP_UNLOCKED);
> diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
> index c484b1c0fc00..7ad2cafb9276 100644
> --- a/net/ipv4/fib_frontend.c
> +++ b/net/ipv4/fib_frontend.c
> @@ -1050,11 +1050,6 @@ static int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
>  			e++;
>  		}
>  	}
> -
> -	/* Don't let NLM_DONE coalesce into a message, even if it could.
> -	 * Some user space expects NLM_DONE in a separate recv().
> -	 */
> -	err = skb->len;
>  out:
>  
>  	cb->args[1] = e;
> @@ -1665,5 +1660,5 @@ void __init ip_fib_init(void)
>  	rtnl_register(PF_INET, RTM_NEWROUTE, inet_rtm_newroute, NULL, 0);
>  	rtnl_register(PF_INET, RTM_DELROUTE, inet_rtm_delroute, NULL, 0);
>  	rtnl_register(PF_INET, RTM_GETROUTE, NULL, inet_dump_fib,
> -		      RTNL_FLAG_DUMP_UNLOCKED);
> +		      RTNL_FLAG_DUMP_UNLOCKED | RTNL_FLAG_DUMP_SPLIT_NLM_DONE);
>  }


You are using the legacy way for route, link and address dumps with the
option to quickly add the others as needed (meaning when a regression is
reported). If those 3 need the workaround, I think there are high odds
all of the other rtnl_register users will need it. So, if there is not
going to be a per-app opt-in to a new way, you might as well make this
the default for all rtnl families - sadly.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ