Skip to content

Commit 1495dc9

Browse files
Jakub Kicinskidavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3ded76a commit 1495dc9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/linux/security.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include <linux/string.h>
3232
#include <linux/mm.h>
3333
#include <linux/fs.h>
34-
#include <linux/bpf.h>
3534

3635
struct linux_binprm;
3736
struct cred;
@@ -1732,6 +1731,10 @@ static inline void securityfs_remove(struct dentry *dentry)
17321731
#endif
17331732

17341733
#ifdef CONFIG_BPF_SYSCALL
1734+
union bpf_attr;
1735+
struct bpf_map;
1736+
struct bpf_prog;
1737+
struct bpf_prog_aux;
17351738
#ifdef CONFIG_SECURITY
17361739
extern int security_bpf(int cmd, union bpf_attr *attr, unsigned int size);
17371740
extern int security_bpf_map(struct bpf_map *map, fmode_t fmode);

0 commit comments

Comments
 (0)