Skip to content
Snippets Groups Projects
Commit c3466890 authored by Luis Gerhorst's avatar Luis Gerhorst
Browse files

bpftask: allow base_func helpers

parent d0e9af5a
No related branches found
No related tags found
No related merge requests found
......@@ -200,11 +200,22 @@ static long find(const char __user *pathname_user, const char __user *filename_u
return err;
}
/* dummy _ops. The verifier will operate on target program's ops. */
static const struct bpf_func_proto *
task_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
{
switch (func_id) {
/* case BPF_FUNC_ktime_get_ns: */
/* return &bpf_ktime_get_ns_proto; */
default:
return bpf_base_func_proto(func_id);
}
}
const struct bpf_verifier_ops task_verifier_ops = {
.get_func_proto = task_prog_func_proto,
};
const struct bpf_prog_ops task_prog_ops = {
};
const struct bpf_prog_ops task_prog_ops = {};
SYSCALL_DEFINE2(bpftask, int, prog_fd, void *, arg)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment