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: <d09f8831-293e-45ec-93fb-6feab25d47f2@kernel.org>
Date: Thu, 2 May 2024 09:59:04 -0600
From: David Ahern <dsahern@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>, "David S . Miller"
 <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com,
 Ido Schimmel <idosch@...dia.com>, Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next 1/2] rtnetlink: change rtnl_stats_dump() return
 value

On 5/2/24 5:37 AM, Eric Dumazet wrote:
> By returning 0 (or an error) instead of skb->len,
> we allow NLMSG_DONE to be appended to the current
> skb at the end of a dump, saving a couple of recvmsg()
> system calls.

any concern that a patch similar to:
https://lore.kernel.org/netdev/20240411180202.399246-1-kuba@kernel.org/
will be needed again here?

> 
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
>  net/core/rtnetlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 283e42f48af68504af193ed5763d4e0fcd667d99..88980c8bcf334079e2d19cbcfb3f10fc05e3c19b 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -6024,7 +6024,7 @@ static int rtnl_stats_dump(struct sk_buff *skb, struct netlink_callback *cb)
>  	cb->args[1] = idx;
>  	cb->args[0] = h;
>  
> -	return skb->len;
> +	return err;
>  }
>  
>  void rtnl_offload_xstats_notify(struct net_device *dev)


Reviewed-by: David Ahern <dsahern@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ