lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 31 Oct 2021 22:42:10 +0800
From:   Leo Yan <>
To:     Mathieu Poirier <>,
        Suzuki K Poulose <>,
        Mike Leach <>,
        Alexander Shishkin <>,
        James Clark <>,,,
Cc:     Leo Yan <>
Subject: [PATCH v1 0/4] coresight: etm: Correct (virtual) contextID tracing for namespace

If a profiling program runs in a non-root PID namespace, if CoreSight
driver enables contextID tracing, it can lead to mismatching issue
between the context ID in hardware trace data and the allocated PID in
the non-root namespace.

CoreSight driver has tried to address this issue for the contextID
related interfaces under sysfs, but it misses other parts: it doesn't
prevent user to set VMID (virtual contextID) for kernel runs in EL2 with
VHE, and furthermore, it misses to handle the perf mode when the
profiling tool (e.g. perf) doesn't run in root PID namespace.

For this reason, this patch series is to correct contextID tracing for
non-root namespace.

Patch 01 is to use spinlock to protect reading virtual context ID

Patch 02 corrects the virtual contextID tracing for non-root PID

Patch 03/04 are used to fix the contextID tracing for perf mode.

I only verified this patch series on Juno board in the root PID
namespace and confirmed the patches don't introduce any regression for
root PID namespace.

Leo Yan (4):
  coresight: etm4x: Add lock for reading virtual context ID comparator
  coresight: etm4x: Don't use virtual contextID for non-root PID
  coresight: etm4x: Don't trace contextID for non-root namespace in perf
  coresight: etm3x: Don't trace contextID for non-root namespace in perf

 .../coresight/coresight-etm3x-core.c          |  4 +++
 .../coresight/coresight-etm4x-core.c          | 10 +++++--
 .../coresight/coresight-etm4x-sysfs.c         | 30 +++++++++++++++++++
 3 files changed, 42 insertions(+), 2 deletions(-)


Powered by blists - more mailing lists