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.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -419,6 +419,8 @@ static inline int bpf_map_attr_numa_node(const union bpf_attr *attr) · 418 unmodified lines | ||
| 419 | 419 | attr->numa_node : NUMA_NO_NODE; |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | +struct bpf_prog *bpf_prog_get_type_path(const char *name, enum bpf_prog_type type); | |
| 423 | + | |
| 422 | 424 | #else /* !CONFIG_BPF_SYSCALL */ |
| 423 | 425 | static inline struct bpf_prog *bpf_prog_get(u32 ufd) |
| 424 | 426 | { |
| @@ -506,6 +508,12 @@ static inline int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, · 81 unmodified lines | ||
| 506 | 508 | { |
| 507 | 509 | return 0; |
| 508 | 510 | } |
| 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 | +} | |
| 509 | 517 | #endif /* CONFIG_BPF_SYSCALL */ |
| 510 | 518 | |
| 511 | 519 | 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 | ||
| 514 | 522 | return bpf_prog_get_type_dev(ufd, type, false); |
| 515 | 523 | } |
| 516 | 524 | |
| 525 | +bool bpf_prog_get_ok(struct bpf_prog *, enum bpf_prog_type *, bool); | |
| 526 | + | |
| 517 | 527 | int bpf_prog_offload_compile(struct bpf_prog *prog); |
| 518 | 528 | void bpf_prog_offload_destroy(struct bpf_prog *prog); |
| 519 | 529 | |