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: <20080309184524.GF2820@one-eyed-alien.net>
Date:	Sun, 9 Mar 2008 11:45:24 -0700
From:	Matthew Dharm <mdharm-kernel@...-eyed-alien.net>
To:	matthieu castet <castet.matthieu@...e.fr>
Cc:	linux-usb@...r.kernel.org,
	Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH]  mass storage : emulation of sat scsi_pass_thru with ATACB

On Sun, Mar 09, 2008 at 09:21:40AM +0100, matthieu castet wrote:
> Hum, may be to avoid confusion with a new protocol handler, I can add my 
> hook in usb_stor_control_thread with a new flag.
> 
> Something like :
> [...]
>  /* Handle those devices which need us to fake
>          * their inquiry data */
>         else if ((us->srb->cmnd[0] == INQUIRY) &&
>                 (us->flags & US_FL_FIX_INQUIRY)) {
> [...]
> 	else if (( (us->srb->cmnd[0] == ATA_12) || (us->srb->cmnd[0] == 
> 	ATA_16)) &&
>                 (us->flags & US_FL_CYPRESS_ATACB)) {
>         US_DEBUGP("emulating ATA pass thru\n");
> 		call to emulate_pass_thru_with_atacb code
>         }
> 
>         /* we've got a command, let's do it! */
>         else {
>             US_DEBUG(usb_stor_show_command(us->srb));
>             us->proto_handler(us->srb, us);
>         }
> 
> Does it sound better ?

Somewhat better.  I still like a separate protocol handler better.

I guess I see this as being more like the ISD200 case.  In that code, it
attempts to identify the device as ATA or ATAPI.  If it's ATAPI, it
switches back to the transparent scsi protocol handler.  Here, we're just
talking about doing it on a command-by-command basis, instead of a one-time
selection.  But there is no confusion that the ISD200 code handles all
commands; but it does implement a new 'protocol' (a way to transport
commands to/from the device), which is exactly what you're doing.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@...-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

I'm seen in many forms.  Now open your mouth.  It's caffeine time.
					-- Cola Man to Greg
User Friendly, 10/28/1998

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ