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: <20200907135102.27e07aff@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 7 Sep 2020 13:51:02 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Yang Yingliang <yangyingliang@...wei.com>
Cc:     <netdev@...r.kernel.org>, <davem@...emloft.net>
Subject: Re: [PATCH net-next] netlink: add spaces around '&' in
 netlink_recvmsg()

On Mon, 7 Sep 2020 21:21:44 +0800 Yang Yingliang wrote:
> Spaces preferred around '&'.

This in itself is not a sufficient justification to touch code that
pre-dates the git era.

IMHO '&' without spaces around it is particularly hard to read, and 
the code is actively used, which makes the change worth considering.

But I'm not sure why you decided to fix recvmsg but not sendmsg.

Please provide a better commit message.

> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
> index d2d1448274f5..5a86bf4f80b1 100644
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> @@ -1929,12 +1929,12 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
>  	struct scm_cookie scm;
>  	struct sock *sk = sock->sk;
>  	struct netlink_sock *nlk = nlk_sk(sk);
> -	int noblock = flags&MSG_DONTWAIT;
> +	int noblock = flags & MSG_DONTWAIT;
>  	size_t copied;
>  	struct sk_buff *skb, *data_skb;
>  	int err, ret;
>  
> -	if (flags&MSG_OOB)
> +	if (flags & MSG_OOB)
>  		return -EOPNOTSUPP;
>  
>  	copied = 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ