All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matteo Croce <mcroce@linux.microsoft.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>, bpf@vger.kernel.org
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH bpf-next v3 0/2] limit bpf_core_types_are_compat recursion
Date: Fri,  4 Feb 2022 01:55:17 +0100	[thread overview]
Message-ID: <20220204005519.60361-1-mcroce@linux.microsoft.com> (raw)

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

-- 
2.34.1


             reply	other threads:[~2022-02-04  0:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04  0:55 Matteo Croce [this message]
2022-02-04  0:55 ` [PATCH bpf-next v3 1/2] bpf: limit bpf_core_types_are_compat() recursion Matteo Croce
2022-02-04 19:32   ` Alexei Starovoitov
2022-02-04  0:55 ` [PATCH bpf-next v3 2/2] selftests/bpf: test maximum recursion depth for bpf_core_types_are_compat() Matteo Croce
2022-02-04 19:37   ` Alexei Starovoitov
2022-02-06 22:27     ` Matteo Croce
2022-02-04 19:40 ` [PATCH bpf-next v3 0/2] limit bpf_core_types_are_compat recursion patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220204005519.60361-1-mcroce@linux.microsoft.com \
    --to=mcroce@linux.microsoft.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.