bpf: replace map pointer loads before calling into offloads
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 4 May 2018 01:37:11 +0000 (18:37 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 May 2018 21:41:03 +0000 (23:41 +0200)
commitf4e3ec0d573e238f383b3da365127002579a07d6
tree856b1b6e09f4f1cea9be322e3ee65405fcbfbbe7
parent6cb5fb3891db9d3f6feb0f7669946550c9abc420
bpf: replace map pointer loads before calling into offloads

Offloads may find host map pointers more useful than map fds.
Map pointers can be used to identify the map, while fds are
only valid within the context of loading process.

Jump to skip_full_check on error in case verifier log overflow
has to be handled (replace_map_fd_with_map_ptr() prints to the
log, driver prep may do that too in the future).

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/verifier.c