summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller2016-07-01 22:00:52 +0200
committerDavid S. Miller2016-07-01 22:00:52 +0200
commit6bd3847bdc3ba97e642cb9af9d16b0f056da31a2 (patch)
tree31d2c41c7af6991401c3aff11e7ade3317b4a614 /include
parentatm: horizon: Use setup_timer (diff)
parentbpf: refactor bpf_prog_get and type check into helper (diff)
downloadkernel-qcow2-linux-6bd3847bdc3ba97e642cb9af9d16b0f056da31a2.tar.gz
kernel-qcow2-linux-6bd3847bdc3ba97e642cb9af9d16b0f056da31a2.tar.xz
kernel-qcow2-linux-6bd3847bdc3ba97e642cb9af9d16b0f056da31a2.zip
Merge branch 'bpf-robustify'
Daniel Borkmann says: ==================== Further robustify putting BPF progs This series addresses a potential issue reported to us by Jann Horn with regards to putting progs. First patch moves progs generally under RCU destruction and second patch refactors getting of progs to simplify code a bit. For details, please see individual patches. Note, we think that addressing this one in net-next should be sufficient. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bpf.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 8411032ac90d..b3336b4f5d04 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -218,9 +218,9 @@ void bpf_register_prog_type(struct bpf_prog_type_list *tl);
void bpf_register_map_type(struct bpf_map_type_list *tl);
struct bpf_prog *bpf_prog_get(u32 ufd);
+struct bpf_prog *bpf_prog_get_type(u32 ufd, enum bpf_prog_type type);
struct bpf_prog *bpf_prog_inc(struct bpf_prog *prog);
void bpf_prog_put(struct bpf_prog *prog);
-void bpf_prog_put_rcu(struct bpf_prog *prog);
struct bpf_map *bpf_map_get_with_uref(u32 ufd);
struct bpf_map *__bpf_map_get(struct fd f);
@@ -278,11 +278,13 @@ static inline struct bpf_prog *bpf_prog_get(u32 ufd)
return ERR_PTR(-EOPNOTSUPP);
}
-static inline void bpf_prog_put(struct bpf_prog *prog)
+static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
+ enum bpf_prog_type type)
{
+ return ERR_PTR(-EOPNOTSUPP);
}
-static inline void bpf_prog_put_rcu(struct bpf_prog *prog)
+static inline void bpf_prog_put(struct bpf_prog *prog)
{
}
#endif /* CONFIG_BPF_SYSCALL */