linux-stable/include
Martin KaFai Lau 75b64b68ee bpf: Change bpf_setsockopt(SOL_IPV6) to reuse do_ipv6_setsockopt()
After the prep work in the previous patches,
this patch removes the dup code from bpf_setsockopt(SOL_IPV6)
and reuses the implementation in do_ipv6_setsockopt().

ipv6 could be compiled as a module.  Like how other code solved it
with stubs in ipv6_stubs.h, this patch adds the do_ipv6_setsockopt
to the ipv6_bpf_stub.

The current bpf_setsockopt(IPV6_TCLASS) does not take the
INET_ECN_MASK into the account for tcp.  The
do_ipv6_setsockopt(IPV6_TCLASS) will handle it correctly.

The existing optname white-list is refactored into a new
function sol_ipv6_setsockopt().

After this last SOL_IPV6 dup code removal, the __bpf_setsockopt()
is simplified enough that the extra "{ }" around the if statement
can be removed.

Reviewed-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/r/20220817061834.4181198-1-kafai@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2022-08-18 17:06:13 -07:00
..
acpi Merge branch 'acpi-properties' 2022-08-11 19:21:03 +02:00
asm-generic Bitmap patches for v6.0-rc1 2022-08-07 17:52:35 -07:00
clocksource
crypto for-5.20/block-2022-08-04 2022-08-04 20:00:14 -07:00
drm
dt-bindings Pin control bulk changes for v6.0: 2022-08-10 11:01:44 -07:00
keys
kunit
kvm
linux bpf: net: Avoid sk_setsockopt() taking sk lock when called from bpf 2022-08-18 17:06:12 -07:00
math-emu
media SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
memory
misc
net bpf: Change bpf_setsockopt(SOL_IPV6) to reuse do_ipv6_setsockopt() 2022-08-18 17:06:13 -07:00
pcmcia
ras mm, hwpoison: enable memory error handling on 1GB hugepage 2022-08-08 18:06:44 -07:00
rdma dma-mapping updates 2022-08-06 10:56:45 -07:00
rv
scsi dma-mapping updates 2022-08-06 10:56:45 -07:00
soc Char / Misc driver changes for 6.0-rc1 2022-08-04 11:05:48 -07:00
sound
target
trace * Xen timer fixes 2022-08-11 12:10:08 -07:00
uapi Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2022-08-17 20:29:36 -07:00
ufs
vdso
video
xen