linux/kernel/events
Rob Herring 82ff0c022d perf: Add a counter for number of user access events in context
On arm64, user space counter access will be controlled differently
compared to x86. On x86, access in the strictest mode is enabled for all
tasks in an MM when any event is mmap'ed. For arm64, access is
explicitly requested for an event and only enabled when the event's
context is active. This avoids hooks into the arch context switch code
and gives better control of when access is enabled.

In order to configure user space access when the PMU is enabled, it is
necessary to know if any event (currently active or not) in the current
context has user space accessed enabled. Add a counter similar to other
counters in the context to avoid walking the event list every time.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20211208201124.310740-3-robh@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2021-12-14 11:30:54 +00:00
..
callchain.c uaccess: add force_uaccess_{begin,end} helpers 2020-08-12 10:57:59 -07:00
core.c perf: Add a counter for number of user access events in context 2021-12-14 11:30:54 +00:00
hw_breakpoint.c perf/hw_breakpoint: Replace deprecated CPU-hotplug functions 2021-08-26 09:14:36 +02:00
internal.h tracing/perf: Add interrupt_context_level() helper 2021-10-19 20:33:20 -04:00
Makefile perf/core: allow ftrace for functions in kernel/event/core.c 2021-10-25 22:50:42 -04:00
ring_buffer.c perf: Cap allocation order at aux_watermark 2021-04-16 16:32:39 +02:00
uprobes.c mm/memcg: Convert mem_cgroup_charge() to take a folio 2021-09-27 09:27:31 -04:00