Skip to contentSkip to conversation

bpf, docs: specify which BPF_ABS and BPF_IND fields were zero

PATCH Applied Dave Thaler 3 participants 3 messages Feb 21, 2024 – Feb 22, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpf, docs: specify which BPF_ABS and BPF_IND fields were zero

Specifying which fields were unused allows IANA to only list as deprecated instructions that were actually used, leaving the rest as unassigned and possibly available for future use for something else.

---
 Documentation/bpf/standardization/instruction-set.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/bpf/standardization/instruction-set.rst +2 -1
index 868d9f617..597a086c8 100644
@@ -658,6 +658,7 @@ Legacy BPF Packet access instructions
 BPF previously introduced special instructions for access to packet data that were
 carried over from classic BPF. These instructions used an instruction
 class of BPF_LD, a size modifier of BPF_W, BPF_H, or BPF_B, and a
-mode modifier of BPF_ABS or BPF_IND.  However, these instructions are
+mode modifier of BPF_ABS or BPF_IND.  The 'dst_reg' and 'offset' fields were
+set to zero, and 'src_reg' was set to zero for BPF_ABS.  However, these instructions are
 deprecated and should no longer be used.  All legacy packet access
 instructions belong to the "legacy" conformance group.
Signature · 1 line
2.40.1
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Dave Thaler

Specifying which fields were unused allows IANA to only list as deprecated instructions that were actually used, leaving the rest as unassigned and possibly available for future use for something else.

Seems reasonable -- guess there's no harm in leaving ourselves the option of using them in the future.

Quoted 21 lines
---
 Documentation/bpf/standardization/instruction-set.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/bpf/standardization/instruction-set.rst +2 -1
index 868d9f617..597a086c8 100644
@@ -658,6 +658,7 @@ Legacy BPF Packet access instructions
 BPF previously introduced special instructions for access to packet data that were
 carried over from classic BPF. These instructions used an instruction
 class of BPF_LD, a size modifier of BPF_W, BPF_H, or BPF_B, and a
-mode modifier of BPF_ABS or BPF_IND.  However, these instructions are
+mode modifier of BPF_ABS or BPF_IND.  The 'dst_reg' and 'offset' fields were
+set to zero, and 'src_reg' was set to zero for BPF_ABS.  However, these instructions are
 deprecated and should no longer be used.  All legacy packet access
 instructions belong to the "legacy" conformance group.
Signature · 1 line
2.40.1
#2 lore raw
In reply to Dave Thaler
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Hello:

This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Quoted 8 lines · On Wed, 21 Feb 2024 09:54:19 -0800 you wrote:

Specifying which fields were unused allows IANA to only list as deprecated instructions that were actually used, leaving the rest as unassigned and possibly available for future use for something else.

---
 Documentation/bpf/standardization/instruction-set.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
- [bpf-next] bpf, docs: specify which BPF_ABS and BPF_IND fields were zero

    https://git.kernel.org/bpf/bpf-next/c/89ee838130f4

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html