Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] Add some 'malloc' failure checks
@ 2024-04-24  2:04 Kunwu Chan
  2024-04-24  2:04 ` [PATCH bpf-next 1/4] selftests/bpf: Add some null pointer checks Kunwu Chan
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Kunwu Chan @ 2024-04-24  2:04 UTC (permalink / raw)
  To: ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
	john.fastabend, kpsingh, sdf, haoluo, jolsa, mykolal, shuah,
	kunwu.chan
  Cc: bpf, linux-kselftest, linux-kernel, Kunwu Chan

The "malloc" call may not be successful.Add the malloc 
failure checking to avoid possible null dereference.

Kunwu Chan (4):
  selftests/bpf: Add some null pointer checks
  selftests/bpf/sockopt: Add a null pointer check for the run_test
  selftests/bpf: Add a null pointer check for the load_btf_spec
  selftests/bpf: Add a null pointer check for the
    serial_test_tp_attach_query

 tools/testing/selftests/bpf/prog_tests/sockopt.c         | 6 ++++++
 tools/testing/selftests/bpf/prog_tests/tp_attach_query.c | 3 +++
 tools/testing/selftests/bpf/test_progs.c                 | 7 +++++++
 tools/testing/selftests/bpf/test_verifier.c              | 2 ++
 4 files changed, 18 insertions(+)

-- 
2.40.1


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

end of thread, other threads:[~2024-05-10  8:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-24  2:04 [PATCH bpf-next 0/4] Add some 'malloc' failure checks Kunwu Chan
2024-04-24  2:04 ` [PATCH bpf-next 1/4] selftests/bpf: Add some null pointer checks Kunwu Chan
2024-04-24  9:35   ` Markus Elfring
2024-04-24  2:04 ` [PATCH bpf-next 2/4] selftests/bpf/sockopt: Add a null pointer check for the run_test Kunwu Chan
2024-04-24 10:21   ` Markus Elfring
2024-04-24  2:04 ` [PATCH bpf-next 3/4] selftests/bpf: Add a null pointer check for the load_btf_spec Kunwu Chan
2024-04-24 10:40   ` Markus Elfring
2024-04-24  2:04 ` [PATCH bpf-next 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query Kunwu Chan
2024-04-24 10:48   ` Markus Elfring
2024-05-03 15:47   ` Daniel Borkmann
2024-05-03 15:51     ` Daniel Borkmann
2024-05-10  8:21     ` Kunwu Chan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox