aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/str_error.c
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <[email protected]>2019-06-28 09:12:35 +0000
committerDaniel Borkmann <[email protected]>2019-06-28 23:31:09 +0000
commit0cdbb4b09a0658b72c563638d476113aadd91afb (patch)
tree5e29d398bd0fcaac393d22b98ce3f0bc48f49f05 /tools/lib/bpf/str_error.c
parentbpf_xdp_redirect_map: Perform map lookup in eBPF helper (diff)
downloadkernel-0cdbb4b09a0658b72c563638d476113aadd91afb.tar.gz
kernel-0cdbb4b09a0658b72c563638d476113aadd91afb.zip
devmap: Allow map lookups from eBPF
We don't currently allow lookups into a devmap from eBPF, because the map lookup returns a pointer directly to the dev->ifindex, which shouldn't be modifiable from eBPF. However, being able to do lookups in devmaps is useful to know (e.g.) whether forwarding to a specific interface is enabled. Currently, programs work around this by keeping a shadow map of another type which indicates whether a map index is valid. Since we now have a flag to make maps read-only from the eBPF side, we can simply lift the lookup restriction if we make sure this flag is always set. Signed-off-by: Toke Høiland-Jørgensen <[email protected]> Acked-by: Jonathan Lemon <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'tools/lib/bpf/str_error.c')
0 files changed, 0 insertions, 0 deletions