Lines Matching refs:and
3 Perf events and tool security
12 direct usage of perf_events system call API [2]_ and over data files
15 units (PMU) [2]_ and Perf collect and expose for performance analysis.
16 Collected system and performance data may be split into several
19 1. System hardware and software configuration data, for example: a CPU
20 model and its cache configuration, an amount of available memory and
21 its topology, used kernel and Perf versions, performance monitoring
25 2. User and kernel module paths and their load addresses with sizes,
26 process and thread names with their PIDs and TIDs, timestamps for
27 captured hardware and software events.
31 (PMC) [8]_ and machine specific registers (MSR) [9]_ that provide
38 RBP on x86_64), process user and kernel space memory addresses and
45 to such monitoring modes requires to be ordered and secured properly.
46 So, perf_events performance monitoring and observability operations are
54 ID is 0, referred to as superuser or root), and b) unprivileged
58 scope and resource restrictions.
62 effective GID, and supplementary group list).
66 independently enabled and disabled on per-thread basis for processes and
71 monitoring and observability operations, thus, bypass *scope* permissions
73 privilege [13]_ (POSIX 1003.1e: 2.2.2.39) for performance monitoring and
74 observability operations in the kernel and provides a secure approach to
75 performance monitoring and observability in the system.
77 For backward compatibility reasons the access to perf_events monitoring and
79 processes but CAP_SYS_ADMIN usage for secure monitoring and observability
82 API contain denial records of acquiring both CAP_PERFMON and CAP_SYS_ADMIN
85 denial logging related to usage of performance monitoring and observability.
92 CAP_SYS_PTRACE capability is not required and CAP_PERFMON is enough to
93 be provided for processes to make performance monitoring and observability
106 file system ACLs [10]_ and sudo [15]_ utility can be used to create
108 performance monitoring and observability without limits. The following
112 group to Perf tool executable and limit access to the executable for
127 2. Assign the required capabilities to the Perf tool executable file and
128 enable members of perf_users group with monitoring and observability
158 To get kernel and user samples with a perf binary with just CAP_PERFMON.
161 performance monitoring and observability by using functionality of the
169 inherent processes with CAP_PERFMON and other required capabilities so that
170 performance monitoring and observability operations are available in the
176 and other required capabilities into ambient capability set of the shell
178 SECBIT_NOROOT and SECBIT_NO_CAP_AMBIENT_RAISE bits and then change
197 shell and have CAP_PERFMON and other required capabilities enabled
198 in permitted, effective and ambient capability sets of an inherent process:
226 perf_events *scope* and *access* control for unprivileged processes
230 Impose no *scope* and *access* restrictions on using perf_events
234 monitored *scope* is maximized and no perf_events specific limits
238 *scope* includes per-process and system wide performance monitoring
239 but excludes raw tracepoints and ftrace function tracepoints
240 monitoring. CPU and system events happened when executing either in
241 user or in kernel space can be monitored and captured for later
247 *scope* includes per-process performance monitoring only and
248 excludes system wide performance monitoring. CPU and system events
250 monitored and captured for later analysis. Per-user per-cpu
255 *scope* includes per-process performance monitoring only. CPU and
257 monitored and captured for later analysis. Per-user per-cpu
288 specifically for capturing monitored performance events and related data.
290 For example, if a machine has eight cores and perf_event_mlock_kb limit
298 allocates all available 4128 KiB and the other processes will fail to
301 RLIMIT_MEMLOCK and perf_event_mlock_kb resource constraints are ignored