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 4E1803D96A for ; Wed, 28 Aug 2024 04:12:24 +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=1724818346; cv=none; b=qICi0LrTj7z26YLwKSgAnG0qSXS/4l0X4EiKW6tgdKOB4EA4SyI4+s1pOWy3nK61lik8wCvF6/fN3BwAm9qdjMQVrtZazeBBciq6hQpfnj4rsWuSCr8Lu8M4O4JO6fXGD0AokWGVrMzWlbbanQP7nSS3MevcqYjzsvaJsItMPMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724818346; c=relaxed/simple; bh=XTt1glJu0rUb8owyLnA57AYtub8xBCVVnILF+wSZyrU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=hhkumqjlrFMx8AoQhGS34Al35ynZPoOzBUgbs9raV6vMQz5d+6rXGPZBxeBvwu/LstXyNmUPtT5aMZppASkAl34DL8PWgHyIIA0+Iv0OHtT0wnaznFEwtfiqdYdo34o36EPtMC9FIaY8p+cqoPJ65PykuQ7GQtGWVBDdh5OjkOU= 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=FjXnBwht; 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="FjXnBwht" Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20240828041222epoutp021d818476a4d193ef86f7dbe146ab917a~vySTLxSyv0913109131epoutp02N for ; Wed, 28 Aug 2024 04:12:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20240828041222epoutp021d818476a4d193ef86f7dbe146ab917a~vySTLxSyv0913109131epoutp02N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1724818342; bh=xY/5bssFJz3c4MH21yr5Lg7t97Fz6p4kSqYdRPCosQw=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=FjXnBwhto2WPTiS849OiIrbg4gMm+x9EVOJZy0js0bKRhXnP6xmgHbMZl5h0+lyq8 LU1hSokl8UKYWskiXQXysLdcgHaOh88ebbEpVjUOmrrtHv4CBmLfBIla0j3zt+9h6U Fxt0D4dUdgWVTTIHlksVsQ4W2ZqbgaLQAi24hOrM= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20240828041221epcas5p25eab363bd19fbe63bb5ccfff560e2c82~vySSsN48v2954929549epcas5p22; Wed, 28 Aug 2024 04:12:21 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.181]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4WtrbR1tMPz4x9Pt; Wed, 28 Aug 2024 04:12:19 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 0F.05.09640.3A3AEC66; Wed, 28 Aug 2024 13:12:19 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20240828040823epcas5p47149c92b86596bd5f39a52cededabe29~vyO0saBr01187911879epcas5p4a; Wed, 28 Aug 2024 04:08:23 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240828040823epsmtrp12462cee2a5aaf9c562f3e23b21d0b366~vyO0rhHJb2266022660epsmtrp1m; Wed, 28 Aug 2024 04:08:23 +0000 (GMT) X-AuditID: b6c32a49-a57ff700000025a8-30-66cea3a3e29e Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 9A.79.08964.7B2AEC66; Wed, 28 Aug 2024 13:08:23 +0900 (KST) Received: from [107.122.5.126] (unknown [107.122.5.126]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240828040820epsmtip18742cfc0b437319cebc3c73ebe4cabb8~vyOyKE1c72270122701epsmtip1j; Wed, 28 Aug 2024 04:08:20 +0000 (GMT) Message-ID: <3beb7209-9ed4-4155-bea8-c31dc0d5f017@samsung.com> Date: Wed, 28 Aug 2024 09:38:18 +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: <2024082212-copper-oversight-f84f@gregkh> Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJJsWRmVeSWpSXmKPExsWy7bCmpu7ixefSDG5uYbd4c3UVq8WdBdOY LE4tX8hk0bx4PZvFpD1bWSz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fF+m94S32Oi8/9ci/2+3cuVkihjseNNTyci+9 aGF8e9/8JcfmP/lypvLdg0u5839p3Pnj6bvjxMHuqq4WTzanWT1TGmYqsRRnJBpqMRcVJwIA AJ8iCigDAAA= X-CMS-MailID: 20240828040823epcas5p47149c92b86596bd5f39a52cededabe29 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> <2024082212-copper-oversight-f84f@gregkh> On 8/22/2024 1:29 PM, Greg KH wrote: > On Sat, Aug 17, 2024 at 07:13:53PM +0530, 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. > I'll fix it up when applying it, thanks. Thank you for the support!!. Thanks, Selva > > greg k-h >