coresight: etm4x: Don't use contextID with PID namespaces
authorMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 11 Jul 2018 19:40:12 +0000 (13:40 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Jul 2018 11:52:56 +0000 (13:52 +0200)
commit450367f06ef310af15f6424376ce9d5c7879c2d1
tree0270fcdcbbbb34cd603b0af8df7fe3922661fd3e
parent7bd50ccf001f77db236af51797579359b09e2354
coresight: etm4x: Don't use contextID with PID namespaces

As with ETM3x, the ETM4x tracers can trigger trace acquisition based on
contextID value, something that isn't useful when PID namespaces are
enabled.  Indeed the PID value of a process has a different representation
in the kernel and the PID namespace, making the feature confusing and
potentially leaking internal kernel information.

As such simply return an error when the feature is being used from a
PID namespace other than the default one.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Kim Phillips <kim.phillips@arm.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
drivers/hwtracing/coresight/coresight-etm4x.h