All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: Zhao Gongyi <zhaogongyi@bytedance.com>,
	linux-ide@vger.kernel.org, dlemoal@kernel.org
Subject: Re: [PATCH v2] ata: libata-scsi: reject data-in commands with a data-out buffer
Date: Wed, 28 Oct 2026 14:16:56 +0100	[thread overview]
Message-ID: <auH1yAtfRUmf3OJq@ryzen> (raw)
In-Reply-To: <sashiko-outbox-187849@kernel.org>

Hello Zhao,

When sending a V2 (or V3), please do not use In-Reply-To:
https://docs.kernel.org/process/submitting-patches.html#explicit-in-reply-to-headers

It creates an unmanageable forest of references in email clients.


On Wed, Oct 28, 2026 at 11:53:37AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [High] ata: libata-scsi: ata_scsi_translate() direction check misses atapi_xlat()

This looks like a valid comment, we probably need something like:

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3193,6 +3193,13 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
 
 	qc->complete_fn = atapi_qc_complete;
 
+	if (scmd->sc_data_direction == DMA_TO_DEVICE &&
+	    scmd->cmnd[0] == INQUIRY) {
+		ata_scsi_set_sense(dev, scmd, ILLEGAL_REQUEST,
+				   INVALID_FIELD_IN_CDB);
+		return 1;
+	}
+
 	qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
 	if (scmd->sc_data_direction == DMA_TO_DEVICE) {
 		qc->tf.flags |= ATA_TFLAG_WRITE;



> - [Medium] ata: libata-scsi: missing ascq argument in ata_scsi_set_sense() calls

This Sashiko comment is a false positive.

Because Sashiko first tries to apply a patch to libata/for-next before
mainline, Sashiko did not realize that ata_scsi_set_sense() has changed in
mainline by the recent SCSI pull request.

Since Linus has pulled the both the SCSI and the libata pull request, I
updated libata for-next to point to mainline, so Sashiko should not give
this false positive comment should not happen again.


Kind regards,
Niklas

  reply	other threads:[~2026-10-28 13:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27  9:08 [PATCH] ata: libata-scsi: reject to-device transfers for simulated commands Zhao Gongyi
2026-10-27 21:22 ` Niklas Cassel
2026-10-28 11:39 ` [PATCH v2] ata: libata-scsi: reject data-in commands with a data-out buffer Zhao Gongyi
2026-10-28 11:53   ` sashiko-bot
2026-10-28 13:16     ` Niklas Cassel [this message]
2026-10-28 13:59   ` Damien Le Moal
2026-10-29  4:37     ` Zhao Gongyi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=auH1yAtfRUmf3OJq@ryzen \
    --to=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zhaogongyi@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.