Re: [PATCH v3 1/3] bpf: Allow trusted pointers to be passed to KF_TRUSTED_ARGS kfuncs

From: David Vernet
Date: Fri Oct 14 2022 - 16:19:58 EST


On Fri, Oct 14, 2022 at 03:14:25PM -0500, David Vernet wrote:

[...]

> @@ -5768,6 +5778,9 @@ static int check_reg_type(struct bpf_verifier_env *env, u32 regno,
> if (arg_type & PTR_MAYBE_NULL)
> type &= ~PTR_MAYBE_NULL;
>
> + if (!(arg_type & ARG_PTR_TO_BTF_ID))
> + type &= ~PTR_NESTED;
> +

Argh, I added while debugging something and I meant to remove it before
sending out the next version. I'll send out v4 shortly without this,
apologies for the noise.