aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.c
diff options
context:
space:
mode:
authorYonghong Song <[email protected]>2024-01-27 19:46:29 +0000
committerDaniel Borkmann <[email protected]>2024-01-29 15:54:33 +0000
commitced33f2cfa21a14a292a00e31dc9f85c1bfbda1c (patch)
treec1ff1a7054587716b2ad4cd071023314b4cca538 /tools/lib/bpf/libbpf.c
parentbpf: Remove unused field "mod" in struct bpf_trampoline (diff)
downloadkernel-ced33f2cfa21a14a292a00e31dc9f85c1bfbda1c.tar.gz
kernel-ced33f2cfa21a14a292a00e31dc9f85c1bfbda1c.zip
docs/bpf: Improve documentation of 64-bit immediate instructions
For 64-bit immediate instruction, 'BPF_IMM | BPF_DW | BPF_LD' and src_reg=[0-6], the current documentation describes the 64-bit immediate is constructed by: imm64 = (next_imm << 32) | imm But actually imm64 is only used when src_reg=0. For all other variants (src_reg != 0), 'imm' and 'next_imm' have separate special encoding requirement and imm64 cannot be easily used to describe instruction semantics. This patch clarifies that 64-bit immediate instructions use two 32-bit immediate values instead of a 64-bit immediate value, so later describing individual 64-bit immediate instructions becomes less confusing. Signed-off-by: Yonghong Song <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Dave Thaler <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions