[PATCH 0/2] esp.c: fix esp_cdb_ready() FIFO wraparound limit calculation

Mark Cave-Ayland posted 2 patches 3 days, 2 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250925122846.527615-1-mark.cave-ayland@ilande.co.uk
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
hw/scsi/esp.c               |  6 ++++--
tests/qtest/am53c974-test.c | 40 +++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 2 deletions(-)
[PATCH 0/2] esp.c: fix esp_cdb_ready() FIFO wraparound limit calculation
Posted by Mark Cave-Ayland 3 days, 2 hours ago
This small series fixes a bug in the ESP cmdfifo FIFO wraparound limit
calculation as reported at https://gitlab.com/qemu-project/qemu/-/issues/3082, as
well as adding the reported test case to qtest.

In normal usage the cmdfifo does not overflow, however the test case reported by
the fuzzer was enough to show that the FIFO overflow check in esp_cdb_ready()
was not working correctly.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


Mark Cave-Ayland (2):
  esp.c: fix esp_cdb_ready() FIFO wraparound limit calculation
  qtest/am53c974-test: add additional test for cmdfifo overflow

 hw/scsi/esp.c               |  6 ++++--
 tests/qtest/am53c974-test.c | 40 +++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 2 deletions(-)

-- 
2.39.5