History

bpf: Add prog flag to struct bpf_ksym object

Adding 'prog' bool flag to 'struct bpf_ksym' to mark that this object belongs to bpf_prog object. This change allows having bpf_prog objects together with other types (trampolines and dispatchers) in the single bpf_tree. It's used when searching for bpf_prog exception tables by the bpf_prog_ksym_find function, where we need to get the bpf_prog pointer. >From now we can safely add bpf_ksym support for trampoline or dispatcher objects, because we can differentiate them from bpf_prog objects.

Jiri Olsa committed 6 years ago

Commit cbd76f81 parent eda0c922 files · +12 −11Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/bpf.h+1−0
@@ -478,6 +478,7 @@ struct bpf_ksym { · 477 unmodified lines
478478 char name[KSYM_NAME_LEN];
479479 struct list_head lnode;
480480 struct latch_tree_node tnode;
481+ bool prog;
481482 };
482483
483484 enum bpf_tramp_prog_type {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t