)]}' { "commit": "8e7ae2518f5265f0ef09d561748098fde5a87ccd", "tree": "4ca18ed93fa3e56a4c81ff6715d0a8b9d8b7afb9", "parents": [ "32ca98feab8c9076c89c0697c5a85e46fece809d" ], "author": { "name": "Martin KaFai Lau", "email": "kafai@fb.com", "time": "Fri Mar 13 18:02:09 2020 -0700" }, "committer": { "name": "Daniel Borkmann", "email": "daniel@iogearbox.net", "time": "Tue Mar 17 20:40:19 2020 +0100" }, "message": "bpf: Sanitize the bpf_struct_ops tcp-cc name\n\nThe bpf_struct_ops tcp-cc name should be sanitized in order to\navoid problematic chars (e.g. whitespaces).\n\nThis patch reuses the bpf_obj_name_cpy() for accepting the same set\nof characters in order to keep a consistent bpf programming experience.\nA \"size\" param is added. Also, the strlen is returned on success so\nthat the caller (like the bpf_tcp_ca here) can error out on empty name.\nThe existing callers of the bpf_obj_name_cpy() only need to change the\ntesting statement to \"if (err \u003c 0)\". For all these existing callers,\nthe err will be overwritten later, so no extra change is needed\nfor the new strlen return value.\n\nv3:\n - reverse xmas tree style\nv2:\n - Save the orig_src to avoid \"end - size\" (Andrii)\n\nFixes: 0baf26b0fcd7 (\"bpf: tcp: Support tcp_congestion_ops in bpf\")\nSigned-off-by: Martin KaFai Lau \u003ckafai@fb.com\u003e\nSigned-off-by: Daniel Borkmann \u003cdaniel@iogearbox.net\u003e\nAcked-by: Andrii Nakryiko \u003candriin@fb.com\u003e\nLink: https://lore.kernel.org/bpf/20200314010209.1131542-1-kafai@fb.com\n", "tree_diff": [ { "type": "modify", "old_id": "49b1a70e12c87c92774c6ebceadc420fdb61d8cd", "old_mode": 33188, "old_path": "include/linux/bpf.h", "new_id": "212991f6f2a5d6113e3dded01aedc3e838efe115", "new_mode": 33188, "new_path": "include/linux/bpf.h" }, { "type": "modify", "old_id": "0c7fb0d4836d38677dda7e2d6067476e6d086498", "old_mode": 33188, "old_path": "kernel/bpf/syscall.c", "new_id": "2857b7dda382c1eb469ec21f944c1d8cebf4340f", "new_mode": 33188, "new_path": "kernel/bpf/syscall.c" }, { "type": "modify", "old_id": "574972bc72995d3a78253a6521d67f813be935b3", "old_mode": 33188, "old_path": "net/ipv4/bpf_tcp_ca.c", "new_id": "2bf3abeb1456770780e8cdf3653d6f34b812245d", "new_mode": 33188, "new_path": "net/ipv4/bpf_tcp_ca.c" } ] }