Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Luis Gerhorst
linux
Commits
c3466890
Commit
c3466890
authored
4 years ago
by
Luis Gerhorst
Browse files
Options
Downloads
Patches
Plain Diff
bpftask: allow base_func helpers
parent
d0e9af5a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/bpf/task.c
+14
-3
14 additions, 3 deletions
kernel/bpf/task.c
with
14 additions
and
3 deletions
kernel/bpf/task.c
+
14
−
3
View file @
c3466890
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment