selftests/bpf: Add and use strscpy()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | selftests/bpf: Add simple strscpy() implementationtools/ tools/ | +26 | 0 replies | |
| 2/7 | selftests/bpf: Add strscpy_cat()tools/ | +28 | 1 reply | |
| 3/7 | selftests/bpf: Replace strcpy() calls with strscpy()tools/ tools/ tools/ +3 more | +8 | 0 replies | |
| 4/7 | selftests/bpf: Replace strncpy() with strscpy()tools/ tools/ tools/ +7 more | +13 | 0 replies | |
| 5/7 | selftests/bpf: Use strscpy_cat() in the test_loadertools/ | +4 | 0 replies | |
| 6/7 | selftests/bpf: Use strscpy in bpftool_helpers.ctools/ | +9 | 0 replies | |
| 7/7 | selftests/bpf: Use memcpy() for bounded non-NULL-terminated copiestools/ tools/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH bpf v1 0/7] selftests/bpf: Add and use strscpy()
This series introduces a simplified implementation of strscpy() to selftests/bpf and then replaces strcpy/strncpy usages across the tests with it.
For context see a discussion that prompted this series [1].
[1] https://lore.kernel.org/bpf/CAADnVQ+9uw2_o388j43EWiAPdMB=3FLx2jq-9zRSvqrv-wgRag@mail.gmail.com/
Suggested-by Alexei Starovoitov <[email protected]>
Ihor Solodrai (7):
selftests/bpf: Add simple strscpy() implementation selftests/bpf: Add strscpy_cat()
selftests/bpf: Replace strcpy() calls with strscpy() selftests/bpf: Replace strncpy() with strscpy() selftests/bpf: Use strscpy_cat() in the test_loader selftests/bpf: Use strscpy in bpftool_helpers.c selftests/bpf: Use memcpy() for bounded non-NULL-terminated copies
tools/testing/selftests/bpf/bpf_util.h | 66 +++++++++++++++---- tools/testing/selftests/bpf/bpftool_helpers.c | 16 +++-- tools/testing/selftests/bpf/cgroup_helpers.c | 2 +- tools/testing/selftests/bpf/network_helpers.c | 5 +- .../testing/selftests/bpf/prog_tests/align.c | 2 +- .../selftests/bpf/prog_tests/bpf_iter.c | 3 +- .../selftests/bpf/prog_tests/bpf_tcp_ca.c | 2 +- .../selftests/bpf/prog_tests/ctx_rewrite.c | 6 +- .../selftests/bpf/prog_tests/flow_dissector.c | 4 +- .../bpf/prog_tests/queue_stack_map.c | 4 +- .../selftests/bpf/prog_tests/setget_sockopt.c | 2 +- .../bpf/prog_tests/skc_to_unix_sock.c | 2 +- .../selftests/bpf/prog_tests/sockopt_sk.c | 2 +- .../bpf/prog_tests/task_local_data.h | 2 +- .../selftests/bpf/prog_tests/tc_redirect.c | 2 +- .../selftests/bpf/prog_tests/test_veristat.c | 4 +- tools/testing/selftests/bpf/test_loader.c | 8 +-- tools/testing/selftests/bpf/test_progs.c | 2 +- tools/testing/selftests/bpf/test_verifier.c | 2 +- tools/testing/selftests/bpf/xdp_features.c | 3 +- tools/testing/selftests/bpf/xdp_hw_metadata.c | 4 +- 21 files changed, 93 insertions(+), 50 deletions(-)
Signature · 1 line
2.53.0