From: sashiko-bot@kernel.org
To: "Tal Zussman" <tz2294@columbia.edu>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] scsi: scsi_debug: handle protection information for WRITE ATOMIC(16)
Date: Tue, 10 Nov 2026 18:40:06 +0000 [thread overview]
Message-ID: <sashiko-outbox-207594@kernel.org> (raw)
In-Reply-To: <20261110-scsi-debug-pi-v1-1-539829902b3a@columbia.edu>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] scsi: scsi_debug: incorrect CDB byte offset in
resp_atomic_write() [1]
--
commit 48252d9d72a1d4d7e89b4f529cfc1af6aee082f9
Author: Tal Zussman <tz2294@columbia.edu>
scsi: scsi_debug: handle protection information for WRITE ATOMIC(16)
This commit routes resp_atomic_write() through __resp_write_dt0() so that
protection information is verified and stored for WRITE ATOMIC(16)
commands.
> diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
> index a922c8318a2fb..7d50650396377 100644
> --- a/drivers/scsi/scsi_debug.c
> +++ b/drivers/scsi/scsi_debug.c
[ ... ]
> @@ -6328,6 +6329,7 @@ static int resp_atomic_write(struct scsi_cmnd *scp,
> u16 boundary, len;
> u64 lba, lba_tmp;
> bool lbp = scsi_debug_lbp();
> + int scsi_status = DID_ERROR << 16;
> int ret;
>
> if (!scsi_debug_atomic_write()) {
[Severity: Medium]
This problem wasn't introduced by this patch, but does resp_atomic_write()
report the wrong CDB byte offset [1] when boundary exceeds
sdebug_atomic_wr_max_bndry?
drivers/scsi/scsi_debug.c:resp_atomic_write() {
...
boundary = get_unaligned_be16(cmd + 10);
len = get_unaligned_be16(cmd + 12);
...
if (boundary > 0) {
if (boundary > sdebug_atomic_wr_max_bndry) {
mk_sense_invalid_fld(scp, SDEB_IN_CDB, 12, -1);
return check_condition_result;
}
...
}
boundary is parsed from CDB byte 10, while byte 12 is the transfer length
field, so the sense data points the initiator at the transfer length
instead of the atomic boundary field.
[1] https://sashiko.dev/#/bug/linux-0276b62a-b78e-4b07-bc67-b1a9f88dc08e
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110-scsi-debug-pi-v1-0-539829902b3a@columbia.edu?part=1
next prev parent reply other threads:[~2026-11-10 18:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 18:28 [PATCH 0/2] scsi: scsi_debug: fix protection information for writes Tal Zussman
2026-11-10 18:28 ` [PATCH 1/2] scsi: scsi_debug: handle protection information for WRITE ATOMIC(16) Tal Zussman
2026-11-10 18:40 ` sashiko-bot [this message]
2026-11-10 18:28 ` [PATCH 2/2] scsi: scsi_debug: generate protection information for writes without it Tal Zussman
2026-11-10 18:41 ` sashiko-bot
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=sashiko-outbox-207594@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tz2294@columbia.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox