From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796498015; b=w6IbM7oSzXjuxAoy/G5/tRCJNR0JIpAwhvng6wIWF6lw1MJLh7lcubCv81yvfuVdWm2Q A/HZlJw1qvP5rGnlybB03WOnS7WIwe5zBIDodKyPdTwmKgkMj8v+IZ+bENoNA8XclDiH+ pEJLZzyNMA+K7l3fUV6DiFkHmfO/k9k/CTFgwCr9P13pvXJO42UniC0DwEo6tUsFKFYRp yxMGYPsctDm03EFsR/LO+DLH4D0F+XP66dxTei6aT/LPUvgPAkFBmTTlIKXzPiPNMoNKO mxItMhqyMGoeVkqxIk9TdufYRk68DWk7TmckZOp0apU3qCEfwRUoVUDJdC6bRx50LVQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796498015; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=m70GNhuHiq6wGeZ8aBTBkQ4wDUX6pZ/+YMpC2VE+liY=; b=L/+m7fJ/qu2PBFVKBVokgZ0LCRybbDo06apVNsO3AAa1CGLUWeqQiggGwvRw2jKXb5vN PBGFG/pegYVSzuzwWgiiepL8dxTsNXtz/nyQwxhUJAtWgnOBE7MMt5MuOJvmr8TYECl8a ZCfDlNk9attpZkkGjKmFuaul3hfejU8ye3Y8CYOOAsSt6jPeXEIZWpiQCtyTjPMVqLw1u PS0C2ojbLPVddb6GAznJE7BS+31GHBEvsK9h74aThCmf4exzgx5WL89DBKBpSQwbr9svh 5eWc2tgT+53T9WvUz7cIq6vAQcI3pK5DZnH6LztvAjuh7xuAaMF/xQSdrsJiyx4wv3Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NH9V1bgK; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5D1B606A31F for ; Sat, 5 Dec 2026 19:13:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NH9V1bgK Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FBAC1F0092B; Sat, 5 Dec 2026 19:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796498015; bh=m70GNhuHiq6wGeZ8aBTBkQ4wDUX6pZ/+YMpC2VE+liY=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=NH9V1bgK7gOEgaQwqZwUNQkNsxv6pvpJBhktJ6V+5KjWrhKWv2b+ks+qwP8y2zQd5 SOmAinwULO7210xa9lZL2I+wocO/5QEmCnE12WDt3kdM90Fzp5EohzX6wa7p1M/1Wj JXpGjz8kmGyFsKizaBluxZvoFJBCPD6v6sVS85gNJhjObfQAcxk1IyB9h2NfbiylhO eg7t+djm5yMn9gqqMd+XUesaPj7BunF5dRrlmBCBFzhZ0gD0NGFSRRyi98U3wqCN5E BjaYWWDjQF3s3rApTStGHXZFfka6eKZvyv3TPaly7cYIk07edtnH/rJ9llqvNYgeOI d6c8YJmeT8qdA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] usbip: stub: ignore peer NO_TRANSFER_DMA_MAP Reply-To: sashiko-reviews@lists.linux.dev To: "Yongjin Lee" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261205185516.587-1-contact@marulee.dev> References: <20261205185516.587-1-contact@marulee.dev> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 19:13:35 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > Fixes: 4d7b5c7f8ad4 ("Staging: USB/IP: add host driver") > Cc: stable@vger.kernel.org > Signed-off-by: Yongjin Lee Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205185516.587-= 1-contact@marulee.dev?part=3D1