mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-30 14:34:51 +08:00
a50388dbb3
Allow passing known constant scalars as arguments to kfuncs that do not represent a size parameter. We use mark_chain_precision for the constant scalar argument to mark it precise. This makes the search pruning optimization of verifier more conservative for such kfunc calls, and each non-distinct argument is considered unequivalent. We will use this support to then expose a bpf_obj_new function where it takes the local type ID of a type in program BTF, and returns a PTR_TO_BTF_ID | MEM_ALLOC to the local type, and allows programs to allocate their own objects. Each type ID resolves to a distinct type with a possibly distinct size, hence the type ID constant matters in terms of program safety and its precision needs to be checked between old and cur states inside regsafe. The use of mark_chain_precision enables this. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20221118015614.2013203-13-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> |
||
---|---|---|
.. | ||
libbpf | ||
bpf_design_QA.rst | ||
bpf_devel_QA.rst | ||
bpf_licensing.rst | ||
bpf_prog_run.rst | ||
btf.rst | ||
clang-notes.rst | ||
classic_vs_extended.rst | ||
drgn.rst | ||
faq.rst | ||
helpers.rst | ||
index.rst | ||
instruction-set.rst | ||
kfuncs.rst | ||
linux-notes.rst | ||
llvm_reloc.rst | ||
map_array.rst | ||
map_cgroup_storage.rst | ||
map_cgrp_storage.rst | ||
map_cpumap.rst | ||
map_hash.rst | ||
map_lpm_trie.rst | ||
map_of_maps.rst | ||
map_queue_stack.rst | ||
maps.rst | ||
other.rst | ||
prog_cgroup_sockopt.rst | ||
prog_cgroup_sysctl.rst | ||
prog_flow_dissector.rst | ||
prog_lsm.rst | ||
prog_sk_lookup.rst | ||
programs.rst | ||
ringbuf.rst | ||
s390.rst | ||
syscall_api.rst | ||
test_debug.rst | ||
verifier.rst |