]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
security: bpf: replace include of linux/bpf.h with forward declarations
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 1 Nov 2017 18:48:00 +0000 (11:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Nov 2017 07:50:28 +0000 (16:50 +0900)
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>
include/linux/security.h

index 18800b0911e53ac6958be1caa1c1395f6723682a..73f1ef625d40c900430778fab29f8bad6cd2e029 100644 (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);