<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/Documentation/bpf/instruction-set.rst, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2023-07-11T01:12:50+00:00</updated>
<entry>
<title>bpf,docs: Create new standardization subdirectory</title>
<updated>2023-07-11T01:12:50+00:00</updated>
<author>
<name>David Vernet</name>
<email>void@manifault.com</email>
</author>
<published>2023-07-10T18:30:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4d496be9ca05d22dbbbba78368ac4bb05bcc67f2'/>
<id>urn:sha1:4d496be9ca05d22dbbbba78368ac4bb05bcc67f2</id>
<content type='text'>
The BPF standardization effort is actively underway with the IETF. As
described in the BPF Working Group (WG) charter in [0], there are a
number of proposed documents, some informational and some proposed
standards, that will be drafted as part of the standardization effort.

[0]: https://datatracker.ietf.org/wg/bpf/about/

Though the specific documents that will formally be standardized will
exist as Internet Drafts (I-D) and WG documents in the BPF WG
datatracker page, the source of truth from where those documents will be
generated will reside in the kernel documentation tree (originating in
the bpf-next tree).

Because these documents will be used to generate the I-D and WG
documents which will be standardized with the IETF, they are a bit
special as far as kernel-tree documentation goes:

- They will be dual licensed with LGPL-2.1 OR BSD-2-Clause
- IETF I-D and WG documents (the documents which will actually be
  standardized) will be auto-generated from these documents.

In order to keep things clearly organized in the BPF documentation tree,
and to make it abundantly clear where standards-related documentation
needs to go, we should move standards-relevant documents into a separate
standardization/ subdirectory.

Signed-off-by: David Vernet &lt;void@manifault.com&gt;
Link: https://lore.kernel.org/r/20230710183027.15132-1-void@manifault.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf, docs: Fix definition of BPF_NEG operation</title>
<updated>2023-06-29T13:58:50+00:00</updated>
<author>
<name>Dave Thaler</name>
<email>dthaler@microsoft.com</email>
</author>
<published>2023-06-27T21:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=85b0c6d4905ec21cd22cb18da701aa02278ccc4c'/>
<id>urn:sha1:85b0c6d4905ec21cd22cb18da701aa02278ccc4c</id>
<content type='text'>
Instruction is an arithmetic negative, not a bitwise inverse.

Signed-off-by: Dave Thaler &lt;dthaler@microsoft.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: David Vernet &lt;void@manifault.com&gt;
Link: https://lore.kernel.org/bpf/20230627213912.951-1-dthaler1968@googlemail.com
</content>
</entry>
<entry>
<title>bpf, docs: Shift operations are defined to use a mask</title>
<updated>2023-05-17T14:18:33+00:00</updated>
<author>
<name>Dave Thaler</name>
<email>dthaler@microsoft.com</email>
</author>
<published>2023-05-09T18:08:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8819495a754e71d3c3fde991c26ad832af995136'/>
<id>urn:sha1:8819495a754e71d3c3fde991c26ad832af995136</id>
<content type='text'>
Update the documentation regarding shift operations to explain the
use of a mask, since otherwise shifting by a value out of range
(like negative) is undefined.

Signed-off-by: Dave Thaler &lt;dthaler@microsoft.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/bpf/20230509180845.1236-1-dthaler1968@googlemail.com
</content>
</entry>
<entry>
<title>bpf, docs: Add docs on extended 64-bit immediate instructions</title>
<updated>2023-04-03T00:02:54+00:00</updated>
<author>
<name>Dave Thaler</name>
<email>dthaler@microsoft.com</email>
</author>
<published>2023-03-26T05:49:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=16b7c970cc8192e929dbd5192ccc1867e19d7bda'/>
<id>urn:sha1:16b7c970cc8192e929dbd5192ccc1867e19d7bda</id>
<content type='text'>
Add docs on extended 64-bit immediate instructions, including six instructions
previously undocumented.  Include a brief description of maps and variables,
as used by those instructions.

V1 -&gt; V2: rebased on top of latest master

V2 -&gt; V3: addressed comments from Alexei

V3 -&gt; V4: addressed comments from David Vernet

Signed-off-by: Dave Thaler &lt;dthaler@microsoft.com&gt;
Link: https://lore.kernel.org/r/20230326054946.2331-1-dthaler1968@googlemail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf, docs: Add extended call instructions</title>
<updated>2023-03-26T03:58:36+00:00</updated>
<author>
<name>Dave Thaler</name>
<email>dthaler@microsoft.com</email>
</author>
<published>2023-03-26T03:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8cfee110711ed60bfdd39af0107ddef01d6b72c3'/>
<id>urn:sha1:8cfee110711ed60bfdd39af0107ddef01d6b72c3</id>
<content type='text'>
Add extended call instructions.  Uses the term "program-local" for
call by offset.  And there are instructions for calling helper functions
by "address" (the old way of using integer values), and for calling
helper functions by BTF ID (for kfuncs).

V1 -&gt; V2: addressed comments from David Vernet

V2 -&gt; V3: make descriptions in table consistent with updated names

V3 -&gt; V4: addressed comments from Alexei

V4 -&gt; V5: fixed alignment

Signed-off-by: Dave Thaler &lt;dthaler@microsoft.com&gt;
Acked-by: David Vernet &lt;void@manifault.com&gt;
Link: https://lore.kernel.org/r/20230326033117.1075-1-dthaler1968@googlemail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf, docs: Add signed comparison example</title>
<updated>2023-03-14T05:10:45+00:00</updated>
<author>
<name>Dave Thaler</name>
<email>dthaler@microsoft.com</email>
</author>
<published>2023-03-10T23:38:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b9fe8e8d03d0df28b2431e3aaf8e115cf7bf2f65'/>
<id>urn:sha1:b9fe8e8d03d0df28b2431e3aaf8e115cf7bf2f65</id>
<content type='text'>
Improve clarity by adding an example of a signed comparison instruction

Signed-off-by: Dave Thaler &lt;dthaler@microsoft.com&gt;
Acked-by: David Vernet &lt;void@manifault.com&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Link: https://lore.kernel.org/r/20230310233814.4641-1-dthaler1968@googlemail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf, docs: Explain helper functions</title>
<updated>2023-03-10T21:02:00+00:00</updated>
<author>
<name>Dave Thaler</name>
<email>dthaler@microsoft.com</email>
</author>
<published>2023-03-08T20:53:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c1f9e14e3b676eb88fe1c9488c0b5f4fc9108a1c'/>
<id>urn:sha1:c1f9e14e3b676eb88fe1c9488c0b5f4fc9108a1c</id>
<content type='text'>
Add brief text about existence of helper functions, with details to go in
separate psABI text.

Note that text about runtime functions (kfuncs) is part of a separate patch,
not this one.

Signed-off-by: Dave Thaler &lt;dthaler@microsoft.com&gt;
Link: https://lore.kernel.org/r/20230308205303.1308-1-dthaler1968@googlemail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf, docs: Document BPF insn encoding in term of stored bytes</title>
<updated>2023-02-28T17:55:18+00:00</updated>
<author>
<name>Jose E. Marchesi</name>
<email>jose.marchesi@oracle.com</email>
</author>
<published>2023-02-28T09:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ae256f95478e07d49dae5036bb83c09dfbd686d4'/>
<id>urn:sha1:ae256f95478e07d49dae5036bb83c09dfbd686d4</id>
<content type='text'>
[Changes from V4:
- s/regs:16/regs:8 in figure.]

[Changes from V3:
- Back to src_reg and dst_reg, since they denote register numbers
  as opposed to the values stored in these registers.]

[Changes from V2:
- Use src and dst consistently in the document.
- Use a more graphical depiction of the 128-bit instruction.
- Remove `Where:' fragment.
- Clarify that unused bits are reserved and shall be zeroed.]

[Changes from V1:
- Use rst literal blocks for figures.
- Avoid using | in the basic instruction/pseudo instruction figure.
- Rebased to today's bpf-next master branch.]

This patch modifies instruction-set.rst so it documents the encoding
of BPF instructions in terms of how the bytes are stored (be it in an
ELF file or as bytes in a memory buffer to be loaded into the kernel
or some other BPF consumer) as opposed to how the instruction looks
like once loaded.

This is hopefully easier to understand by implementors looking to
generate and/or consume bytes conforming BPF instructions.

The patch also clarifies that the unused bytes in a pseudo-instruction
shall be cleared with zeros.

Signed-off-by: Jose E. Marchesi &lt;jose.marchesi@oracle.com&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Acked-by: David Vernet &lt;void@manifault.com&gt;
Link: https://lore.kernel.org/r/87h6v6i0da.fsf_-_@oracle.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf, docs: Add explanation of endianness</title>
<updated>2023-02-22T22:04:55+00:00</updated>
<author>
<name>Dave Thaler</name>
<email>dthaler@microsoft.com</email>
</author>
<published>2023-02-20T22:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=746ce767128598711a00d8df5713d4c3b3d9e9a7'/>
<id>urn:sha1:746ce767128598711a00d8df5713d4c3b3d9e9a7</id>
<content type='text'>
Document the discussion from the email thread on the IETF bpf list,
where it was explained that the raw format varies by endianness
of the processor.

Signed-off-by: Dave Thaler &lt;dthaler@microsoft.com&gt;
Acked-by: David Vernet &lt;void@manifault.com&gt;
Link: https://lore.kernel.org/r/20230220223742.1347-1-dthaler1968@googlemail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf, docs: Add note about type convention</title>
<updated>2023-02-08T17:25:26+00:00</updated>
<author>
<name>Dave Thaler</name>
<email>dthaler@microsoft.com</email>
</author>
<published>2023-01-27T01:47:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d00d5b82f0734205c718aa1acf7cc9b183fd6751'/>
<id>urn:sha1:d00d5b82f0734205c718aa1acf7cc9b183fd6751</id>
<content type='text'>
Add explanation about use of "u64", "u32", etc. as
the type convention used in BPF documentation.

Signed-off-by: Dave Thaler &lt;dthaler@microsoft.com&gt;
Acked-by: David Vernet &lt;void@manifault.com&gt;
Link: https://lore.kernel.org/r/20230127014706.1005-1-dthaler1968@googlemail.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
