All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Add support of pointer to struct in global functions
@ 2020-12-14 19:52 Dmitrii Banshchikov
  2020-12-14 19:52 ` [PATCH bpf-next 1/3] bpf: Factor out nullable reg type conversion Dmitrii Banshchikov
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Dmitrii Banshchikov @ 2020-12-14 19:52 UTC (permalink / raw)
  To: bpf
  Cc: Dmitrii Banshchikov, ast, daniel, andrii, kafai, songliubraving,
	yhs, john.fastabend, kpsingh, rdna

This patchset adds support of a pointer to struct among global function
arguments.

The motivation is to overcome the limit on the maximum number of allowed
arguments and avoid tricky and unoptimal ways of passing arguments.

The limitation is that used structs may not contain any other pointers.

Dmitrii Banshchikov (3):
  bpf: Factor out nullable reg type conversion
  bpf: Support pointer to struct in global func args
  selftests/bpf: Add unit tests for global functions

 include/linux/bpf_verifier.h                  |   2 +
 kernel/bpf/btf.c                              |  59 ++++++++--
 kernel/bpf/verifier.c                         | 107 ++++++++++++------
 .../bpf/prog_tests/test_global_funcs.c        |   5 +
 .../selftests/bpf/progs/test_global_func10.c  |  29 +++++
 .../selftests/bpf/progs/test_global_func11.c  |  19 ++++
 .../selftests/bpf/progs/test_global_func12.c  |  21 ++++
 .../selftests/bpf/progs/test_global_func13.c  |  24 ++++
 .../selftests/bpf/progs/test_global_func9.c   |  59 ++++++++++
 9 files changed, 284 insertions(+), 41 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_global_func10.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_global_func11.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_global_func12.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_global_func13.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_global_func9.c

-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-12-19 14:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 19:52 [PATCH bpf-next 0/3] Add support of pointer to struct in global functions Dmitrii Banshchikov
2020-12-14 19:52 ` [PATCH bpf-next 1/3] bpf: Factor out nullable reg type conversion Dmitrii Banshchikov
2020-12-16 22:46   ` Andrii Nakryiko
2020-12-17  6:17   ` Alexei Starovoitov
2020-12-14 19:52 ` [PATCH bpf-next 2/3] bpf: Support pointer to struct in global func args Dmitrii Banshchikov
2020-12-16 23:35   ` Andrii Nakryiko
2020-12-17  6:13     ` Dmitrii Banshchikov
2020-12-18 19:52       ` Andrii Nakryiko
2020-12-19 14:37         ` Dmitrii Banshchikov
2020-12-14 19:52 ` [PATCH bpf-next 3/3] selftests/bpf: Add unit tests for global functions Dmitrii Banshchikov
2020-12-16 22:53   ` Andrii Nakryiko
2020-12-17  2:00   ` Yonghong Song
2020-12-16 22:44 ` [PATCH bpf-next 0/3] Add support of pointer to struct in " Andrii Nakryiko

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.