xref: /linux/tools/perf/util/cap.h (revision f4f346c3465949ebba80c6cc52cd8d2eeaa545fd)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PERF_CAP_H
3 #define __PERF_CAP_H
4 
5 #include <stdbool.h>
6 #include <linux/capability.h>
7 
8 /* For older systems */
9 #ifndef CAP_SYSLOG
10 #define CAP_SYSLOG	34
11 #endif
12 
13 #ifndef CAP_PERFMON
14 #define CAP_PERFMON	38
15 #endif
16 
17 #ifndef CAP_BPF
18 #define CAP_BPF		39
19 #endif
20 
21 /* Query if a capability is supported, used_root is set if the fallback root check was used. */
22 bool perf_cap__capable(int cap, bool *used_root);
23 
24 #endif /* __PERF_CAP_H */
25