diff options
author | Alexei Starovoitov <ast@kernel.org> | 2021-11-07 11:54:51 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-11-07 11:54:51 -0800 |
commit | 0cc78dcca36de43f6ec4a94ddf64ddfa9bb36024 (patch) | |
tree | 0adf410fb0caebdb0252f340a7fd0b27ff6c56e3 /kernel/bpf/btf.c | |
parent | 5fd79ed9bed1934de0ba0024e62eacaedb3c4c8a (diff) | |
parent | f108662b27c96cdadfadd39f0c0d650704cd593d (diff) |
Merge branch 'introduce bpf_find_vma'
Song Liu says:
====================
Changes v4 => v5:
1. Clean up and style change in 2/2. (Andrii)
Changes v3 => v4:
1. Move mmap_unlock_work to task_iter.c to fix build for .config without
!CONFIG_PERF_EVENTS. (kernel test robot <lkp@intel.com>)
Changes v2 => v3:
1. Avoid using x86 only function in selftests. (Yonghong)
2. Add struct file and struct vm_area_struct to btf_task_struct_ids, and
use it in bpf_find_vma and stackmap.c. (Yonghong)
3. Fix inaccurate comments. (Yonghong)
Changes v1 => v2:
1. Share irq_work with stackmap.c. (Daniel)
2. Add tests for illegal writes to task/vma from the callback function.
(Daniel)
3. Other small fixes.
Add helper bpf_find_vma. This can be used in some profiling use cases. It
might also be useful for LSM.
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/btf.c')
-rw-r--r-- | kernel/bpf/btf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index dbc3ad07e21b..cdb0fba65600 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -6342,7 +6342,10 @@ const struct bpf_func_proto bpf_btf_find_by_name_kind_proto = { .arg4_type = ARG_ANYTHING, }; -BTF_ID_LIST_GLOBAL_SINGLE(btf_task_struct_ids, struct, task_struct) +BTF_ID_LIST_GLOBAL(btf_task_struct_ids) +BTF_ID(struct, task_struct) +BTF_ID(struct, file) +BTF_ID(struct, vm_area_struct) /* BTF ID set registration API for modules */ |