Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH v4 0/4] ata: libata-scsi: fix ATA PASS-THROUGH(32) handling
@ 2026-11-13 17:47 shao.mingyin
  2026-11-13 17:48 ` [PATCH v4 1/4] ata: libata-scsi: reject reserved bits in 32-byte passthru shao.mingyin
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: shao.mingyin @ 2026-11-13 17:47 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 checks the reserved bits in byte 10, 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 field pointers, including READ/WRITE LONG count errors.
The four patches can be applied independently.

Changes in v4:
- Patch 1: follow Niklas's correction to validate byte 10 bits 7:5
  with fp=10, leave CONTROL out of the count checks, and retain
  READ/WRITE MULTIPLE support. Correct the comment and description.
  Split the warning after dev, per Damien's nit. Extend the function
  tests to cross CONTROL values and byte-10 reserved bits.
- Patches 2-4: code and commit messages unchanged; retain Damien's
  Reviewed-by tags. Patch 1 needs review again after its behavior change.
Previous version: https://lore.kernel.org/all/20261112220113627e1oAXj5lbAzyI0Xe6Joud@zte.com.cn/

Codex assisted with the review changes, descriptions and validation
scripts. The updated code was function-tested and build-tested.

Shao Mingyin (4):
  ata: libata-scsi: reject reserved bits in 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 | 70 +++++++++++++++++++++++++++++++++--------------
 1 file changed, 50 insertions(+), 20 deletions(-)

---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b

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

end of thread, other threads:[~2026-11-15  2:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 17:47 [PATCH v4 0/4] ata: libata-scsi: fix ATA PASS-THROUGH(32) handling shao.mingyin
2026-11-13 17:48 ` [PATCH v4 1/4] ata: libata-scsi: reject reserved bits in 32-byte passthru shao.mingyin
2026-11-15  2:01   ` Damien Le Moal
2026-11-13 17:48 ` [PATCH v4 2/4] ata: libata-scsi: reject unsupported ATA-32 service actions shao.mingyin
2026-11-13 17:48 ` [PATCH v4 3/4] ata: libata-scsi: generate SAT sense data for ATA PASS-THROUGH(32) shao.mingyin
2026-11-13 17:48 ` [PATCH v4 4/4] ata: libata-scsi: fix remaining passthru field pointers shao.mingyin

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