Re: [RFC bpf-next 2/5] bpf: Provide bpf_copy_from_user() and bpf_copy_to_user().

Martin KaFai Lau
2023-08-02T19:59:56Z

On 7/21/23 10:22 PM, kuifeng@meta.com wrote:
> From: Kui-Feng Lee <kuifeng@meta.com>
>
> Provide bpf_copy_from_user() and bpf_copy_to_user() to the BPF programs
> attached to cgroup/{set,get}sockopt. bpf_copy_to_user() is a new kfunc to

Allowing bpf_copy_to_user() in setsockopt will then change the "__user *optval".
I don't think the userspace is expecting any change in the optval passed to
setsockopt.