Lines Matching refs:optval
333 static int sock_get_timeout(long timeo, void *optval, bool old_timeval) in sock_get_timeout() argument
348 *(struct old_timeval32 *)optval = tv32; in sock_get_timeout()
356 *(struct __kernel_old_timeval *)optval = old_tv; in sock_get_timeout()
359 *(struct __kernel_sock_timeval *)optval = tv; in sock_get_timeout()
366 static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen, bool old_timeval) in sock_set_timeout() argument
376 if (copy_from_user(&tv32, optval, sizeof(tv32))) in sock_set_timeout()
385 if (copy_from_user(&old_tv, optval, sizeof(old_tv))) in sock_set_timeout()
392 if (copy_from_user(&tv, optval, sizeof(tv))) in sock_set_timeout()
600 static int sock_setbindtodevice(struct sock *sk, char __user *optval, in sock_setbindtodevice() argument
623 if (copy_from_user(devname, optval, optlen)) in sock_setbindtodevice()
650 static int sock_getbindtodevice(struct sock *sk, char __user *optval, in sock_getbindtodevice() argument
674 if (copy_to_user(optval, devname, len)) in sock_getbindtodevice()
723 char __user *optval, unsigned int optlen) in sock_setsockopt() argument
737 return sock_setbindtodevice(sk, optval, optlen); in sock_setsockopt()
742 if (get_user(val, (int __user *)optval)) in sock_setsockopt()
879 if (copy_from_user(&ling, optval, sizeof(ling))) { in sock_setsockopt()
984 ret = sock_set_timeout(&sk->sk_rcvtimeo, optval, optlen, optname == SO_RCVTIMEO_OLD); in sock_setsockopt()
989 ret = sock_set_timeout(&sk->sk_sndtimeo, optval, optlen, optname == SO_SNDTIMEO_OLD); in sock_setsockopt()
998 if (copy_from_user(&fprog, optval, sizeof(fprog))) in sock_setsockopt()
1011 if (copy_from_user(&ufd, optval, sizeof(ufd))) in sock_setsockopt()
1024 if (copy_from_user(&fprog, optval, sizeof(fprog))) in sock_setsockopt()
1037 if (copy_from_user(&ufd, optval, sizeof(ufd))) in sock_setsockopt()
1117 get_user(ulval, (unsigned long __user *)optval)) { in sock_setsockopt()
1161 } else if (copy_from_user(&sk_txtime, optval, in sock_setsockopt()
1216 char __user *optval, int __user *optlen) in sock_getsockopt() argument
1364 if (copy_to_user(optval, &peercred, len)) in sock_getsockopt()
1383 ret = groups_to_user((gid_t __user *)optval, in sock_getsockopt()
1399 if (copy_to_user(optval, address, len)) in sock_getsockopt()
1416 return security_socket_getpeersec_stream(sock, optval, optlen, len); in sock_getsockopt()
1441 return sock_getbindtodevice(sk, optval, optlen, len); in sock_getsockopt()
1444 len = sk_get_filter(sk, (struct sock_filter __user *)optval, len); in sock_getsockopt()
1489 if (copy_to_user(optval, &meminfo, len)) in sock_getsockopt()
1539 if (copy_to_user(optval, &v, len)) in sock_getsockopt()
2695 char __user *optval, unsigned int optlen) in sock_no_setsockopt() argument
2702 char __user *optval, int __user *optlen) in sock_no_getsockopt() argument
3106 char __user *optval, int __user *optlen) in sock_common_getsockopt() argument
3110 return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen); in sock_common_getsockopt()
3116 char __user *optval, int __user *optlen) in compat_sock_common_getsockopt() argument
3122 optval, optlen); in compat_sock_common_getsockopt()
3123 return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen); in compat_sock_common_getsockopt()
3147 char __user *optval, unsigned int optlen) in sock_common_setsockopt() argument
3151 return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen); in sock_common_setsockopt()
3157 char __user *optval, unsigned int optlen) in compat_sock_common_setsockopt() argument
3163 optval, optlen); in compat_sock_common_setsockopt()
3164 return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen); in compat_sock_common_setsockopt()