This is a note to let you know that I've just added the patch titled coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug to the 6.2-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: coresight-etm4-fix-for-loop-drvdata-nr_addr_cmp-range-bug.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From bf84937e882009075f57fd213836256fc65d96bc Mon Sep 17 00:00:00 2001 From: Steve Clevenger <scclevenger@xxxxxxxxxxxxxxxxxxxxxx> Date: Mon, 27 Feb 2023 16:54:32 -0700 Subject: coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug From: Steve Clevenger <scclevenger@xxxxxxxxxxxxxxxxxxxxxx> commit bf84937e882009075f57fd213836256fc65d96bc upstream. In etm4_enable_hw, fix for() loop range to represent address comparator pairs. Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Steve Clevenger <scclevenger@xxxxxxxxxxxxxxxxxxxxxx> Reviewed-by: James Clark <james.clark@xxxxxxx> Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx> Link: https://lore.kernel.org/r/4a4ee61ce8ef402615a4528b21a051de3444fb7b.1677540079.git.scclevenger@xxxxxxxxxxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -454,7 +454,7 @@ static int etm4_enable_hw(struct etmv4_d if (etm4x_sspcicrn_present(drvdata, i)) etm4x_relaxed_write32(csa, config->ss_pe_cmp[i], TRCSSPCICRn(i)); } - for (i = 0; i < drvdata->nr_addr_cmp; i++) { + for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) { etm4x_relaxed_write64(csa, config->addr_val[i], TRCACVRn(i)); etm4x_relaxed_write64(csa, config->addr_acc[i], TRCACATRn(i)); } Patches currently in stable-queue which might be from scclevenger@xxxxxxxxxxxxxxxxxxxxxx are queue-6.2/coresight-etm4-fix-for-loop-drvdata-nr_addr_cmp-range-bug.patch queue-6.2/coresight-etm4x-do-not-access-trcidr1-for-identification.patch