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: Thu, 29 Jun 2023 21:55:50 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Simon Horman <simon.horman@...igine.com>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH v1 1/1] netlink: Don't use int as bool in
 netlink_update_socket_mc()

On Thu, Jun 29, 2023 at 05:11:23PM +0200, Simon Horman wrote:
> On Thu, Jun 29, 2023 at 04:31:31PM +0300, Andy Shevchenko wrote:

> > -	int old, new = !!is_new, subscriptions;
> > +	int subscriptions;
> > +	bool old;
> >  
> >  	old = test_bit(group - 1, nlk->groups);
> >  	subscriptions = nlk->subscriptions - old + new;
> 
> Hi Andy,
> 
> Doing arithmetic with boolean values doesn't seem right to me.

In any case it does not change the status quo, the same still applies to
the existing code (that's implied in the commit message). And obfuscating
it for the sake of purity seems wrong to me. Hence this patch.

> In any case, net-next is closed.
> Please consider reposting once it re-opens, after 10th July.

Sure.

Thank you for the review!

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ