diff options
author | Martin KaFai Lau <kafai@fb.com> | 2017-10-06 06:52:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-08 00:29:39 +0200 |
commit | 473d97343f94ff20f5196078314e4dd83156d3a2 (patch) | |
tree | 0b740f409d0dd6eea79ff5b16c0711232d4e0e61 /tools/include | |
parent | ip_gre: check packet length and mtu correctly in erspan tx (diff) | |
download | linux-473d97343f94ff20f5196078314e4dd83156d3a2.tar.xz linux-473d97343f94ff20f5196078314e4dd83156d3a2.zip |
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 <daniel@iogearbox.net>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions