-
Notifications
You must be signed in to change notification settings - Fork 5
ftrace,bpf: Use single direct ops for bpf trampolines #6403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bpf-next_base
Are you sure you want to change the base?
ftrace,bpf: Use single direct ops for bpf trampolines #6403
Conversation
|
Upstream branch: d088da9 |
729c7ba to
623bab9
Compare
|
Upstream branch: e0940c6 |
509030d to
55c3708
Compare
623bab9 to
fe03c14
Compare
|
Upstream branch: 792f258 |
55c3708 to
477b884
Compare
fe03c14 to
65bfb85
Compare
|
Upstream branch: 878ee3c |
477b884 to
a17bf14
Compare
65bfb85 to
b1f8b58
Compare
|
Upstream branch: ae24fc8 |
a17bf14 to
a7741ac
Compare
b1f8b58 to
8f7081b
Compare
|
Upstream branch: b7f7d76 |
a7741ac to
938d097
Compare
8f7081b to
c347688
Compare
|
Upstream branch: 4dd3a48 |
938d097 to
503a988
Compare
c347688 to
fb42a92
Compare
|
Upstream branch: 8f7cf30 |
503a988 to
7be58df
Compare
fb42a92 to
3282beb
Compare
|
Upstream branch: c427320 |
7be58df to
8e8f8cb
Compare
3282beb to
067f842
Compare
6223f99 to
baaa38a
Compare
3bd2c43 to
71c4be1
Compare
|
Upstream branch: 4617b30 |
baaa38a to
35d1efa
Compare
71c4be1 to
9b3817c
Compare
|
Upstream branch: 590699d |
35d1efa to
086613a
Compare
9b3817c to
90dfd48
Compare
|
Upstream branch: f2cb066 |
086613a to
b37e3c1
Compare
90dfd48 to
1559a3a
Compare
|
Upstream branch: 8c868a3 |
b37e3c1 to
67df020
Compare
1559a3a to
ae9b520
Compare
|
Upstream branch: 8f6ddc0 |
67df020 to
240bee3
Compare
ae9b520 to
399fdcb
Compare
|
Upstream branch: 5262cb2 |
240bee3 to
6f06236
Compare
399fdcb to
8c83cb5
Compare
Make alloc_and_copy_ftrace_hash to copy also direct address for each hash entry. Signed-off-by: Jiri Olsa <[email protected]>
We are going to use these functions in following changes. Signed-off-by: Jiri Olsa <[email protected]>
Adding update_ftrace_direct_add function that adds all entries (ip -> addr) provided in hash argument to direct ftrace ops and updates its attachments. The difference to current register_ftrace_direct is - hash argument that allows to register multiple ip -> direct entries at once - we can call update_ftrace_direct_add multiple times on the same ftrace_ops object, becase after first registration with register_ftrace_function_nolock, it uses ftrace_update_ops to update the ftrace_ops object This change will allow us to have simple ftrace_ops for all bpf direct interface users in following changes. Signed-off-by: Jiri Olsa <[email protected]>
Adding update_ftrace_direct_del function that removes all entries (ip -> addr) provided in hash argument to direct ftrace ops and updates its attachments. The difference to current unregister_ftrace_direct is - hash argument that allows to unregister multiple ip -> direct entries at once - we can call update_ftrace_direct_del multiple times on the same ftrace_ops object, becase we do not need to unregister all entries at once, we can do it gradualy with the help of ftrace_update_ops function This change will allow us to have simple ftrace_ops for all bpf direct interface users in following changes. Signed-off-by: Jiri Olsa <[email protected]>
Adding update_ftrace_direct_mod function that modifies all entries (ip -> direct) provided in hash argument to direct ftrace ops and updates its attachments. The difference to current modify_ftrace_direct is: - hash argument that allows to modify multiple ip -> direct entries at once This change will allow us to have simple ftrace_ops for all bpf direct interface users in following changes. Signed-off-by: Jiri Olsa <[email protected]>
Following changes need to lookup trampoline based on its ip address, adding hash table for that. Signed-off-by: Jiri Olsa <[email protected]>
We are going to remove "ftrace_ops->private == bpf_trampoline" setup in following changes. Adding ip argument to ftrace_ops_func_t callback function, so we can use it to look up the trampoline. Signed-off-by: Jiri Olsa <[email protected]>
Using single ftrace_ops for direct calls update instead of allocating ftrace_ops object for each trampoline. With single ftrace_ops object we can use update_ftrace_direct_* api that allows multiple ip sites updates on single ftrace_ops object. Adding HAVE_SINGLE_FTRACE_DIRECT_OPS config option to be enabled on each arch that supports this. At the moment we can enable this only on x86 arch, because arm relies on ftrace_ops object representing just single trampoline image (stored in ftrace_ops::direct_call). Ach that do not support this will continue to use *_ftrace_direct api. Signed-off-by: Jiri Olsa <[email protected]>
|
Upstream branch: 688b745 |
6f06236 to
fecd0ab
Compare
Pull request for series with
subject: ftrace,bpf: Use single direct ops for bpf trampolines
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1026027