Re: [PATCH bpf-next 2/5] bpf: Implement get_current_task_btf and RET_PTR_TO_BTF_ID

From: Martin KaFai Lau
Date: Wed Oct 28 2020 - 17:45:14 EST


On Tue, Oct 27, 2020 at 06:03:14PM +0100, KP Singh wrote:
[ ... ]

> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index b0790876694f..eb0aef85fc11 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -493,7 +493,8 @@ static bool is_ptr_cast_function(enum bpf_func_id func_id)
> func_id == BPF_FUNC_skc_to_tcp6_sock ||
> func_id == BPF_FUNC_skc_to_udp6_sock ||
> func_id == BPF_FUNC_skc_to_tcp_timewait_sock ||
> - func_id == BPF_FUNC_skc_to_tcp_request_sock;
> + func_id == BPF_FUNC_skc_to_tcp_request_sock ||
> + func_id == BPF_FUNC_get_current_task_btf;
This change is not needed. The helper does not take any
argument or do any type casting.