Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- include/linux/bpf.h | 5 +++++
+ include/linux/bpf.h | 4 ++++
kernel/bpf/syscall.c | 11 +++++++++++
kernel/bpf/trampoline.c | 15 ++-------------
kernel/trace/bpf_trace.c | 6 ++++++
- 4 files changed, 24 insertions(+), 13 deletions(-)
+ 4 files changed, 23 insertions(+), 13 deletions(-)
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
#else /* !CONFIG_BPF_SYSCALL */
static inline struct bpf_prog *bpf_prog_get(u32 ufd)
{
-@@ -2305,6 +2306,10 @@ static inline int sock_map_bpf_prog_quer
- {
- return -EINVAL;
+@@ -2176,6 +2177,9 @@ static inline bool unprivileged_ebpf_ena
+ return false;
}
-+
+
+static inline void bpf_prog_inc_misses_counter(struct bpf_prog *prog)
+{
+}
#endif /* CONFIG_BPF_SYSCALL */
- #endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */
+ void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -2094,6 +2094,17 @@ struct bpf_prog_kstats {