linux/drivers/hwtracing
Leo Yan 1314dd1971 coresight: etm4x: Don't use virtual contextID for non-root PID namespace
As commented in the function ctxid_pid_store(), it can cause the PID
values mismatching between context ID tracing and PID allocated in a
non-root namespace.

For this reason, when a process runs in non-root PID namespace, the
driver doesn't allow PID tracing and returns failure when access
contextID related sysfs nodes.

VMID works for virtual contextID when the kernel runs in EL2 mode with
VHE; on the other hand, the driver doesn't prevent users from accessing
it when programs run in the non-root namespace.  Thus this can lead
to same issues with contextID described above.

This patch imposes the checking on VMID related sysfs knobs and returns
failure if current process runs in non-root PID namespace.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20220204152403.71775-3-leo.yan@linaro.org
2022-03-11 10:07:50 +00:00
..
coresight coresight: etm4x: Don't use virtual contextID for non-root PID namespace 2022-03-11 10:07:50 +00:00
intel_th bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
stm stm class: Use correct UUID APIs 2021-04-16 07:26:50 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00