diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2018-07-11 22:40:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-15 14:52:56 +0300 |
commit | 7bd50ccf001f77db236af51797579359b09e2354 (patch) | |
tree | 170431f9c6a9f5672e8fe9f4d642931ff637021f /drivers/hwtracing/coresight/coresight-etm3x.c | |
parent | 5151e2b578e92f88d676ad78d36a2ef93d0a0dea (diff) | |
download | linux-7bd50ccf001f77db236af51797579359b09e2354.tar.xz |
coresight: etm3x: Don't use contextID with PID namespaces
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>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-etm3x.c')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-etm3x.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index 15ed64d51a5b..7c74263c333d 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -230,10 +230,8 @@ void etm_set_default(struct etm_config *config) config->seq_curr_state = 0x0; config->ctxid_idx = 0x0; - for (i = 0; i < ETM_MAX_CTXID_CMP; i++) { + for (i = 0; i < ETM_MAX_CTXID_CMP; i++) config->ctxid_pid[i] = 0x0; - config->ctxid_vpid[i] = 0x0; - } config->ctxid_mask = 0x0; /* Setting default to 1024 as per TRM recommendation */ |