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]
Date:   Wed, 17 Oct 2018 15:04:54 +0200
From:   Johannes Thumshirn <jthumshirn@...e.de>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     YueHaibing <yuehaibing@...wei.com>, hare@...e.com,
        jejb@...ux.vnet.ibm.com, martin.petersen@...cle.com,
        linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH -next] advansys: remove set but not used variable
 'srb_tag' in adv_isr_callback

On 17/10/18 15:00, Matthew Wilcox wrote:
> On Wed, Oct 17, 2018 at 02:49:50PM +0200, Johannes Thumshirn wrote:
>> On 17/10/18 14:34, YueHaibing wrote:
>>> -	srb_tag = le32_to_cpu(scsiqp->srb_tag);
>>>  	scp = scsi_host_find_tag(boardp->shost, scsiqp->srb_tag);
>>
>> Shouldn't this be:
>> 	scp = scsi_host_find_tag(boardp->shost,
>> 					le32_to_cpu(scsiqp->srb_tag));
> 
> I don't think so.  Look at how scsiqp->srb_tag is set:
> 
>  adv_build_req(struct asc_board *boardp, struct scsi_cmnd *scp,
>               ADV_SCSI_REQ_Q **adv_scsiqpp)
>  {
> +       u32 srb_tag = scp->request->tag;
> ...
> +       scsiqp->srb_tag = srb_tag;
> 
> If we're not converting it to le32 on the way in, we probably don't want
> to convert it back on the way out.

Yeah right, didn't check the submission path. It was just the removed
srb_tag = le32_to_cpu(scsiqp->srb_tag);
that triggered here.

> Please don't make me power up my PA-RISC machine with an Advansys card
> in it, just to find out ...

Now that your saying it...

-- 
Johannes Thumshirn                                        SUSE Labs
jthumshirn@...e.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ