Perf events changes in this cycle were:

 - Improve Intel uncore PMU support:

     - Parse uncore 'discovery tables' - a new hardware capability enumeration method
       introduced on the latest Intel platforms. This table is in a well-defined PCI
       namespace location and is read via MMIO. It is organized in an rbtree.

       These uncore tables will allow the discovery of standard counter blocks, but
       fancier counters still need to be enumerated explicitly.

     - Add Alder Lake support

     - Improve IIO stacks to PMON mapping support on Skylake servers

 - Add Intel Alder Lake PMU support - which requires the introduction of 'hybrid' CPUs
   and PMUs. Alder Lake is a mix of Golden Cove ('big') and Gracemont ('small' - Atom derived)
   cores.

   The CPU-side feature set is entirely symmetrical - but on the PMU side there's
   core type dependent PMU functionality.

 - Reduce data loss with CPU level hardware tracing on Intel PT / AUX profiling, by
   fixing the AUX allocation watermark logic.

 - Improve ring buffer allocation on NUMA systems

 - Put 'struct perf_event' into their separate kmem_cache pool

 - Add support for synchronous signals for select perf events. The immediate motivation
   is to support low-overhead sampling-based race detection for user-space code. The
   feature consists of the following main changes:

    - Add thread-only event inheritance via perf_event_attr::inherit_thread, which limits
      inheritance of events to CLONE_THREAD.

    - Add the ability for events to not leak through exec(), via perf_event_attr::remove_on_exec.

    - Allow the generation of SIGTRAP via perf_event_attr::sigtrap, extend siginfo with an u64
      ::si_perf, and add the breakpoint information to ::si_addr and ::si_perf if the event is
      PERF_TYPE_BREAKPOINT.

   The siginfo support is adequate for breakpoints right now - but the new field can be used
   to introduce support for other types of metadata passed over siginfo as well.

 - Misc fixes, cleanups and smaller updates.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
signal, perf: Add missing TRAP_PERF case in siginfo_layout()

Add the missing TRAP_PERF case in siginfo_layout() for interpreting the
layout correctly as SIL_PERF_EVENT instead of just SIL_FAULT. This
ensures the si_perf field is copied and not just the si_addr field.

This was caught and tested by running the perf_events/sigtrap_threads
kselftest as a 32-bit binary with a 64-bit kernel.

Fixes: fb6cc127e0b6 ("signal: Introduce TRAP_PERF si_code and si_perf to siginfo")
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210422191823.79012-2-elver@google.com
1 file changed