]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fixed up queue-6.0/bpf-prevent-bpf-program-recursion-for-raw-tracepoint-probes.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 07:45:45 +0000 (08:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 07:45:45 +0000 (08:45 +0100)
queue-6.0/bpf-prevent-bpf-program-recursion-for-raw-tracepoint-probes.patch

index 32a1e8784ec451942f977c1d784b01573b301307..321b729d674daff5f3a21c067ece60fbaa0f270b 100644 (file)
@@ -58,11 +58,11 @@ Link: https://lore.kernel.org/r/20220916071914.7156-1-jolsa@kernel.org
 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      |    ++++
  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 <gregkh@linuxfoundation.org>
  #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 {