netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf 0/3] bpf: Enforce NULL check on new _OR_NULL return types
@ 2020-10-19 19:42 Martin KaFai Lau
  2020-10-19 19:42 ` [PATCH bpf 1/3] bpf: Enforce id generation for all may-be-null register type Martin KaFai Lau
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Martin KaFai Lau @ 2020-10-19 19:42 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Daniel Borkmann, Hao Luo, kernel-team, netdev,
	Yonghong Song

This set enforces NULL check on the new helper return types,
RET_PTR_TO_BTF_ID_OR_NULL and RET_PTR_TO_MEM_OR_BTF_ID_OR_NULL.

Martin KaFai Lau (3):
  bpf: Enforce id generation for all may-be-null register type
  bpf: selftest: Ensure the return value of bpf_skc_to helpers must be
    checked
  bpf: selftest: Ensure the return value of the bpf_per_cpu_ptr() must
    be checked

 kernel/bpf/verifier.c                         | 11 ++--
 .../selftests/bpf/prog_tests/ksyms_btf.c      | 57 +++++++++++++------
 .../bpf/progs/test_ksyms_btf_null_check.c     | 31 ++++++++++
 tools/testing/selftests/bpf/verifier/sock.c   | 25 ++++++++
 4 files changed, 100 insertions(+), 24 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_ksyms_btf_null_check.c

-- 
2.24.1


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

end of thread, other threads:[~2020-10-20  0:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-19 19:42 [PATCH bpf 0/3] bpf: Enforce NULL check on new _OR_NULL return types Martin KaFai Lau
2020-10-19 19:42 ` [PATCH bpf 1/3] bpf: Enforce id generation for all may-be-null register type Martin KaFai Lau
2020-10-19 23:23   ` Alexei Starovoitov
2020-10-19 19:42 ` [PATCH bpf 2/3] bpf: selftest: Ensure the return value of bpf_skc_to helpers must be checked Martin KaFai Lau
2020-10-19 19:42 ` [PATCH bpf 3/3] bpf: selftest: Ensure the return value of the bpf_per_cpu_ptr() " Martin KaFai Lau
2020-10-20  0:33   ` Hao Luo
2020-10-19 23:30 ` [PATCH bpf 0/3] bpf: Enforce NULL check on new _OR_NULL return types patchwork-bot+netdevbpf

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).