From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (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 7EF6E16BE03 for ; Wed, 21 Aug 2024 05:42:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724218964; cv=none; b=j/7o9GMIi6FEyH+mdI86K1wdkcgy0Km4poGx13QbUJzOaOTS2knoHEgPmLzlAr6NcJCRQL/RvIhhfU6W9JiFKcWyfaiPHcvRgQqqMo9ijiL150s1eDbRj+itzRY79DfqffESzIdxhUsLpSlbRsCvCVd/90r7x033aeoZioIrqCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724218964; c=relaxed/simple; bh=24nKDa2HoDT3211Np8XRUv0LTMaNqoDReSyYeOmRIkI=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:In-Reply-To: Content-Type:References; b=sRTyMSA1ZMPsVGBHPBYx3GXAHWIYBA0XJjTId8X3aBrjSsdCl6f1BORNtLCBUV2ygTZOSARKv2BouJv1TffnTpmcze9ZIyWWb6os8KToATgxXlO/gbY03hjMPRIrGrIYWRbsn9iys9KMYHcL6F/OgIRxxCi7hdBH8ORAL48+KaE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=BVx0UbgQ; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="BVx0UbgQ" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20240821054233epoutp027cef3af9559178ce60e40eedd0620c6f~tqACso3DK0977809778epoutp02L for ; Wed, 21 Aug 2024 05:42:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20240821054233epoutp027cef3af9559178ce60e40eedd0620c6f~tqACso3DK0977809778epoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1724218953; bh=VHnNMvIcdgjE/R1tIeGb8sDSSqEjSXXpwIjbYZHbxFg=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=BVx0UbgQ6wHuCtz7rWWC5dWsHepcdQzCHJYeX6jt4JNgAxTD1uWnDfHIrMHwiNXV1 budcwwGhcP1bs+NoFP0FRF0iqbpAVDXUm07z45XbCop1kTZdv7ZHjDJY52d+hVnAze eUypUo2Kr644jpTBFvmvxISXCeLhh0iUADXeu/wI= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20240821054232epcas5p28262726dde43d01dcc22944e9a68b69d~tqACBMZ4d2238122381epcas5p2z; Wed, 21 Aug 2024 05:42:32 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.181]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4WpZwl04Thz4x9Py; Wed, 21 Aug 2024 05:42:31 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id DC.B4.19863.64E75C66; Wed, 21 Aug 2024 14:42:30 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20240821052925epcas5p28f55bc6fed2ce4689c4d52f45601ab7f~tp0k4tO7a2051120511epcas5p2I; Wed, 21 Aug 2024 05:29:25 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240821052925epsmtrp1c967157b9a26a352b2e18ae79284a4b3~tp0k1TkSq0077500775epsmtrp1k; Wed, 21 Aug 2024 05:29:25 +0000 (GMT) X-AuditID: b6c32a50-ef5fe70000004d97-9e-66c57e46299e Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id EA.74.07567.43B75C66; Wed, 21 Aug 2024 14:29:25 +0900 (KST) Received: from [107.122.5.126] (unknown [107.122.5.126]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240821052922epsmtip1298c35023b69cce3f07e3caf14c16159~tp0ivpEOt2498524985epsmtip1X; Wed, 21 Aug 2024 05:29:22 +0000 (GMT) Message-ID: <4a0ada8a-5247-4c1c-b938-a6ae034b04d9@samsung.com> Date: Wed, 21 Aug 2024 10:59:21 +0530 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] usb: dwc3: core: Prevent USB core invalid event buffer address access From: Selvarasu Ganesan To: Greg KH Cc: Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, jh0801.jung@samsung.com, dh10.jung@samsung.com, naushad@samsung.com, akash.m5@samsung.com, rc93.raju@samsung.com, taehyun.cho@samsung.com, hongpooh.kim@samsung.com, eomji.oh@samsung.com, shijie.cai@samsung.com, stable@vger.kernel.org Content-Language: en-US In-Reply-To: Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJJsWRmVeSWpSXmKPExsWy7bCmpq5b3dE0g8lzLC3eXF3FanFnwTQm i1PLFzJZNC9ez2Yxac9WFou7D3+wWFzeNYfNYtGyV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ngP 6fh4rzrTSsYjYfI8WVOTpkp3NCxlc7hza8rRwK0bOM2ZTMR0db0PKbEUZyQaajEXFScCAAhL WlsmAwAA X-CMS-MailID: 20240821052925epcas5p28f55bc6fed2ce4689c4d52f45601ab7f X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240815064918epcas5p1248e4f9084d33fdb11a25fa34e66cdbe References: <20240815064836.1491-1-selvarasu.g@samsung.com> <2024081618-singing-marlin-2b05@gregkh> <4f286780-89a2-496d-9007-d35559f26a21@samsung.com> <2024081700-skittle-lethargy-9567@gregkh> On 8/17/2024 7:13 PM, Selvarasu Ganesan wrote: > On 8/17/2024 10:47 AM, Greg KH wrote: >> On Fri, Aug 16, 2024 at 09:13:09PM +0530, Selvarasu Ganesan wrote: >>> On 8/16/2024 3:25 PM, Greg KH wrote: >>>> On Thu, Aug 15, 2024 at 12:18:31PM +0530, Selvarasu Ganesan wrote: >>>>> This commit addresses an issue where the USB core could access an >>>>> invalid event buffer address during runtime suspend, potentially causing >>>>> SMMU faults and other memory issues in Exynos platforms. The problem >>>>> arises from the following sequence. >>>>> 1. In dwc3_gadget_suspend, there is a chance of a timeout when >>>>> moving the USB core to the halt state after clearing the >>>>> run/stop bit by software. >>>>> 2. In dwc3_core_exit, the event buffer is cleared regardless of >>>>> the USB core's status, which may lead to an SMMU faults and >>>>> other memory issues. if the USB core tries to access the event >>>>> buffer address. >>>>> >>>>> To prevent this hardware quirk on Exynos platforms, this commit ensures >>>>> that the event buffer address is not cleared by software when the USB >>>>> core is active during runtime suspend by checking its status before >>>>> clearing the buffer address. >>>>> >>>>> Cc: stable@vger.kernel.org # v6.1+ >>>> Any hint as to what commit id this fixes? >>>> >>>> thanks, >>>> >>>> greg k-h >>> Hi Greg, >>> >>> This issue is not related to any particular commit. The given fix is >>> address a hardware quirk on the Exynos platform. And we require it to be >>> backported on stable kernel 6.1 and above all stable kernel. >> If it's a hardware quirk issue, why are you restricting it to a specific >> kernel release and not a specific kernel commit? Why not 5.15? 5.4? > Hi Greg, > > I mentioned a specific kernel because our platform is set to be tested > and functioning with kernels 6.1 and above, and the issue was reported > with these kernel versions. However, we would be fine if all stable > kernels, such as 5.4 and 5.15, were backported. In this case, if you > need a new patch version to update the Cc tag for all stable kernels, > please suggest the Cc tag to avoid confusion in next version. > > Thanks, > Selva Hi Greg, Would you like to provide any feedback or suggestions regarding the my last comments mentioned above? Thanks, Selva >> thanks, >> >> greg k-h >> >> >