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: <YuksB4Lv9/7Ix5x8@nvidia.com>
Date:   Tue, 2 Aug 2022 10:52:07 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Mark Zhang <markzhang@...dia.com>
Cc:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>, leon@...nel.org,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH] RDMA/cm: fix cond_no_effect.cocci warnings

On Tue, Aug 02, 2022 at 10:15:24AM +0800, Mark Zhang wrote:
> 
> > Yes, this is a standard pattern for walking tree with priority, we
> > should not obfuscate it.
> > 
> > The final else means 'equal' and the first if should ideally be placed
> > there
> > 
> > However this function is complicated by the use of the service_mask
> > for equality checking, and it doesn't even work right if the
> > service_mask is not -1.
> > 
> > If someone wants to clean this then please go through and eliminate
> > service_mask completely. From what I can see its value is always -1.
> > Three patches:
> >   - Remove the service_mask parameter from ib_cm_listen(), all callers
> >     use 0
> >   - Remove the service_mask parameter from cm_init_listen(), all
> >     callers use 0. Inspect and remove cm_id_priv->id.service_mask,
> >     it is the constant value  ~cpu_to_be64(0) which is a NOP when &'d
> >   - Move the test at the top of cm_find_listen() into the final else
> > 
> 
> I'll do it. For the 3rd one, do you mean a patch like (similar change in
> cm_insert_listen):

Yes

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ