[PATCH] coresight: tpdm: fix invalid MMIO access issue

Jie Gan jie.gan at oss.qualcomm.com
Tue Apr 7 03:59:21 PDT 2026


Hi Leo,

On 4/7/2026 6:35 PM, Leo Yan wrote:
> 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 <leo.yan at arm.com>

Well noted.

Thanks,
Jie





More information about the linux-arm-kernel mailing list