[PATCH bpf-next v13 3/5] bpf: Add helper to detect indirect jump targets

bot+bpf-ci at kernel.org bot+bpf-ci at kernel.org
Sat Apr 11 07:43:55 PDT 2026


> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index dd6dbd41b06d..dd8949874d1b 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c

[ ... ]

> @@ -22544,6 +22551,17 @@ static void adjust_insn_aux_data(struct bpf_verifier_env *env,
>  		data[i].seen = old_seen;
>  		data[i].zext_dst = insn_has_def32(insn + i);
>  	}
> +
> +	/* The indirect_target flag of the original instruction was moved to the last of the
> +	 * new instructions by the above memmove and memset, but the indirect jump target is

This isn't a bug, but the BPF subsystem prefers the opening /* on its
own line for multi-line comments:

	/*
	 * The indirect_target flag of the original ...

> +	 * actually the first instruction, so move it back. This also matches with the behavior
> +	 * of bpf_insn_array_adjust(), which preserves xlated_off to point to the first new
> +	 * instruction.
> +	 */
> +	if (data[off + cnt - 1].indirect_target) {
> +		data[off].indirect_target = 1;
> +		data[off + cnt - 1].indirect_target = 0;
> +	}
>  }


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/24284268460


More information about the linux-arm-kernel mailing list