From: Niklas Cassel <cassel@kernel.org>
To: dlemoal@kernel.org, Zhao Gongyi <zhaogongyi@bytedance.com>
Cc: Niklas Cassel <cassel@kernel.org>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] ata: libata-scsi: reject data-in commands with a data-out buffer
Date: Sat, 7 Nov 2026 14:37:31 +0100 [thread overview]
Message-ID: <179405862389.952030.5756129776149980701.b4-ty@kernel.org> (raw)
In-Reply-To: <20261104130638.37882-1-zhaogongyi@bytedance.com>
On Wed, 04 Nov 2026 21:06:38 +0800, Zhao Gongyi wrote:
> SG_IO can submit a data-in SCSI command with DMA_TO_DEVICE. The
> scatterlist can then contain pages pinned without write access.
> ata_scsi_rbuf_fill() writes simulated replies to that scatterlist;
> in the reported case, the copy tried to write the shared zero page
> and faulted in the kernel.
>
> The same mismatch can affect SG_IO commands translated by libata.
> ZBC IN and GET PHYSICAL ELEMENT STATUS completion handlers can modify
> the receive buffer even if the drive aborts the command. For ATAPI,
> the successful INQUIRY completion also rewrites the buffer in
> atapi_fixup_inquiry().
>
> [...]
Applied to libata/linux.git (for-7.4-fixes), thanks!
[1/1] ata: libata-scsi: reject data-in commands with a data-out buffer
https://git.kernel.org/libata/linux/c/a4845f07
Kind regards,
Niklas
prev parent reply other threads:[~2026-11-07 13:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 13:06 Zhao Gongyi
2026-11-05 3:09 ` Damien Le Moal
2026-11-07 13:37 ` Niklas Cassel [this message]
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=179405862389.952030.5756129776149980701.b4-ty@kernel.org \
--to=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®