Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ata: libata-scsi: fix ATA PASS-THROUGH(32) handling
@ 2026-11-11 14:31 shao.mingyin
  2026-11-11 14:31 ` [PATCH v2 1/4] ata: libata-scsi: skip MULTIPLE_COUNT for 32-byte passthru shao.mingyin
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: shao.mingyin @ 2026-11-11 14:31 UTC (permalink / raw)
  To: dlemoal, cassel, linux-ide; +Cc: linux-kernel, stable

ATA PASS-THROUGH(32) still has translation and completion paths that
interpret fields as if the command used a 12- or 16-byte CDB.

Patch 1 skips the nonexistent MULTIPLE_COUNT field and corrects the
invalid-PROTOCOL field pointer. Patch 2 rejects unsupported service
actions with sense data. Patch 3 honors CK_COND and generates SAT sense
on completion. Patch 4 corrects the remaining invalid-field pointers,
including distinguishing READ/WRITE LONG protocol and count errors.
The four patches can be applied independently; the numbered order groups
the related translation fixes together.

Changes in v2, following Niklas Cassel's review:
- Do not interpret byte 10 bits 7:5 as MULTIPLE_COUNT. Skip the CDB
  count checks for the 32-byte form, keeping the device-mode check.
- Move the unrelated invalid-PROTOCOL hunk from patch 3 to patch 1.
- Keep patch 2's code unchanged and add patch 4 for the remaining
  PROTOCOL, FEATURES, COMMAND and sector-count field pointers.
- Generate all diffs and indexes from Git commits. Validate the exact
  resulting blobs and include observed field-pointer helper arguments
  from userspace function tests in the per-patch notes.
- Keep the Reviewed-by tags on patches 2 and 3: patch 2 is unchanged,
  and patch 3 only loses the hunk moved to patch 1. Patch 1 changes the
  MULTIPLE_COUNT handling itself, so its v1 tag does not apply.
Link to v1: https://lore.kernel.org/all/20261104220832716LXKf7OaS9dt1VJ8Q959AG@zte.com.cn/
Review: https://lore.kernel.org/all/avI7-lrzsRL_Gz75@ryzen/

Shao Mingyin (4):
  ata: libata-scsi: skip MULTIPLE_COUNT for 32-byte passthru
  ata: libata-scsi: reject unsupported ATA-32 service actions
  ata: libata-scsi: generate SAT sense data for ATA PASS-THROUGH(32)
  ata: libata-scsi: fix remaining passthru field pointers

 drivers/ata/libata-scsi.c | 64 ++++++++++++++++++++++++++++++++---------------
 1 file changed, 44 insertions(+), 20 deletions(-)

---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-12  4:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 14:31 [PATCH v2 0/4] ata: libata-scsi: fix ATA PASS-THROUGH(32) handling shao.mingyin
2026-11-11 14:31 ` [PATCH v2 1/4] ata: libata-scsi: skip MULTIPLE_COUNT for 32-byte passthru shao.mingyin
2026-11-11 23:28   ` Damien Le Moal
2026-11-12  4:12     ` shao.mingyin
2026-11-11 14:31 ` [PATCH v2 2/4] ata: libata-scsi: reject unsupported ATA-32 service actions shao.mingyin
2026-11-11 14:31 ` [PATCH v2 3/4] ata: libata-scsi: generate SAT sense data for ATA PASS-THROUGH(32) shao.mingyin
2026-11-11 14:31 ` [PATCH v2 4/4] ata: libata-scsi: fix remaining passthru field pointers shao.mingyin
2026-11-11 23:30   ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox