]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/security.h
Merge branch 'parisc-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[linux.git] / include / linux / security.h
index 9df7547afc0cb783883b5c5c7b32b2956a650d7a..3e8d4bacd59de1d338e4b5f33ee47d502ddd7409 100644 (file)
@@ -117,12 +117,14 @@ enum lockdown_reason {
        LOCKDOWN_MODULE_PARAMETERS,
        LOCKDOWN_MMIOTRACE,
        LOCKDOWN_DEBUGFS,
+       LOCKDOWN_XMON_WR,
        LOCKDOWN_INTEGRITY_MAX,
        LOCKDOWN_KCORE,
        LOCKDOWN_KPROBES,
        LOCKDOWN_BPF_READ,
        LOCKDOWN_PERF,
        LOCKDOWN_TRACEFS,
+       LOCKDOWN_XMON_RW,
        LOCKDOWN_CONFIDENTIALITY_MAX,
 };
 
@@ -1895,5 +1897,42 @@ static inline void security_bpf_prog_free(struct bpf_prog_aux *aux)
 #endif /* CONFIG_SECURITY */
 #endif /* CONFIG_BPF_SYSCALL */
 
-#endif /* ! __LINUX_SECURITY_H */
+#ifdef CONFIG_PERF_EVENTS
+struct perf_event_attr;
+struct perf_event;
+
+#ifdef CONFIG_SECURITY
+extern int security_perf_event_open(struct perf_event_attr *attr, int type);
+extern int security_perf_event_alloc(struct perf_event *event);
+extern void security_perf_event_free(struct perf_event *event);
+extern int security_perf_event_read(struct perf_event *event);
+extern int security_perf_event_write(struct perf_event *event);
+#else
+static inline int security_perf_event_open(struct perf_event_attr *attr,
+                                          int type)
+{
+       return 0;
+}
+
+static inline int security_perf_event_alloc(struct perf_event *event)
+{
+       return 0;
+}
+
+static inline void security_perf_event_free(struct perf_event *event)
+{
+}
+
+static inline int security_perf_event_read(struct perf_event *event)
+{
+       return 0;
+}
 
+static inline int security_perf_event_write(struct perf_event *event)
+{
+       return 0;
+}
+#endif /* CONFIG_SECURITY */
+#endif /* CONFIG_PERF_EVENTS */
+
+#endif /* ! __LINUX_SECURITY_H */