All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Protopopov <a.s.protopopov@gmail.com>
To: bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Anton Protopopov <aspsk@isovalent.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Quentin Monnet <qmo@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>
Subject: Re: [PATCH v7 bpf-next 06/12] bpf, x86: add support for indirect jumps
Date: Sun, 26 Oct 2025 20:41:07 +0000	[thread overview]
Message-ID: <aP6HY/xewvV6FvDb@mail.gmail.com> (raw)
In-Reply-To: <20251026192709.1964787-7-a.s.protopopov@gmail.com>

On 25/10/26 07:27PM, Anton Protopopov wrote:
> Add support for a new instruction
>
> [...]
>
> @@ -17823,6 +17851,197 @@ static struct bpf_iarray *iarray_realloc(struct bpf_iarray *old, size_t n_elem)
>  	return new;
>  }
>  
> +static int copy_insn_array(struct bpf_map *map, u32 start, u32 end, u32 *items)
> +{
> +	struct bpf_insn_array_value *value;
> +	u32 i;
> +
> +	for (i = start; i <= end; i++) {
> +		value = map->ops->map_lookup_elem(map, &i);
> +		if (!value)
> +			return -EINVAL;
> +		items[i - start] = value->xlated_off;
> +	}
> +	return 0;
> +}

AI said that the function here can copy a INSN_DELETED as xlated
offset. This doesn't look correct. This function is executed in
check_cfg first, then in check_indirect_jump. And the INSN_DELETED
may only be introduced after the verification is done in the "remove
dead code" or "remove nops".

> [...]

  reply	other threads:[~2025-10-26 20:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-26 19:26 [PATCH v7 bpf-next 00/12] BPF indirect jumps Anton Protopopov
2025-10-26 19:26 ` [PATCH v7 bpf-next 01/12] bpf, x86: add new map type: instructions array Anton Protopopov
2025-10-26 20:12   ` Anton Protopopov
2025-10-26 22:34   ` kernel test robot
2025-10-26 22:59   ` kernel test robot
2025-10-27 21:44   ` Eduard Zingerman
2025-10-28 10:10     ` Anton Protopopov
2025-10-29 21:54   ` Eduard Zingerman
2025-10-26 19:26 ` [PATCH v7 bpf-next 02/12] selftests/bpf: add selftests for new insn_array map Anton Protopopov
2025-10-26 19:27 ` [PATCH v7 bpf-next 03/12] bpf: support instructions arrays with constants blinding Anton Protopopov
2025-10-26 19:27 ` [PATCH v7 bpf-next 04/12] selftests/bpf: test instructions arrays with blinding Anton Protopopov
2025-10-26 19:27 ` [PATCH v7 bpf-next 05/12] bpf, x86: allow indirect jumps to r8...r15 Anton Protopopov
2025-10-26 19:27 ` [PATCH v7 bpf-next 06/12] bpf, x86: add support for indirect jumps Anton Protopopov
2025-10-26 20:41   ` Anton Protopopov [this message]
2025-10-26 19:27 ` [PATCH v7 bpf-next 07/12] bpf: disasm: add support for BPF_JMP|BPF_JA|BPF_X Anton Protopopov
2025-10-26 19:27 ` [PATCH v7 bpf-next 08/12] bpf, docs: do not state that indirect jumps are not supported Anton Protopopov
2025-10-27  6:30   ` Anton Protopopov
2025-10-26 19:27 ` [PATCH v7 bpf-next 09/12] libbpf: support llvm-generated indirect jumps Anton Protopopov
2025-10-26 20:15   ` Anton Protopopov
2025-10-27 22:09   ` Eduard Zingerman
2025-10-27 22:38   ` Eduard Zingerman
2025-10-27 22:59     ` Eduard Zingerman
2025-10-28 11:36       ` Anton Protopopov
2025-10-28 11:42       ` Anton Protopopov
2025-10-26 19:27 ` [PATCH v7 bpf-next 10/12] bpftool: Recognize insn_array map type Anton Protopopov
2025-10-26 19:27 ` [PATCH v7 bpf-next 11/12] selftests/bpf: add new verifier_gotox test Anton Protopopov
2025-10-26 19:27 ` [PATCH v7 bpf-next 12/12] selftests/bpf: add C-level selftests for indirect jumps Anton Protopopov
2025-10-27 23:25   ` Eduard Zingerman
2025-10-28 10:59     ` Anton Protopopov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aP6HY/xewvV6FvDb@mail.gmail.com \
    --to=a.s.protopopov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=aspsk@isovalent.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=qmo@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.