From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 940693A961E for ; Tue, 7 Apr 2026 10:35:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775558135; cv=none; b=QrSrD27LOr1Clln+B65/vn1UasYTYGg5kYtng1iDQIEpb4KNw5uhpI65jH2uDL2vATsFwlFM+Uz7+7lFnhPjY1EpHII8jGBK4UoDqMGfjFkYb2Sn9s4tQuB60EKK80pGvXzpNnspzt7xDMLkt0XkpnSr7UnUfZlh68oJLXYJN2E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775558135; c=relaxed/simple; bh=xGASapseFRbHL3Uubm9FOBig3I0Lzpe0iWlAvh212w8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BIp4tVoWX5MBQ5FjleulVkEVn/bu8VXlN4JeciVoA8tkZ6ZlAPNxF+LoR9MOa/5TcMcP7rc5Hqw5/6nXcHYrC3/28VtwHCwNVGGK+5zuFc30c3DWimBDnEkRgfUX632ElxQD/yJIgrsfRR1oFjM5kdWwZvJaXPIuHo4pOH/VPG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=uYKqWHx9; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="uYKqWHx9" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2F1831688; Tue, 7 Apr 2026 03:35:27 -0700 (PDT) Received: from localhost (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 71DCE3F641; Tue, 7 Apr 2026 03:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1775558132; bh=xGASapseFRbHL3Uubm9FOBig3I0Lzpe0iWlAvh212w8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uYKqWHx9my6KjCuROYMXJznF76M0c1+FrWqKa8hIiMzZ/r+mZeDfYz2Op5RkjtF7t A0PSP2EtvK7hgH+Gyr9K+DPbPC+ZA2fMMZvW1WJ9xdKVq1e6W7zIXW3+O8sPdTFBsR fWtvaXO63exvRKNQsFfYH9fNWsgQNZPe0O45ZdD8= Date: Tue, 7 Apr 2026 11:35:30 +0100 From: Leo Yan To: Jie Gan Cc: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Tingwei Zhang , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coresight: tpdm: fix invalid MMIO access issue Message-ID: <20260407103530.GL356832@e132581.arm.com> References: <20260407-fix-potential-issue-in-tpdm-v1-1-42090d27c0a8@oss.qualcomm.com> <20260407081048.GJ356832@e132581.arm.com> <0a4911f4-168b-48c4-9554-3962d6e96efa@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0a4911f4-168b-48c4-9554-3962d6e96efa@oss.qualcomm.com> Hi Jie, On Tue, Apr 07, 2026 at 04:33:22PM +0800, Jie Gan wrote: > On 4/7/2026 4:10 PM, Leo Yan wrote: > > On Tue, Apr 07, 2026 at 12:47:11PM +0800, Jie Gan wrote: > > > Create the csdev_access struct only when a valid MMIO resource is > > > available. In tpdm_probe(), base is uninitialized for static TPDM > > > instances that lack an MMIO resource, causing csdev_access to be > > > created with a garbage address and potentially leading to > > > unexpected issues. > > > > This patch itself is fine for me. However, I am wandering if this > > is sufficient. > > > > As mentioned "potentially leading to unexpected issues", can I > > understand some code pieces access register with uninitialized base? > > If so, you would also explictly add coresight_is_static_tpdm() to > > prevent register access. > > > > Actually, we havent MMIO access for the static TPDM device, So no issues are > observed. The commit message here may be misleading. do I need rephrase the > commit message? Yes, good to clarify a bit in commit log: "So far there has no register access for static instance, but this change helps mitigate potential risks in the future." With this: Reviewed-by: Leo Yan