summaryrefslogtreecommitdiff
path: root/.gitattributes
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2020-03-13 18:02:09 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2020-03-17 20:40:19 +0100
commit8e7ae2518f5265f0ef09d561748098fde5a87ccd (patch)
tree4ca18ed93fa3e56a4c81ff6715d0a8b9d8b7afb9 /.gitattributes
parent32ca98feab8c9076c89c0697c5a85e46fece809d (diff)
bpf: Sanitize the bpf_struct_ops tcp-cc name
The bpf_struct_ops tcp-cc name should be sanitized in order to avoid problematic chars (e.g. whitespaces). This patch reuses the bpf_obj_name_cpy() for accepting the same set of characters in order to keep a consistent bpf programming experience. A "size" param is added. Also, the strlen is returned on success so that the caller (like the bpf_tcp_ca here) can error out on empty name. The existing callers of the bpf_obj_name_cpy() only need to change the testing statement to "if (err < 0)". For all these existing callers, the err will be overwritten later, so no extra change is needed for the new strlen return value. v3: - reverse xmas tree style v2: - Save the orig_src to avoid "end - size" (Andrii) Fixes: 0baf26b0fcd7 ("bpf: tcp: Support tcp_congestion_ops in bpf") Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200314010209.1131542-1-kafai@fb.com
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions