€•Œ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/networking/filter”Œ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/networking/filter”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/it_IT/networking/filter”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ja_JP/networking/filter”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ko_KR/networking/filter”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/pt_BR/networking/filter”Œ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/networking/filter”Œ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Œ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ?/var/lib/git/docbuild/linux/Documentation/networking/filter.rst”h´KubhŒtarget”“”)�”}”(hŒ.. _networking-filter:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œnetworking-filter”uh1hÈh´Khhh²hh³hÇubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ7Linux Socket Filtering aka Berkeley Packet Filter (BPF)”h]”hŒ7Linux Socket Filtering aka Berkeley Packet Filter (BPF)”…”�”}”(hhÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhØh²hh³hÇh´Kubh×)�”}”(hhh]”(hÜ)�”}”(hŒNotice”h]”hŒNotice”…”�”}”(hhîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhëh²hh³hÇh´K ubhŒ paragraph”“”)�”}”(hŒ”This file used to document the eBPF format and mechanisms even when not related to socket filtering. The ../bpf/index.rst has more details on eBPF.”h]”hŒ”This file used to document the eBPF format and mechanisms even when not related to socket filtering. The ../bpf/index.rst has more details on eBPF.”…”�”}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K hhëh²hubeh}”(h]”Œnotice”ah ]”h"]”Œnotice”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K ubh×)�”}”(hhh]”(hÜ)�”}”(hŒ Introduction”h]”hŒ Introduction”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjh²hh³hÇh´Kubhý)�”}”(hXLinux Socket Filtering (LSF) is derived from the Berkeley Packet Filter. Though there are some distinct differences between the BSD and Linux Kernel filtering, but when we speak of BPF or LSF in Linux context, we mean the very same mechanism of filtering in the Linux kernel.”h]”hXLinux Socket Filtering (LSF) is derived from the Berkeley Packet Filter. Though there are some distinct differences between the BSD and Linux Kernel filtering, but when we speak of BPF or LSF in Linux context, we mean the very same mechanism of filtering in the Linux kernel.”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khjh²hubhý)�”}”(hXBPF allows a user-space program to attach a filter onto any socket and allow or disallow certain types of data to come through the socket. LSF follows exactly the same filter code structure as BSD's BPF, so referring to the BSD bpf.4 manpage is very helpful in creating filters.”h]”hXBPF allows a user-space program to attach a filter onto any socket and allow or disallow certain types of data to come through the socket. LSF follows exactly the same filter code structure as BSD’s BPF, so referring to the BSD bpf.4 manpage is very helpful in creating filters.”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khjh²hubhý)�”}”(hX5On Linux, BPF is much simpler than on BSD. One does not have to worry about devices or anything like that. You simply create your filter code, send it to the kernel via the SO_ATTACH_FILTER option and if your filter code passes the kernel check on it, you then immediately begin filtering data on that socket.”h]”hX5On Linux, BPF is much simpler than on BSD. One does not have to worry about devices or anything like that. You simply create your filter code, send it to the kernel via the SO_ATTACH_FILTER option and if your filter code passes the kernel check on it, you then immediately begin filtering data on that socket.”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khjh²hubhý)�”}”(hXYou can also detach filters from your socket via the SO_DETACH_FILTER option. This will probably not be used much since when you close a socket that has a filter on it the filter is automagically removed. The other less common case may be adding a different filter on the same socket where you had another filter that is still running: the kernel takes care of removing the old one and placing your new one in its place, assuming your filter has passed the checks, otherwise if it fails the old filter will remain on that socket.”h]”hXYou can also detach filters from your socket via the SO_DETACH_FILTER option. This will probably not be used much since when you close a socket that has a filter on it the filter is automagically removed. The other less common case may be adding a different filter on the same socket where you had another filter that is still running: the kernel takes care of removing the old one and placing your new one in its place, assuming your filter has passed the checks, otherwise if it fails the old filter will remain on that socket.”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K#hjh²hubhý)�”}”(hXSO_LOCK_FILTER option allows to lock the filter attached to a socket. Once set, a filter cannot be removed or changed. This allows one process to setup a socket, attach a filter, lock it then drop privileges and be assured that the filter will be kept until the socket is closed.”h]”hXSO_LOCK_FILTER option allows to lock the filter attached to a socket. Once set, a filter cannot be removed or changed. This allows one process to setup a socket, attach a filter, lock it then drop privileges and be assured that the filter will be kept until the socket is closed.”…”�”}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K,hjh²hubhý)�”}”(hXQThe biggest user of this construct might be libpcap. Issuing a high-level filter command like `tcpdump -i em1 port 22` passes through the libpcap internal compiler that generates a structure that can eventually be loaded via SO_ATTACH_FILTER to the kernel. `tcpdump -i em1 port 22 -ddd` displays what is being placed into this structure.”h]”(hŒ^The biggest user of this construct might be libpcap. Issuing a high-level filter command like ”…”�”}”(hjkh²hh³Nh´NubhŒtitle_reference”“”)�”}”(hŒ`tcpdump -i em1 port 22`”h]”hŒtcpdump -i em1 port 22”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jshjkubhŒ‹ passes through the libpcap internal compiler that generates a structure that can eventually be loaded via SO_ATTACH_FILTER to the kernel. ”…”�”}”(hjkh²hh³Nh´Nubjt)�”}”(hŒ`tcpdump -i em1 port 22 -ddd`”h]”hŒtcpdump -i em1 port 22 -ddd”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jshjkubhŒ3 displays what is being placed into this structure.”…”�”}”(hjkh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K1hjh²hubhý)�”}”(hXAlthough we were only speaking about sockets here, BPF in Linux is used in many more places. There's xt_bpf for netfilter, cls_bpf in the kernel qdisc layer, SECCOMP-BPF (SECure COMPuting [1]_), and lots of other places such as team driver, PTP code, etc where BPF is being used.”h]”(hŒ¾Although we were only speaking about sockets here, BPF in Linux is used in many more places. There’s xt_bpf for netfilter, cls_bpf in the kernel qdisc layer, SECCOMP-BPF (SECure COMPuting ”…”�”}”(hjŸh²hh³Nh´NubhŒfootnote_reference”“”)�”}”(hŒ[1]_”h]”hŒ1”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”Œid1”ah ]”h"]”h$]”h&]”hÔŒid2”Œdocname”Œnetworking/filter”uh1j§hjŸŒresolved”KubhŒW), and lots of other places such as team driver, PTP code, etc where BPF is being used.”…”�”}”(hjŸh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K7hjh²hubhŒfootnote”“”)�”}”(hŒ/Documentation/userspace-api/seccomp_filter.rst ”h]”(hŒlabel”“”)�”}”(hŒ1”h]”hŒ1”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjÈubhý)�”}”(hŒ.Documentation/userspace-api/seccomp_filter.rst”h]”hŒ.Documentation/userspace-api/seccomp_filter.rst”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khjh²hubhý)�”}”(hXFSteven McCanne and Van Jacobson. 1993. The BSD packet filter: a new architecture for user-level packet capture. In Proceedings of the USENIX Winter 1993 Conference Proceedings on USENIX Winter 1993 Conference Proceedings (USENIX'93). USENIX Association, Berkeley, CA, USA, 2-2. [http://www.tcpdump.org/papers/bpf-usenix93.pdf]”h]”(hXSteven McCanne and Van Jacobson. 1993. The BSD packet filter: a new architecture for user-level packet capture. In Proceedings of the USENIX Winter 1993 Conference Proceedings on USENIX Winter 1993 Conference Proceedings (USENIX’93). USENIX Association, Berkeley, CA, USA, 2-2. [”…”�”}”(hjÿh²hh³Nh´NubhŒ reference”“”)�”}”(hŒ.http://www.tcpdump.org/papers/bpf-usenix93.pdf”h]”hŒ.http://www.tcpdump.org/papers/bpf-usenix93.pdf”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j uh1jhjÿubhŒ]”…”�”}”(hjÿh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K@hjh²hubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Kubh×)�”}”(hhh]”(hÜ)�”}”(hŒ Structure”h]”hŒ Structure”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj*h²hh³hÇh´KGubhý)�”}”(hŒcUser space applications include which contains the following relevant structures::”h]”hŒbUser space applications include which contains the following relevant structures:”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KIhj*h²hubhŒ literal_block”“”)�”}”(hŒästruct sock_filter { /* Filter block */ __u16 code; /* Actual filter code */ __u8 jt; /* Jump true */ __u8 jf; /* Jump false */ __u32 k; /* Generic multiuse field */ };”h]”hŒästruct sock_filter { /* Filter block */ __u16 code; /* Actual filter code */ __u8 jt; /* Jump true */ __u8 jf; /* Jump false */ __u32 k; /* Generic multiuse field */ };”…”�”}”hjKsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´KLhj*h²hubhý)�”}”(hŒ²Such a structure is assembled as an array of 4-tuples, that contains a code, jt, jf and k value. jt and jf are jump offsets and k a generic value to be used for a provided code::”h]”hŒ±Such a structure is assembled as an array of 4-tuples, that contains a code, jt, jf and k value. jt and jf are jump offsets and k a generic value to be used for a provided code:”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KShj*h²hubjJ)�”}”(hŒÀstruct sock_fprog { /* Required for SO_ATTACH_FILTER. */ unsigned short len; /* Number of filter blocks */ struct sock_filter __user *filter; };”h]”hŒÀstruct sock_fprog { /* Required for SO_ATTACH_FILTER. */ unsigned short len; /* Number of filter blocks */ struct sock_filter __user *filter; };”…”�”}”hjgsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´KWhj*h²hubhý)�”}”(hŒ†For socket filtering, a pointer to this structure (as shown in follow-up example) is being passed to the kernel through setsockopt(2).”h]”hŒ†For socket filtering, a pointer to this structure (as shown in follow-up example) is being passed to the kernel through setsockopt(2).”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K\hj*h²hubeh}”(h]”Œ structure”ah ]”h"]”Œ structure”ah$]”h&]”uh1hÖhhØh²hh³hÇh´KGubh×)�”}”(hhh]”(hÜ)�”}”(hŒExample”h]”hŒExample”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj‹h²hh³hÇh´K`ubjJ)�”}”(hXŸ#include #include #include #include /* ... */ /* From the example above: tcpdump -i em1 port 22 -dd */ struct sock_filter code[] = { { 0x28, 0, 0, 0x0000000c }, { 0x15, 0, 8, 0x000086dd }, { 0x30, 0, 0, 0x00000014 }, { 0x15, 2, 0, 0x00000084 }, { 0x15, 1, 0, 0x00000006 }, { 0x15, 0, 17, 0x00000011 }, { 0x28, 0, 0, 0x00000036 }, { 0x15, 14, 0, 0x00000016 }, { 0x28, 0, 0, 0x00000038 }, { 0x15, 12, 13, 0x00000016 }, { 0x15, 0, 12, 0x00000800 }, { 0x30, 0, 0, 0x00000017 }, { 0x15, 2, 0, 0x00000084 }, { 0x15, 1, 0, 0x00000006 }, { 0x15, 0, 8, 0x00000011 }, { 0x28, 0, 0, 0x00000014 }, { 0x45, 6, 0, 0x00001fff }, { 0xb1, 0, 0, 0x0000000e }, { 0x48, 0, 0, 0x0000000e }, { 0x15, 2, 0, 0x00000016 }, { 0x48, 0, 0, 0x00000010 }, { 0x15, 0, 1, 0x00000016 }, { 0x06, 0, 0, 0x0000ffff }, { 0x06, 0, 0, 0x00000000 }, }; struct sock_fprog bpf = { .len = ARRAY_SIZE(code), .filter = code, }; sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); if (sock < 0) /* ... bail out ... */ ret = setsockopt(sock, SOL_SOCKET, SO_ATTACH_FILTER, &bpf, sizeof(bpf)); if (ret < 0) /* ... bail out ... */ /* ... */ close(sock);”h]”hXŸ#include #include #include #include /* ... */ /* From the example above: tcpdump -i em1 port 22 -dd */ struct sock_filter code[] = { { 0x28, 0, 0, 0x0000000c }, { 0x15, 0, 8, 0x000086dd }, { 0x30, 0, 0, 0x00000014 }, { 0x15, 2, 0, 0x00000084 }, { 0x15, 1, 0, 0x00000006 }, { 0x15, 0, 17, 0x00000011 }, { 0x28, 0, 0, 0x00000036 }, { 0x15, 14, 0, 0x00000016 }, { 0x28, 0, 0, 0x00000038 }, { 0x15, 12, 13, 0x00000016 }, { 0x15, 0, 12, 0x00000800 }, { 0x30, 0, 0, 0x00000017 }, { 0x15, 2, 0, 0x00000084 }, { 0x15, 1, 0, 0x00000006 }, { 0x15, 0, 8, 0x00000011 }, { 0x28, 0, 0, 0x00000014 }, { 0x45, 6, 0, 0x00001fff }, { 0xb1, 0, 0, 0x0000000e }, { 0x48, 0, 0, 0x0000000e }, { 0x15, 2, 0, 0x00000016 }, { 0x48, 0, 0, 0x00000010 }, { 0x15, 0, 1, 0x00000016 }, { 0x06, 0, 0, 0x0000ffff }, { 0x06, 0, 0, 0x00000000 }, }; struct sock_fprog bpf = { .len = ARRAY_SIZE(code), .filter = code, }; sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); if (sock < 0) /* ... bail out ... */ ret = setsockopt(sock, SOL_SOCKET, SO_ATTACH_FILTER, &bpf, sizeof(bpf)); if (ret < 0) /* ... bail out ... */ /* ... */ close(sock);”…”�”}”hjœsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´Kdhj‹h²hubhý)�”}”(hŒ©The above example code attaches a socket filter for a PF_PACKET socket in order to let all IPv4/IPv6 packets with port 22 pass. The rest will be dropped for this socket.”h]”hŒ©The above example code attaches a socket filter for a PF_PACKET socket in order to let all IPv4/IPv6 packets with port 22 pass. The rest will be dropped for this socket.”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K–hj‹h²hubhý)�”}”(hŒ¦The setsockopt(2) call to SO_DETACH_FILTER doesn't need any arguments and SO_LOCK_FILTER for preventing the filter to be detached, takes an integer value with 0 or 1.”h]”hŒ¨The setsockopt(2) call to SO_DETACH_FILTER doesn’t need any arguments and SO_LOCK_FILTER for preventing the filter to be detached, takes an integer value with 0 or 1.”…”�”}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kšhj‹h²hubhý)�”}”(hŒuNote that socket filters are not restricted to PF_PACKET sockets only, but can also be used on other socket families.”h]”hŒuNote that socket filters are not restricted to PF_PACKET sockets only, but can also be used on other socket families.”…”�”}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kžhj‹h²hubhý)�”}”(hŒSummary of system calls:”h]”hŒSummary of system calls:”…”�”}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¡hj‹h²hubhŒ block_quote”“”)�”}”(hŒÕ* setsockopt(sockfd, SOL_SOCKET, SO_ATTACH_FILTER, &val, sizeof(val)); * setsockopt(sockfd, SOL_SOCKET, SO_DETACH_FILTER, &val, sizeof(val)); * setsockopt(sockfd, SOL_SOCKET, SO_LOCK_FILTER, &val, sizeof(val)); ”h]”hŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒDsetsockopt(sockfd, SOL_SOCKET, SO_ATTACH_FILTER, &val, sizeof(val));”h]”hý)�”}”(hjñh]”hŒDsetsockopt(sockfd, SOL_SOCKET, SO_ATTACH_FILTER, &val, sizeof(val));”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K£hjïubah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjêubjî)�”}”(hŒDsetsockopt(sockfd, SOL_SOCKET, SO_DETACH_FILTER, &val, sizeof(val));”h]”hý)�”}”(hjh]”hŒDsetsockopt(sockfd, SOL_SOCKET, SO_DETACH_FILTER, &val, sizeof(val));”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¤hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjêubjî)�”}”(hŒEsetsockopt(sockfd, SOL_SOCKET, SO_LOCK_FILTER, &val, sizeof(val)); ”h]”hý)�”}”(hŒDsetsockopt(sockfd, SOL_SOCKET, SO_LOCK_FILTER, &val, sizeof(val));”h]”hŒDsetsockopt(sockfd, SOL_SOCKET, SO_LOCK_FILTER, &val, sizeof(val));”…”�”}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¥hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjêubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jèh³hÇh´K£hjäubah}”(h]”h ]”h"]”h$]”h&]”uh1jâh³hÇh´K£hj‹h²hubhý)�”}”(hŒÖNormally, most use cases for socket filtering on packet sockets will be covered by libpcap in high-level syntax, so as an application developer you should stick to that. libpcap wraps its own layer around all that.”h]”hŒÖNormally, most use cases for socket filtering on packet sockets will be covered by libpcap in high-level syntax, so as an application developer you should stick to that. libpcap wraps its own layer around all that.”…”�”}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K§hj‹h²hubhý)�”}”(hXëUnless i) using/linking to libpcap is not an option, ii) the required BPF filters use Linux extensions that are not supported by libpcap's compiler, iii) a filter might be more complex and not cleanly implementable with libpcap's compiler, or iv) particular filter codes should be optimized differently than libpcap's internal compiler does; then in such cases writing such a filter "by hand" can be of an alternative. For example, xt_bpf and cls_bpf users might have requirements that could result in more complex filter code, or one that cannot be expressed with libpcap (e.g. different return codes for various code paths). Moreover, BPF JIT implementors may wish to manually write test cases and thus need low-level access to BPF code as well.”h]”hXõUnless i) using/linking to libpcap is not an option, ii) the required BPF filters use Linux extensions that are not supported by libpcap’s compiler, iii) a filter might be more complex and not cleanly implementable with libpcap’s compiler, or iv) particular filter codes should be optimized differently than libpcap’s internal compiler does; then in such cases writing such a filter “by handâ€� can be of an alternative. For example, xt_bpf and cls_bpf users might have requirements that could result in more complex filter code, or one that cannot be expressed with libpcap (e.g. different return codes for various code paths). Moreover, BPF JIT implementors may wish to manually write test cases and thus need low-level access to BPF code as well.”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K«hj‹h²hubeh}”(h]”Œexample”ah ]”h"]”Œexample”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K`ubh×)�”}”(hhh]”(hÜ)�”}”(hŒBPF engine and instruction set”h]”hŒBPF engine and instruction set”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjgh²hh³hÇh´K¸ubhý)�”}”(hX±Under tools/bpf/ there's a small helper tool called bpf_asm which can be used to write low-level filters for example scenarios mentioned in the previous section. Asm-like syntax mentioned here has been implemented in bpf_asm and will be used for further explanations (instead of dealing with less readable opcodes directly, principles are the same). The syntax is closely modelled after Steven McCanne's and Van Jacobson's BPF paper.”h]”hX·Under tools/bpf/ there’s a small helper tool called bpf_asm which can be used to write low-level filters for example scenarios mentioned in the previous section. Asm-like syntax mentioned here has been implemented in bpf_asm and will be used for further explanations (instead of dealing with less readable opcodes directly, principles are the same). The syntax is closely modelled after Steven McCanne’s and Van Jacobson’s BPF paper.”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kºhjgh²hubhý)�”}”(hŒ>The BPF architecture consists of the following basic elements:”h]”hŒ>The BPF architecture consists of the following basic elements:”…”�”}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÁhjgh²hubjã)�”}”(hX·======= ==================================================== Element Description ======= ==================================================== A 32 bit wide accumulator X 32 bit wide X register M[] 16 x 32 bit wide misc registers aka "scratch memory store", addressable from 0 to 15 ======= ==================================================== ”h]”hŒtable”“”)�”}”(hhh]”hŒtgroup”“”)�”}”(hhh]”(hŒcolspec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j¢hjŸubj£)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K4uh1j¢hjŸubhŒthead”“”)�”}”(hhh]”hŒrow”“”)�”}”(hhh]”(hŒentry”“”)�”}”(hhh]”hý)�”}”(hŒElement”h]”hŒElement”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÄhjÄubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¿ubjÃ)�”}”(hhh]”hý)�”}”(hŒ Description”h]”hŒ Description”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÄhjÛubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¿ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjºubah}”(h]”h ]”h"]”h$]”h&]”uh1j¸hjŸubhŒtbody”“”)�”}”(hhh]”(j¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒA”h]”hŒA”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÆhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubjÃ)�”}”(hhh]”hý)�”}”(hŒ32 bit wide accumulator”h]”hŒ32 bit wide accumulator”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÆhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒX”h]”hŒX”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÇhj=ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj:ubjÃ)�”}”(hhh]”hý)�”}”(hŒ32 bit wide X register”h]”hŒ32 bit wide X register”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÇhjTubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj:ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒM[]”h]”hŒM[]”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÈhjtubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjqubjÃ)�”}”(hhh]”hý)�”}”(hŒT16 x 32 bit wide misc registers aka "scratch memory store", addressable from 0 to 15”h]”hŒX16 x 32 bit wide misc registers aka “scratch memory storeâ€�, addressable from 0 to 15”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÈhj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjqubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jþhjŸubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j�hjšubah}”(h]”h ]”h"]”h$]”h&]”uh1j˜hj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1jâh³hÇh´KÃhjgh²hubhý)�”}”(hŒ„A program, that is translated by bpf_asm into "opcodes" is an array that consists of the following elements (as already mentioned)::”h]”hŒ‡A program, that is translated by bpf_asm into “opcodesâ€� is an array that consists of the following elements (as already mentioned):”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÌhjgh²hubjJ)�”}”(hŒop:16, jt:8, jf:8, k:32”h]”hŒop:16, jt:8, jf:8, k:32”…”�”}”hjÏsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´KÏhjgh²hubhý)�”}”(hXIThe element op is a 16 bit wide opcode that has a particular instruction encoded. jt and jf are two 8 bit wide jump targets, one for condition "jump if true", the other one "jump if false". Eventually, element k contains a miscellaneous argument that can be interpreted in different ways depending on the given instruction in op.”h]”hXQThe element op is a 16 bit wide opcode that has a particular instruction encoded. jt and jf are two 8 bit wide jump targets, one for condition “jump if trueâ€�, the other one “jump if falseâ€�. Eventually, element k contains a miscellaneous argument that can be interpreted in different ways depending on the given instruction in op.”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÑhjgh²hubhý)�”}”(hX The instruction set consists of load, store, branch, alu, miscellaneous and return instructions that are also represented in bpf_asm syntax. This table lists all bpf_asm instructions available resp. what their underlying opcodes as defined in linux/filter.h stand for:”h]”hX The instruction set consists of load, store, branch, alu, miscellaneous and return instructions that are also represented in bpf_asm syntax. This table lists all bpf_asm instructions available resp. what their underlying opcodes as defined in linux/filter.h stand for:”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K×hjgh²hubjã)�”}”(hX‹=========== =================== ===================== Instruction Addressing mode Description =========== =================== ===================== ld 1, 2, 3, 4, 12 Load word into A ldi 4 Load word into A ldh 1, 2 Load half-word into A ldb 1, 2 Load byte into A ldx 3, 4, 5, 12 Load word into X ldxi 4 Load word into X ldxb 5 Load byte into X st 3 Store A into M[] stx 3 Store X into M[] jmp 6 Jump to label ja 6 Jump to label jeq 7, 8, 9, 10 Jump on A == jneq 9, 10 Jump on A != jne 9, 10 Jump on A != jlt 9, 10 Jump on A < jle 9, 10 Jump on A <= jgt 7, 8, 9, 10 Jump on A > jge 7, 8, 9, 10 Jump on A >= jset 7, 8, 9, 10 Jump on A & add 0, 4 A + sub 0, 4 A - mul 0, 4 A * div 0, 4 A / mod 0, 4 A % neg !A and 0, 4 A & or 0, 4 A | xor 0, 4 A ^ lsh 0, 4 A << rsh 0, 4 A >> tax Copy A into X txa Copy X into A ret 4, 11 Return =========== =================== ===================== ”h]”j™)�”}”(hhh]”jž)�”}”(hhh]”(j£)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1j¢hjubj£)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j¢hjubj£)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j¢hjubj¹)�”}”(hhh]”j¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒ Instruction”h]”hŒ Instruction”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÝhj'ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj$ubjÃ)�”}”(hhh]”hý)�”}”(hŒAddressing mode”h]”hŒAddressing mode”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÝhj>ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj$ubjÃ)�”}”(hhh]”hý)�”}”(hŒ Description”h]”hŒ Description”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÝhjUubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj$ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hj!ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¸hjubjÿ)�”}”(hhh]”(j¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒld”h]”hŒld”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kßhj~ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj{ubjÃ)�”}”(hhh]”hý)�”}”(hŒ1, 2, 3, 4, 12”h]”hŒ1, 2, 3, 4, 12”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kßhj•ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj{ubjÃ)�”}”(hhh]”hý)�”}”(hŒLoad word into A”h]”hŒLoad word into A”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kßhj¬ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj{ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒldi”h]”hŒldi”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KàhjÌubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÉubjÃ)�”}”(hhh]”hý)�”}”(hŒ4”h]”hŒ4”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kàhjãubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÉubjÃ)�”}”(hhh]”hý)�”}”(hŒLoad word into A”h]”hŒLoad word into A”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kàhjúubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÉubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒldh”h]”hŒldh”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Káhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubjÃ)�”}”(hhh]”hý)�”}”(hŒ1, 2”h]”hŒ1, 2”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Káhj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubjÃ)�”}”(hhh]”hý)�”}”(hŒLoad half-word into A”h]”hŒLoad half-word into A”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KáhjHubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒldb”h]”hŒldb”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kâhjhubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjeubjÃ)�”}”(hhh]”hý)�”}”(hŒ1, 2”h]”hŒ1, 2”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kâhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjeubjÃ)�”}”(hhh]”hý)�”}”(hŒLoad byte into A”h]”hŒLoad byte into A”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kâhj–ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjeubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒldx”h]”hŒldx”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kãhj¶ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj³ubjÃ)�”}”(hhh]”hý)�”}”(hŒ 3, 4, 5, 12”h]”hŒ 3, 4, 5, 12”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KãhjÍubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj³ubjÃ)�”}”(hhh]”hý)�”}”(hŒLoad word into X”h]”hŒLoad word into X”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kãhjäubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj³ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒldxi”h]”hŒldxi”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kähjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubjÃ)�”}”(hhh]”hý)�”}”(hjèh]”hŒ4”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kähjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubjÃ)�”}”(hhh]”hý)�”}”(hŒLoad word into X”h]”hŒLoad word into X”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kähj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒldxb”h]”hŒldxb”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KåhjQubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjNubjÃ)�”}”(hhh]”hý)�”}”(hŒ5”h]”hŒ5”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kåhjhubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjNubjÃ)�”}”(hhh]”hý)�”}”(hŒLoad byte into X”h]”hŒLoad byte into X”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kåhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjNubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒst”h]”hŒst”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KçhjŸubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjœubjÃ)�”}”(hhh]”hý)�”}”(hŒ3”h]”hŒ3”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kçhj¶ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjœubjÃ)�”}”(hhh]”hý)�”}”(hŒStore A into M[]”h]”hŒStore A into M[]”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KçhjÍubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjœubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒstx”h]”hŒstx”…”�”}”(hjðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kèhjíubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjêubjÃ)�”}”(hhh]”hý)�”}”(hj»h]”hŒ3”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kèhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjêubjÃ)�”}”(hhh]”hý)�”}”(hŒStore X into M[]”h]”hŒStore X into M[]”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kèhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjêubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒjmp”h]”hŒjmp”…”�”}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kêhj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj7ubjÃ)�”}”(hhh]”hý)�”}”(hŒ6”h]”hŒ6”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KêhjQubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj7ubjÃ)�”}”(hhh]”hý)�”}”(hŒ Jump to label”h]”hŒ Jump to label”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kêhjhubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj7ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒja”h]”hŒja”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Këhjˆubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj…ubjÃ)�”}”(hhh]”hý)�”}”(hjVh]”hŒ6”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KëhjŸubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj…ubjÃ)�”}”(hhh]”hý)�”}”(hŒ Jump to label”h]”hŒ Jump to label”…”�”}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Këhjµubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj…ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒjeq”h]”hŒjeq”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KìhjÕubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÒubjÃ)�”}”(hhh]”hý)�”}”(hŒ 7, 8, 9, 10”h]”hŒ 7, 8, 9, 10”…”�”}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kìhjìubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÒubjÃ)�”}”(hhh]”hý)�”}”(hŒJump on A == ”h]”hŒJump on A == ”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kìhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÒubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒjneq”h]”hŒjneq”…”�”}”(hj& h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kíhj# ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubjÃ)�”}”(hhh]”hý)�”}”(hŒ9, 10”h]”hŒ9, 10”…”�”}”(hj= h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kíhj: ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubjÃ)�”}”(hhh]”hý)�”}”(hŒJump on A != ”h]”hŒJump on A != ”…”�”}”(hjT h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KíhjQ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒjne”h]”hŒjne”…”�”}”(hjt h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kîhjq ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjn ubjÃ)�”}”(hhh]”hý)�”}”(hŒ9, 10”h]”hŒ9, 10”…”�”}”(hj‹ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kîhjˆ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjn ubjÃ)�”}”(hhh]”hý)�”}”(hŒJump on A != ”h]”hŒJump on A != ”…”�”}”(hj¢ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KîhjŸ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjn ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒjlt”h]”hŒjlt”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kïhj¿ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¼ ubjÃ)�”}”(hhh]”hý)�”}”(hŒ9, 10”h]”hŒ9, 10”…”�”}”(hjÙ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KïhjÖ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¼ ubjÃ)�”}”(hhh]”hý)�”}”(hŒJump on A < ”h]”hŒJump on A < ”…”�”}”(hjð h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kïhjí ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¼ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒjle”h]”hŒjle”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kðhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubjÃ)�”}”(hhh]”hý)�”}”(hŒ9, 10”h]”hŒ9, 10”…”�”}”(hj' h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kðhj$ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubjÃ)�”}”(hhh]”hý)�”}”(hŒJump on A <= ”h]”hŒJump on A <= ”…”�”}”(hj> h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kðhj; ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒjgt”h]”hŒjgt”…”�”}”(hj^ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kñhj[ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjX ubjÃ)�”}”(hhh]”hý)�”}”(hŒ 7, 8, 9, 10”h]”hŒ 7, 8, 9, 10”…”�”}”(hju h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kñhjr ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjX ubjÃ)�”}”(hhh]”hý)�”}”(hŒJump on A > ”h]”hŒJump on A > ”…”�”}”(hjŒ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kñhj‰ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjX ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒjge”h]”hŒjge”…”�”}”(hj¬ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kòhj© ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¦ ubjÃ)�”}”(hhh]”hý)�”}”(hŒ 7, 8, 9, 10”h]”hŒ 7, 8, 9, 10”…”�”}”(hjà h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KòhjÀ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¦ ubjÃ)�”}”(hhh]”hý)�”}”(hŒJump on A >= ”h]”hŒJump on A >= ”…”�”}”(hjÚ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kòhj× ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¦ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒjset”h]”hŒjset”…”�”}”(hjú h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kóhj÷ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjô ubjÃ)�”}”(hhh]”hý)�”}”(hŒ 7, 8, 9, 10”h]”hŒ 7, 8, 9, 10”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kóhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjô ubjÃ)�”}”(hhh]”hý)�”}”(hŒJump on A & ”h]”hŒJump on A & ”…”�”}”(hj( h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kóhj% ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjô ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒadd”h]”hŒadd”…”�”}”(hjH h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KõhjE ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjB ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hj_ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kõhj\ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjB ubjÃ)�”}”(hhh]”hý)�”}”(hŒA + ”h]”hŒA + ”…”�”}”(hjv h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kõhjs ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjB ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒsub”h]”hŒsub”…”�”}”(hj– h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Köhj“ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj� ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hj­ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Köhjª ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj� ubjÃ)�”}”(hhh]”hý)�”}”(hŒA - ”h]”hŒA - ”…”�”}”(hjÄ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KöhjÁ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj� ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒmul”h]”hŒmul”…”�”}”(hjä h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K÷hjá ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÞ ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hjû h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K÷hjø ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÞ ubjÃ)�”}”(hhh]”hý)�”}”(hŒA * ”h]”hŒA * ”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K÷hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÞ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒdiv”h]”hŒdiv”…”�”}”(hj2 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Køhj/ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj, ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hjI h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KøhjF ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj, ubjÃ)�”}”(hhh]”hý)�”}”(hŒA / ”h]”hŒA / ”…”�”}”(hj` h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Køhj] ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj, ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒmod”h]”hŒmod”…”�”}”(hj€ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kùhj} ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjz ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hj— h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kùhj” ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjz ubjÃ)�”}”(hhh]”hý)�”}”(hŒA % ”h]”hŒA % ”…”�”}”(hj® h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kùhj« ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjz ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒneg”h]”hŒneg”…”�”}”(hjÎ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KúhjË ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÈ ubjÃ)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÈ ubjÃ)�”}”(hhh]”hý)�”}”(hŒ!A”h]”hŒ!A”…”�”}”(hjî h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kúhjë ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÈ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒand”h]”hŒand”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kûhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hj% h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kûhj" ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubjÃ)�”}”(hhh]”hý)�”}”(hŒA & ”h]”hŒA & ”…”�”}”(hj< h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kûhj9 ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒor”h]”hŒor”…”�”}”(hj\ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KühjY ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjV ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hjs h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kühjp ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjV ubjÃ)�”}”(hhh]”hý)�”}”(hŒA | ”h]”hŒA | ”…”�”}”(hjŠ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kühj‡ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjV ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒxor”h]”hŒxor”…”�”}”(hjª h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kýhj§ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¤ ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hjÁ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kýhj¾ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¤ ubjÃ)�”}”(hhh]”hý)�”}”(hŒA ^ ”h]”hŒA ^ ”…”�”}”(hjØ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KýhjÕ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj¤ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒlsh”h]”hŒlsh”…”�”}”(hjø h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kþhjõ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjò ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kþhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjò ubjÃ)�”}”(hhh]”hý)�”}”(hŒA << ”h]”hŒA << ”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kþhj#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjò ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒrsh”h]”hŒrsh”…”�”}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÿhjCubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj@ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0, 4”h]”hŒ0, 4”…”�”}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÿhjZubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj@ubjÃ)�”}”(hhh]”hý)�”}”(hŒA >> ”h]”hŒA >> ”…”�”}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kÿhjqubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj@ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒtax”h]”hŒtax”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj‘ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjŽubjÃ)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjŽubjÃ)�”}”(hhh]”hý)�”}”(hŒ Copy A into X”h]”hŒ Copy A into X”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj±ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjŽubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒtxa”h]”hŒtxa”…”�”}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÑubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÎubjÃ)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÎubjÃ)�”}”(hhh]”hý)�”}”(hŒ Copy X into A”h]”hŒ Copy X into A”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjñubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÎubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒret”h]”hŒret”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubjÃ)�”}”(hhh]”hý)�”}”(hŒ4, 11”h]”hŒ4, 11”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj(ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubjÃ)�”}”(hhh]”hý)�”}”(hŒReturn”h]”hŒReturn”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj?ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjxubeh}”(h]”h ]”h"]”h$]”h&]”uh1jþhjubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j�hjýubah}”(h]”h ]”h"]”h$]”h&]”uh1j˜hjùubah}”(h]”h ]”h"]”h$]”h&]”uh1jâh³hÇh´KÜhjgh²hubhý)�”}”(hŒubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒ11”h]”hŒ11”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj[ubjÃ)�”}”(hhh]”hý)�”}”(hŒa/%a”h]”hŒa/%a”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjuubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj[ubjÃ)�”}”(hhh]”hý)�”}”(hŒ Accumulator A”h]”hŒ Accumulator A”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjŒubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj[ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒ12”h]”hŒ12”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj¬ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj©ubjÃ)�”}”(hhh]”hý)�”}”(hŒ extension”h]”hŒ extension”…”�”}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÃubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj©ubjÃ)�”}”(hhh]”hý)�”}”(hŒ BPF extension”h]”hŒ BPF extension”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÚubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj©ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jþhjŠubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j�hj‡ubah}”(h]”h ]”h"]”h$]”h&]”uh1j˜hjƒubah}”(h]”h ]”h"]”h$]”h&]”uh1jâh³hÇh´M hjgh²hubhý)�”}”(hŒùThe Linux kernel also has a couple of BPF extensions that are used along with the class of load instructions by "overloading" the k argument with a negative offset + a particular extension offset. The result of such BPF extensions are loaded into A.”h]”hŒýThe Linux kernel also has a couple of BPF extensions that are used along with the class of load instructions by “overloadingâ€� the k argument with a negative offset + a particular extension offset. The result of such BPF extensions are loaded into A.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjgh²hubhý)�”}”(hŒ9Possible BPF extensions are shown in the following table:”h]”hŒ9Possible BPF extensions are shown in the following table:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hjgh²hubjã)�”}”(hXß=================================== ================================================= Extension Description =================================== ================================================= len skb->len proto skb->protocol type skb->pkt_type poff Payload start offset ifidx skb->dev->ifindex nla Netlink attribute of type X with offset A nlan Nested Netlink attribute of type X with offset A mark skb->mark queue skb->queue_mapping hatype skb->dev->type rxhash skb->hash cpu raw_smp_processor_id() vlan_tci skb_vlan_tag_get(skb) vlan_avail skb_vlan_tag_present(skb) vlan_tpid skb->vlan_proto rand get_random_u32() =================================== ================================================= ”h]”j™)�”}”(hhh]”jž)�”}”(hhh]”(j£)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K#uh1j¢hj3ubj£)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K1uh1j¢hj3ubj¹)�”}”(hhh]”j¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒ Extension”h]”hŒ Extension”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M#hjPubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjMubjÃ)�”}”(hhh]”hý)�”}”(hŒ Description”h]”hŒ Description”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M#hjgubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjMubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjJubah}”(h]”h ]”h"]”h$]”h&]”uh1j¸hj3ubjÿ)�”}”(hhh]”(j¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒlen”h]”hŒlen”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M%hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj�ubjÃ)�”}”(hhh]”hý)�”}”(hŒskb->len”h]”hŒskb->len”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M%hj§ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒproto”h]”hŒproto”…”�”}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M&hjÇubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÄubjÃ)�”}”(hhh]”hý)�”}”(hŒ skb->protocol”h]”hŒ skb->protocol”…”�”}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M&hjÞubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÄubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒtype”h]”hŒtype”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M'hjþubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjûubjÃ)�”}”(hhh]”hý)�”}”(hŒ skb->pkt_type”h]”hŒ skb->pkt_type”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M'hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjûubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒpoff”h]”hŒpoff”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M(hj5ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj2ubjÃ)�”}”(hhh]”hý)�”}”(hŒPayload start offset”h]”hŒPayload start offset”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M(hjLubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj2ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒifidx”h]”hŒifidx”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M)hjlubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjiubjÃ)�”}”(hhh]”hý)�”}”(hŒskb->dev->ifindex”h]”hŒskb->dev->ifindex”…”�”}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M)hjƒubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjiubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒnla”h]”hŒnla”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M*hj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubjÃ)�”}”(hhh]”hý)�”}”(hŒ)Netlink attribute of type X with offset A”h]”hŒ)Netlink attribute of type X with offset A”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M*hjºubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒnlan”h]”hŒnlan”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M+hjÚubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj×ubjÃ)�”}”(hhh]”hý)�”}”(hŒ0Nested Netlink attribute of type X with offset A”h]”hŒ0Nested Netlink attribute of type X with offset A”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M+hjñubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj×ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒmark”h]”hŒmark”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M,hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubjÃ)�”}”(hhh]”hý)�”}”(hŒ skb->mark”h]”hŒ skb->mark”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M,h•ù¸j(ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒqueue”h]”hŒqueue”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M-hjHubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjEubjÃ)�”}”(hhh]”hý)�”}”(hŒskb->queue_mapping”h]”hŒskb->queue_mapping”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M-hj_ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjEubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒhatype”h]”hŒhatype”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M.hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj|ubjÃ)�”}”(hhh]”hý)�”}”(hŒskb->dev->type”h]”hŒskb->dev->type”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M.hj–ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj|ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒrxhash”h]”hŒrxhash”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M/hj¶ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj³ubjÃ)�”}”(hhh]”hý)�”}”(hŒ skb->hash”h]”hŒ skb->hash”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M/hjÍubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj³ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒcpu”h]”hŒcpu”…”�”}”(hjðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M0hjíubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjêubjÃ)�”}”(hhh]”hý)�”}”(hŒraw_smp_processor_id()”h]”hŒraw_smp_processor_id()”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M0hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjêubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒvlan_tci”h]”hŒvlan_tci”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M1hj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj!ubjÃ)�”}”(hhh]”hý)�”}”(hŒskb_vlan_tag_get(skb)”h]”hŒskb_vlan_tag_get(skb)”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M1hj;ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj!ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒ vlan_avail”h]”hŒ vlan_avail”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M2hj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjXubjÃ)�”}”(hhh]”hý)�”}”(hŒskb_vlan_tag_present(skb)”h]”hŒskb_vlan_tag_present(skb)”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M2hjrubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjXubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒ vlan_tpid”h]”hŒ vlan_tpid”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M3hj’ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj�ubjÃ)�”}”(hhh]”hý)�”}”(hŒskb->vlan_proto”h]”hŒskb->vlan_proto”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M3hj©ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubj¾)�”}”(hhh]”(jÃ)�”}”(hhh]”hý)�”}”(hŒrand”h]”hŒrand”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M4hjÉubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÆubjÃ)�”}”(hhh]”hý)�”}”(hŒget_random_u32()”h]”hŒget_random_u32()”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M4hjàubah}”(h]”h ]”h"]”h$]”h&]”uh1jÂhjÆubeh}”(h]”h ]”h"]”h$]”h&]”uh1j½hjŠubeh}”(h]”h ]”h"]”h$]”h&]”uh1jþhj3ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j�hj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1j˜hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1jâh³hÇh´M"hjgh²hubhý)�”}”(hŒKThese extensions can also be prefixed with '#'. Examples for low-level BPF:”h]”hŒOThese extensions can also be prefixed with ‘#’. Examples for low-level BPF:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M7hjgh²hubhý)�”}”(hŒ**ARP packets**::”h]”(hŒstrong”“”)�”}”(hŒ**ARP packets**”h]”hŒ ARP packets”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hj$ubhŒ:”…”�”}”(hj$h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M:hjgh²hubjJ)�”}”(hŒ.ldh [12] jne #0x806, drop ret #-1 drop: ret #0”h]”hŒ.ldh [12] jne #0x806, drop ret #-1 drop: ret #0”…”�”}”hjBsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´M<hjgh²hubhý)�”}”(hŒ**IPv4 TCP packets**::”h]”(j))�”}”(hŒ**IPv4 TCP packets**”h]”hŒIPv4 TCP packets”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjPubhŒ:”…”�”}”(hjPh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MAhjgh²hubjJ)�”}”(hŒEldh [12] jne #0x800, drop ldb [23] jneq #6, drop ret #-1 drop: ret #0”h]”hŒEldh [12] jne #0x800, drop ldb [23] jneq #6, drop ret #-1 drop: ret #0”…”�”}”hjlsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´MChjgh²hubhý)�”}”(hŒ)**icmp random packet sampling, 1 in 4**::”h]”(j))�”}”(hŒ'**icmp random packet sampling, 1 in 4**”h]”hŒ#icmp random packet sampling, 1 in 4”…”�”}”(hj~h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjzubhŒ:”…”�”}”(hjzh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MJhjgh²hubjJ)�”}”(hŒldh [12] jne #0x800, drop ldb [23] jneq #1, drop # get a random uint32 number ld rand mod #4 jneq #1, drop ret #-1 drop: ret #0”h]”hŒldh [12] jne #0x800, drop ldb [23] jneq #1, drop # get a random uint32 number ld rand mod #4 jneq #1, drop ret #-1 drop: ret #0”…”�”}”hj–sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´MLhjgh²hubhý)�”}”(hŒ**SECCOMP filter example**::”h]”(j))�”}”(hŒ**SECCOMP filter example**”h]”hŒSECCOMP filter example”…”�”}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hj¤ubhŒ:”…”�”}”(hj¤h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MWhjgh²hubjJ)�”}”(hXÎld [4] /* offsetof(struct seccomp_data, arch) */ jne #0xc000003e, bad /* AUDIT_ARCH_X86_64 */ ld [0] /* offsetof(struct seccomp_data, nr) */ jeq #15, good /* __NR_rt_sigreturn */ jeq #231, good /* __NR_exit_group */ jeq #60, good /* __NR_exit */ jeq #0, good /* __NR_read */ jeq #1, good /* __NR_write */ jeq #5, good /* __NR_fstat */ jeq #9, good /* __NR_mmap */ jeq #14, good /* __NR_rt_sigprocmask */ jeq #13, good /* __NR_rt_sigaction */ jeq #35, good /* __NR_nanosleep */ bad: ret #0 /* SECCOMP_RET_KILL_THREAD */ good: ret #0x7fff0000 /* SECCOMP_RET_ALLOW */”h]”hXÎld [4] /* offsetof(struct seccomp_data, arch) */ jne #0xc000003e, bad /* AUDIT_ARCH_X86_64 */ ld [0] /* offsetof(struct seccomp_data, nr) */ jeq #15, good /* __NR_rt_sigreturn */ jeq #231, good /* __NR_exit_group */ jeq #60, good /* __NR_exit */ jeq #0, good /* __NR_read */ jeq #1, good /* __NR_write */ jeq #5, good /* __NR_fstat */ jeq #9, good /* __NR_mmap */ jeq #14, good /* __NR_rt_sigprocmask */ jeq #13, good /* __NR_rt_sigaction */ jeq #35, good /* __NR_nanosleep */ bad: ret #0 /* SECCOMP_RET_KILL_THREAD */ good: ret #0x7fff0000 /* SECCOMP_RET_ALLOW */”…”�”}”hjÀsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´MYhjgh²hubhý)�”}”(hŒ%Examples for low-level BPF extension:”h]”hŒ%Examples for low-level BPF extension:”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mihjgh²hubhý)�”}”(hŒ#**Packet for interface index 13**::”h]”(j))�”}”(hŒ!**Packet for interface index 13**”h]”hŒPacket for interface index 13”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjÜubhŒ:”…”�”}”(hjÜh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mkhjgh²hubjJ)�”}”(hŒ,ld ifidx jneq #13, drop ret #-1 drop: ret #0”h]”hŒ,ld ifidx jneq #13, drop ret #-1 drop: ret #0”…”�”}”hjøsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´Mmhjgh²hubhý)�”}”(hŒ!**(Accelerated) VLAN w/ id 10**::”h]”(j))�”}”(hŒ**(Accelerated) VLAN w/ id 10**”h]”hŒ(Accelerated) VLAN w/ id 10”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j(hjubhŒ:”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mrhjgh²hubjJ)�”}”(hŒ/ld vlan_tci jneq #10, drop ret #-1 drop: ret #0”h]”hŒ/ld vlan_tci jneq #10, drop ret #-1 drop: ret #0”…”�”}”hj"sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´Mthjgh²hubhý)�”}”(hŒîThe above example code can be placed into a file (here called "foo"), and then be passed to the bpf_asm tool for generating opcodes, output that xt_bpf and cls_bpf understands and can directly be loaded with. Example with above ARP code::”h]”hŒñThe above example code can be placed into a file (here called “fooâ€�), and then be passed to the bpf_asm tool for generating opcodes, output that xt_bpf and cls_bpf understands and can directly be loaded with. Example with above ARP code:”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Myhjgh²hubjJ)�”}”(hŒA$ ./bpf_asm foo 4,40 0 0 12,21 0 1 2054,6 0 0 4294967295,6 0 0 0,”h]”hŒA$ ./bpf_asm foo 4,40 0 0 12,21 0 1 2054,6 0 0 4294967295,6 0 0 0,”…”�”}”hj>sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´M~hjgh²hubhý)�”}”(hŒ!In copy and paste C-like output::”h]”hŒ In copy and paste C-like output:”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjgh²hubjJ)�”}”(hŒŠ$ ./bpf_asm -c foo { 0x28, 0, 0, 0x0000000c }, { 0x15, 0, 1, 0x00000806 }, { 0x06, 0, 0, 0xffffffff }, { 0x06, 0, 0, 0000000000 },”h]”hŒŠ$ ./bpf_asm -c foo { 0x28, 0, 0, 0x0000000c }, { 0x15, 0, 1, 0x00000806 }, { 0x06, 0, 0, 0xffffffff }, { 0x06, 0, 0, 0000000000 },”…”�”}”hjZsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´Mƒhjgh²hubhý)�”}”(hXÅIn particular, as usage with xt_bpf or cls_bpf can result in more complex BPF filters that might not be obvious at first, it's good to test filters before attaching to a live system. For that purpose, there's a small tool called bpf_dbg under tools/bpf/ in the kernel source directory. This debugger allows for testing BPF filters against given pcap files, single stepping through the BPF code on the pcap's packets and to do BPF machine register dumps.”h]”hXËIn particular, as usage with xt_bpf or cls_bpf can result in more complex BPF filters that might not be obvious at first, it’s good to test filters before attaching to a live system. For that purpose, there’s a small tool called bpf_dbg under tools/bpf/ in the kernel source directory. This debugger allows for testing BPF filters against given pcap files, single stepping through the BPF code on the pcap’s packets and to do BPF machine register dumps.”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‰hjgh²hubhý)�”}”(hŒ7Starting bpf_dbg is trivial and just requires issuing::”h]”hŒ6Starting bpf_dbg is trivial and just requires issuing:”…”�”}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjgh²hubjJ)�”}”(hŒ # ./bpf_dbg”h]”hŒ # ./bpf_dbg”…”�”}”hj„sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´M’hjgh²hubhý)�”}”(hŒÍIn case input and output do not equal stdin/stdout, bpf_dbg takes an alternative stdin source as a first argument, and an alternative stdout sink as a second one, e.g. `./bpf_dbg test_in.txt test_out.txt`.”h]”(hŒ¨In case input and output do not equal stdin/stdout, bpf_dbg takes an alternative stdin source as a first argument, and an alternative stdout sink as a second one, e.g. ”…”�”}”(hj’h²hh³Nh´Nubjt)�”}”(hŒ$`./bpf_dbg test_in.txt test_out.txt`”h]”hŒ"./bpf_dbg test_in.txt test_out.txt”…”�”}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jshj’ubhŒ.”…”�”}”(hj’h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M”hjgh²hubhý)�”}”(hŒ¡Other than that, a particular libreadline configuration can be set via file "~/.bpf_dbg_init" and the command history is stored in the file "~/.bpf_dbg_history".”h]”hŒ©Other than that, a particular libreadline configuration can be set via file “~/.bpf_dbg_initâ€� and the command history is stored in the file “~/.bpf_dbg_historyâ€�.”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M˜hjgh²hubhý)�”}”(hŒ¼Interaction in bpf_dbg happens through a shell that also has auto-completion support (follow-up example commands starting with '>' denote bpf_dbg shell). The usual workflow would be to ...”h]”hŒÀInteraction in bpf_dbg happens through a shell that also has auto-completion support (follow-up example commands starting with ‘>’ denote bpf_dbg shell). The usual workflow would be to ...”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mœhjgh²hubjé)�”}”(hhh]”(jî)�”}”(hXqload bpf 6,40 0 0 12,21 0 3 2048,48 0 0 23,21 0 1 1,6 0 0 65535,6 0 0 0 Loads a BPF filter from standard output of bpf_asm, or transformed via e.g. ``tcpdump -iem1 -ddd port 22 | tr '\n' ','``. Note that for JIT debugging (next section), this command creates a temporary socket and loads the BPF code into the kernel. Thus, this will also be useful for JIT developers. ”h]”hý)�”}”(hXpload bpf 6,40 0 0 12,21 0 3 2048,48 0 0 23,21 0 1 1,6 0 0 65535,6 0 0 0 Loads a BPF filter from standard output of bpf_asm, or transformed via e.g. ``tcpdump -iem1 -ddd port 22 | tr '\n' ','``. Note that for JIT debugging (next section), this command creates a temporary socket and loads the BPF code into the kernel. Thus, this will also be useful for JIT developers.”h]”(hŒ”load bpf 6,40 0 0 12,21 0 3 2048,48 0 0 23,21 0 1 1,6 0 0 65535,6 0 0 0 Loads a BPF filter from standard output of bpf_asm, or transformed via e.g. ”…”�”}”(hjÕh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ,``tcpdump -iem1 -ddd port 22 | tr '\n' ','``”h]”hŒ(tcpdump -iem1 -ddd port 22 | tr '\n' ','”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÝhjÕubhŒ°. Note that for JIT debugging (next section), this command creates a temporary socket and loads the BPF code into the kernel. Thus, this will also be useful for JIT developers.”…”�”}”(hjÕh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hjÑubah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjÎh²hh³hÇh´Nubjî)�”}”(hŒ6load pcap foo.pcap Loads standard tcpdump pcap file. ”h]”(hý)�”}”(hŒload pcap foo.pcap”h]”hŒload pcap foo.pcap”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M§hjýubhý)�”}”(hŒ!Loads standard tcpdump pcap file.”h]”hŒ!Loads standard tcpdump pcap file.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M©hjýubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhjÎh²hh³hÇh´Nubjî)�”}”(hŒ run [] ”h]”hý)�”}”(hŒ run []”h]”hŒ run []”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M«hj#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jíhjÎh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”j;j<uh1jèh³hÇh´M hjgh²hubhŒdefinition_list”“”)�”}”(hhh]”hŒdefinition_list_item”“”)�”}”(hŒ¦bpf passes:1 fails:9 Runs through all packets from a pcap to account how many passes and fails the filter will generate. A limit of packets to traverse can be given. ”h]”(hŒterm”“”)�”}”(hŒbpf passes:1 fails:9”h]”hŒbpf passes:1 fails:9”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jLh³hÇh´M¯hjHubhŒ definition”“”)�”}”(hhh]”hý)�”}”(hŒ�Runs through all packets from a pcap to account how many passes and fails the filter will generate. A limit of packets to traverse can be given.”h]”hŒ�Runs through all packets from a pcap to account how many passes and fails the filter will generate. A limit of packets to traverse can be given.”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M®hj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1j\hjHubeh}”(h]”h ]”h"]”h$]”h&]”uh1jFh³hÇh´M¯hjCubah}”(h]”h ]”h"]”h$]”h&]”uh1jAhjgh²hh³hÇh´Nubjé)�”}”(hhh]”(jî)�”}”(hŒÎdisassemble:: l0: ldh [12] l1: jeq #0x800, l2, l5 l2: ldb [23] l3: jeq #0x1, l4, l5 l4: ret #0xffff l5: ret #0 Prints out BPF code disassembly. ”h]”(hý)�”}”(hŒ disassemble::”h]”hŒ disassemble:”…”�”}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M±hj„ubjJ)�”}”(hŒxl0: ldh [12] l1: jeq #0x800, l2, l5 l2: ldb [23] l3: jeq #0x1, l4, l5 l4: ret #0xffff l5: ret #0”h]”hŒxl0: ldh [12] l1: jeq #0x800, l2, l5 l2: ldb [23] l3: jeq #0x1, l4, l5 l4: ret #0xffff l5: ret #0”…”�”}”hj–sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´M³hj„ubhý)�”}”(hŒ Prints out BPF code disassembly.”h]”hŒ Prints out BPF code disassembly.”…”�”}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mºhj„ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhj�h²hh³hÇh´Nubjî)�”}”(hX"dump:: /* { op, jt, jf, k }, */ { 0x28, 0, 0, 0x0000000c }, { 0x15, 0, 3, 0x00000800 }, { 0x30, 0, 0, 0x00000017 }, { 0x15, 0, 1, 0x00000001 }, { 0x06, 0, 0, 0x0000ffff }, { 0x06, 0, 0, 0000000000 }, Prints out C-style BPF code dump. ”h]”(hý)�”}”(hŒdump::”h]”hŒdump:”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¼hj¸ubjJ)�”}”(hŒÌ/* { op, jt, jf, k }, */ { 0x28, 0, 0, 0x0000000c }, { 0x15, 0, 3, 0x00000800 }, { 0x30, 0, 0, 0x00000017 }, { 0x15, 0, 1, 0x00000001 }, { 0x06, 0, 0, 0x0000ffff }, { 0x06, 0, 0, 0000000000 },”h]”hŒÌ/* { op, jt, jf, k }, */ { 0x28, 0, 0, 0x0000000c }, { 0x15, 0, 3, 0x00000800 }, { 0x30, 0, 0, 0x00000017 }, { 0x15, 0, 1, 0x00000001 }, { 0x06, 0, 0, 0x0000ffff }, { 0x06, 0, 0, 0000000000 },”…”�”}”hjÊsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´M¾hj¸ubhý)�”}”(hŒ!Prints out C-style BPF code dump.”h]”hŒ!Prints out C-style BPF code dump.”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÆhj¸ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhj�h²hh³hÇh´Nubjî)�”}”(hŒ7breakpoint 0:: breakpoint at: l0: ldh [12] ”h]”(hý)�”}”(hŒbreakpoint 0::”h]”hŒ breakpoint 0:”…”�”}”(hjðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÈhjìubjJ)�”}”(hŒ breakpoint at: l0: ldh [12]”h]”hŒ breakpoint at: l0: ldh [12]”…”�”}”hjþsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´MÊhjìubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhj�h²hh³hÇh´Nubjî)�”}”(hX¬breakpoint 1:: breakpoint at: l1: jeq #0x800, l2, l5 ... Sets breakpoints at particular BPF instructions. Issuing a `run` command will walk through the pcap file continuing from the current packet and break when a breakpoint is being hit (another `run` will continue from the currently active breakpoint executing next instructions): * run:: -- register dump -- pc: [0] <-- program counter code: [40] jt[0] jf[0] k[12] <-- plain BPF code of current instruction curr: l0: ldh [12] <-- disassembly of current instruction A: [00000000][0] <-- content of A (hex, decimal) X: [00000000][0] <-- content of X (hex, decimal) M[0,15]: [00000000][0] <-- folded content of M (hex, decimal) -- packet dump -- <-- Current packet from pcap (hex) len: 42 0: 00 19 cb 55 55 a4 00 14 a4 43 78 69 08 06 00 01 16: 08 00 06 04 00 01 00 14 a4 43 78 69 0a 3b 01 26 32: 00 00 00 00 00 00 0a 3b 01 01 (breakpoint) > * breakpoint:: breakpoints: 0 1 Prints currently set breakpoints. ”h]”(hý)�”}”(hŒbreakpoint 1::”h]”hŒ breakpoint 1:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÌhjubjJ)�”}”(hŒ*breakpoint at: l1: jeq #0x800, l2, l5”h]”hŒ*breakpoint at: l1: jeq #0x800, l2, l5”…”�”}”hj$sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´MÎhjubhý)�”}”(hŒ...”h]”hŒ...”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÐhjubhý)�”}”(hXSets breakpoints at particular BPF instructions. Issuing a `run` command will walk through the pcap file continuing from the current packet and break when a breakpoint is being hit (another `run` will continue from the currently active breakpoint executing next instructions):”h]”(hŒ;Sets breakpoints at particular BPF instructions. Issuing a ”…”�”}”(hj@h²hh³Nh´Nubjt)�”}”(hŒ`run`”h]”hŒrun”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jshj@ubhŒ~ command will walk through the pcap file continuing from the current packet and break when a breakpoint is being hit (another ”…”�”}”(hj@h²hh³Nh´Nubjt)�”}”(hŒ`run`”h]”hŒrun”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jshj@ubhŒQ will continue from the currently active breakpoint executing next instructions):”…”�”}”(hj@h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÒhjubjé)�”}”(hhh]”(jî)�”}”(hXärun:: -- register dump -- pc: [0] <-- program counter code: [40] jt[0] jf[0] k[12] <-- plain BPF code of current instruction curr: l0: ldh [12] <-- disassembly of current instruction A: [00000000][0] <-- content of A (hex, decimal) X: [00000000][0] <-- content of X (hex, decimal) M[0,15]: [00000000][0] <-- folded content of M (hex, decimal) -- packet dump -- <-- Current packet from pcap (hex) len: 42 0: 00 19 cb 55 55 a4 00 14 a4 43 78 69 08 06 00 01 16: 08 00 06 04 00 01 00 14 a4 43 78 69 0a 3b 01 26 32: 00 00 00 00 00 00 0a 3b 01 01 (breakpoint) > ”h]”(hý)�”}”(hŒrun::”h]”hŒrun:”…”�”}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M×hjuubjJ)�”}”(hX¤-- register dump -- pc: [0] <-- program counter code: [40] jt[0] jf[0] k[12] <-- plain BPF code of current instruction curr: l0: ldh [12] <-- disassembly of current instruction A: [00000000][0] <-- content of A (hex, decimal) X: [00000000][0] <-- content of X (hex, decimal) M[0,15]: [00000000][0] <-- folded content of M (hex, decimal) -- packet dump -- <-- Current packet from pcap (hex) len: 42 0: 00 19 cb 55 55 a4 00 14 a4 43 78 69 08 06 00 01 16: 08 00 06 04 00 01 00 14 a4 43 78 69 0a 3b 01 26 32: 00 00 00 00 00 00 0a 3b 01 01 (breakpoint) >”h]”hX¤-- register dump -- pc: [0] <-- program counter code: [40] jt[0] jf[0] k[12] <-- plain BPF code of current instruction curr: l0: ldh [12] <-- disassembly of current instruction A: [00000000][0] <-- content of A (hex, decimal) X: [00000000][0] <-- content of X (hex, decimal) M[0,15]: [00000000][0] <-- folded content of M (hex, decimal) -- packet dump -- <-- Current packet from pcap (hex) len: 42 0: 00 19 cb 55 55 a4 00 14 a4 43 78 69 08 06 00 01 16: 08 00 06 04 00 01 00 14 a4 43 78 69 0a 3b 01 26 32: 00 00 00 00 00 00 0a 3b 01 01 (breakpoint) >”…”�”}”hj‡sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´MÙhjuubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhjrubjî)�”}”(hŒFbreakpoint:: breakpoints: 0 1 Prints currently set breakpoints. ”h]”(hý)�”}”(hŒ breakpoint::”h]”hŒ breakpoint:”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mèhj›ubjJ)�”}”(hŒbreakpoints: 0 1”h]”hŒbreakpoints: 0 1”…”�”}”hj­sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´Mêhj›ubhý)�”}”(hŒ!Prints currently set breakpoints.”h]”hŒ!Prints currently set breakpoints.”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mìhj›ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhjrubeh}”(h]”h ]”h"]”h$]”h&]”j;j<uh1jèh³hÇh´M×hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhj�h²hh³Nh´Nubjî)�”}”(hX.step [-, +] Performs single stepping through the BPF program from the current pc offset. Thus, on each step invocation, above register dump is issued. This can go forwards and backwards in time, a plain `step` will break on the next BPF instruction, thus +1. (No `run` needs to be issued here.) ”h]”(hý)�”}”(hŒstep [-, +]”h]”hŒstep [-, +]”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MîhjÛubhý)�”}”(hXPerforms single stepping through the BPF program from the current pc offset. Thus, on each step invocation, above register dump is issued. This can go forwards and backwards in time, a plain `step` will break on the next BPF instruction, thus +1. (No `run` needs to be issued here.)”h]”(hŒ¿Performs single stepping through the BPF program from the current pc offset. Thus, on each step invocation, above register dump is issued. This can go forwards and backwards in time, a plain ”…”�”}”(hjíh²hh³Nh´Nubjt)�”}”(hŒ`step`”h]”hŒstep”…”�”}”(hjõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jshjíubhŒ6 will break on the next BPF instruction, thus +1. (No ”…”�”}”(hjíh²hh³Nh´Nubjt)�”}”(hŒ`run`”h]”hŒrun”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jshjíubhŒ needs to be issued here.)”…”�”}”(hjíh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MðhjÛubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhj�h²hh³hÇh´Nubjî)�”}”(hŒèselect Selects a given packet from the pcap file to continue from. Thus, on the next `run` or `step`, the BPF program is being evaluated against the user pre-selected packet. Numbering starts just as in Wireshark with index 1. ”h]”(hý)�”}”(hŒ select ”h]”hŒ select ”…”�”}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mõhj%ubhý)�”}”(hŒÛSelects a given packet from the pcap file to continue from. Thus, on the next `run` or `step`, the BPF program is being evaluated against the user pre-selected packet. Numbering starts just as in Wireshark with index 1.”h]”(hŒNSelects a given packet from the pcap file to continue from. Thus, on the next ”…”�”}”(hj7h²hh³Nh´Nubjt)�”}”(hŒ`run`”h]”hŒrun”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jshj7ubhŒ or ”…”�”}”(hj7h²hh³Nh´Nubjt)�”}”(hŒ`step`”h]”hŒstep”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jshj7ubhŒ~, the BPF program is being evaluated against the user pre-selected packet. Numbering starts just as in Wireshark with index 1.”…”�”}”(hj7h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M÷hj%ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhj�h²hh³hÇh´Nubjî)�”}”(hŒquit Exits bpf_dbg. ”h]”(hý)�”}”(hŒquit”h]”hŒquit”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mühjoubhý)�”}”(hŒExits bpf_dbg.”h]”hŒExits bpf_dbg.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mþhjoubeh}”(h]”h ]”h"]”h$]”h&]”uh1jíhj�h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”j;j<uh1jèh³hÇh´M±hjgh²hubeh}”(h]”Œbpf-engine-and-instruction-set”ah ]”h"]”Œbpf engine and instruction set”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K¸ubh×)�”}”(hhh]”(hÜ)�”}”(hŒ JIT compiler”h]”hŒ JIT compiler”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj£h²hh³hÇh´Mubhý)�”}”(hX;The Linux kernel has a built-in BPF JIT compiler for x86_64, SPARC, PowerPC, ARM, ARM64, MIPS, RISC-V, s390, and ARC and can be enabled through CONFIG_BPF_JIT. The JIT compiler is transparently invoked for each attached filter from user space or for internal kernel users if it has been previously enabled by root::”h]”hX:The Linux kernel has a built-in BPF JIT compiler for x86_64, SPARC, PowerPC, ARM, ARM64, MIPS, RISC-V, s390, and ARC and can be enabled through CONFIG_BPF_JIT. The JIT compiler is transparently invoked for each attached filter from user space or for internal kernel users if it has been previously enabled by root:”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj£h²hubjJ)�”}”(hŒ*echo 1 > /proc/sys/net/core/bpf_jit_enable”h]”hŒ*echo 1 > /proc/sys/net/core/bpf_jit_enable”…”�”}”hjÂsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´M hj£h²hubhý)�”}”(hŒvFor JIT developers, doing audits etc, each compile run can output the generated opcode image into the kernel log via::”h]”hŒuFor JIT developers, doing audits etc, each compile run can output the generated opcode image into the kernel log via:”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hj£h²hubjJ)�”}”(hŒ*echo 2 > /proc/sys/net/core/bpf_jit_enable”h]”hŒ*echo 2 > /proc/sys/net/core/bpf_jit_enable”…”�”}”hjÞsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´Mhj£h²hubhý)�”}”(hŒExample output from dmesg::”h]”hŒExample output from dmesg:”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj£h²hubjJ)�”}”(hX¿[ 3389.935842] flen=6 proglen=70 pass=3 image=ffffffffa0069c8f [ 3389.935847] JIT code: 00000000: 55 48 89 e5 48 83 ec 60 48 89 5d f8 44 8b 4f 68 [ 3389.935849] JIT code: 00000010: 44 2b 4f 6c 4c 8b 87 d8 00 00 00 be 0c 00 00 00 [ 3389.935850] JIT code: 00000020: e8 1d 94 ff e0 3d 00 08 00 00 75 16 be 17 00 00 [ 3389.935851] JIT code: 00000030: 00 e8 28 94 ff e0 83 f8 01 75 07 b8 ff ff 00 00 [ 3389.935852] JIT code: 00000040: eb 02 31 c0 c9 c3”h]”hX¿[ 3389.935842] flen=6 proglen=70 pass=3 image=ffffffffa0069c8f [ 3389.935847] JIT code: 00000000: 55 48 89 e5 48 83 ec 60 48 89 5d f8 44 8b 4f 68 [ 3389.935849] JIT code: 00000010: 44 2b 4f 6c 4c 8b 87 d8 00 00 00 be 0c 00 00 00 [ 3389.935850] JIT code: 00000020: e8 1d 94 ff e0 3d 00 08 00 00 75 16 be 17 00 00 [ 3389.935851] JIT code: 00000030: 00 e8 28 94 ff e0 83 f8 01 75 07 b8 ff ff 00 00 [ 3389.935852] JIT code: 00000040: eb 02 31 c0 c9 c3”…”�”}”hjúsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´Mhj£h²hubhý)�”}”(hXvWhen CONFIG_BPF_JIT_ALWAYS_ON is enabled, bpf_jit_enable is permanently set to 1 and setting any other value than that will return in failure. This is even the case for setting bpf_jit_enable to 2, since dumping the final JIT image into the kernel log is discouraged and introspection through bpftool (under tools/bpf/bpftool/) is the generally recommended approach instead.”h]”hXvWhen CONFIG_BPF_JIT_ALWAYS_ON is enabled, bpf_jit_enable is permanently set to 1 and setting any other value than that will return in failure. This is even the case for setting bpf_jit_enable to 2, since dumping the final JIT image into the kernel log is discouraged and introspection through bpftool (under tools/bpf/bpftool/) is the generally recommended approach instead.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj£h²hubhý)�”}”(hŒIn the kernel source tree under tools/bpf/, there's bpf_jit_disasm for generating disassembly out of the kernel log's hexdump::”h]”hŒ‚In the kernel source tree under tools/bpf/, there’s bpf_jit_disasm for generating disassembly out of the kernel log’s hexdump:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj£h²hubjJ)�”}”(hXú# ./bpf_jit_disasm 70 bytes emitted from JIT compiler (pass:3, flen:6) ffffffffa0069c8f + : 0: push %rbp 1: mov %rsp,%rbp 4: sub $0x60,%rsp 8: mov %rbx,-0x8(%rbp) c: mov 0x68(%rdi),%r9d 10: sub 0x6c(%rdi),%r9d 14: mov 0xd8(%rdi),%r8 1b: mov $0xc,%esi 20: callq 0xffffffffe0ff9442 25: cmp $0x800,%eax 2a: jne 0x0000000000000042 2c: mov $0x17,%esi 31: callq 0xffffffffe0ff945e 36: cmp $0x1,%eax 39: jne 0x0000000000000042 3b: mov $0xffff,%eax 40: jmp 0x0000000000000044 42: xor %eax,%eax 44: leaveq 45: retq Issuing option `-o` will "annotate" opcodes to resulting assembler instructions, which can be very useful for JIT developers: # ./bpf_jit_disasm -o 70 bytes emitted from JIT compiler (pass:3, flen:6) ffffffffa0069c8f + : 0: push %rbp 55 1: mov %rsp,%rbp 48 89 e5 4: sub $0x60,%rsp 48 83 ec 60 8: mov %rbx,-0x8(%rbp) 48 89 5d f8 c: mov 0x68(%rdi),%r9d 44 8b 4f 68 10: sub 0x6c(%rdi),%r9d 44 2b 4f 6c 14: mov 0xd8(%rdi),%r8 4c 8b 87 d8 00 00 00 1b: mov $0xc,%esi be 0c 00 00 00 20: callq 0xffffffffe0ff9442 e8 1d 94 ff e0 25: cmp $0x800,%eax 3d 00 08 00 00 2a: jne 0x0000000000000042 75 16 2c: mov $0x17,%esi be 17 00 00 00 31: callq 0xffffffffe0ff945e e8 28 94 ff e0 36: cmp $0x1,%eax 83 f8 01 39: jne 0x0000000000000042 75 07 3b: mov $0xffff,%eax b8 ff ff 00 00 40: jmp 0x0000000000000044 eb 02 42: xor %eax,%eax 31 c0 44: leaveq c9 45: retq c3”h]”hXú# ./bpf_jit_disasm 70 bytes emitted from JIT compiler (pass:3, flen:6) ffffffffa0069c8f + : 0: push %rbp 1: mov %rsp,%rbp 4: sub $0x60,%rsp 8: mov %rbx,-0x8(%rbp) c: mov 0x68(%rdi),%r9d 10: sub 0x6c(%rdi),%r9d 14: mov 0xd8(%rdi),%r8 1b: mov $0xc,%esi 20: callq 0xffffffffe0ff9442 25: cmp $0x800,%eax 2a: jne 0x0000000000000042 2c: mov $0x17,%esi 31: callq 0xffffffffe0ff945e 36: cmp $0x1,%eax 39: jne 0x0000000000000042 3b: mov $0xffff,%eax 40: jmp 0x0000000000000044 42: xor %eax,%eax 44: leaveq 45: retq Issuing option `-o` will "annotate" opcodes to resulting assembler instructions, which can be very useful for JIT developers: # ./bpf_jit_disasm -o 70 bytes emitted from JIT compiler (pass:3, flen:6) ffffffffa0069c8f + : 0: push %rbp 55 1: mov %rsp,%rbp 48 89 e5 4: sub $0x60,%rsp 48 83 ec 60 8: mov %rbx,-0x8(%rbp) 48 89 5d f8 c: mov 0x68(%rdi),%r9d 44 8b 4f 68 10: sub 0x6c(%rdi),%r9d 44 2b 4f 6c 14: mov 0xd8(%rdi),%r8 4c 8b 87 d8 00 00 00 1b: mov $0xc,%esi be 0c 00 00 00 20: callq 0xffffffffe0ff9442 e8 1d 94 ff e0 25: cmp $0x800,%eax 3d 00 08 00 00 2a: jne 0x0000000000000042 75 16 2c: mov $0x17,%esi be 17 00 00 00 31: callq 0xffffffffe0ff945e e8 28 94 ff e0 36: cmp $0x1,%eax 83 f8 01 39: jne 0x0000000000000042 75 07 3b: mov $0xffff,%eax b8 ff ff 00 00 40: jmp 0x0000000000000044 eb 02 42: xor %eax,%eax 31 c0 44: leaveq c9 45: retq c3”…”�”}”hj$sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´M"hj£h²hubhý)�”}”(hŒ�For BPF JIT developers, bpf_jit_disasm, bpf_asm and bpf_dbg provides a useful toolchain for developing and testing the kernel's JIT compiler.”h]”hŒ�For BPF JIT developers, bpf_jit_disasm, bpf_asm and bpf_dbg provides a useful toolchain for developing and testing the kernel’s JIT compiler.”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mihj£h²hubeh}”(h]”Œ jit-compiler”ah ]”h"]”Œ jit compiler”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Mubh×)�”}”(hhh]”(hÜ)�”}”(hŒBPF kernel internals”h]”hŒBPF kernel internals”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjHh²hh³hÇh´Mmubhý)�”}”(hXxInternally, for the kernel interpreter, a different instruction set format with similar underlying principles from BPF described in previous paragraphs is being used. However, the instruction set format is modelled closer to the underlying architecture to mimic native instruction sets, so that a better performance can be achieved (more details later). This new ISA is called eBPF. See the ../bpf/index.rst for details. (Note: eBPF which originates from [e]xtended BPF is not the same as BPF extensions! While eBPF is an ISA, BPF extensions date back to classic BPF's 'overloading' of BPF_LD | BPF_{B,H,W} | BPF_ABS instruction.)”h]”hX~Internally, for the kernel interpreter, a different instruction set format with similar underlying principles from BPF described in previous paragraphs is being used. However, the instruction set format is modelled closer to the underlying architecture to mimic native instruction sets, so that a better performance can be achieved (more details later). This new ISA is called eBPF. See the ../bpf/index.rst for details. (Note: eBPF which originates from [e]xtended BPF is not the same as BPF extensions! While eBPF is an ISA, BPF extensions date back to classic BPF’s ‘overloading’ of BPF_LD | BPF_{B,H,W} | BPF_ABS instruction.)”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MnhjHh²hubhý)�”}”(hX5The new instruction set was originally designed with the possible goal in mind to write programs in "restricted C" and compile into eBPF with a optional GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with minimal performance overhead over two steps, that is, C -> eBPF -> native code.”h]”hX9The new instruction set was originally designed with the possible goal in mind to write programs in “restricted Câ€� and compile into eBPF with a optional GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with minimal performance overhead over two steps, that is, C -> eBPF -> native code.”…”�”}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MxhjHh²hubhý)�”}”(hXšCurrently, the new format is being used for running user BPF programs, which includes seccomp BPF, classic socket filters, cls_bpf traffic classifier, team driver's classifier for its load-balancing mode, netfilter's xt_bpf extension, PTP dissector/classifier, and much more. They are all internally converted by the kernel into the new instruction set representation and run in the eBPF interpreter. For in-kernel handlers, this all works transparently by using bpf_prog_create() for setting up the filter, resp. bpf_prog_destroy() for destroying it. The function bpf_prog_run(filter, ctx) transparently invokes eBPF interpreter or JITed code to run the filter. 'filter' is a pointer to struct bpf_prog that we got from bpf_prog_create(), and 'ctx' the given context (e.g. skb pointer). All constraints and restrictions from bpf_check_classic() apply before a conversion to the new layout is being done behind the scenes!”h]”hX¦Currently, the new format is being used for running user BPF programs, which includes seccomp BPF, classic socket filters, cls_bpf traffic classifier, team driver’s classifier for its load-balancing mode, netfilter’s xt_bpf extension, PTP dissector/classifier, and much more. They are all internally converted by the kernel into the new instruction set representation and run in the eBPF interpreter. For in-kernel handlers, this all works transparently by using bpf_prog_create() for setting up the filter, resp. bpf_prog_destroy() for destroying it. The function bpf_prog_run(filter, ctx) transparently invokes eBPF interpreter or JITed code to run the filter. ‘filter’ is a pointer to struct bpf_prog that we got from bpf_prog_create(), and ‘ctx’ the given context (e.g. skb pointer). All constraints and restrictions from bpf_check_classic() apply before a conversion to the new layout is being done behind the scenes!”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M}hjHh²hubhý)�”}”(hŒéCurrently, the classic BPF format is being used for JITing on most 32-bit architectures, whereas x86-64, aarch64, s390x, powerpc64, sparc64, arm32, riscv64, riscv32, loongarch64, arc perform JIT compilation from eBPF instruction set.”h]”hŒéCurrently, the classic BPF format is being used for JITing on most 32-bit architectures, whereas x86-64, aarch64, s390x, powerpc64, sparc64, arm32, riscv64, riscv32, loongarch64, arc perform JIT compilation from eBPF instruction set.”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‹hjHh²hubeh}”(h]”Œbpf-kernel-internals”ah ]”h"]”Œbpf kernel internals”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Mmubh×)�”}”(hhh]”(hÜ)�”}”(hŒTesting”h]”hŒTesting”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj™h²hh³hÇh´M‘ubhý)�”}”(hŒóNext to the BPF toolchain, the kernel also ships a test module that contains various test cases for classic and eBPF that can be executed against the BPF interpreter and JIT compiler. It can be found in lib/test_bpf.c and enabled via Kconfig::”h]”hŒòNext to the BPF toolchain, the kernel also ships a test module that contains various test cases for classic and eBPF that can be executed against the BPF interpreter and JIT compiler. It can be found in lib/test_bpf.c and enabled via Kconfig:”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M“hj™h²hubjJ)�”}”(hŒCONFIG_TEST_BPF=m”h]”hŒCONFIG_TEST_BPF=m”…”�”}”hj¸sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jIh³hÇh´M˜hj™h²hubhý)�”}”(hŒÛAfter the module has been built and installed, the test suite can be executed via insmod or modprobe against 'test_bpf' module. Results of the test cases including timings in nsec can be found in the kernel log (dmesg).”h]”hŒßAfter the module has been built and installed, the test suite can be executed via insmod or modprobe against ‘test_bpf’ module. Results of the test cases including timings in nsec can be found in the kernel log (dmesg).”…”�”}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mšhj™h²hubeh}”(h]”Œtesting”ah ]”h"]”Œtesting”ah$]”h&]”uh1hÖhhØh²hh³hÇh´M‘ubh×)�”}”(hhh]”(hÜ)�”}”(hŒMisc”h]”hŒMisc”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjÜh²hh³hÇh´MŸubhý)�”}”(hŒdAlso trinity, the Linux syscall fuzzer, has built-in support for BPF and SECCOMP-BPF kernel fuzzing.”h]”hŒdAlso trinity, the Linux syscall fuzzer, has built-in support for BPF and SECCOMP-BPF kernel fuzzing.”…”�”}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¡hjÜh²hubeh}”(h]”Œmisc”ah ]”h"]”Œmisc”ah$]”h&]”uh1hÖhhØh²hh³hÇh´MŸubh×)�”}”(hhh]”(hÜ)�”}”(hŒ Written by”h]”hŒ Written by”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjh²hh³hÇh´M¥ubhý)�”}”(hŒ®The document was written in the hope that it is found useful and in order to give potential BPF hackers or security auditors a better overview of the underlying architecture.”h]”hŒ®The document was written in the hope that it is found useful and in order to give potential BPF hackers or security auditors a better overview of the underlying architecture.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M§hjh²hubjé)�”}”(hhh]”(jî)�”}”(hŒ Jay Schulist ”h]”hý)�”}”(hj'h]”(hŒJay Schulist <”…”�”}”(hj)h²hh³Nh´Nubj)�”}”(hŒjschlst@samba.org”h]”hŒjschlst@samba.org”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:jschlst@samba.org”uh1jhj)ubhŒ>”…”�”}”(hj)h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M«hj%ubah}”(h]”h ]”h"]”h$]”h&]”uh1jíhj"h²hh³hÇh´Nubjî)�”}”(hŒ&Daniel Borkmann ”h]”hý)�”}”(hjRh]”(hŒDaniel Borkmann <”…”�”}”(hjTh²hh³Nh´Nubj)�”}”(hŒdaniel@iogearbox.net”h]”hŒdaniel@iogearbox.net”…”�”}”(hj[h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:daniel@iogearbox.net”uh1jhjTubhŒ>”…”�”}”(hjTh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¬hjPubah}”(h]”h ]”h"]”h$]”h&]”uh1jíhj"h²hh³hÇh´Nubjî)�”}”(hŒ#Alexei Starovoitov ”h]”hý)�”}”(hj}h]”(hŒAlexei Starovoitov <”…”�”}”(hjh²hh³Nh´Nubj)�”}”(hŒast@kernel.org”h]”hŒast@kernel.org”…”�”}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:ast@kernel.org”uh1jhjubhŒ>”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M­hj{ubah}”(h]”h ]”h"]”h$]”h&]”uh1jíhj"h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”j;Œ-”uh1jèh³hÇh´M«hjh²hubeh}”(h]”Œ written-by”ah ]”h"]”Œ written by”ah$]”h&]”uh1hÖhhØh²hh³hÇh´M¥ubeh}”(h]”(Œ5linux-socket-filtering-aka-berkeley-packet-filter-bpf”hÕeh ]”h"]”(Œ7linux socket filtering aka berkeley packet filter (bpf)”Œnetworking-filter”eh$]”h&]”uh1hÖhhh²hh³hÇh´KŒexpect_referenced_by_name”}”j»hÊsŒexpect_referenced_by_id”}”hÕhÊsubeh}”(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”jÂŒ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”}”Œ1”]”j©asŒrefids”}”hÕ]”hÊasŒnameids”}”(j»hÕjºj·jjj'j$jîj¸jˆj…jdjaj j�jEjBj–j“jÙjÖjjýj²j¯uŒ nametypes”}”(j»ˆjº‰j‰j'‰jîˆjˆ‰jd‰j ‰jE‰j–‰jÙ‰j‰j²‰uh}”(hÕhØj·hØjhëj$jj³j©j¸jÈj…j*jaj‹j�jgjBj£j“jHjÖj™jýjÜj¯juŒ footnote_refs”}”j$]”j©asŒ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”jÈaŒ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”jòKs…”R”Œparse_messages”]”hŒsystem_message”“”)�”}”(hhh]”hý)�”}”(hŒeUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.”h]”hŒgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjLubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œline”MÐŒsource”hÇuh1jJhjubaŒtransform_messages”]”jK)�”}”(hhh]”hý)�”}”(hhh]”hŒ7Hyperlink target "networking-filter" is not referenced.”…”�”}”hjmsbah}”(h]”h ]”h"]”h$]”h&]”uh1hühjjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”jeŒsource”hÇŒline”Kuh1jJubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.