Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b135a420 authored by Suzuki K Poulose's avatar Suzuki K Poulose Committed by Lee Jones
Browse files

UPSTREAM: coresight: tmc-etr: Fix barrier packet insertion for perf buffer



When the ETR is used in perf mode with a larger buffer (configured
via sysfs or the default size of 1M) than the perf aux buffer size,
we end up inserting the barrier packet at the wrong offset, while
moving the offset forward. i.e, instead of the "new moved offset",
we insert it at the current hardware buffer offset. These packets
will not be visible as they are never copied and could lead to
corruption in the trace decoding side, as the decoder is not aware
that it needs to reset the decoding.

Bug: 254441685
Fixes: ec13c78d7b45 ("coresight: tmc-etr: Add barrier packets when moving offset forward")
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: stable@vger.kernel.org
Reported-by: default avatarAl Grant <al.grant@arm.com>
Tested-by: default avatarMike Leach <mike.leach@arm.com>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20201208182651.1597945-2-mathieu.poirier@linaro.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 83be0b84fe846edf0c722fefe225482d5f0d7395)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I9371c1f2440060c715c999608628962918dbbca9
parent 8d87f304
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment