Re: [PATCH v3 bpf-next 1/5] bpf: Rename __kptr_ref -> __kptr and __kptr -> __kptr_untrusted.

David Vernet
2023-02-28T15:16:38Z

On Mon, Feb 27, 2023 at 08:01:17PM -0800, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@kernel.org>
>
> __kptr meant to store PTR_UNTRUSTED kernel pointers inside bpf maps.
> The concept felt useful, but didn't get much traction,
> since bpf_rdonly_cast() was added soon after and bpf programs received
> a simpler way to access PTR_UNTRUSTED kernel pointers
> without going through restrictive __kptr usage.
>
> Rename __kptr_ref -> __kptr and __kptr -> __kptr_untrusted to indicate
> its intended usage.
> The main goal of __kptr_untrusted was to read/write such pointers
> directly while bpf_kptr_xchg was a mechanism to access refcnted
> kernel pointers. The next patch will allow RCU protected __kptr access
> with direct read. At that point __kptr_untrusted will be deprecated.
>
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Acked-by: David Vernet <void@manifault.com>