From: Greg Kroah-Hartman Date: Fri, 25 Nov 2022 07:45:45 +0000 (+0100) Subject: fixed up queue-6.0/bpf-prevent-bpf-program-recursion-for-raw-tracepoint-probes.patch X-Git-Tag: v4.9.334~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cd008b1e0c43bb346a36a79bcd79fbc576ead35;p=thirdparty%2Fkernel%2Fstable-queue.git fixed up queue-6.0/bpf-prevent-bpf-program-recursion-for-raw-tracepoint-probes.patch --- diff --git a/queue-6.0/bpf-prevent-bpf-program-recursion-for-raw-tracepoint-probes.patch b/queue-6.0/bpf-prevent-bpf-program-recursion-for-raw-tracepoint-probes.patch index 32a1e8784ec..321b729d674 100644 --- a/queue-6.0/bpf-prevent-bpf-program-recursion-for-raw-tracepoint-probes.patch +++ b/queue-6.0/bpf-prevent-bpf-program-recursion-for-raw-tracepoint-probes.patch @@ -58,11 +58,11 @@ Link: https://lore.kernel.org/r/20220916071914.7156-1-jolsa@kernel.org Signed-off-by: Alexei Starovoitov Signed-off-by: Greg Kroah-Hartman --- - 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 @@ -74,17 +74,16 @@ Signed-off-by: Greg Kroah-Hartman #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 {