]> git.ipfire.org Git - thirdparty/iproute2.git/commit
{f, m}_bpf: check map attributes when fetching as pinned
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 26 Nov 2015 14:38:43 +0000 (15:38 +0100)
committerStephen Hemminger <shemming@brocade.com>
Sun, 29 Nov 2015 19:55:16 +0000 (11:55 -0800)
commit9e607f2e722604a57a2c1ec9a174fcc505d9c451
tree492d8203e184f1b3bd451db62c04c6d806e1dca9
parent910b543dcce52290ce723758e1d9bb436188a26b
{f, m}_bpf: check map attributes when fetching as pinned

Make use of the new show_fdinfo() facility and verify that when a
pinned map is being fetched that its basic attributes are the same
as the map we declared from the ELF file. I.e. when placed into the
globalns, collisions could occur. In such a case warn the user and
bail out.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
tc/tc_bpf.c