projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78b037b
)
bpf, docs: Correct the example of BPF_XOR
author
Zheng Yejian
<zhengyejian1@huawei.com>
Tue, 29 Nov 2022 13:45:58 +0000
(21:45 +0800)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Fri, 2 Dec 2022 20:27:32 +0000
(21:27 +0100)
Refer to description of BPF_XOR, dst_reg should be used but not src_reg
in the examples.
Fixes: be3193cded9d ("bpf, docs: Add subsections for ALU and JMP instructions")
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link:
https://lore.kernel.org/bpf/20221129134558.2757043-1-zhengyejian1@huawei.com
Documentation/bpf/instruction-set.rst
patch
|
blob
|
history
diff --git
a/Documentation/bpf/instruction-set.rst
b/Documentation/bpf/instruction-set.rst
index 5d798437dad47f99e4086fe7b4dad9eaa2a08433..e672d5ec6cc7bc15301d8b553b4c76385bfe9757 100644
(file)
--- a/
Documentation/bpf/instruction-set.rst
+++ b/
Documentation/bpf/instruction-set.rst
@@
-122,11
+122,11
@@
BPF_END 0xd0 byte swap operations (see `Byte swap instructions`_ below)
``BPF_XOR | BPF_K | BPF_ALU`` means::
-
src_reg = (u32) src
_reg ^ (u32) imm32
+
dst_reg = (u32) dst
_reg ^ (u32) imm32
``BPF_XOR | BPF_K | BPF_ALU64`` means::
-
src_reg = src
_reg ^ imm32
+
dst_reg = dst
_reg ^ imm32
Byte swap instructions