Re: [hatari-devel] Wrong MODE SENSE data length for page code 0x3f

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Sat, 26 Oct 2024 19:33:18 +0200
schrieb Uwe Seimet <Uwe.Seimet@xxxxxxxxx>:

> Hi Eero and Andreas,
> 
> Just let me try to summarize what I would suggest to change in a first step:
> 
> 1. If you want to retain SCSI-1 compatibility, which is not the standard most
>    Atari software and hardware is using: For REQUEST SENSE nly return 4 bytes
>    if the allocation length is *exactly* 0, i.e. do not say "<= 4" but "== 0".
> 2. In any other case return as much sense data as you have, but never more
>    than the amount of bytes requested in the allocation length field.
> 3. For any other command there is no special rule for length 0.
> 
> If too many bytes are returned the initiator may crash because of a buffer
> overflow, or other strange things may happen.

Ok, thanks, I've changed the code now accordingly. I also added the
possibility to set the SCSI version for each device in the config file, in
case someone wants to experiment with different versions. The default is
still version 1, though, since that's the version that has been used so far.

 Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/