[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220204005519.60361-1-mcroce@linux.microsoft.com>
Date: Fri, 4 Feb 2022 01:55:17 +0100
From: Matteo Croce <mcroce@...ux.microsoft.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>,
bpf@...r.kernel.org
Cc: Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH bpf-next v3 0/2] limit bpf_core_types_are_compat recursion
From: Matteo Croce <mcroce@...rosoft.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
--
2.34.1
Powered by blists - more mailing lists