All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Alan Maguire" <alan.maguire@oracle.com>, <andrii@kernel.org>,
	<eddyz87@gmail.com>, <qmo@kernel.org>
Cc: <jolsa@kernel.org>, <daniel@iogearbox.net>,
	<ihor.solodrai@linux.dev>, <yonghong.song@linux.dev>,
	<song@kernel.org>, <martin.lau@linux.dev>, <memxor@gmail.com>,
	<emil@etsalapatis.com>, <bpf@vger.kernel.org>, <nsc@kernel.org>,
	<puranjay@kernel.org>, <yatsenko@meta.com>
Subject: Re: [PATCH v2 bpf-next 1/3] bpf: Verify BTF_KIND_LOC_PARAM vlen, flags
Date: Fri, 25 Sep 2026 20:35:26 +0000	[thread overview]
Message-ID: <DLOOOAHTOMTC.2QEWQ5J60BATG@gmail.com> (raw)
In-Reply-To: <20260925170854.1240637-2-alan.maguire@oracle.com>

On Fri, Sep 25, 2026 at 06:08 PM Alan Maguire <alan.maguire@oracle.com> wrote:
> +	/* All LOC_PARAMs have vlen of at least 1, none have vlen > 8 */
> +	if (vlen < 1 || vlen > 8) {
> +		btf_verifier_log_type(env, t, "Invalid vlen");
> +		return -EINVAL;
> +	}

Why 8? seems arbitrary.

> +	if (p->flags & ~(BTF_LOC_PARAM_SIGNED | BTF_LOC_PARAM_CONST |
> +			 BTF_LOC_PARAM_ADDR | BTF_LOC_PARAM_REG |
> +			 BTF_LOC_PARAM_DEREF | BTF_LOC_PARAM_OFFSET) ||
> +	    !p->flags) {
> +		btf_verifier_log_type(env, t, "Invalid flags");
> +		return -EINVAL;
> +	}

CONST | REG and DEREF without REG are still accepted it seems.


  reply	other threads:[~2026-09-25 20:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 17:08 [PATCH v2 bpf-next 0/3] BTF inline functionality followups Alan Maguire
2026-09-25 17:08 ` [PATCH v2 bpf-next 1/3] bpf: Verify BTF_KIND_LOC_PARAM vlen, flags Alan Maguire
2026-09-25 20:35   ` Alexei Starovoitov [this message]
2026-09-25 17:08 ` [PATCH v2 bpf-next 2/3] bpftool: Update func representation to include function signature Alan Maguire
2026-09-25 17:17   ` sashiko-bot
2026-09-25 19:55     ` Quentin Monnet
2026-09-25 17:08 ` [PATCH v2 bpf-next 3/3] selftests/bpf: Fix up bpftool btf dump test for signatures Alan Maguire

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=DLOOOAHTOMTC.2QEWQ5J60BATG@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=nsc@kernel.org \
    --cc=puranjay@kernel.org \
    --cc=qmo@kernel.org \
    --cc=song@kernel.org \
    --cc=yatsenko@meta.com \
    --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.