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: <20230711133259.GS41919@unreal>
Date:   Tue, 11 Jul 2023 16:32:59 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Paolo Abeni <pabeni@...hat.com>, 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>
Subject: Re: [PATCH net-next][resend v1 1/1] netlink: Don't use int as bool
 in netlink_update_socket_mc()

On Tue, Jul 11, 2023 at 03:45:34PM +0300, Andy Shevchenko wrote:
> On Tue, Jul 11, 2023 at 03:20:12PM +0300, Leon Romanovsky wrote:
> > On Tue, Jul 11, 2023 at 01:54:18PM +0300, Andy Shevchenko wrote:
> > > On Tue, Jul 11, 2023 at 12:21:12PM +0200, Paolo Abeni wrote:
> > > > On Tue, 2023-07-11 at 09:33 +0300, Leon Romanovsky wrote:
> > > > > On Mon, Jul 10, 2023 at 01:06:24PM +0300, Andy Shevchenko wrote:
> 
> ...
> 
> > > > > So what is the outcome of "int - bool + bool" in the line above?
> > > 
> > > The same as with int - int [0 .. 1] + int [0 .. 1].
> > 
> > No, it is not. bool is defined as _Bool C99 type, so strictly speaking
> > you are mixing types int - _Bool + _Bool.
> 
> 1. The original code already does that. You still haven't reacted on that.

The original code was int - int + int.

> 2. Is what you are telling a problema?

No, I'm saying that you took perfectly correct code which had all types
aligned and changed it to have mixed type arithmetic.

Thanks

> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ