Re: [hatari-devel] SCSI Driver improvements patch

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


Hi Uwe,

On 4.12.2024 11.38, Uwe Seimet wrote:
The attached patch for the SCSI driver in particular improves the error
handling. It now takes some features of the SG driver into account that are
a bit tricky to map to the SCSI Driver interface.
I have tested this code with a USB floppy drive, and also tested similar
code used by a SCSI-to-USB bridge software for the Raspberry Pi.

@Thorsten Maybe you can update the Aranym sources?

@Eero I hope that this time the format of my patch submission is
acceptable ;-).

Yes, thank you!

I pushed it as-is (so that you can do pull without conflicts), but while reviewing the changes and earlier nf_scsidrv.c code, I noticed few security / reliability bugs, that you would need to fix with additional patch.

Namely:
* read_stack_pointer(): calls STMemory_STAddrToPointer(), but does not check that the addresses are valid, as it should: https://git.tuxfamily.org/hatari/hatari.git/tree/src/stMemory.c#n554 * scsidrv_interface_features(): does long/word writes to addresses taken for emulator stack, but does not check that (also) those addresses are within emulated memory * scsidrv_inout(): memcpy()s & writes to "sense_buffer" address taken from emulated stack, but does not check validity of that address area


The Hatari git is often very slow. "git pull" often takes several minutes
or just hangs.

It can hang if the tuxfamily.org is down, but that's been very rare, at last until recently. Otherwise git has been fairly responsive for me.


	- Eero




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