From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F28D357D1A for ; Wed, 12 Aug 2026 08:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786522763; cv=none; b=h7G3EOEPGlDdg5FLgZDkPawnZk/ZZK8f7LZhwgSrPRaM1h2ndci1XiF8ha4q7Ch7VgNcI5hCaxXYXB2CtlSovDtNiBBKUKFdcvaeD/InFI3UIaofKywtmq9Lpw7K4QcSeI11FbBH7nKwNYrl62bKVQtI6VDw5qpmcgLCk8GUebo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786522763; c=relaxed/simple; bh=D1X81vd2KLPz37oQ6q90rjiyhpDA8rh1gkcydw+HrrA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N/NVIxNFg66v7HwoglCKJcP2ewJPy1gbJ85J96FlpDvovdW0kj6N9DYg0yzHzXIcJzr/w94HmQGUHilhOuJE+tqetaFA++Zn+8ZqX0pHCAdbqJOe7tCa4hSsAxtPd4kPCs/Aeq5DfTtnWGDtX7d7VlXJrFgMTi80s5DZ5r4MzbM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=lAR3PsBj; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=OfNjgKZl; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="lAR3PsBj"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="OfNjgKZl" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67C62D8d4091020 for ; Wed, 12 Aug 2026 08:19:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=q3JIg+OngKY 7iCLbz15ubyF/RIEnjLmMqDycYXVYXlI=; b=lAR3PsBjZM8Ii97bIfKgU1eUj8b /OPoiTKw4qUgtAN8U4thXy5zal85/sDrAHTkPtZo480t+AFXwkKOJkaxPlisWQu6 EXpcGakmXasPJLqKQfkvpkW8aFWav7NS7QdPonb4dRug3lVxtIhKvv8MYSLRjMgv tJDOI/KdnQ6txFsTtdMdGLi8vNmE2rjzyZnzwz3EtR9MKXE1bJ6BAxGAAWi05wZE ILpekeCN+sevsNpMw4lvgudQthoGrQa0OvnEszW/HVo8kXM8PovPqZTYg/S1FBlC oZvastbWaNeTqxO09PDkII/dhJMVwAm3O/PVxhST8wKuUKJAPREZTBUSDPw== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g049bv87c-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 12 Aug 2026 08:19:21 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-51c07f25de2so6300521cf.3 for ; Wed, 12 Aug 2026 01:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786522760; x=1787127560; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=q3JIg+OngKY7iCLbz15ubyF/RIEnjLmMqDycYXVYXlI=; b=OfNjgKZlCd5e8SMO8Jat+oeH7ZpnJA1z1zeup1rhP9v0q26wBo6YHXGLvegJm/oWNR 1aXahjddJEd9enaft2gyTVJE06Z+6x/84zDUKpMzXTCctj8+hcC9GK2Iw2MhLDCaqWbI ruCroJeWRKGOiDZh6QcpkIgM4WEDIPGXkCo+/hL3wffvOfPg8VUnF/IEbW0MW2toIK09 Ya98+FvTZ1IPc1bljbnyg675bjJ14odb4gzehJB5cU2n/296aqcdI03ZW1pbhqmO0D88 keyF8FosO6etPDiaKzAf+gf5O7IsN8unWz4Z+BEUb93/rrUWoXqfMI+XBwJ1aJTue5aA 9N9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786522760; x=1787127560; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=q3JIg+OngKY7iCLbz15ubyF/RIEnjLmMqDycYXVYXlI=; b=PSxMyUL2T9PmU7PsQzlxzyzAYCTjrwWPvucTbrXHfd+UoRtTRbus8quk9ghylWxJHx QNZClf9GK0ekkHK+riw8G/BwTGOSNsEGKMkwNOlEfvM4KRjeB4cVfHXzHRU7Ikx2eg04 pG1whDvdWBhXJJnrr87J6z7JZKRFVpd7Xp9dh+/e4w0UhhoCjHuvEi3kAcNtEPW5trtz itPuIUsFdA5tuJQA4PoLl906L2WjPzu0QIlrRQUWQrV/ADkhexlm/O6arq1Fgffcygy9 V2PrSnAbEL8WTAGM/DcrK/FbyBUqV52FPx3MYTERqPaxmk2cgUa0V3f4rYYyrC9Zg21T h/cg== X-Forwarded-Encrypted: i=1; AHgh+Roq3/IBXQCsmdhhOecWU1lGKAtqpi9OXJdeKSnnH0UTYXHbKrQ6NNKnUDzFNue4DmG07LmTnwOKsA0c2LY=@vger.kernel.org X-Gm-Message-State: AOJu0YxfK/cAvftrv70rcBTO4q5uKv4ChoVHw6FbCJ4gD53j7XtkmN12 NdiEqu2dmYsJphtyA6egMobFjWxK2RBPr5Vs/3O6bv3y3+MD+caLnFBAfD9ZwPfHo35RJxRuPTy n6N4/xYkwSXltt16pIhgnTwYl+mgeY4JX1TdUIgnCrtQw8DmPpwyWfMekyo8mafJtcyw= X-Gm-Gg: AR+sD10F3BHbw0xd65SMTmHFXdjHGvda6JiEmBkvk5+iAcL4m5X2SXo8y1fFBAyIRC2 iW0yx8kZg4NV3xPYbdXA4tkcYOJrfKMNcv07SMkoayNGrdgAWzTZDSlDMjbB8iFLjzJ4P9F90Vb El1Np7HOkfzUY4krHbgCeoslEE0ah2eM5Q/R1sXtrQv3CKm+m+e+jYRwwTSa5IOj/NdCacJ/ryK EIWlTqwBdTYMxRJ0VyE5cLeVW6D1JyU/hNNGweaB/JjhBNrKsAyjxpqTtPuqK5bAUd5Dh6Z3qky iwlz6oFc3Qiz/wBSuFcULxGChrZG/P0PF8WSh3QnXqP11Df6OmKHpUDjuhvRX3nDcElWpbwCgM/ n+WofXyYLWUpqF5rbXKFr9wJHP4bspcw= X-Received: by 2002:a05:622a:6209:b0:52d:4ea9:b3d8 with SMTP id d75a77b69052e-52d646b8fccmr25388931cf.3.1786522760499; Wed, 12 Aug 2026 01:19:20 -0700 (PDT) X-Received: by 2002:a05:622a:6209:b0:52d:4ea9:b3d8 with SMTP id d75a77b69052e-52d646b8fccmr25388541cf.3.1786522760072; Wed, 12 Aug 2026 01:19:20 -0700 (PDT) Received: from QCOM-WFsSr66Fqw.qualcomm.com ([212.136.9.4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c20f059195asm63327366b.0.2026.08.12.01.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 01:19:19 -0700 (PDT) From: Igor Skalkin To: Greg Kroah-Hartman Cc: Alan Stern , Seungjin Bae , Kees Cook , Sebastian Andrzej Siewior , Sebastian Urban , Felipe Balbi , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Igor Skalkin Subject: [PATCH v2 0/2] usb: gadget: dummy_hcd: fixes found while testing virtio-usb Date: Wed, 12 Aug 2026 10:19:08 +0200 Message-ID: <20260812081910.6821-1-igor.skalkin@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260807075438.5566-1-igor.skalkin@oss.qualcomm.com> References: <20260807075438.5566-1-igor.skalkin@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: Xh4q_T9VzjDKrk8olcG0EB8V_TY4t8lI X-Authority-Analysis: v=2.4 cv=ENg2FVZC c=1 sm=1 tr=0 ts=6a7c2c89 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=dNlqnMcrdpbb+gQrTujlOQ==:17 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=iuzS63gaIvbllXXYX80A:9 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-ORIG-GUID: Xh4q_T9VzjDKrk8olcG0EB8V_TY4t8lI X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODEyMDA2NSBTYWx0ZWRfX2D6PS5FHeiTo qy+f6uGIad+T7B7PHppVxW0AnihzlRF3TY8XHOcnxRHli12jgPM5j67UhV0EVJEXCgMJKflBIjX IMrDE60VicfirZFm3R0AR/KuuzRvR5IwY+9r6/VcmehXRGuQXm32yOBwPqHxxgr5KQAXdvqDne2 Tcv0A/+WqyW/r9BHXCf0r1GC5iyhOdUzGQi3aoa1QmYgIgHzjh5wZqBT3cS1GN+xwtWXMch5LwM tHpBXiCWDdiM32ic/qw41uKp5rizYCqmdMtzYEQvQmCh/+Gq9+jXGI1AEFgB8Ohfiq/GZC2QJYB tfmFq2wCdbRDondlPaj/kEz67LMixl0gbl00/3TYQHo6zra9ARlDUqMuScNKUcNDUxr5yTpdblk hjJ90wpDYcO5HH/wnvGY3pqgUMy3Jjt3EXJt8yUZ5z28t5lDtTKboCvwsia3RywX7YO8tmda5ji VeKBRbVNuiAkWo31b/Q== X-Proofpoint-Spam-Info: AW1haW4tMjYwODEyMDA2NSBTYWx0ZWRfX3T4lEV6azrPD /4cVRI4rEvpCyqaY6VxQAzGh2FzhgfHtj7v2F+Q/uLpG0cI65X1e2QXt7VGS8LCLO85JDkUI/P2 4Urv1L1VOvsI/I3ihh3wkFEcxQHp1bk= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-12_02,2026-08-10_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 impostorscore=0 bulkscore=0 clxscore=1015 spamscore=0 adultscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608120065 This is v2 of the dummy_hcd fixes found while testing our upcoming virtio-usb transport driver (patches for that will follow separately). Changes since v1: - Patch 1 (ep0 maxpacket) is unchanged; carrying forward Alan Stern's Acked-by. - Patch 2 (false overflow on bounded IN) is dropped. Alan Stern pointed out the fix was wrong: an IN short packet where the device has more data queued than the host's buffer can hold is a genuine overflow, not a normal bounded completion. Agreed, and there's no replacement fix queued for this report. - Patch 3 (SG transfer handling across chunks) is dropped from this version. Alan Stern confirmed the underlying issue and suggested a simpler fix (resync the sg_miter with sg_miter_skip() after each consumed chunk instead of restarting and re-walking from urb->actual_length on every call). The original failure was reliably reproducible against an earlier, debug-instrumented version of our (not yet posted) virtio-usb transport driver, but is not currently reproducing against the current version of that driver, which makes it hard to verify a replacement fix with any confidence. I'd rather confirm a fix against a real reproduction before resending than resend an unverified change, so this patch is held back for now and will follow separately once reproduced again. - Patch 4 (no_sg_constraint) is reworked per Alan Stern's review: instead of unconditionally relaxing the SG alignment constraint, it is now only relaxed on the SuperSpeed bus, preserving the EHCI-style alignment emulation on the HighSpeed bus. Igor Skalkin (2): usb: gadget: dummy_hcd: fix SuperSpeed ep0 maxpacket usb: gadget: dummy_hcd: set no_sg_constraint only on the SuperSpeed bus drivers/usb/gadget/udc/dummy_hcd.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- 2.49.0