aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_sockglue.c
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2017-04-28 16:25:04 +0200
committerDavid S. Miller <davem@davemloft.net>2017-04-30 22:41:59 -0400
commit5010e948420ea1cff85f6c2f64ec7a011aea3d07 (patch)
tree7f41790ce6992a94fa9ce45809ae8f0796484feb /net/ipv4/ip_sockglue.c
parentlwtunnel: fix error path in lwtunnel_fill_encap() (diff)
downloadlinux-dev-5010e948420ea1cff85f6c2f64ec7a011aea3d07.tar.xz
linux-dev-5010e948420ea1cff85f6c2f64ec7a011aea3d07.zip
samples/bpf: bpf_load.c detect and abort if ELF maps section size is wrong
The struct bpf_map_def was extended in commit fb30d4b71214 ("bpf: Add tests for map-in-map") with member unsigned int inner_map_idx. This changed the size of the maps section in the generated ELF _kern.o files. Unfortunately the loader in bpf_load.c does not detect or handle this. Thus, older _kern.o files became incompatible, and caused hard-to-debug errors where the syscall validation rejected BPF_MAP_CREATE request. This patch only detect the situation and aborts load_bpf_file(). It also add code comments warning people that read this loader for inspiration for these pitfalls. Fixes: fb30d4b71214 ("bpf: Add tests for map-in-map") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
0 files changed, 0 insertions, 0 deletions