From: Martin KaFai Lau <martin.lau@linux.dev>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: daniel@iogearbox.net, andrii@kernel.org, martin.lau@kernel.org,
ast@kernel.org, netdev@vger.kernel.org, memxor@gmail.com,
kernel-team@fb.com, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH v8 bpf-next 3/5] bpf: Add skb dynptrs
Date: Thu, 26 Jan 2023 23:58:24 -0800 [thread overview]
Message-ID: <befb819f-abc4-c7a1-1f82-9559542f9138@linux.dev> (raw)
In-Reply-To: <20230126233439.3739120-4-joannelkoong@gmail.com>
On 1/26/23 3:34 PM, Joanne Koong wrote:
> +static enum bpf_dynptr_type dynptr_get_type(struct bpf_verifier_env *env,
> + struct bpf_reg_state *reg)
> +{
> + struct bpf_func_state *state = func(env, reg);
> + int spi = __get_spi(reg->off);
> +
> + if (spi < 0) {
> + verbose(env, "verifier internal error: invalid spi when querying dynptr type\n");
> + return BPF_DYNPTR_TYPE_INVALID;
> + }
> +
> + return state->stack[spi].spilled_ptr.dynptr.type;
> +}
CI fails:
https://github.com/kernel-patches/bpf/actions/runs/4020275998/jobs/6908210555
My local KASAN also reports the error.
next prev parent reply other threads:[~2023-01-27 7:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 23:34 [PATCH v8 bpf-next 0/5] Add skb + xdp dynptrs Joanne Koong
2023-01-26 23:34 ` [PATCH v8 bpf-next 1/5] bpf: Allow "sk_buff" and "xdp_buff" as valid kfunc arg types Joanne Koong
2023-01-26 23:34 ` [PATCH v8 bpf-next 2/5] bpf: Allow initializing dynptrs in kfuncs Joanne Koong
2023-01-28 11:52 ` kernel test robot
2023-01-28 14:27 ` kernel test robot
2023-01-26 23:34 ` [PATCH v8 bpf-next 3/5] bpf: Add skb dynptrs Joanne Koong
2023-01-27 7:58 ` Martin KaFai Lau [this message]
2023-01-27 18:07 ` Joanne Koong
2023-01-28 13:15 ` kernel test robot
2023-01-26 23:34 ` [PATCH v8 bpf-next 4/5] bpf: Add xdp dynptrs Joanne Koong
2023-01-28 14:38 ` kernel test robot
2023-01-26 23:34 ` [PATCH v8 bpf-next 5/5] selftests/bpf: tests for using dynptrs to parse skb and xdp buffers Joanne Koong
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=befb819f-abc4-c7a1-1f82-9559542f9138@linux.dev \
--to=martin.lau@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=joannelkoong@gmail.com \
--cc=kernel-team@fb.com \
--cc=martin.lau@kernel.org \
--cc=memxor@gmail.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).