diff options
author | Martin KaFai Lau <kafai@fb.com> | 2017-10-05 21:52:11 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-07 23:29:39 +0100 |
commit | 473d97343f94ff20f5196078314e4dd83156d3a2 (patch) | |
tree | 0b740f409d0dd6eea79ff5b16c0711232d4e0e61 /net/sched/cls_basic.c | |
parent | f192970de860d3ab90aa9e2a22853201a57bde78 (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 <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 'net/sched/cls_basic.c')
0 files changed, 0 insertions, 0 deletions