mbox series

[bpf-next,v3,0/2] limit bpf_core_types_are_compat recursion

Message ID 20220204005519.60361-1-mcroce@linux.microsoft.com (mailing list archive)
Headers show
Series limit bpf_core_types_are_compat recursion | expand

Message

Matteo Croce Feb. 4, 2022, 12:55 a.m. UTC
From: Matteo Croce <mcroce@microsoft.com>

As formerly discussed on the BPF mailing list:
https://lore.kernel.org/bpf/CAADnVQJDax2j0-7uyqdqFEnpB57om_z+Cqmi1O2QyLpHqkVKwA@mail.gmail.com/

changes from v2:
test the bpf_core_type_exists() return value, and check that the recursion
limit is enforced.

Matteo Croce (2):
  bpf: limit bpf_core_types_are_compat() recursion
  selftests/bpf: test maximum recursion depth for
    bpf_core_types_are_compat()

 include/linux/btf.h                           |   5 +
 kernel/bpf/btf.c                              | 105 +++++++++++++++++-
 tools/testing/selftests/bpf/Makefile          |   2 +-
 .../selftests/bpf/bpf_testmod/bpf_testmod.c   |   5 +
 .../selftests/bpf/prog_tests/core_kern.c      |  15 ++-
 .../bpf/prog_tests/core_kern_overflow.c       |  13 +++
 tools/testing/selftests/bpf/progs/core_kern.c |  14 +++
 .../selftests/bpf/progs/core_kern_overflow.c  |  21 ++++
 8 files changed, 177 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/core_kern_overflow.c
 create mode 100644 tools/testing/selftests/bpf/progs/core_kern_overflow.c

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 4, 2022, 7:40 p.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Fri,  4 Feb 2022 01:55:17 +0100 you wrote:
> From: Matteo Croce <mcroce@microsoft.com>
> 
> As formerly discussed on the BPF mailing list:
> https://lore.kernel.org/bpf/CAADnVQJDax2j0-7uyqdqFEnpB57om_z+Cqmi1O2QyLpHqkVKwA@mail.gmail.com/
> 
> changes from v2:
> test the bpf_core_type_exists() return value, and check that the recursion
> limit is enforced.
> 
> [...]

Here is the summary with links:
  - [bpf-next,v3,1/2] bpf: limit bpf_core_types_are_compat() recursion
    https://git.kernel.org/bpf/bpf-next/c/e70e13e7d4ab
  - [bpf-next,v3,2/2] selftests/bpf: test maximum recursion depth for bpf_core_types_are_compat()
    https://git.kernel.org/bpf/bpf-next/c/976a38e05a49

You are awesome, thank you!