From 12779ed52439d34f42a39cd73d122f34d092770c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dean=20=E5=88=A9=E8=BF=AA=E6=81=A9?= <10921578+deanmlittle@users.noreply.github.com> Date: Sat, 25 May 2024 13:07:33 +0800 Subject: [PATCH] Fix mislabelled mul64 opcodes mul64 opcodes were labelled as div64 in the comments with an operation equivalent `/=`. They are now accurately labelled as mul64 with an operation equivalent to `*=` --- src/ebpf.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ebpf.rs b/src/ebpf.rs index 6f2432d7f..b0ce538fb 100644 --- a/src/ebpf.rs +++ b/src/ebpf.rs @@ -274,9 +274,9 @@ pub const ADD64_REG : u8 = BPF_ALU64 | BPF_X | BPF_ADD; pub const SUB64_IMM : u8 = BPF_ALU64 | BPF_K | BPF_SUB; /// BPF opcode: `sub64 dst, src` /// `dst -= src`. pub const SUB64_REG : u8 = BPF_ALU64 | BPF_X | BPF_SUB; -/// BPF opcode: `div64 dst, imm` /// `dst /= imm`. +/// BPF opcode: `mul64 dst, imm` /// `dst *= imm`. pub const MUL64_IMM : u8 = BPF_ALU64 | BPF_K | BPF_MUL; -/// BPF opcode: `div64 dst, src` /// `dst /= src`. +/// BPF opcode: `mul64 dst, src` /// `dst *= src`. pub const MUL64_REG : u8 = BPF_ALU64 | BPF_X | BPF_MUL; /// BPF opcode: `div64 dst, imm` /// `dst /= imm`. pub const DIV64_IMM : u8 = BPF_ALU64 | BPF_K | BPF_DIV;