Home
last modified time | relevance | path

Searched refs:optval (Results 1 – 25 of 128) sorted by relevance

123456

/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/
Dsockopt_multi.c13 __u8 *optval = ctx->optval; in _getsockopt_child() local
18 if (optval + 1 > optval_end) in _getsockopt_child()
21 if (optval[0] != 0x80) in _getsockopt_child()
26 optval[0] = 0x90; in _getsockopt_child()
36 __u8 *optval = ctx->optval; in _getsockopt_parent() local
41 if (optval + 1 > optval_end) in _getsockopt_parent()
44 if (optval[0] != 0x90) in _getsockopt_parent()
49 optval[0] = 0xA0; in _getsockopt_parent()
59 __u8 *optval = ctx->optval; in _setsockopt() local
64 if (optval + 1 > optval_end) in _setsockopt()
[all …]
Dsockopt_sk.c32 __u8 *optval = ctx->optval; in _getsockopt() local
61 if (optval + 1 > optval_end) in _getsockopt()
67 optval[0] = 0x55; in _getsockopt()
74 if (optval_end - optval != PAGE_SIZE) in _getsockopt()
83 if (optval + 1 > optval_end) in _getsockopt()
97 optval[0] = storage->val; in _getsockopt()
107 __u8 *optval = ctx->optval; in _setsockopt() local
122 if (optval + sizeof(__u32) > optval_end) in _setsockopt()
125 *(__u32 *)optval = 0x55AA; in _setsockopt()
134 if (optval + 5 > optval_end) in _setsockopt()
[all …]
Dsockopt_inherit.c56 __u8 *optval = ctx->optval; in _getsockopt() local
61 if (optval + 1 > optval_end) in _getsockopt()
70 optval[0] = storage->val; in _getsockopt()
81 __u8 *optval = ctx->optval; in _setsockopt() local
86 if (optval + 1 > optval_end) in _setsockopt()
93 storage->val = optval[0]; in _setsockopt()
/kernel/linux/linux-5.10/include/net/
Dbond_options.h118 static inline void __bond_opt_init(struct bond_opt_value *optval, in __bond_opt_init() argument
121 memset(optval, 0, sizeof(*optval)); in __bond_opt_init()
122 optval->value = ULLONG_MAX; in __bond_opt_init()
124 optval->string = string; in __bond_opt_init()
126 optval->value = value; in __bond_opt_init()
128 #define bond_opt_initval(optval, value) __bond_opt_init(optval, NULL, value) argument
129 #define bond_opt_initstr(optval, str) __bond_opt_init(optval, str, ULLONG_MAX) argument
/kernel/linux/common_modules/newip/third_party/linux-5.10/net/newip/
Dnip_sockglue.c63 sockptr_t optval, unsigned int optlen) in do_nip_setsockopt() argument
71 if (copy_from_sockptr(&val, optval, sizeof(val))) in do_nip_setsockopt()
76 if (copy_from_sockptr(&ucval, optval, sizeof(ucval))) in do_nip_setsockopt()
102 int nip_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, in nip_setsockopt() argument
110 err = do_nip_setsockopt(sk, level, optname, optval, optlen); in nip_setsockopt()
116 char __user *optval, int __user *optlen) in do_nip_getsockopt() argument
151 if (copy_to_user(optval, &ucval, 1)) { in do_nip_getsockopt()
161 if (copy_to_user(optval, &val, len)) { in do_nip_getsockopt()
175 int optname, char __user *optval, int __user *optlen) in nip_getsockopt() argument
177 return do_nip_getsockopt(sk, level, optname, optval, optlen); in nip_getsockopt()
/kernel/linux/linux-5.10/net/ipv6/
Dipv6_sockglue.c140 sockptr_t optval, int optlen) in copy_group_source_from_sockptr() argument
147 if (copy_from_sockptr(&gr32, optval, sizeof(gr32))) in copy_group_source_from_sockptr()
155 if (copy_from_sockptr(greqs, optval, sizeof(*greqs))) in copy_group_source_from_sockptr()
163 sockptr_t optval, int optlen) in do_ipv6_mcast_group_source() argument
169 ret = copy_group_source_from_sockptr(&greqs, optval, optlen); in do_ipv6_mcast_group_source()
203 static int ipv6_set_mcast_msfilter(struct sock *sk, sockptr_t optval, in ipv6_set_mcast_msfilter() argument
214 gsf = memdup_sockptr(optval, optlen); in ipv6_set_mcast_msfilter()
234 static int compat_ipv6_set_mcast_msfilter(struct sock *sk, sockptr_t optval, in compat_ipv6_set_mcast_msfilter() argument
254 if (copy_from_sockptr(gf32, optval, optlen)) in compat_ipv6_set_mcast_msfilter()
279 sockptr_t optval, int optlen) in ipv6_mcast_join_leave() argument
[all …]
/kernel/linux/linux-5.10/net/ipv4/bpfilter/
Dsockopt.c24 static int bpfilter_mbox_request(struct sock *sk, int optname, sockptr_t optval, in bpfilter_mbox_request() argument
48 err = bpfilter_ops.sockopt(sk, optname, optval, optlen, is_set); in bpfilter_mbox_request()
54 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval, in bpfilter_ip_set_sockopt() argument
57 return bpfilter_mbox_request(sk, optname, optval, optlen, true); in bpfilter_ip_set_sockopt()
60 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval, in bpfilter_ip_get_sockopt() argument
68 return bpfilter_mbox_request(sk, optname, USER_SOCKPTR(optval), len, in bpfilter_ip_get_sockopt()
/kernel/linux/linux-5.10/net/rds/
Daf_rds.c293 static int rds_cancel_sent_to(struct rds_sock *rs, sockptr_t optval, int len) in rds_cancel_sent_to() argument
310 if (copy_from_sockptr(&sin, optval, in rds_cancel_sent_to()
318 if (copy_from_sockptr(&sin6, optval, in rds_cancel_sent_to()
330 static int rds_set_bool_option(unsigned char *optvar, sockptr_t optval, in rds_set_bool_option() argument
337 if (copy_from_sockptr(&value, optval, sizeof(int))) in rds_set_bool_option()
343 static int rds_cong_monitor(struct rds_sock *rs, sockptr_t optval, int optlen) in rds_cong_monitor() argument
347 ret = rds_set_bool_option(&rs->rs_cong_monitor, optval, optlen); in rds_cong_monitor()
360 static int rds_set_transport(struct rds_sock *rs, sockptr_t optval, int optlen) in rds_set_transport() argument
370 if (copy_from_sockptr(&t_type, optval, sizeof(t_type))) in rds_set_transport()
381 static int rds_enable_recvtstamp(struct sock *sk, sockptr_t optval, in rds_enable_recvtstamp() argument
[all …]
/kernel/linux/linux-5.10/net/ipv4/
Dip_sockglue.c699 sockptr_t optval, int optlen) in copy_group_source_from_sockptr() argument
706 if (copy_from_sockptr(&gr32, optval, sizeof(gr32))) in copy_group_source_from_sockptr()
714 if (copy_from_sockptr(greqs, optval, sizeof(*greqs))) in copy_group_source_from_sockptr()
722 sockptr_t optval, int optlen) in do_mcast_group_source() argument
729 err = copy_group_source_from_sockptr(&greqs, optval, optlen); in do_mcast_group_source()
769 static int ip_set_mcast_msfilter(struct sock *sk, sockptr_t optval, int optlen) in ip_set_mcast_msfilter() argument
779 gsf = memdup_sockptr(optval, optlen); in ip_set_mcast_msfilter()
800 static int compat_ip_set_mcast_msfilter(struct sock *sk, sockptr_t optval, in compat_ip_set_mcast_msfilter() argument
820 if (copy_from_sockptr(gf32, optval, optlen)) in compat_ip_set_mcast_msfilter()
845 sockptr_t optval, int optlen) in ip_mcast_join_leave() argument
[all …]
Dudp_impl.h15 int udp_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,
18 char __user *optval, int __user *optlen);
/kernel/linux/linux-5.10/net/sctp/
Dsocket.c1385 char __user *optval, in sctp_getsockopt_connectx3() argument
1399 if (copy_from_user(&param32, optval, sizeof(param32))) in sctp_getsockopt_connectx3()
1410 if (copy_from_user(&param, optval, sizeof(param))) in sctp_getsockopt_connectx3()
1421 if (copy_to_user(optval, &assoc_id, sizeof(assoc_id))) in sctp_getsockopt_connectx3()
2259 static int sctp_setsockopt_autoclose(struct sock *sk, u32 *optval, in sctp_setsockopt_autoclose() argument
2271 sp->autoclose = *optval; in sctp_setsockopt_autoclose()
4454 sockptr_t optval, unsigned int optlen) in sctp_setsockopt() argument
4470 return af->setsockopt(sk, level, optname, optval, optlen); in sctp_setsockopt()
4478 kopt = memdup_sockptr(optval, optlen); in sctp_setsockopt()
5275 char __user *optval, in sctp_getsockopt_sctp_status() argument
[all …]
/kernel/linux/linux-5.10/net/dccp/
Dproto.c414 sockptr_t optval, unsigned int optlen) in dccp_setsockopt_service() argument
429 if (copy_from_sockptr_offset(sl->dccpsl_list, optval, in dccp_setsockopt_service()
484 sockptr_t optval, unsigned int optlen) in dccp_setsockopt_ccid() argument
492 val = memdup_sockptr(optval, optlen); in dccp_setsockopt_ccid()
509 sockptr_t optval, unsigned int optlen) in do_dccp_setsockopt() argument
525 return dccp_setsockopt_ccid(sk, optname, optval, optlen); in do_dccp_setsockopt()
531 if (copy_from_sockptr(&val, optval, sizeof(int))) in do_dccp_setsockopt()
535 return dccp_setsockopt_service(sk, val, optval, optlen); in do_dccp_setsockopt()
574 int dccp_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval, in dccp_setsockopt() argument
579 optname, optval, in dccp_setsockopt()
[all …]
Dccid.h80 u32 __user *optval,
84 u32 __user *optval,
243 u32 __user *optval, int __user *optlen) in ccid_hc_rx_getsockopt() argument
248 optval, optlen); in ccid_hc_rx_getsockopt()
254 u32 __user *optval, int __user *optlen) in ccid_hc_tx_getsockopt() argument
259 optval, optlen); in ccid_hc_tx_getsockopt()
/kernel/linux/linux-5.10/include/linux/
Dbpfilter.h10 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval,
12 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
20 int (*sockopt)(struct sock *sk, int optname, sockptr_t optval,
Dbpf-cgroup.h141 int *optname, char __user *optval,
144 int optname, char __user *optval,
331 #define BPF_CGROUP_RUN_PROG_SETSOCKOPT(sock, level, optname, optval, optlen, \ argument
337 optname, optval, \
351 #define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, optlen, \ argument
357 optname, optval, \
440 #define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \ argument
442 #define BPF_CGROUP_RUN_PROG_SETSOCKOPT(sock, level, optname, optval, optlen, \ argument
/kernel/linux/linux-5.10/Documentation/bpf/
Dprog_cgroup_sockopt.rst16 all input arguments: ``level``, ``optname``, ``optval`` and ``optlen``.
44 sockopt. The BPF hook can observe ``optval``, ``optlen`` and ``retval``
60 * ``1`` - success: copy ``optval`` and ``optlen`` to userspace, return
78 adjust ``optval``, ``optlen`` and reset ``retval`` to 0. After that
84 to the input arguments (``level``, ``optname``, ``optval``, ``optlen``),
89 Large optval
91 When the ``optval`` is greater than the ``PAGE_SIZE``, the BPF program
96 done by the BPF program to the ``optval`` are ignored.
98 indicates that the kernel should use BPF's trimmed ``optval``.
/kernel/linux/linux-5.10/drivers/net/bonding/
Dbond_procfs.c60 const struct bond_opt_value *optval; in bond_info_show_master() local
71 optval = bond_opt_get_val(BOND_OPT_FAIL_OVER_MAC, in bond_info_show_master()
73 seq_printf(seq, " (fail_over_mac %s)", optval->string); in bond_info_show_master()
79 optval = bond_opt_get_val(BOND_OPT_XMIT_HASH, in bond_info_show_master()
82 optval->string, bond->params.xmit_policy); in bond_info_show_master()
90 optval = bond_opt_get_val(BOND_OPT_PRIMARY_RESELECT, in bond_info_show_master()
93 optval->string); in bond_info_show_master()
137 optval = bond_opt_get_val(BOND_OPT_AD_SELECT, in bond_info_show_master()
140 optval->string); in bond_info_show_master()
/kernel/linux/linux-5.10/net/tls/
Dtls_main.c335 static int do_tls_getsockopt_conf(struct sock *sk, char __user *optval, in do_tls_getsockopt_conf() argument
347 if (!optval || (len < sizeof(*crypto_info))) { in do_tls_getsockopt_conf()
372 if (copy_to_user(optval, crypto_info, sizeof(*crypto_info))) in do_tls_getsockopt_conf()
394 if (copy_to_user(optval, in do_tls_getsockopt_conf()
418 if (copy_to_user(optval, in do_tls_getsockopt_conf()
433 char __user *optval, int __user *optlen) in do_tls_getsockopt() argument
442 rc = do_tls_getsockopt_conf(sk, optval, optlen, in do_tls_getsockopt()
456 char __user *optval, int __user *optlen) in tls_getsockopt() argument
462 optname, optval, optlen); in tls_getsockopt()
464 return do_tls_getsockopt(sk, optname, optval, optlen); in tls_getsockopt()
[all …]
/kernel/linux/linux-5.10/net/dns_resolver/
Ddns_key.c151 char optval[128]; in dns_resolver_preparse() local
155 if (opt_len <= 0 || opt_len > sizeof(optval)) { in dns_resolver_preparse()
165 memcpy(optval, eq, next_opt - eq); in dns_resolver_preparse()
166 optval[next_opt - eq] = '\0'; in dns_resolver_preparse()
169 optval[0] = '\0'; in dns_resolver_preparse()
173 opt_nlen, opt_nlen, opt, optval); in dns_resolver_preparse()
181 ret = kstrtoul(optval, 10, &derrno); in dns_resolver_preparse()
/kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/inline_crypto/chtls/
Dchtls_main.c467 static int do_chtls_getsockopt(struct sock *sk, char __user *optval, in do_chtls_getsockopt() argument
473 if (copy_to_user(optval, &crypto_info, sizeof(struct tls_crypto_info))) in do_chtls_getsockopt()
479 char __user *optval, int __user *optlen) in chtls_getsockopt() argument
485 optname, optval, optlen); in chtls_getsockopt()
487 return do_chtls_getsockopt(sk, optval, optlen); in chtls_getsockopt()
491 sockptr_t optval, unsigned int optlen) in do_chtls_setsockopt() argument
501 if (sockptr_is_null(optval) || optlen < sizeof(*crypto_info)) { in do_chtls_setsockopt()
506 rc = copy_from_sockptr(&tmp_crypto_info, optval, sizeof(*crypto_info)); in do_chtls_setsockopt()
530 optval, sizeof(*crypto_info), in do_chtls_setsockopt()
547 optval, sizeof(*crypto_info), in do_chtls_setsockopt()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/
Dsockopt.c106 offsetof(struct bpf_sockopt, optval)),
321 offsetof(struct bpf_sockopt, optval)),
348 offsetof(struct bpf_sockopt, optval)),
452 offsetof(struct bpf_sockopt, optval)),
656 offsetof(struct bpf_sockopt, optval)),
734 offsetof(struct bpf_sockopt, optval)),
761 offsetof(struct bpf_sockopt, optval)),
807 offsetof(struct bpf_sockopt, optval)),
880 void *optval = NULL; in run_test() local
925 optval = malloc(test->get_optlen); in run_test()
[all …]
/kernel/linux/linux-5.10/net/bluetooth/
Dl2cap_sock.c452 char __user *optval, int __user *optlen) in l2cap_sock_getsockopt_old() argument
506 if (copy_to_user(optval, (char *) &opts, len)) in l2cap_sock_getsockopt_old()
538 if (put_user(opt, (u32 __user *) optval)) in l2cap_sock_getsockopt_old()
556 if (copy_to_user(optval, (char *) &cinfo, len)) in l2cap_sock_getsockopt_old()
571 char __user *optval, int __user *optlen) in l2cap_sock_getsockopt() argument
583 return l2cap_sock_getsockopt_old(sock, optname, optval, optlen); in l2cap_sock_getsockopt()
613 if (copy_to_user(optval, (char *) &sec, len)) in l2cap_sock_getsockopt()
625 (u32 __user *) optval)) in l2cap_sock_getsockopt()
632 (u32 __user *) optval)) in l2cap_sock_getsockopt()
647 if (copy_to_user(optval, (char *) &pwr, len)) in l2cap_sock_getsockopt()
[all …]
/kernel/linux/linux-5.10/net/atm/
Dpvc.c66 sockptr_t optval, unsigned int optlen) in pvc_setsockopt() argument
72 error = vcc_setsockopt(sock, level, optname, optval, optlen); in pvc_setsockopt()
78 char __user *optval, int __user *optlen) in pvc_getsockopt() argument
84 error = vcc_getsockopt(sock, level, optname, optval, optlen); in pvc_getsockopt()
/kernel/liteos_a/compat/posix/src/
Dsocket.c77 int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) in getsockopt() argument
79 return lwip_getsockopt(s, level, optname, optval, optlen); in getsockopt()
82 int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) in setsockopt() argument
84 return lwip_setsockopt(s, level, optname, optval, optlen); in setsockopt()
/kernel/linux/linux-5.10/net/bpfilter/
Dbpfilter_kern.c63 sockptr_t optval, unsigned int optlen, in bpfilter_process_sockopt() argument
70 .addr = (uintptr_t)optval.user, in bpfilter_process_sockopt()
73 if (uaccess_kernel() || sockptr_is_kernel(optval)) { in bpfilter_process_sockopt()

123456