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: <0A01BD2F489C764A+647ab6a7-35e5-4aa4-b8d1-c177be1724c6@uniontech.com>
Date: Tue, 25 Feb 2025 21:11:54 +0800
From: WangYuli <wangyuli@...ontech.com>
To: Bart Van Assche <bvanassche@....org>,
 James.Bottomley@...senPartnership.com, martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
 stern@...land.harvard.edu, zhanjun@...ontech.com, niecheng1@...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: [RESEND PATCH v3] scsi: Bypass certain SCSI commands on disks
 with "use_192_bytes_for_3f" attribute

Hi Bart Van Assche,

On 2025/2/25 02:11, Bart Van Assche wrote:
> lshw is a user space utility. use_192_bytes_for_3f is not exposed to
> user space as far as I know. So how can the above statement be correct?
>
Disks have the attribute use_192_bytes_for_3f, which means that disks only accept MODE SENSE transfer lengths of 192 bytes

However, when lshw sends MODE SENSE command to disks, use_192_bytes_for_3f will not be considered, which will cause some disks with use_192_bytes_for_3f to be unusable

To solve this problem, it is necessary to determine whether the device has the use_192_bytes_for_3f attribute at the scsi level. If the device has use_192_bytes_for_3f, when lshw or other applications send MODE SENSE command through ioctl, the command with the data length field of 0xff needs to be filtered out to avoid device abnormality. 

>
> From include/scsi/scsi_device.h:
>
> unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */
>
> The above code uses use_192_bytes_for_3f for another purpose. Please 
> respect the purpose of the use_192_bytes_for_3f bitfield.
>
> Thanks,
>
> Bart.
>
>
Thanks,
-- 
WangYuli

Download attachment "OpenPGP_0xC5DA1F3046F40BEE.asc" of type "application/pgp-keys" (633 bytes)

Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ