Skip to content
Commit e4975487 authored by Alexei Starovoitov's avatar Alexei Starovoitov
Browse files

[bpf] error when unknown bpf helper is called



Emit error when BPF backend sees a call to a global function or to an external symbol.
The kernel verifier only allows calls to predefined helpers from bpf.h
which are defined in 'enum bpf_func_id'. Such calls in assembler must
look like 'call [1-9]+' where number matches bpf_func_id.

Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
llvm-svn: 292204
parent c0857a40
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment