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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 10 Mar 2020 20:49:48 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     "Bean Huo (beanhuo)" <beanhuo@...ron.com>,
        "huobean@...il.com" <huobean@...il.com>,
        "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
        "avri.altman@....com" <avri.altman@....com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "tomas.winkler@...el.com" <tomas.winkler@...el.com>,
        "cang@...eaurora.org" <cang@...eaurora.org>
Cc:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [EXT] Re: [PATCH v3 1/1] scsi: ufs: fix LRB pointer incorrect
 initialization issue

On 2020-03-10 00:53, Bean Huo (beanhuo) wrote:
> Hi, Bart 
> 
>> Subject: [EXT] Re: [PATCH v3 1/1] scsi: ufs: fix LRB pointer incorrect initialization
>> issue
>>
>> On 2020-03-09 09:10, huobean@...il.com wrote:
>>> @@ -4834,6 +4829,7 @@ static void __ufshcd_transfer_req_compl(struct
>> ufs_hba *hba,
>>>  			continue;
>>>  		cmd = blk_mq_rq_to_pdu(req);
>>>  		lrbp = scsi_cmd_priv(cmd);
>>> +		ufshcd_init_lrb(hba, lrbp, index);
>>>  		if (ufshcd_is_scsi(req)) {
>>>  			ufshcd_add_command_trace(hba, req, "complete");
>>>  			result = ufshcd_transfer_rsp_status(hba, lrbp);
>>
>> This ufshcd_init_lrb() call looks incorrect to me. I think that
>> ufshcd_init_lrb() should only be called before a request is submitted to the UFS
>> controller and also that ufshcd_init_lrb() should not be called from the
>> completion path.
> 
> __ufshcd_transfer_req_compl()
> 	ufshcd_transfer_rsp_status()  will access lrbp->ucd_rsp_ptr.
> Without calling ufshcd_init_lrb() here, there will be an error.

Hi Bean,

I think that ufshcd_init_lrb() should only be called from the code that
prepares a command before it is submitted and not from the command
completion path. Because v5.6-rc5 has already been released, there is
not that much time left until the merge window opens. I think it is less
risky to revert commit 34656dda81ac ("scsi: ufs: Let the SCSI core
allocate per-command UFS data") than to proceed with the above patch. Do
you want to submit a revert or do you perhaps want me to do that?

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ