summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2020-09-25 03:04:15 +0300
committerAlexei Starovoitov <ast@kernel.org>2020-09-25 23:58:02 +0300
commit27e5203bd9c5cc6d54dcac48c3027f3f04522b8b (patch)
tree9ad54aac549bbb1ae4cfc87b1d0c69019ed4a686 /include/uapi
parentc0df236e1394970f3503a8fb103de95d000014ca (diff)
downloadlinux-27e5203bd9c5cc6d54dcac48c3027f3f04522b8b.tar.xz
bpf: Change bpf_sk_assign to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON
This patch changes the bpf_sk_assign() to take ARG_PTR_TO_BTF_ID_SOCK_COMMON such that they will work with the pointer returned by the bpf_skc_to_*() helpers also. The bpf_sk_lookup_assign() is taking ARG_PTR_TO_SOCKET_"OR_NULL". Meaning it specifically takes a literal NULL. ARG_PTR_TO_BTF_ID_SOCK_COMMON does not allow a literal NULL, so another ARG type is required for this purpose and another follow-up patch can be used if there is such need. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200925000415.3857374-1-kafai@fb.com
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/bpf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 69b9e30375bc..2d6519a2ed77 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -3107,7 +3107,7 @@ union bpf_attr {
* Return
* The id is returned or 0 in case the id could not be retrieved.
*
- * long bpf_sk_assign(struct sk_buff *skb, struct bpf_sock *sk, u64 flags)
+ * long bpf_sk_assign(struct sk_buff *skb, void *sk, u64 flags)
* Description
* Helper is overloaded depending on BPF program type. This
* description applies to **BPF_PROG_TYPE_SCHED_CLS** and