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-next>] [day] [month] [year] [list]
Date:   Thu, 04 May 2017 12:42:09 -0500
From:   "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To:     Doug Ledford <dledford@...hat.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Sagi Grimberg <sagi@...berg.me>,
        Bart Van Assche <bart.vanassche@...disk.com>,
        Steve Wise <swise@...ngridcomputing.com>,
        Leon Romanovsky <leonro@...lanox.com>,
        Yishai Hadas <yishaih@...lanox.com>,
        Moni Shoua <monis@...lanox.com>
Cc:     linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [infiniband-core] question about arguments position


Hello everybody,

While looking into Coverity ID 1351047 I ran into the following piece  
of code at drivers/infiniband/core/verbs.c:496:

ret = rdma_addr_find_l2_eth_by_grh(&dgid, &sgid,
                                    ah_attr->dmac,
                                    wc->wc_flags & IB_WC_WITH_VLAN ?
                                    NULL : &vlan_id,
                                    &if_index, &hoplimit);


The issue here is that the position of arguments in the call to  
rdma_addr_find_l2_eth_by_grh() function do not match the order of the  
parameters:

&dgid is passed to sgid
&sgid is passed to dgid

This is the function prototype:

int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,
				 const union ib_gid *dgid,
				 u8 *dmac, u16 *vlan_id, int *if_index,
				 int *hoplimit)

My question here is if this is intentional?

In case it is not, I will send a patch to fix it. But first it would  
be great to hear any comment about it.

Thank you
--
Gustavo A. R. Silva




Powered by blists - more mailing lists