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  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, 13 Jun 2018 13:11:19 +0000
From:   Bart Van Assche <Bart.VanAssche@....com>
To:     "hch@...radead.org" <hch@...radead.org>,
        "jthumshirn@...e.de" <jthumshirn@...e.de>
CC:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>
Subject: Re: [PATCH v2 3/3] scsi: don't add scsi command result bytes

On Wed, 2018-06-13 at 04:59 -0700, Christoph Hellwig wrote:
> On Wed, Jun 13, 2018 at 09:53:49AM +0200, Johannes Thumshirn wrote:
> > Some drivers are ADDing the scsi command's result bytes instead of
> > ORing them.
> > 
> > While this can produce correct results it has unexpected side effects.
> > 
> > Signed-off-by: Johannes Thumshirn <jthumshirn@...e.de>
> 
> Looks good,
> 
> Reviewed-by: Christoph Hellwig <hch@....de>
> 
> > -			cmd->result = (DID_OK << 16) + (l & STATUS_MASK);
> > +			cmd->result = DID_OK << 16 | (l & STATUS_MASK);
> 
> Although I would have keep the braces around the shift operators
> to stick closer to the original code.  But the code should be fine
> even without them.

I share Christoph's opinion: I prefer that the parentheses would be kept but
I'm also fine without. Hence:

Reviewed-by: Bart Van Assche <bart.vanassche@....com>



Powered by blists - more mailing lists