[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200915053556.jvunz3rvlnlu46jp@kafai-mbp.dhcp.thefacebook.com>
Date: Mon, 14 Sep 2020 22:36:47 -0700
From: Martin KaFai Lau <kafai@...com>
To: Lorenz Bauer <lmb@...udflare.com>
CC: bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Kernel Team <kernel-team@...com>,
Networking <netdev@...r.kernel.org>, Yonghong Song <yhs@...com>
Subject: Re: [PATCH RFC bpf-next 2/2] bpf: Enable bpf_skc_to_* sock casting
helper to networking prog type
On Mon, Sep 14, 2020 at 12:43:04PM -0700, Martin KaFai Lau wrote:
> For other ARG_PTR_TO_SOCK_COMMON helpers, they are not available to
> the tracing prog type. Hence, they are fine to accept PTR_TO_BTF_ID
> as ARG_PTR_TO_SOCK_COMMON since the only way for non tracing prog to
> get a PTR_TO_BTF_ID is from casting helpers bpf_skc_to_* and
> the NULL check on return value must be done first.
After looking more, it may not work well. For example, reading
request_sock->sk.
Need to think a bit. May try out another idea tomorrow or consider adding
the OR_NULL arg as you mentioned.
Powered by blists - more mailing lists