Skip to content

bpf: Don't trigger __bpf_prog_ret0_warn() for -ENOMEM.

Kuniyuki Iwashima bpf 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: Allow bpf_int_jit_compile() to set errno.arch/arc/net/bpf_jit_core.c arch/arm/net/bpf_jit_32.c arch/arm64/net/bpf_jit_comp.c +12 more+32 -213 replies
2/2bpf: Set -ENOMEM to err in bpf_int_jit_compile().arch/arc/net/bpf_jit_core.c arch/arm/net/bpf_jit_32.c arch/arm64/net/bpf_jit_comp.c +9 more+91 -203 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 bpf 0/2] bpf: Don't trigger __bpf_prog_ret0_warn() for -ENOMEM.

syzkaller reported a splat in __bpf_prog_ret0_warn() with a sane bpf prog, which was triggered by fault injection.

This series suppresses the warning in such a case.

Kuniyuki Iwashima (2):
bpf: Allow bpf_int_jit_compile() to set errno.
bpf: Set -ENOMEM to err in bpf_int_jit_compile().

 arch/arc/net/bpf_jit_core.c      | 21 +++++++++++++--------
 arch/arm/net/bpf_jit_32.c        | 10 ++++++++--
 arch/arm64/net/bpf_jit_comp.c    | 10 ++++++++--
 arch/loongarch/net/bpf_jit.c     | 10 ++++++++--
 arch/mips/net/bpf_jit_comp.c     | 15 +++++++++++----
 arch/parisc/net/bpf_jit_core.c   | 10 ++++++++--
 arch/powerpc/net/bpf_jit_comp.c  | 10 ++++++++--
 arch/riscv/net/bpf_jit_core.c    | 10 ++++++++--
 arch/s390/net/bpf_jit_comp.c     |  9 +++++++--
 arch/sparc/net/bpf_jit_comp_64.c | 10 ++++++++--
 arch/x86/net/bpf_jit_comp.c      | 11 +++++++++--
 arch/x86/net/bpf_jit_comp32.c    |  9 +++++++--
 include/linux/filter.h           |  2 +-
 kernel/bpf/core.c                |  6 ++++--
 kernel/bpf/verifier.c            | 21 +++++++++++++++------
 15 files changed, 123 insertions(+), 41 deletions(-)
Signature · 1 line
2.49.0