bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 bpf 0/3] fix BTF verification size resolution
@ 2019-07-12 17:25 Andrii Nakryiko
  2019-07-12 17:25 ` [PATCH v3 bpf 1/3] bpf: fix BTF verifier size resolution logic Andrii Nakryiko
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Andrii Nakryiko @ 2019-07-12 17:25 UTC (permalink / raw)
  To: bpf, netdev, ast, daniel, yhs
  Cc: andrii.nakryiko, kernel-team, Andrii Nakryiko

BTF size resolution logic isn't always resolving type size correctly, leading
to erroneous map creation failures due to value size mismatch.

This patch set:
1. fixes the issue (patch #1);
2. adds tests for trickier cases (patch #2);
3. and converts few test cases utilizing BTF-defined maps, that previously
   couldn't use typedef'ed arrays due to kernel bug (patch #3).

Andrii Nakryiko (3):
  bpf: fix BTF verifier size resolution logic
  selftests/bpf: add trickier size resolution tests
  selftests/bpf: use typedef'ed arrays as map values

 kernel/bpf/btf.c                              | 19 ++--
 .../bpf/progs/test_get_stack_rawtp.c          |  3 +-
 .../bpf/progs/test_stacktrace_build_id.c      |  3 +-
 .../selftests/bpf/progs/test_stacktrace_map.c |  2 +-
 tools/testing/selftests/bpf/test_btf.c        | 88 +++++++++++++++++++
 5 files changed, 104 insertions(+), 11 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-07-15 22:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12 17:25 [PATCH v3 bpf 0/3] fix BTF verification size resolution Andrii Nakryiko
2019-07-12 17:25 ` [PATCH v3 bpf 1/3] bpf: fix BTF verifier size resolution logic Andrii Nakryiko
2019-07-13  4:54   ` Martin Lau
2019-07-12 17:25 ` [PATCH v3 bpf 2/3] selftests/bpf: add trickier size resolution tests Andrii Nakryiko
2019-07-12 17:25 ` [PATCH v3 bpf 3/3] selftests/bpf: use typedef'ed arrays as map values Andrii Nakryiko
2019-07-12 18:47 ` [PATCH v3 bpf 0/3] fix BTF verification size resolution Yonghong Song
2019-07-15 22:18 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).