Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yongjin Lee" <contact@marulee.dev>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usbip: stub: ignore peer NO_TRANSFER_DMA_MAP
Date: Sat, 05 Dec 2026 19:13:35 +0000	[thread overview]
Message-ID: <sashiko-outbox-251853@kernel.org> (raw)
In-Reply-To: <20261205185516.587-1-contact@marulee.dev>

> The stub driver allocates transfer buffers and relies on the USB core to
> map them for DMA. A peer can set USBIP_URB_NO_TRANSFER_DMA_MAP, which the
> stub translates to URB_NO_TRANSFER_DMA_MAP. This skips the mapping,
> leaving the HCD to use urb->transfer_dma even though the stub never sets
> it and the peer cannot supply a valid server-side DMA address.
> 
> Clear the wire flag before constructing URBs, and remove the URB flag
> from the allowed mask. The early clear also covers paths that return
> before masking_bogus_flags() applies its mask.
> 
> On a no-IOMMU QEMU xHCI guest, a peer-supplied flag caused the host
> controller to write device data outside the allocated transfer buffer.
> With this change, the same request returned the expected data, as did
> the normal control request. The same EP0 comparison passed on Linux
> 6.18.66 and on mainline revision
> 28a23309c8e40d651faf4cc3cc9b71458a11b987.
> 
> OpenAI Codex (GPT-6) assisted in tracing the flag and drafting the fix
> and changelog. The result was checked with source review and the QEMU
> before/after test described above.
> 
> Fixes: 4d7b5c7f8ad4 ("Staging: USB/IP: add host driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Yongjin Lee <contact@marulee.dev>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261205185516.587-1-contact@marulee.dev?part=1

      reply	other threads:[~2026-12-05 19:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 18:55 [PATCH] usbip: stub: ignore peer NO_TRANSFER_DMA_MAP Yongjin Lee
2026-12-05 19:13 ` sashiko-bot [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=sashiko-outbox-251853@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=contact@marulee.dev \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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