aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/bpf
diff options
context:
space:
mode:
authorZheng Yejian <zhengyejian1@huawei.com>2022-11-29 21:45:58 +0800
committerDaniel Borkmann <daniel@iogearbox.net>2022-12-02 21:27:32 +0100
commitbc067cacb69c6ee0da10d357458fa7f1fe54e472 (patch)
treeaa55504166f3f9423e554d87bb29e27ca21c3616 /Documentation/bpf
parent78b037bd402df8eca0f45ef003c6d0ab25a26ecc (diff)
downloadlinux-bc067cacb69c6ee0da10d357458fa7f1fe54e472.tar.gz
bpf, docs: Correct the example of BPF_XOR
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
Diffstat (limited to 'Documentation/bpf')
-rw-r--r--Documentation/bpf/instruction-set.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst
index 5d798437dad47..e672d5ec6cc7b 100644
--- 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