1
0
Fork 0

security: bpf: replace include of linux/bpf.h with forward declarations

Touching linux/bpf.h makes us rebuild a surprisingly large
portion of the kernel.  Remove the unnecessary dependency
from security.h, it only needs forward declarations.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
Jakub Kicinski 2017-11-01 11:48:00 -07:00 committed by David S. Miller
parent 3ded76a8ff
commit 1495dc9f0a
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,6 @@
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/bpf.h>
struct linux_binprm;
struct cred;
@ -1732,6 +1731,10 @@ static inline void securityfs_remove(struct dentry *dentry)
#endif
#ifdef CONFIG_BPF_SYSCALL
union bpf_attr;
struct bpf_map;
struct bpf_prog;
struct bpf_prog_aux;
#ifdef CONFIG_SECURITY
extern int security_bpf(int cmd, union bpf_attr *attr, unsigned int size);
extern int security_bpf_map(struct bpf_map *map, fmode_t fmode);