提交 1495dc9f 编写于 作者: J Jakub Kicinski 提交者: David S. Miller

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: NJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: NQuentin Monnet <quentin.monnet@netronome.com>
Acked-by: NAlexei Starovoitov <ast@kernel.org>
Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3ded76a8
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/bpf.h>
struct linux_binprm; struct linux_binprm;
struct cred; struct cred;
...@@ -1732,6 +1731,10 @@ static inline void securityfs_remove(struct dentry *dentry) ...@@ -1732,6 +1731,10 @@ static inline void securityfs_remove(struct dentry *dentry)
#endif #endif
#ifdef CONFIG_BPF_SYSCALL #ifdef CONFIG_BPF_SYSCALL
union bpf_attr;
struct bpf_map;
struct bpf_prog;
struct bpf_prog_aux;
#ifdef CONFIG_SECURITY #ifdef CONFIG_SECURITY
extern int security_bpf(int cmd, union bpf_attr *attr, unsigned int size); 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); extern int security_bpf_map(struct bpf_map *map, fmode_t fmode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册