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]
Message-ID: <c9106b58-677b-31e3-5c4e-5cbef5b1fe63@interlog.com>
Date:   Sun, 13 Nov 2022 21:54:18 -0500
From:   Douglas Gilbert <dgilbert@...erlog.com>
To:     Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
        Wenchao Hao <haowenchao@...wei.com>,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 0/5] scsi:scsi_debug:Add error injection for single
 lun

On 2022-11-13 19:30, Damien Le Moal wrote:
> On 11/14/22 06:48, Douglas Gilbert wrote:
>> On 2022-11-09 10:59, Wenchao Hao wrote:
>>> The original error injection mechanism was based on scsi_host which
>>> could not inject fault for a single SCSI device.
>>>
>>> This patchset provides the ability to inject errors for a single
>>> SCSI device. Now we supports inject timeout errors, queuecommand
>>> errors, and hostbyte, driverbyte, statusbyte, and sense data for
>>> specific SCSI Command
>>>
>>> The first patch add an sysfs interface to add and inquiry single
>>> device's error injection info; the second patch defined how to remove
>>> an injection which has been added. The following 3 patches use the
>>> injection info and generate the related error type.
>>>
>>> Wenchao Hao (5):
>>>     scsi:scsi_debug: Add sysfs interface to manager single devices' error inject
>>>     scsi:scsi_debug: Add interface to remove injection which has been added
>>>     scsi:scsi_debug: make command timeout if timeout error is injected
>>>     scsi:scsi_debug: Return failed value for specific command's queuecommand
>>>     scsi:scsi_debug: fail specific scsi command with result and sense data
>>>
>>>    drivers/scsi/scsi_debug.c | 295 ++++++++++++++++++++++++++++++++++++++
>>>    1 file changed, 295 insertions(+)
>>
>> Hi,
>> This patchset seems to assume all scsi_debug devices will be disk (-like) SCSI
>> devices. That leaves out other device types: tapes, enclosures, WLUNs, etc.
>>
>> Have you considered putting these device specific additions under:
>>      /sys/class/scsi_device/<hctl>/device/error_inject/
>> instead of
>>      /sys/block/sdb/device/error_inject/
> 
> But these are the same, no ?
> At least on my Fedora box, I see:
> 
> /sys/block/sdp/device/ being
> /sys/devices/pseudo_0/adapter0/host19/target19:0:0/19:0:0:0
> 
> and /sys/class/scsi_device/19:0:0:0/device being
> /sys/devices/pseudo_0/adapter0/host19/target19:0:0/19:0:0:0

Well the patch descriptions are all in terms of /sys/block/sd<letter>/
which will not exist if scsi_debug is called like this:
   $ modprobe scsi_debug ptype=1

That creates a pseudo host with an attached (virtual) tape drive. If
the patchset works for other peripheral device types (i.e. that don't
use the sd driver) then the description should at least mention the
more general case (i.e. /sys/class/scsi_device/<hctl>/device ) IMO.

Doug Gilbert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ