mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 15:41:58 +00:00
f9efc79d0a
TRBE implementations affected by Arm erratum (2253138 or 2224489), could write to the next address after the TRBLIMITR.LIMIT, instead of wrapping to the TRBBASER. This implies that the TRBE could potentially corrupt : - A page used by the rest of the kernel/user (if the LIMIT = end of perf ring buffer) - A page within the ring buffer, but outside the driver's range. [head, head + size]. This may contain some trace data, may be consumed by the userspace. We workaround this erratum by : - Making sure that there is at least an extra PAGE space left in the TRBE's range than we normally assign. This will be additional to other restrictions (e.g, the TRBE alignment for working around TRBE_WORKAROUND_OVERWRITE_IN_FILL_MODE, where there is a minimum of PAGE_SIZE. Thus we would have 2 * PAGE_SIZE) - Adjust the LIMIT to leave the last PAGE_SIZE out of the TRBE's allowed range (i.e, TRBEBASER...TRBLIMITR.LIMIT), by : TRBLIMITR.LIMIT -= PAGE_SIZE Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Leo Yan <leo.yan@linaro.org> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20211019163153.3692640-14-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> |
||
---|---|---|
.. | ||
coresight-catu.c | ||
coresight-catu.h | ||
coresight-cfg-afdo.c | ||
coresight-cfg-preload.c | ||
coresight-cfg-preload.h | ||
coresight-config.c | ||
coresight-config.h | ||
coresight-core.c | ||
coresight-cpu-debug.c | ||
coresight-cti-core.c | ||
coresight-cti-platform.c | ||
coresight-cti-sysfs.c | ||
coresight-cti.h | ||
coresight-etb10.c | ||
coresight-etm3x-core.c | ||
coresight-etm3x-sysfs.c | ||
coresight-etm4x-cfg.c | ||
coresight-etm4x-cfg.h | ||
coresight-etm4x-core.c | ||
coresight-etm4x-sysfs.c | ||
coresight-etm4x.h | ||
coresight-etm-cp14.c | ||
coresight-etm-perf.c | ||
coresight-etm-perf.h | ||
coresight-etm.h | ||
coresight-funnel.c | ||
coresight-platform.c | ||
coresight-priv.h | ||
coresight-replicator.c | ||
coresight-self-hosted-trace.h | ||
coresight-stm.c | ||
coresight-syscfg-configfs.c | ||
coresight-syscfg-configfs.h | ||
coresight-syscfg.c | ||
coresight-syscfg.h | ||
coresight-sysfs.c | ||
coresight-tmc-core.c | ||
coresight-tmc-etf.c | ||
coresight-tmc-etr.c | ||
coresight-tmc.h | ||
coresight-tpiu.c | ||
coresight-trbe.c | ||
coresight-trbe.h | ||
Kconfig | ||
Makefile |