mbox series

[v2,bpf-next,0/2] arm64/bpf: remove 128MB limit for BPF JIT programs

Message ID 1636131046-5982-1-git-send-email-alan.maguire@oracle.com (mailing list archive)
Headers show
Series arm64/bpf: remove 128MB limit for BPF JIT programs | expand

Message

Alan Maguire Nov. 5, 2021, 4:50 p.m. UTC
There is a 128MB limit on BPF JIT program allocations; this is
to ensure BPF programs are in branching range of each other.
Patch 1 in this series removes this restriction.  To verify
exception handling still works, a test case to validate
exception handling in BPF programs is added in patch 2.

There was previous discussion around this topic [1], in particular
would be good to get feedback from Daniel if this approach makes
sense.

[1] https://lore.kernel.org/all/20181121131733.14910-1-ard.biesheuvel@linaro.org/

Changes since v1:

 - respin picked up changes in arm64 exception handling changes
   which removed need for special BPF exception handling in patch 1
 - made selftest use task creation/task_struct field instead to
   minimize BPF selftests parallel runs, moved from CHECK()s
   to ASSERT_*()s (Andrii, patch 2)

Alan Maguire (1):
  selftests/bpf: add exception handling selftests for tp_bpf program

Russell King (1):
  arm64/bpf: remove 128MB limit for BPF JIT programs

 arch/arm64/include/asm/extable.h                   |  9 -----
 arch/arm64/include/asm/memory.h                    |  5 +--
 arch/arm64/kernel/traps.c                          |  2 +-
 arch/arm64/mm/ptdump.c                             |  2 -
 arch/arm64/net/bpf_jit_comp.c                      |  7 +---
 tools/testing/selftests/bpf/prog_tests/exhandler.c | 43 ++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/exhandler_kern.c | 43 ++++++++++++++++++++++
 7 files changed, 90 insertions(+), 21 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/exhandler.c
 create mode 100644 tools/testing/selftests/bpf/progs/exhandler_kern.c

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 8, 2021, 9:30 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Fri,  5 Nov 2021 16:50:44 +0000 you wrote:
> There is a 128MB limit on BPF JIT program allocations; this is
> to ensure BPF programs are in branching range of each other.
> Patch 1 in this series removes this restriction.  To verify
> exception handling still works, a test case to validate
> exception handling in BPF programs is added in patch 2.
> 
> There was previous discussion around this topic [1], in particular
> would be good to get feedback from Daniel if this approach makes
> sense.
> 
> [...]

Here is the summary with links:
  - [v2,bpf-next,1/2] arm64/bpf: remove 128MB limit for BPF JIT programs
    https://git.kernel.org/bpf/bpf-next/c/b89ddf4cca43
  - [v2,bpf-next,2/2] selftests/bpf: add exception handling selftests for tp_bpf program
    https://git.kernel.org/bpf/bpf-next/c/c23551c9c36a

You are awesome, thank you!