diff options
Diffstat (limited to 'include/linux/security.h')
| -rw-r--r-- | include/linux/security.h | 41 | 
1 files changed, 40 insertions, 1 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index 9df7547afc0c..3e8d4bacd59d 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -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 */  |