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]
Message-ID: <ad4bd008-8d0d-439b-879c-e9cf4c89ec56@acm.org>
Date: Fri, 7 Feb 2025 09:51:05 -0800
From: Bart Van Assche <bvanassche@....org>
To: WangYuli <wangyuli@...ontech.com>, James.Bottomley@...senPartnership.com,
 martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
 stern@...land.harvard.edu, gregkh@...uxfoundation.org,
 zhanjun@...ontech.com, guanwentao@...ontech.com, chenlinxuan@...ontech.com,
 Xinwei Zhou <zhouxinwei@...ontech.com>, Xu Rao <raoxu@...ontech.com>,
 Yujing Ming <mingyujing@...ontech.com>
Subject: Re: [PATCH v2] scsi: Bypass certain SCSI commands on disks with
 "use_192_bytes_for_3f" attribute

On 2/7/25 1:17 AM, WangYuli wrote:
> +	/* Bofore we queue this comman, check attribute use_192_bytes_for_3f */

Please replace this source code comment with a comment that explains why 
the code below is necessary. The above comment duplicates the code below
rather than explaining something that cannot be derived from the code
easily. Additionally, there are spelling errors in the above comment.

> +	if (cmd->cmnd[0] == MODE_SENSE && sdev->use_192_bytes_for_3f == 1 &&

Please remove "== 1" because this part is redundant when using a single
bit in a boolean "and" expression.

> +		cmd->result = (DID_ABORT << 16);

Please remove the superfluous parentheses from the above statement.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ