]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: net: Change sk_getsockopt() to take the sockptr_t argument
authorMartin KaFai Lau <martin.lau@kernel.org>
Fri, 2 Sep 2022 00:28:02 +0000 (17:28 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 3 Sep 2022 03:34:30 +0000 (20:34 -0700)
commit67f1b0edb1f814070618909deff6e5776cb008aa
tree4bccfceb51e4846c36c378f214a4e08582588448
parente3b0d90e7dd8e070fabdb82ed899055100e32c3e
bpf: net: Change sk_getsockopt() to take the sockptr_t argument

This patch changes sk_getsockopt() to take the sockptr_t argument
such that it can be used by bpf_getsockopt(SOL_SOCKET) in a
latter patch.

security_socket_getpeersec_stream() is not changed.  It stays
with the __user ptr (optval.user and optlen.user) to avoid changes
to other security hooks.  bpf_getsockopt(SOL_SOCKET) also does not
support SO_PEERSEC.

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20220902002802.2888419-1-kafai@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/filter.h
include/linux/sockptr.h
net/core/filter.c
net/core/sock.c