Skip to content

Commit 091f024

Browse files
author
Russell King
committed
ARM: net: bpf: clarify tail_call index
As per 90caccd ("bpf: fix bpf_tail_call() x64 JIT"), the index used for array lookup is defined to be 32-bit wide. Update a misleading comment that suggests it is 64-bit wide. Fixes: 39c13c2 ("arm: eBPF JIT compiler") Signed-off-by: Russell King <[email protected]>
1 parent ec19e02 commit 091f024

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/net/bpf_jit_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ static int emit_bpf_tail_call(struct jit_ctx *ctx)
10161016
emit_a32_mov_i(tmp[1], off, false, ctx);
10171017
emit(ARM_LDR_I(tmp2[1], ARM_SP, STACK_VAR(r2[1])), ctx);
10181018
emit(ARM_LDR_R(tmp[1], tmp2[1], tmp[1]), ctx);
1019-
/* index (64 bit) */
1019+
/* index is 32-bit for arrays */
10201020
emit(ARM_LDR_I(tmp2[1], ARM_SP, STACK_VAR(r3[1])), ctx);
10211021
/* index >= array->map.max_entries */
10221022
emit(ARM_CMP_R(tmp2[1], tmp[1]), ctx);

0 commit comments

Comments
 (0)