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]
Date:   Wed, 03 May 2017 13:34:49 -0500
From:   "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To:     Chad Dupuis <chad.dupuis@...ium.com>
Cc:     QLogic-Storage-Upstream@...ium.com,
        "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        Peter Senna Tschudin <peter.senna@...il.com>
Subject: Re: [scsi-qedf] question about parameter ordering

Hi Chad,

Quoting Chad Dupuis <chad.dupuis@...ium.com>:

> On Wed, 3 May 2017, 1:58pm, Gustavo A. R. Silva wrote:
>
>>
>> Hello everybody,
>>
>> While looking into Coverity ID 1402011 I ran into the following  
>> piece of code
>> at drivers/scsi/qedf/qedf_io.c:2057:
>>
>> /* Fill FC header */
>> fc_hdr = &(tm_req->req_fc_hdr);
>> sid = fcport->sid;
>> did = fcport->rdata->ids.port_id;
>> __fc_fill_fc_hdr(fc_hdr, FC_RCTL_DD_UNSOL_CMD, sid, did,
>>                   FC_TYPE_FCP, FC_FC_FIRST_SEQ | FC_FC_END_SEQ |
>>                   FC_FC_SEQ_INIT, 0);
>>
>> The issue here is that the position of arguments in the call to
>> __fc_fill_fc_hdr() function do not match the ordering of the parameters:
>>
>> _sid_ is passed to _did_
>> _did_ is passed to _sid_
>>
>> this is the function prototype:
>>
>> static inline void __fc_fill_fc_hdr(struct fc_frame_header *fh,
>>                                    enum fc_rctl r_ctl,
>>                                    u32 did, u32 sid, enum fc_fh_type type,
>>                                    u32 f_ctl, u32 parm_offset)
>>
>> My question here is if this is intentionala?
>
> This may have been but this code has been superseded by commit
> be086e7c53f1fac51eed14523b28f2214b548dd2.B
>>

Oh OK, great.

>> 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.
>>
>> By the way... the same is happening at drivers/scsi/qedf/qedf_els.c:109
>
> May be a bug here so you could send a patch.
>

I'll send a patch for this shortly.

Thanks for your comments.
--
Gustavo A. R. Silva






Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ