€•jŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ/translations/zh_CN/bpf/drgn”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/zh_TW/bpf/drgn”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/it_IT/bpf/drgn”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ja_JP/bpf/drgn”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ko_KR/bpf/drgn”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/sp_SP/bpf/drgn”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ3SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)”h]”hŒ3SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒ6/var/lib/git/docbuild/linux/Documentation/bpf/drgn.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒBPF drgn tools”h]”hŒBPF drgn tools”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ paragraph”“”)”}”(hX drgn scripts is a convenient and easy to use mechanism to retrieve arbitrary kernel data structures. drgn is not relying on kernel UAPI to read the data. Instead it's reading directly from ``/proc/kcore`` or vmcore and pretty prints the data based on DWARF debug information from vmlinux.”h]”(hŒ¿drgn scripts is a convenient and easy to use mechanism to retrieve arbitrary kernel data structures. drgn is not relying on kernel UAPI to read the data. Instead it’s reading directly from ”…””}”(hhËhžhhŸNh NubhŒliteral”“”)”}”(hŒ``/proc/kcore``”h]”hŒ /proc/kcore”…””}”(hhÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhhËubhŒT or vmcore and pretty prints the data based on DWARF debug information from vmlinux.”…””}”(hhËhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhÊ)”}”(hŒ/This document describes BPF related drgn tools.”h]”hŒ/This document describes BPF related drgn tools.”…””}”(hhíhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K hh¶hžhubhÊ)”}”(hŒhSee `drgn/tools`_ for all tools available at the moment and `drgn/doc`_ for more details on drgn itself.”h]”(hŒSee ”…””}”(hhûhžhhŸNh NubhŒ reference”“”)”}”(hŒ `drgn/tools`_”h]”hŒ drgn/tools”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ drgn/tools”Œrefuri”Œ1https://github.com/osandov/drgn/tree/master/tools”uh1jhhûŒresolved”KubhŒ+ for all tools available at the moment and ”…””}”(hhûhžhhŸNh Nubj)”}”(hŒ `drgn/doc`_”h]”hŒdrgn/doc”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œdrgn/doc”jŒ&https://drgn.readthedocs.io/en/latest/”uh1jhhûjKubhŒ! for more details on drgn itself.”…””}”(hhûhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhµ)”}”(hhh]”(hº)”}”(hŒbpf_inspect.py”h]”hŒbpf_inspect.py”…””}”(hj:hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj7hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ Description”h]”hŒ Description”…””}”(hjKhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjHhžhhŸh³h KubhÊ)”}”(hŒÌ`bpf_inspect.py`_ is a tool intended to inspect BPF programs and maps. It can iterate over all programs and maps in the system and print basic information about these objects, including id, type and name.”h]”(j)”}”(hŒ`bpf_inspect.py`_”h]”hŒbpf_inspect.py”…””}”(hj]hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œbpf_inspect.py”jŒ@https://github.com/osandov/drgn/blob/master/tools/bpf_inspect.py”uh1jhjYjKubhŒ» is a tool intended to inspect BPF programs and maps. It can iterate over all programs and maps in the system and print basic information about these objects, including id, type and name.”…””}”(hjYhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KhjHhžhubhÊ)”}”(hX The main use-case `bpf_inspect.py`_ covers is to show BPF programs of types ``BPF_PROG_TYPE_EXT`` and ``BPF_PROG_TYPE_TRACING`` attached to other BPF programs via ``freplace``/``fentry``/``fexit`` mechanisms, since there is no user-space API to get this information.”h]”(hŒThe main use-case ”…””}”(hjxhžhhŸNh Nubj)”}”(hŒ`bpf_inspect.py`_”h]”hŒbpf_inspect.py”…””}”(hj€hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œbpf_inspect.py”jjmuh1jhjxjKubhŒ) covers is to show BPF programs of types ”…””}”(hjxhžhhŸNh NubhÔ)”}”(hŒ``BPF_PROG_TYPE_EXT``”h]”hŒBPF_PROG_TYPE_EXT”…””}”(hj”hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjxubhŒ and ”…””}”(hjxhžhhŸNh NubhÔ)”}”(hŒ``BPF_PROG_TYPE_TRACING``”h]”hŒBPF_PROG_TYPE_TRACING”…””}”(hj¦hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjxubhŒ$ attached to other BPF programs via ”…””}”(hjxhžhhŸNh NubhÔ)”}”(hŒ ``freplace``”h]”hŒfreplace”…””}”(hj¸hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjxubhŒ/”…””}”(hjxhžhhŸNh NubhÔ)”}”(hŒ ``fentry``”h]”hŒfentry”…””}”(hjÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjxubhŒ/”…””}”hjxsbhÔ)”}”(hŒ ``fexit``”h]”hŒfexit”…””}”(hjÜhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjxubhŒF mechanisms, since there is no user-space API to get this information.”…””}”(hjxhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KhjHhžhubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1h´hj7hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒGetting started”h]”hŒGetting started”…””}”(hjÿhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjühžhhŸh³h K!ubhÊ)”}”(hŒ6List BPF programs (full names are obtained from BTF)::”h]”hŒ5List BPF programs (full names are obtained from BTF):”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K#hjühžhubhŒ literal_block”“”)”}”(hŒä% sudo bpf_inspect.py prog 27: BPF_PROG_TYPE_TRACEPOINT tracepoint__tcp__tcp_send_reset 4632: BPF_PROG_TYPE_CGROUP_SOCK_ADDR tw_ipt_bind 49464: BPF_PROG_TYPE_RAW_TRACEPOINT raw_tracepoint__sched_process_exit”h]”hŒä% sudo bpf_inspect.py prog 27: BPF_PROG_TYPE_TRACEPOINT tracepoint__tcp__tcp_send_reset 4632: BPF_PROG_TYPE_CGROUP_SOCK_ADDR tw_ipt_bind 49464: BPF_PROG_TYPE_RAW_TRACEPOINT raw_tracepoint__sched_process_exit”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jhŸh³h K%hjühžhubhÊ)”}”(hŒList BPF maps::”h]”hŒList BPF maps:”…””}”(hj+hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K*hjühžhubj)”}”(hŒ¼% sudo bpf_inspect.py map 2577: BPF_MAP_TYPE_HASH tw_ipt_vips 4050: BPF_MAP_TYPE_STACK_TRACE stack_traces 4069: BPF_MAP_TYPE_PERCPU_ARRAY ned_dctcp_cntr”h]”hŒ¼% sudo bpf_inspect.py map 2577: BPF_MAP_TYPE_HASH tw_ipt_vips 4050: BPF_MAP_TYPE_STACK_TRACE stack_traces 4069: BPF_MAP_TYPE_PERCPU_ARRAY ned_dctcp_cntr”…””}”hj9sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jhŸh³h K,hjühžhubhÊ)”}”(hŒ?Find BPF programs attached to BPF program ``test_pkt_access``::”h]”(hŒ*Find BPF programs attached to BPF program ”…””}”(hjGhžhhŸNh NubhÔ)”}”(hŒ``test_pkt_access``”h]”hŒtest_pkt_access”…””}”(hjOhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjGubhŒ:”…””}”(hjGhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K1hjühžhubj)”}”(hXj% sudo bpf_inspect.py p | grep test_pkt_access 650: BPF_PROG_TYPE_SCHED_CLS test_pkt_access 654: BPF_PROG_TYPE_TRACING test_main linked:[650->25: BPF_TRAMP_FEXIT test_pkt_access->test_pkt_access()] 655: BPF_PROG_TYPE_TRACING test_subprog1 linked:[650->29: BPF_TRAMP_FEXIT test_pkt_access->test_pkt_access_subprog1()] 656: BPF_PROG_TYPE_TRACING test_subprog2 linked:[650->31: BPF_TRAMP_FEXIT test_pkt_access->test_pkt_access_subprog2()] 657: BPF_PROG_TYPE_TRACING test_subprog3 linked:[650->21: BPF_TRAMP_FEXIT test_pkt_access->test_pkt_access_subprog3()] 658: BPF_PROG_TYPE_EXT new_get_skb_len linked:[650->16: BPF_TRAMP_REPLACE test_pkt_access->get_skb_len()] 659: BPF_PROG_TYPE_EXT new_get_skb_ifindex linked:[650->23: BPF_TRAMP_REPLACE test_pkt_access->get_skb_ifindex()] 660: BPF_PROG_TYPE_EXT new_get_constant linked:[650->19: BPF_TRAMP_REPLACE test_pkt_access->get_constant()]”h]”hXj% sudo bpf_inspect.py p | grep test_pkt_access 650: BPF_PROG_TYPE_SCHED_CLS test_pkt_access 654: BPF_PROG_TYPE_TRACING test_main linked:[650->25: BPF_TRAMP_FEXIT test_pkt_access->test_pkt_access()] 655: BPF_PROG_TYPE_TRACING test_subprog1 linked:[650->29: BPF_TRAMP_FEXIT test_pkt_access->test_pkt_access_subprog1()] 656: BPF_PROG_TYPE_TRACING test_subprog2 linked:[650->31: BPF_TRAMP_FEXIT test_pkt_access->test_pkt_access_subprog2()] 657: BPF_PROG_TYPE_TRACING test_subprog3 linked:[650->21: BPF_TRAMP_FEXIT test_pkt_access->test_pkt_access_subprog3()] 658: BPF_PROG_TYPE_EXT new_get_skb_len linked:[650->16: BPF_TRAMP_REPLACE test_pkt_access->get_skb_len()] 659: BPF_PROG_TYPE_EXT new_get_skb_ifindex linked:[650->23: BPF_TRAMP_REPLACE test_pkt_access->get_skb_ifindex()] 660: BPF_PROG_TYPE_EXT new_get_constant linked:[650->19: BPF_TRAMP_REPLACE test_pkt_access->get_constant()]”…””}”hjgsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jhŸh³h K3hjühžhubhÊ)”}”(hŒ¦It can be seen that there is a program ``test_pkt_access``, id 650 and there are multiple other tracing and ext programs attached to functions in ``test_pkt_access``.”h]”(hŒ'It can be seen that there is a program ”…””}”(hjuhžhhŸNh NubhÔ)”}”(hŒ``test_pkt_access``”h]”hŒtest_pkt_access”…””}”(hj}hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjuubhŒX, id 650 and there are multiple other tracing and ext programs attached to functions in ”…””}”(hjuhžhhŸNh NubhÔ)”}”(hŒ``test_pkt_access``”h]”hŒtest_pkt_access”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjuubhŒ.”…””}”(hjuhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K=hjühžhubhÊ)”}”(hŒFor example the line::”h]”hŒFor example the line:”…””}”(hj§hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KAhjühžhubj)”}”(hŒ‰658: BPF_PROG_TYPE_EXT new_get_skb_len linked:[650->16: BPF_TRAMP_REPLACE test_pkt_access->get_skb_len()]”h]”hŒ‰658: BPF_PROG_TYPE_EXT new_get_skb_len linked:[650->16: BPF_TRAMP_REPLACE test_pkt_access->get_skb_len()]”…””}”hjµsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jhŸh³h KChjühžhubhÊ)”}”(hŒÕ, means that BPF program id 658, type ``BPF_PROG_TYPE_EXT``, name ``new_get_skb_len`` replaces (``BPF_TRAMP_REPLACE``) function ``get_skb_len()`` that has BTF id 16 in BPF program id 650, name ``test_pkt_access``.”h]”(hŒ&, means that BPF program id 658, type ”…””}”(hjÃhžhhŸNh NubhÔ)”}”(hŒ``BPF_PROG_TYPE_EXT``”h]”hŒBPF_PROG_TYPE_EXT”…””}”(hjËhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjÃubhŒ, name ”…””}”(hjÃhžhhŸNh NubhÔ)”}”(hŒ``new_get_skb_len``”h]”hŒnew_get_skb_len”…””}”(hjÝhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjÃubhŒ replaces (”…””}”(hjÃhžhhŸNh NubhÔ)”}”(hŒ``BPF_TRAMP_REPLACE``”h]”hŒBPF_TRAMP_REPLACE”…””}”(hjïhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjÃubhŒ ) function ”…””}”(hjÃhžhhŸNh NubhÔ)”}”(hŒ``get_skb_len()``”h]”hŒ get_skb_len()”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjÃubhŒ0 that has BTF id 16 in BPF program id 650, name ”…””}”(hjÃhžhhŸNh NubhÔ)”}”(hŒ``test_pkt_access``”h]”hŒtest_pkt_access”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjÃubhŒ.”…””}”(hjÃhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KEhjühžhubhÊ)”}”(hŒ Getting help:”h]”hŒ Getting help:”…””}”(hj+hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KIhjühžhubj)”}”(hXˆ% sudo bpf_inspect.py usage: bpf_inspect.py [-h] {prog,p,map,m} ... drgn script to list BPF programs or maps and their properties unavailable via kernel API. See https://github.com/osandov/drgn/ for more details on drgn. optional arguments: -h, --help show this help message and exit subcommands: {prog,p,map,m} prog (p) list BPF programs map (m) list BPF maps”h]”hXˆ% sudo bpf_inspect.py usage: bpf_inspect.py [-h] {prog,p,map,m} ... drgn script to list BPF programs or maps and their properties unavailable via kernel API. See https://github.com/osandov/drgn/ for more details on drgn. optional arguments: -h, --help show this help message and exit subcommands: {prog,p,map,m} prog (p) list BPF programs map (m) list BPF maps”…””}”hj9sbah}”(h]”h ]”h"]”h$]”h&]”h±h²Œforce”‰Œlanguage”Œnone”Œhighlight_args”}”uh1jhŸh³h KKhjühžhubeh}”(h]”Œgetting-started”ah ]”h"]”Œgetting started”ah$]”h&]”uh1h´hj7hžhhŸh³h K!ubhµ)”}”(hhh]”(hº)”}”(hŒ Customization”h]”hŒ Customization”…””}”(hjWhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjThžhhŸh³h K^ubhÊ)”}”(hŒThe script is intended to be customized by developers to print relevant information about BPF programs, maps and other objects.”h]”hŒThe script is intended to be customized by developers to print relevant information about BPF programs, maps and other objects.”…””}”(hjehžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h K`hjThžhubhÊ)”}”(hŒGFor example, to print ``struct bpf_prog_aux`` for BPF program id 53077:”h]”(hŒFor example, to print ”…””}”(hjshžhhŸNh NubhÔ)”}”(hŒ``struct bpf_prog_aux``”h]”hŒstruct bpf_prog_aux”…””}”(hj{hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÓhjsubhŒ for BPF program id 53077:”…””}”(hjshžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KchjThžhubj)”}”(hXÓ% git diff diff --git a/tools/bpf_inspect.py b/tools/bpf_inspect.py index 650e228..aea2357 100755 --- a/tools/bpf_inspect.py +++ b/tools/bpf_inspect.py @@ -112,7 +112,9 @@ def list_bpf_progs(args): if linked: linked = f" linked:[{linked}]" - print(f"{id_:>6}: {type_:32} {name:32} {linked}") + if id_ == 53077: + print(f"{id_:>6}: {type_:32} {name:32}") + print(f"{bpf_prog.aux}") def list_bpf_maps(args):”h]”hXÓ% git diff diff --git a/tools/bpf_inspect.py b/tools/bpf_inspect.py index 650e228..aea2357 100755 --- a/tools/bpf_inspect.py +++ b/tools/bpf_inspect.py @@ -112,7 +112,9 @@ def list_bpf_progs(args): if linked: linked = f" linked:[{linked}]" - print(f"{id_:>6}: {type_:32} {name:32} {linked}") + if id_ == 53077: + print(f"{id_:>6}: {type_:32} {name:32}") + print(f"{bpf_prog.aux}") def list_bpf_maps(args):”…””}”hj“sbah}”(h]”h ]”h"]”h$]”h&]”h±h²jG‰jHŒnone”jJ}”uh1jhŸh³h KehjThžhubhÊ)”}”(hŒIt produces the output::”h]”hŒIt produces the output:”…””}”(hj£hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h KxhjThžhubj)”}”(hX•% sudo bpf_inspect.py p 53077: BPF_PROG_TYPE_XDP tw_xdp_policer *(struct bpf_prog_aux *)0xffff8893fad4b400 = { .refcnt = (atomic64_t){ .counter = (long)58, }, .used_map_cnt = (u32)1, .max_ctx_offset = (u32)8, .max_pkt_offset = (u32)15, .max_tp_access = (u32)0, .stack_depth = (u32)8, .id = (u32)53077, .func_cnt = (u32)0, .func_idx = (u32)0, .attach_btf_id = (u32)0, .linked_prog = (struct bpf_prog *)0x0, .verifier_zext = (bool)0, .offload_requested = (bool)0, .attach_btf_trace = (bool)0, .func_proto_unreliable = (bool)0, .trampoline_prog_type = (enum bpf_tramp_prog_type)BPF_TRAMP_FENTRY, .trampoline = (struct bpf_trampoline *)0x0, .tramp_hlist = (struct hlist_node){ .next = (struct hlist_node *)0x0, .pprev = (struct hlist_node **)0x0, }, .attach_func_proto = (const struct btf_type *)0x0, .attach_func_name = (const char *)0x0, .func = (struct bpf_prog **)0x0, .jit_data = (void *)0x0, .poke_tab = (struct bpf_jit_poke_descriptor *)0x0, .size_poke_tab = (u32)0, .ksym_tnode = (struct latch_tree_node){ .node = (struct rb_node [2]){ { .__rb_parent_color = (unsigned long)18446612956263126665, .rb_right = (struct rb_node *)0x0, .rb_left = (struct rb_node *)0xffff88a0be3d0088, }, { .__rb_parent_color = (unsigned long)18446612956263126689, .rb_right = (struct rb_node *)0x0, .rb_left = (struct rb_node *)0xffff88a0be3d00a0, }, }, }, .ksym_lnode = (struct list_head){ .next = (struct list_head *)0xffff88bf481830b8, .prev = (struct list_head *)0xffff888309f536b8, }, .ops = (const struct bpf_prog_ops *)xdp_prog_ops+0x0 = 0xffffffff820fa350, .used_maps = (struct bpf_map **)0xffff889ff795de98, .prog = (struct bpf_prog *)0xffffc9000cf2d000, .user = (struct user_struct *)root_user+0x0 = 0xffffffff82444820, .load_time = (u64)2408348759285319, .cgroup_storage = (struct bpf_map *[2]){}, .name = (char [16])"tw_xdp_policer", .security = (void *)0xffff889ff795d548, .offload = (struct bpf_prog_offload *)0x0, .btf = (struct btf *)0xffff8890ce6d0580, .func_info = (struct bpf_func_info *)0xffff889ff795d240, .func_info_aux = (struct bpf_func_info_aux *)0xffff889ff795de20, .linfo = (struct bpf_line_info *)0xffff888a707afc00, .jited_linfo = (void **)0xffff8893fad48600, .func_info_cnt = (u32)1, .nr_linfo = (u32)37, .linfo_idx = (u32)0, .num_exentries = (u32)0, .extable = (struct exception_table_entry *)0xffffffffa032d950, .stats = (struct bpf_prog_stats *)0x603fe3a1f6d0, .work = (struct work_struct){ .data = (atomic_long_t){ .counter = (long)0, }, .entry = (struct list_head){ .next = (struct list_head *)0x0, .prev = (struct list_head *)0x0, }, .func = (work_func_t)0x0, }, .rcu = (struct callback_head){ .next = (struct callback_head *)0x0, .func = (void (*)(struct callback_head *))0x0, }, }”h]”hX•% sudo bpf_inspect.py p 53077: BPF_PROG_TYPE_XDP tw_xdp_policer *(struct bpf_prog_aux *)0xffff8893fad4b400 = { .refcnt = (atomic64_t){ .counter = (long)58, }, .used_map_cnt = (u32)1, .max_ctx_offset = (u32)8, .max_pkt_offset = (u32)15, .max_tp_access = (u32)0, .stack_depth = (u32)8, .id = (u32)53077, .func_cnt = (u32)0, .func_idx = (u32)0, .attach_btf_id = (u32)0, .linked_prog = (struct bpf_prog *)0x0, .verifier_zext = (bool)0, .offload_requested = (bool)0, .attach_btf_trace = (bool)0, .func_proto_unreliable = (bool)0, .trampoline_prog_type = (enum bpf_tramp_prog_type)BPF_TRAMP_FENTRY, .trampoline = (struct bpf_trampoline *)0x0, .tramp_hlist = (struct hlist_node){ .next = (struct hlist_node *)0x0, .pprev = (struct hlist_node **)0x0, }, .attach_func_proto = (const struct btf_type *)0x0, .attach_func_name = (const char *)0x0, .func = (struct bpf_prog **)0x0, .jit_data = (void *)0x0, .poke_tab = (struct bpf_jit_poke_descriptor *)0x0, .size_poke_tab = (u32)0, .ksym_tnode = (struct latch_tree_node){ .node = (struct rb_node [2]){ { .__rb_parent_color = (unsigned long)18446612956263126665, .rb_right = (struct rb_node *)0x0, .rb_left = (struct rb_node *)0xffff88a0be3d0088, }, { .__rb_parent_color = (unsigned long)18446612956263126689, .rb_right = (struct rb_node *)0x0, .rb_left = (struct rb_node *)0xffff88a0be3d00a0, }, }, }, .ksym_lnode = (struct list_head){ .next = (struct list_head *)0xffff88bf481830b8, .prev = (struct list_head *)0xffff888309f536b8, }, .ops = (const struct bpf_prog_ops *)xdp_prog_ops+0x0 = 0xffffffff820fa350, .used_maps = (struct bpf_map **)0xffff889ff795de98, .prog = (struct bpf_prog *)0xffffc9000cf2d000, .user = (struct user_struct *)root_user+0x0 = 0xffffffff82444820, .load_time = (u64)2408348759285319, .cgroup_storage = (struct bpf_map *[2]){}, .name = (char [16])"tw_xdp_policer", .security = (void *)0xffff889ff795d548, .offload = (struct bpf_prog_offload *)0x0, .btf = (struct btf *)0xffff8890ce6d0580, .func_info = (struct bpf_func_info *)0xffff889ff795d240, .func_info_aux = (struct bpf_func_info_aux *)0xffff889ff795de20, .linfo = (struct bpf_line_info *)0xffff888a707afc00, .jited_linfo = (void **)0xffff8893fad48600, .func_info_cnt = (u32)1, .nr_linfo = (u32)37, .linfo_idx = (u32)0, .num_exentries = (u32)0, .extable = (struct exception_table_entry *)0xffffffffa032d950, .stats = (struct bpf_prog_stats *)0x603fe3a1f6d0, .work = (struct work_struct){ .data = (atomic_long_t){ .counter = (long)0, }, .entry = (struct list_head){ .next = (struct list_head *)0x0, .prev = (struct list_head *)0x0, }, .func = (work_func_t)0x0, }, .rcu = (struct callback_head){ .next = (struct callback_head *)0x0, .func = (void (*)(struct callback_head *))0x0, }, }”…””}”hj±sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jhŸh³h KzhjThžhubh¢)”}”(hŒLinks”h]”hŒLinks”…””}”hj¿sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1h¡hjThžhhŸh³h KÑubhŒtarget”“”)”}”(hŒ4.. _drgn/doc: https://drgn.readthedocs.io/en/latest/”h]”h}”(h]”Œdrgn-doc”ah ]”h"]”Œdrgn/doc”ah$]”h&]”jj,uh1jÍh KÒhjThžhhŸh³Œ referenced”KubjÎ)”}”(hŒA.. _drgn/tools: https://github.com/osandov/drgn/tree/master/tools”h]”h}”(h]”Œ drgn-tools”ah ]”h"]”Œ drgn/tools”ah$]”h&]”jjuh1jÍh KÓhjThžhhŸh³jÛKubjÎ)”}”(hŒW.. _bpf_inspect.py: https://github.com/osandov/drgn/blob/master/tools/bpf_inspect.py”h]”h}”(h]”Œid1”ah ]”h"]”Œbpf_inspect.py”ah$]”h&]”jjmuh1jÍh KÔhjThžhhŸh³jÛKubeh}”(h]”Œ customization”ah ]”h"]”Œ customization”ah$]”h&]”uh1h´hj7hžhhŸh³h K^ubeh}”(h]”Œbpf-inspect-py”ah ]”h"]”h$]”jñah&]”uh1h´hh¶hžhhŸh³h KjÛKubeh}”(h]”Œbpf-drgn-tools”ah ]”h"]”Œbpf drgn tools”ah$]”h&]”uh1h´hhhžhhŸh³h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h³uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¹NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j.Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h³Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”(Œ drgn/tools”]”jaŒdrgn/doc”]”jaŒbpf_inspect.py”]”(j]j€euŒrefids”}”Œnameids”}”(jjŒbpf_inspect.py”jîjùjöjQjNjùjöjØjÕjåjâuŒ nametypes”}”(j‰jxˆjù‰jQ‰jù‰j؈jåˆuh}”(jh¶jþj7jöjHjNjüjöjTjÕjÏjâjÜjîjèuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”j<Ks…”R”Œparse_messages”]”hŒsystem_message”“”)”}”(hhh]”hÊ)”}”(hŒ1Duplicate implicit target name: "bpf_inspect.py".”h]”hŒ5Duplicate implicit target name: “bpf_inspect.pyâ€.”…””}”(hjœhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhj™ubah}”(h]”h ]”h"]”h$]”h&]”jîaŒlevel”KŒtype”ŒINFO”Œline”KÔŒsource”h³uh1j—hjThžhhŸh³h KÕubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.