From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (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 89018F507 for ; Sat, 17 Aug 2024 13:49:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723902569; cv=none; b=aivHO2vh5YZ/ys/Bexi+h2Kt6GTmu1kL0WeVRs/gBse9YZEdY3Hn/viq9WCXMt6OJ82PFCQ3tw7pZNqPP2jMWKXwVUgQLT4yf9vvbC8x0/kElzstlztJM3utbFzTltLub1l02lyj7qkbzMUyH1OQWsrE1WT2IdrZSVsqjX0MK0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723902569; c=relaxed/simple; bh=Z37x7P3OUwQ57VOk02zwVc2udz2b1U+xIPjklLd4zCo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=rbu5xFKdmAp7O9/Am0fOqaBs8gIUnfxfEFi8wfHQP02zkrUh+lTsTJCO3BnCr/HWkVp109T3Xkx75YLDi0/RseDZZlcZ9SFwDCoYYKTxESjF0WOhuaRTGzXh1xF1GS8S2o0BfVeuc3yUmhYQiBqMit0Q503vxNXCEtI52xFryEY= 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=nUOdgm0k; arc=none smtp.client-ip=203.254.224.34 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="nUOdgm0k" Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20240817134919epoutp04d206dfdd8618b8018481546cbb990c91~siD56q6pR3036730367epoutp04O for ; Sat, 17 Aug 2024 13:49:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20240817134919epoutp04d206dfdd8618b8018481546cbb990c91~siD56q6pR3036730367epoutp04O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1723902559; bh=6OdAAhY1jmDD/qNc8iBhpCFMfmOZJ5vdix/d/18DDPQ=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=nUOdgm0ktl34B2s0pKxb3UkUK88B4KLP1hctKHgmNtvkc/V1CHVUJakkdkU+oiNwW ZhzWrCxOideaD9sI+xT3pO3FN91BhRWUqOLihsW1gznNBKxUxUlg/6/P5DkvFvc0gu vluUXMvs1QpeIqkl0iFqCCuaXWz/Bs8Ucx5UHySg= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20240817134918epcas5p4b81041e43428e2ab9c9ce40d2c919282~siD5lhkIw0893208932epcas5p4H; Sat, 17 Aug 2024 13:49:18 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.179]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4WmKwF2pmjz4x9Pp; Sat, 17 Aug 2024 13:49:17 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 87.D4.09743.D5AA0C66; Sat, 17 Aug 2024 22:49:17 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20240817134356epcas5p311b04d9ba86b537c871a55ae7f2e4261~sh-NkFcK82016620166epcas5p3p; Sat, 17 Aug 2024 13:43:56 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240817134356epsmtrp2ad3aba442d71ae211fca8898de870bbd~sh-NjSmU20363203632epsmtrp2C; Sat, 17 Aug 2024 13:43:56 +0000 (GMT) X-AuditID: b6c32a4a-14fff7000000260f-b2-66c0aa5d535c Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 56.6A.07567.C19A0C66; Sat, 17 Aug 2024 22:43:56 +0900 (KST) Received: from [107.122.5.126] (unknown [107.122.5.126]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240817134354epsmtip130a4c32a2f80ebb9ac325ba1b7b421d5~sh-LnkTaY0574705747epsmtip1P; Sat, 17 Aug 2024 13:43:54 +0000 (GMT) Message-ID: Date: Sat, 17 Aug 2024 19:13:53 +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 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 From: Selvarasu Ganesan In-Reply-To: <2024081700-skittle-lethargy-9567@gregkh> Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBJsWRmVeSWpSXmKPExsWy7bCmum7sqgNpBs0LhS3eXF3FanFnwTQm i1PLFzJZNC9ez2Yxac9WFou7D3+wWFzeNYfNYtGyVmaLT0f/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va+I qfl+fvlcdtZdEhufsk06f0vGkvfaCg0u2+YPF89b2v+U5Hp6PlRzQn+PEktxRqKhFnNRcSIA OkdZfCUDAAA= X-CMS-MailID: 20240817134356epcas5p311b04d9ba86b537c871a55ae7f2e4261 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 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 > > thanks, > > greg k-h > >