]> git.baikalelectronics.ru Git - kernel.git/commit
ebpf: export BPF_PSEUDO_MAP_FD to uapi
authorDaniel Borkmann <daniel@iogearbox.net>
Sun, 1 Mar 2015 11:31:43 +0000 (12:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Mar 2015 19:05:19 +0000 (14:05 -0500)
commit3d085b37e6dc2a2c6edf100b9a09b6e7d0e368b5
tree74e50377321d7afae02ebf494ee523cb878d285a
parent1018795de519cbfca9e5d007cf69c89322def84f
ebpf: export BPF_PSEUDO_MAP_FD to uapi

We need to export BPF_PSEUDO_MAP_FD to user space, as it's used in the
ELF BPF loader where instructions are being loaded that need map fixups.

An initial stage loads all maps into the kernel, and later on replaces
related instructions in the eBPF blob with BPF_PSEUDO_MAP_FD as source
register and the actual fd as immediate value.

The kernel verifier recognizes this keyword and replaces the map fd with
a real pointer internally.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/filter.h
include/uapi/linux/bpf.h
samples/bpf/libbpf.h