aboutsummaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <[email protected]>2017-10-05 21:52:11 -0700
committerDavid S. Miller <[email protected]>2017-10-07 23:29:39 +0100
commit473d97343f94ff20f5196078314e4dd83156d3a2 (patch)
tree0b740f409d0dd6eea79ff5b16c0711232d4e0e61 /lib/test-string_helpers.c
parentf192970de860d3ab90aa9e2a22853201a57bde78 (diff)
bpf: Change bpf_obj_name_cpy() to better ensure map's name is init by 0
During get_info_by_fd, the prog/map name is memcpy-ed. It depends on the prog->aux->name and map->name to be zero initialized. bpf_prog_aux is easy to guarantee that aux->name is zero init. The name in bpf_map may be harder to be guaranteed in the future when new map type is added. Hence, this patch makes bpf_obj_name_cpy() to always zero init the prog/map name. Suggested-by: Daniel Borkmann <[email protected]> Signed-off-by: Martin KaFai Lau <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions