History

fix "netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'"

Descriptor table is a shared object; it's not a place where you can stick temporary references to files, especially when we don't need an opened file at all.

Al Viro committed 8 years ago

Commit 040ee691 parent 9ee332d4 files · +52 −14Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/bpf.h+10−0
@@ -419,6 +419,8 @@ static inline int bpf_map_attr_numa_node(const union bpf_attr *attr) · 418 unmodified lines
419419 attr->numa_node : NUMA_NO_NODE;
420420 }
421421
422+struct bpf_prog *bpf_prog_get_type_path(const char *name, enum bpf_prog_type type);
423+
422424 #else /* !CONFIG_BPF_SYSCALL */
423425 static inline struct bpf_prog *bpf_prog_get(u32 ufd)
424426 {
@@ -506,6 +508,12 @@ static inline int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, · 81 unmodified lines
506508 {
507509 return 0;
508510 }
511+
512+static inline struct bpf_prog *bpf_prog_get_type_path(const char *name,
513+ enum bpf_prog_type type)
514+{
515+ return ERR_PTR(-EOPNOTSUPP);
516+}
509517 #endif /* CONFIG_BPF_SYSCALL */
510518
511519 static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
@@ -514,6 +522,8 @@ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, · 2 unmodified lines
514522 return bpf_prog_get_type_dev(ufd, type, false);
515523 }
516524
525+bool bpf_prog_get_ok(struct bpf_prog *, enum bpf_prog_type *, bool);
526+
517527 int bpf_prog_offload_compile(struct bpf_prog *prog);
518528 void bpf_prog_offload_destroy(struct bpf_prog *prog);
519529