• Alexei Starovoitov's avatar
    bpf: handle pseudo BPF_CALL insn · 0a542a86
    Alexei Starovoitov authored
    in native eBPF programs userspace is using pseudo BPF_CALL instructions
    which encode one of 'enum bpf_func_id' inside insn->imm field.
    Verifier checks that program using correct function arguments to given func_id.
    If all checks passed, kernel needs to fixup BPF_CALL->imm fields by
    replacing func_id with in-kernel function pointer.
    eBPF interpreter just calls the function.
    
    In-kernel eBPF users continue to use generic BPF_CALL.
    Signed-off-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0a542a86
syscall.c 13 KB