Jonathan Wakely [Thu, 18 Feb 2021 17:14:02 +0000 (17:14 +0000)]
Fix buffer overflow in GTerm::update_changes()
Increase the buffer size by one byte to fix an AddressSanitizer error as
shown below. It's possible that the bug is in the values passed to
wxTerm::DrawText, but simply increasing the buffer size avoids the
error.
==94572==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62a000053020 at pc 0x00000048bd3c bp 0x7ffdf5219130 sp 0x7ffdf5219128
READ of size 1 at 0x62a000053020 thread T0
#0 0x48bd3b in wxTerm::DrawText(int, int, int, int, int, int, unsigned char*) TerminalWx/src/taTelnet/wxterm.cpp:1250
#1 0x497ee3 in GTerm::update_changes() TerminalWx/src/GTerm/utils.cpp:75
#2 0x48e4e5 in wxTerm::ProcessInput(int, unsigned char*) TerminalWx/src/taTelnet/wxterm.cpp:1754
#3 0x47f31b in TerminalWx::DisplayCharsUnsafe(wxString const&) TerminalWx/src/terminalwx.cpp:62
#4 0x49c60e in redirectDfuOutput /home/builder/SCSI2SD-V6/src/scsi2sd-util6/scsi2sd-util.cc:717
#5 0x4a4131 in OnID_Timer /home/builder/SCSI2SD-V6/src/scsi2sd-util6/scsi2sd-util.cc:784
#6 0x7f0d2063a26d in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (/lib64/libwx_baseu-3.0.so.0+0x17726d)
#7 0x7f0d2063c212 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (/lib64/libwx_baseu-3.0.so.0+0x179212)
#8 0x7f0d2063c4eb in wxEvtHandler::TryHereOnly(wxEvent&) (/lib64/libwx_baseu-3.0.so.0+0x1794eb)
#9 0x7f0d2063c57a in wxEvtHandler::ProcessEventLocally(wxEvent&) (/lib64/libwx_baseu-3.0.so.0+0x17957a)
#10 0x7f0d2063c660 in wxEvtHandler::ProcessEvent(wxEvent&) (/lib64/libwx_baseu-3.0.so.0+0x179660)
#11 0x7f0d2063a476 in wxEvtHandler::SafelyProcessEvent(wxEvent&) (/lib64/libwx_baseu-3.0.so.0+0x177476)
#12 0x7f0d205dd9af in wxTimerImpl::SendEvent() (/lib64/libwx_baseu-3.0.so.0+0x11a9af)
#13 0x7f0d209cfe91 (/lib64/libwx_gtk3u_core-3.0.so.0+0x291e91)
#14 0x7f0d1f44566c (/lib64/libglib-2.0.so.0+0x5266c)
#15 0x7f0d1f444ff6 in g_main_context_dispatch (/lib64/libglib-2.0.so.0+0x51ff6)
#16 0x7f0d1f495b87 (/lib64/libglib-2.0.so.0+0xa2b87)
#17 0x7f0d1f4446ca in g_main_loop_run (/lib64/libglib-2.0.so.0+0x516ca)
#18 0x7f0d1f98620c in gtk_main (/lib64/libgtk-3.so.0+0x24420c)
#19 0x7f0d209c4834 in wxGUIEventLoop::DoRun() (/lib64/libwx_gtk3u_core-3.0.so.0+0x286834)
#20 0x7f0d2056c1bc in wxEventLoopBase::Run() (/lib64/libwx_baseu-3.0.so.0+0xa91bc)
#21 0x7f0d20549d79 in wxAppConsoleBase::MainLoop() (/lib64/libwx_baseu-3.0.so.0+0x86d79)
#22 0x7f0d205a447b in wxEntry(int&, wchar_t**) (/lib64/libwx_baseu-3.0.so.0+0xe147b)
#23 0x4252d6 in main /home/builder/SCSI2SD-V6/src/scsi2sd-util6/scsi2sd-util.cc:1123
#24 0x7f0d1ff1a1e1 in __libc_start_main (/lib64/libc.so.6+0x281e1)
#25 0x42610d in _start (/home/builder/SCSI2SD-V6/src/scsi2sd-util6/build/linux/scsi2sd-util6+0x42610d)
0x62a000053020 is located 0 bytes to the right of 20000-byte region [0x62a00004e200,0x62a000053020)
allocated by thread T0 here:
#0 0x7f0d21183d17 in operator new[](unsigned long) (/lib64/libasan.so.6+0xacd17)
#1 0x49169f in GTerm::GTerm(int, int) TerminalWx/src/GTerm/gterm.cpp:86
Jonathan Wakely [Thu, 18 Feb 2021 17:24:05 +0000 (17:24 +0000)]
Fix warning about redefinition of _GNU_SOURCE
G++ implicitly defines _GNU_SOURCE=1 so define it consistently to avoid
a warning about redefinition.
Michael McMaster [Sat, 24 Apr 2021 11:07:28 +0000 (21:07 +1000)]
Cleanup cubemx files
Michael McMaster [Fri, 23 Apr 2021 14:13:57 +0000 (00:13 +1000)]
Fix SD card corruption due to not waiting for SD to leave the programming state
Michael McMaster [Fri, 23 Apr 2021 11:39:48 +0000 (21:39 +1000)]
Fix up SCSI timing and data corruption on 2021 boards
Michael McMaster [Tue, 20 Apr 2021 12:45:05 +0000 (22:45 +1000)]
Fix implementation of USB MSC READ FORMAT CAPACITIES command to handle no SD card inserted under windows
Michael McMaster [Wed, 14 Apr 2021 00:39:17 +0000 (10:39 +1000)]
Provide better USB Mass Storage experience with no SD card inserted.
Michael McMaster [Fri, 9 Apr 2021 11:06:30 +0000 (21:06 +1000)]
Update scsi2sd-util6 to identify the 2021 board
Michael McMaster [Fri, 9 Apr 2021 10:24:48 +0000 (20:24 +1000)]
Update USB Product strings based on board version
Michael McMaster [Sun, 21 Mar 2021 23:35:46 +0000 (09:35 +1000)]
Version bump to 6.4.0, 2021 initial build
Michael McMaster [Tue, 9 Mar 2021 11:58:04 +0000 (21:58 +1000)]
Don't check if the SD card is removed while in the middle of USB reads/writes
Michael McMaster [Tue, 9 Mar 2021 11:39:06 +0000 (21:39 +1000)]
Adding CRC routines (to be used later to detect config corruption)
Michael McMaster [Tue, 9 Mar 2021 01:39:23 +0000 (11:39 +1000)]
Improved reliability of USB config interface (port from V5 branch)
Michael McMaster [Mon, 8 Mar 2021 03:25:40 +0000 (13:25 +1000)]
STM32Cubemx patches for rev f firmware
Michael McMaster [Mon, 8 Mar 2021 03:11:20 +0000 (13:11 +1000)]
More work to merge revF and 2020/2021 branches
Michael McMaster [Mon, 8 Mar 2021 00:35:13 +0000 (10:35 +1000)]
Merge branch '2020a'
Michael McMaster [Sun, 7 Mar 2021 23:36:13 +0000 (09:36 +1000)]
Migrate to STM32Cubemx v1.8
Michael McMaster [Tue, 2 Mar 2021 12:18:02 +0000 (22:18 +1000)]
Halve FMC timings for clk/2 MCO1 freq
Michael McMaster [Tue, 2 Mar 2021 12:13:15 +0000 (22:13 +1000)]
V2021 board is now working
Michael McMaster [Tue, 23 Feb 2021 10:36:56 +0000 (20:36 +1000)]
Reapply STMCubeMX patches and FIX USB sense codes and workaround for USB<->SDIO dma consistency problem
Michael McMaster [Mon, 22 Feb 2021 22:56:01 +0000 (08:56 +1000)]
Reduce IRQ priority of the SDIO device to speed up USB HS interrupt
handling
Michael McMaster [Mon, 22 Feb 2021 10:35:26 +0000 (20:35 +1000)]
Merge branch 'master' into 2020a
Michael McMaster [Mon, 22 Feb 2021 10:31:25 +0000 (20:31 +1000)]
Use configured serial number in inquiry responses
Michael McMaster [Tue, 16 Feb 2021 13:26:27 +0000 (23:26 +1000)]
Timer fixes
Michael McMaster [Mon, 15 Feb 2021 22:11:10 +0000 (08:11 +1000)]
Fix USB endpoint Fifo sizes
Michael McMaster [Mon, 15 Feb 2021 11:45:26 +0000 (21:45 +1000)]
More USB fixes
Michael McMaster [Mon, 15 Feb 2021 09:48:35 +0000 (19:48 +1000)]
Apple STMCUBEMX patches
Michael McMaster [Mon, 15 Feb 2021 01:43:56 +0000 (11:43 +1000)]
2021 cubemx: reducing GPIO speeds where possible.
Michael McMaster [Mon, 15 Feb 2021 01:30:01 +0000 (11:30 +1000)]
More fixes, SD over USB HS still not working
Michael McMaster [Sat, 13 Feb 2021 11:08:36 +0000 (21:08 +1000)]
Fix DMA IRQ priorty to be less than the SDIO IRQ
Michael McMaster [Tue, 9 Feb 2021 12:33:12 +0000 (22:33 +1000)]
2021 USB HS interface now working, but SD card initialisation is broken
Michael McMaster [Sat, 6 Feb 2021 10:19:59 +0000 (20:19 +1000)]
Fixes for 2021 board
Michael McMaster [Sat, 6 Feb 2021 07:58:56 +0000 (17:58 +1000)]
STMCUBEMX to 1.8 update
Michael McMaster [Tue, 2 Feb 2021 12:41:19 +0000 (22:41 +1000)]
Init the FS USB device in STM32CUBEMX generated code
Michael McMaster [Mon, 1 Feb 2021 12:09:35 +0000 (22:09 +1000)]
Attempt to complete 2021 and 2020c on the same branch
Michael McMaster [Tue, 27 Oct 2020 10:56:27 +0000 (20:56 +1000)]
Initial support for cross-compiling scsi2sd-util6 with osxcross on Linux
Michael McMaster [Tue, 27 Oct 2020 10:56:27 +0000 (20:56 +1000)]
Initial support for cross-compiling scsi2sd-util6 with osxcross on Linux
Michael McMaster [Sat, 24 Oct 2020 10:34:09 +0000 (20:34 +1000)]
Fix issue setting new Blind Writes config option
Michael McMaster [Sat, 24 Oct 2020 10:34:09 +0000 (20:34 +1000)]
Fix issue setting new Blind Writes config option
Michael McMaster [Mon, 12 Oct 2020 10:30:30 +0000 (20:30 +1000)]
Add new "blind write" option to increase write command performance. This causes issues with some SCSI hosts and is now disabled by default.
Michael McMaster [Mon, 12 Oct 2020 10:30:30 +0000 (20:30 +1000)]
Add new "blind write" option to increase write command performance. This causes issues with some SCSI hosts and is now disabled by default.
Michael McMaster [Tue, 1 Sep 2020 13:03:55 +0000 (23:03 +1000)]
Increase limit of READ/WRITE BUFFER command for improved compatibility SGI Iris hosts
Michael McMaster [Tue, 1 Sep 2020 13:03:55 +0000 (23:03 +1000)]
Increase limit of READ/WRITE BUFFER command for improved compatibility SGI Iris hosts
Michael McMaster [Sun, 19 Apr 2020 09:24:32 +0000 (19:24 +1000)]
Fix error in merging 2020 board files
Michael McMaster [Sun, 19 Apr 2020 09:14:29 +0000 (19:14 +1000)]
Include missing files
Michael McMaster [Sun, 19 Apr 2020 09:09:10 +0000 (19:09 +1000)]
Fix hardware version checks for V6 revF and older boards
Michael McMaster [Sun, 19 Apr 2020 04:36:08 +0000 (14:36 +1000)]
Add hardware version checks, and embed version marker in the one-time-programmable flash memory
Michael McMaster [Sun, 19 Apr 2020 04:36:08 +0000 (14:36 +1000)]
Add hardware version checks, and embed version marker in the one-time-programmable flash memory
Michael McMaster [Wed, 26 Feb 2020 20:23:29 +0000 (06:23 +1000)]
More updates for V6 2020c hardware
Michael McMaster [Wed, 19 Feb 2020 12:19:53 +0000 (22:19 +1000)]
Get SCSI interface working with 2020c hardware
Michael McMaster [Tue, 18 Feb 2020 09:36:29 +0000 (19:36 +1000)]
Changes to support V6 2020c hardware
Michael McMaster [Tue, 18 Feb 2020 09:35:41 +0000 (19:35 +1000)]
Merge remote-tracking branch 'origin/master' into 2020a
Michael McMaster [Sun, 16 Feb 2020 08:06:36 +0000 (18:06 +1000)]
Modify dfu-util to use the UsbDk driver via libusb.
Update libusb to 1.0.23 for dfu-util
Michael McMaster [Sat, 15 Feb 2020 05:04:51 +0000 (15:04 +1000)]
Fix regression preventing some machines from booting
Michael McMaster [Thu, 30 Jan 2020 09:17:49 +0000 (19:17 +1000)]
Fix for large writes and data corruption over 64k
Michael McMaster [Mon, 13 Jan 2020 08:55:05 +0000 (18:55 +1000)]
Merge master into 2020a
Michael McMaster [Mon, 13 Jan 2020 08:51:49 +0000 (18:51 +1000)]
In-progress 2020 update
Michael McMaster [Wed, 1 Jan 2020 08:59:42 +0000 (18:59 +1000)]
64K Data Corruption fix
Michael McMaster [Tue, 24 Dec 2019 06:13:47 +0000 (16:13 +1000)]
Improve sync transfer stability by measuring host speed before blind writes to SD card
Michael McMaster [Thu, 19 Dec 2019 08:57:47 +0000 (18:57 +1000)]
Fix invalid CDROM TOC responses (thanks Simon Gander)
Michael McMaster [Sun, 8 Dec 2019 11:02:22 +0000 (21:02 +1000)]
Update release version
Michael McMaster [Tue, 19 Nov 2019 06:13:46 +0000 (16:13 +1000)]
Fix for VMS 5.5-2 for incorrect Inquiry command allocation lengths
Michael McMaster [Tue, 19 Nov 2019 06:00:34 +0000 (16:00 +1000)]
Fix for VMS 5.5-2: Only send mode page 5 if configured as floppy.
Author: Landon Rodgers
Michael McMaster [Tue, 12 Nov 2019 10:40:01 +0000 (20:40 +1000)]
Fixing missing SPI
Michael McMaster [Tue, 12 Nov 2019 10:32:01 +0000 (20:32 +1000)]
STMCubeMX pinout changes
Michael McMaster [Mon, 4 Nov 2019 09:18:38 +0000 (19:18 +1000)]
Support READ DEFECT DATA command
Michael McMaster [Wed, 30 Oct 2019 10:36:49 +0000 (20:36 +1000)]
Fix incorrect reporting of failures from self-test function.
Michael McMaster [Mon, 21 Oct 2019 10:52:08 +0000 (20:52 +1000)]
Compiles
Michael McMaster [Mon, 21 Oct 2019 10:38:51 +0000 (20:38 +1000)]
STM32Cubemx update
Michael McMaster [Fri, 18 Oct 2019 09:41:23 +0000 (19:41 +1000)]
Header date change only
Michael McMaster [Fri, 18 Oct 2019 09:37:22 +0000 (19:37 +1000)]
Remove obsolete files
Michael McMaster [Mon, 5 Aug 2019 10:07:37 +0000 (20:07 +1000)]
Slight improvements to data throughput, which may assist SCSI hosts with short timeouts
Michael McMaster [Wed, 29 May 2019 12:10:55 +0000 (22:10 +1000)]
Prepare for release
Michael McMaster [Mon, 27 May 2019 10:00:59 +0000 (20:00 +1000)]
Fix SD card hotswap bug when the SCSI host is constantly polling
Michael McMaster [Wed, 22 May 2019 10:53:14 +0000 (20:53 +1000)]
Add scsi mode page 0 support (merge from v5)
Michael McMaster [Thu, 2 May 2019 09:54:15 +0000 (19:54 +1000)]
Fix timeout issue on entering data-in phase
Michael McMaster [Wed, 24 Apr 2019 11:53:16 +0000 (21:53 +1000)]
Improved async noise model that considers all 9 dbx signals.
Michael McMaster [Sat, 2 Mar 2019 05:39:51 +0000 (15:39 +1000)]
Add better floppy MODE page support
Michael McMaster [Sat, 2 Mar 2019 05:35:55 +0000 (15:35 +1000)]
Add support for XEBEC quirks config
Michael McMaster [Sat, 2 Mar 2019 05:32:33 +0000 (15:32 +1000)]
Port XEBEC controller support from v5 firmware
Michael McMaster [Sat, 2 Mar 2019 05:14:39 +0000 (15:14 +1000)]
Makefile updates for command-line test util
Michael McMaster [Sat, 2 Mar 2019 05:13:54 +0000 (15:13 +1000)]
Improve self-test function
Michael McMaster [Sat, 2 Mar 2019 05:11:50 +0000 (15:11 +1000)]
Add 10ms delay to seek command
Michael McMaster [Sat, 2 Mar 2019 05:09:04 +0000 (15:09 +1000)]
Add command-line test utility
Michael McMaster [Wed, 31 Oct 2018 13:10:48 +0000 (23:10 +1000)]
Cleanup
Michael McMaster [Thu, 11 Oct 2018 09:32:27 +0000 (19:32 +1000)]
Fix USB bug with > 4gb drives
Michael McMaster [Wed, 26 Sep 2018 10:43:33 +0000 (20:43 +1000)]
Prepare for release
Michael McMaster [Wed, 19 Sep 2018 11:31:30 +0000 (21:31 +1000)]
Improved scsi signal noise rejection, fixed write performance, fixed bug with multiple devices on the bus, and fixed bugs with non-512byte sectors.
Michael McMaster [Mon, 30 Apr 2018 11:54:02 +0000 (21:54 +1000)]
Fix bug in scsi self-test function
Michael McMaster [Wed, 31 Jan 2018 11:25:50 +0000 (21:25 +1000)]
Fix sync timings to split read and write period times
Michael McMaster [Tue, 28 Nov 2017 11:06:07 +0000 (21:06 +1000)]
6.1.2 patch release firmware
Michael McMaster [Tue, 28 Nov 2017 10:45:57 +0000 (20:45 +1000)]
Fix sync error after scsi reset
Michael McMaster [Thu, 21 Sep 2017 10:51:25 +0000 (20:51 +1000)]
Fix sync negotiation bug
Michael McMaster [Sat, 20 May 2017 03:39:22 +0000 (13:39 +1000)]
Save a cycle in fpga memory interface
Michael McMaster [Sun, 30 Apr 2017 12:12:38 +0000 (22:12 +1000)]
Add turbo sync mode
Michael McMaster [Sat, 29 Apr 2017 05:38:49 +0000 (15:38 +1000)]
Add "turbo" speed mode.
Michael McMaster [Sat, 29 Apr 2017 04:40:25 +0000 (14:40 +1000)]
Fix crash when SD card is smaller than starting sector of scsi disk
Michael McMaster [Mon, 24 Apr 2017 11:33:05 +0000 (21:33 +1000)]
Fix size inputs in scsi2sd-util
Michael McMaster [Wed, 29 Mar 2017 09:52:34 +0000 (19:52 +1000)]
Add missing files
Michael McMaster [Wed, 29 Mar 2017 09:51:47 +0000 (19:51 +1000)]
Lots of bug fixing, and 4.7 merges