Lines Matching refs:optval
438 static int do_tls_getsockopt_conf(struct sock *sk, char __user *optval, in do_tls_getsockopt_conf() argument
451 if (!optval || (len < sizeof(*crypto_info))) { in do_tls_getsockopt_conf()
476 if (copy_to_user(optval, crypto_info, sizeof(*crypto_info))) in do_tls_getsockopt_conf()
492 if (copy_to_user(optval, crypto_info, cipher_desc->crypto_info)) in do_tls_getsockopt_conf()
499 static int do_tls_getsockopt_tx_zc(struct sock *sk, char __user *optval, in do_tls_getsockopt_tx_zc() argument
513 if (copy_to_user(optval, &value, sizeof(value))) in do_tls_getsockopt_tx_zc()
519 static int do_tls_getsockopt_no_pad(struct sock *sk, char __user *optval, in do_tls_getsockopt_no_pad() argument
541 if (copy_to_user(optval, &value, sizeof(value))) in do_tls_getsockopt_no_pad()
548 char __user *optval, int __user *optlen) in do_tls_getsockopt() argument
557 rc = do_tls_getsockopt_conf(sk, optval, optlen, in do_tls_getsockopt()
561 rc = do_tls_getsockopt_tx_zc(sk, optval, optlen); in do_tls_getsockopt()
564 rc = do_tls_getsockopt_no_pad(sk, optval, optlen); in do_tls_getsockopt()
577 char __user *optval, int __user *optlen) in tls_getsockopt() argument
583 optname, optval, optlen); in tls_getsockopt()
585 return do_tls_getsockopt(sk, optname, optval, optlen); in tls_getsockopt()
588 static int do_tls_setsockopt_conf(struct sock *sk, sockptr_t optval, in do_tls_setsockopt_conf() argument
598 if (sockptr_is_null(optval) || (optlen < sizeof(*crypto_info))) in do_tls_setsockopt_conf()
613 rc = copy_from_sockptr(crypto_info, optval, sizeof(*crypto_info)); in do_tls_setsockopt_conf()
656 rc = copy_from_sockptr_offset(crypto_info + 1, optval, in do_tls_setsockopt_conf()
715 static int do_tls_setsockopt_tx_zc(struct sock *sk, sockptr_t optval, in do_tls_setsockopt_tx_zc() argument
721 if (sockptr_is_null(optval) || optlen != sizeof(value)) in do_tls_setsockopt_tx_zc()
724 if (copy_from_sockptr(&value, optval, sizeof(value))) in do_tls_setsockopt_tx_zc()
735 static int do_tls_setsockopt_no_pad(struct sock *sk, sockptr_t optval, in do_tls_setsockopt_no_pad() argument
743 sockptr_is_null(optval) || optlen < sizeof(val)) in do_tls_setsockopt_no_pad()
746 rc = copy_from_sockptr(&val, optval, sizeof(val)); in do_tls_setsockopt_no_pad()
751 rc = check_zeroed_sockptr(optval, sizeof(val), optlen - sizeof(val)); in do_tls_setsockopt_no_pad()
767 static int do_tls_setsockopt(struct sock *sk, int optname, sockptr_t optval, in do_tls_setsockopt() argument
776 rc = do_tls_setsockopt_conf(sk, optval, optlen, in do_tls_setsockopt()
782 rc = do_tls_setsockopt_tx_zc(sk, optval, optlen); in do_tls_setsockopt()
786 rc = do_tls_setsockopt_no_pad(sk, optval, optlen); in do_tls_setsockopt()
796 sockptr_t optval, unsigned int optlen) in tls_setsockopt() argument
801 return ctx->sk_proto->setsockopt(sk, level, optname, optval, in tls_setsockopt()
804 return do_tls_setsockopt(sk, optname, optval, optlen); in tls_setsockopt()