| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | string_kfuncs_failure1.c | 9 char *user_ptr = (char *)1; variable 26 * user_ptr (instead of causing an exception) so the below two groups of tests 58 SEC("syscall") __retval(USER_PTR_ERR) int test_strcmp_user_ptr1(void *ctx) { return bpf_strcmp(user_ptr, "hello"); } in __retval() 59 SEC("syscall") __retval(USER_PTR_ERR) int test_strcmp_user_ptr2(void *ctx) { return bpf_strcmp("hello", user_ptr); } in __retval() 60 SEC("syscall") __retval(USER_PTR_ERR) int test_strcasecmp_user_ptr1(void *ctx) { return bpf_strcasecmp(user_ptr, "HELLO"); } in __retval() 61 SEC("syscall") __retval(USER_PTR_ERR) int test_strcasecmp_user_ptr2(void *ctx) { return bpf_strcasecmp("HELLO", user_ptr); } in __retval() 62 SEC("syscall") __retval(USER_PTR_ERR) int test_strncasecmp_user_ptr1(void *ctx) { return bpf_strncasecmp(user_ptr, "HELLO", 5); } in __retval() 63 SEC("syscall") __retval(USER_PTR_ERR) int test_strncasecmp_user_ptr2(void *ctx) { return bpf_strncasecmp("HELLO", user_ptr, 5); } in __retval() 64 SEC("syscall") __retval(USER_PTR_ERR) int test_strchr_user_ptr(void *ctx) { return bpf_strchr(user_ptr, 'a'); } in __retval() 65 SEC("syscall") __retval(USER_PTR_ERR) int test_strchrnul_user_ptr(void *ctx) { return bpf_strchrnul(user_ptr, ' in __retval() [all...] |
| H A D | read_vsyscall.c | 10 void *user_ptr = 0; variable 30 read_ret[0] = bpf_probe_read_kernel(buf, sizeof(buf), user_ptr); in do_probe_read() 31 read_ret[1] = bpf_probe_read_kernel_str(buf, sizeof(buf), user_ptr); in do_probe_read() 32 read_ret[2] = bpf_probe_read(buf, sizeof(buf), user_ptr); in do_probe_read() 33 read_ret[3] = bpf_probe_read_str(buf, sizeof(buf), user_ptr); in do_probe_read() 34 read_ret[4] = bpf_probe_read_user(buf, sizeof(buf), user_ptr); in do_probe_read() 35 read_ret[5] = bpf_probe_read_user_str(buf, sizeof(buf), user_ptr); in do_probe_read() 48 read_ret[6] = bpf_copy_from_user(buf, sizeof(buf), user_ptr); in do_copy_from_user() 49 read_ret[7] = bpf_copy_from_user_task(buf, sizeof(buf), user_ptr, in do_copy_from_user() 51 read_ret[8] = bpf_copy_from_user_str((char *)buf, sizeof(buf), user_ptr, 0); in do_copy_from_user() [all …]
|
| H A D | test_attach_probe.c | 24 void *user_ptr = 0; variable 92 bpf_copy_from_user(data, sizeof(data), user_ptr); in verify_sleepable_user_copy() 105 ret = bpf_copy_from_user_str(data_short, sizeof(data_short), user_ptr, 0); in verify_sleepable_user_copy_str() 110 ret = bpf_copy_from_user_str(data_short_pad, sizeof(data_short_pad), user_ptr, BPF_F_PAD_ZEROS); in verify_sleepable_user_copy_str() 116 ret = bpf_copy_from_user_str(data_long, dynamic_sz & sizeof(data_long), user_ptr, 0); in verify_sleepable_user_copy_str() 121 ret = bpf_copy_from_user_str(data_long, sizeof(data_long), user_ptr, 0); in verify_sleepable_user_copy_str() 126 ret = bpf_copy_from_user_str(data_long_pad, sizeof(data_long_pad), user_ptr, BPF_F_PAD_ZEROS); in verify_sleepable_user_copy_str() 136 ret = bpf_copy_from_user_str(data_long, sizeof(data_long), user_ptr, 2); in verify_sleepable_user_copy_str()
|
| H A D | bpf_iter_tasks.c | 12 void *user_ptr = 0; variable 116 ret = bpf_copy_from_user_task_str((char *)task_str2, 10, user_ptr, task, 0); in dump_task_sleepable() 124 ret = bpf_copy_from_user_task_str((char *)task_str3, 2, user_ptr, task, 0); in dump_task_sleepable() 131 ret = bpf_copy_from_user_task_str((char *)task_str4, 20, user_ptr, task, 0); in dump_task_sleepable() 139 ret = bpf_copy_from_user_task_str((char *)task_str4, 20, user_ptr, task, BPF_F_PAD_ZEROS); in dump_task_sleepable() 147 ret = bpf_copy_from_user_task_str(big_str1, 5000, user_ptr, task, 0); in dump_task_sleepable()
|
| H A D | test_probe_read_user_str.c | 11 void *user_ptr = 0; variable 20 ret = bpf_probe_read_user_str(buf, sizeof(buf), user_ptr); in on_write()
|
| H A D | uprobe_multi_session.c | 17 void *user_ptr = 0; 60 bpf_copy_from_user(data, sizeof(data), user_ptr); in verify_sleepable_user_copy() 18 void *user_ptr = 0; global() variable
|
| H A D | dynptr_success.c | 909 void *user_ptr; variable 1062 test_dynptr_probe(user_ptr, bpf_probe_read_user_dynptr); in test_probe_read_user_dynptr() 1064 test_dynptr_probe_xdp(xdp, user_ptr, bpf_probe_read_user_dynptr); in test_probe_read_user_dynptr() 1080 test_dynptr_probe_str(user_ptr, bpf_probe_read_user_str_dynptr); in test_probe_read_user_str_dynptr() 1082 test_dynptr_probe_str_xdp(xdp, user_ptr, bpf_probe_read_user_str_dynptr); in test_probe_read_user_str_dynptr() 1098 test_dynptr_probe(user_ptr, bpf_copy_from_user_dynptr); in test_copy_from_user_dynptr() 1105 test_dynptr_probe_str(user_ptr, bpf_copy_from_user_str_dynptr); in test_copy_from_user_str_dynptr() 1128 test_dynptr_probe(user_ptr, bpf_copy_data_from_user_task); in test_copy_from_user_task_dynptr() 1135 test_dynptr_probe_str(user_ptr, bpf_copy_data_from_user_task_str); in test_copy_from_user_task_str_dynptr()
|
| H A D | task_work_fail.c | 13 const void *user_ptr = NULL; variable 39 bpf_copy_from_user_str(work->data, sizeof(work->data), (const void *)user_ptr, 0); in process_work()
|
| H A D | task_work.c | 14 const void *user_ptr = NULL; variable 47 bpf_copy_from_user_str(work->data, sizeof(work->data), (const void *)user_ptr, 0); in process_work()
|
| H A D | uprobe_multi.c | 34 void *user_ptr = 0; variable 40 bpf_copy_from_user(data, sizeof(data), user_ptr); in verify_sleepable_user_copy()
|
| /linux/drivers/accel/ivpu/ |
| H A D | ivpu_gem_userptr.c | 65 ivpu_create_userptr_dmabuf(struct ivpu_device *vdev, void __user *user_ptr, in ivpu_create_userptr_dmabuf() argument 84 pinned = pin_user_pages_fast((unsigned long)user_ptr, nr_pages, gup_flags, pages); in ivpu_create_userptr_dmabuf() 139 ivpu_bo_create_from_userptr(struct ivpu_device *vdev, void __user *user_ptr, in ivpu_bo_create_from_userptr() argument 146 dma_buf = ivpu_create_userptr_dmabuf(vdev, user_ptr, size, flags); in ivpu_bo_create_from_userptr() 169 void __user *user_ptr = u64_to_user_ptr(args->user_ptr); in ivpu_bo_create_from_userptr_ioctl() local 178 if (!args->user_ptr || !args->size) { in ivpu_bo_create_from_userptr_ioctl() 180 args->user_ptr, args->size); in ivpu_bo_create_from_userptr_ioctl() 184 if (!PAGE_ALIGNED(args->user_ptr) || !PAGE_ALIGNED(args->size)) { in ivpu_bo_create_from_userptr_ioctl() 186 args->user_ptr, args->size); in ivpu_bo_create_from_userptr_ioctl() 190 if (!access_ok(user_ptr, args->size)) { in ivpu_bo_create_from_userptr_ioctl() [all …]
|
| H A D | ivpu_ms.c | 119 void __user *user_ptr, u64 user_size, u64 *user_bytes_copied) in copy_leftover_bytes() argument 125 if (copy_to_user(user_ptr + *user_bytes_copied, ms->leftover_addr, copy_bytes)) in copy_leftover_bytes() 138 void __user *user_ptr, u64 user_size, u64 *user_bytes_copied) in copy_samples_to_user() argument 145 ret = copy_leftover_bytes(ms, user_ptr, user_size, user_bytes_copied); in copy_samples_to_user() 163 return copy_leftover_bytes(ms, user_ptr, user_size, user_bytes_copied); in copy_samples_to_user()
|
| /linux/arch/arm/lib/ |
| H A D | uaccess_with_memcpy.c | 231 void *user_ptr, *kernel_ptr; 243 user_ptr = vmap(&dst_page, 1, VM_IOREMAP, __pgprot(__PAGE_COPY)); 244 if (!user_ptr) 248 ret = __copy_to_user_memcpy(user_ptr, kernel_ptr, PAGE_SIZE); 252 ret |= __copy_to_user_memcpy(user_ptr, kernel_ptr, size); 254 ret |= __copy_to_user_std(user_ptr, kernel_ptr, size); 261 ret |= __clear_user_memset(user_ptr, size); 263 ret |= __clear_user_std(user_ptr, size); 271 vunmap(user_ptr);
|
| /linux/net/ieee802154/ |
| H A D | nl802154.c | 663 struct cfg802154_registered_device *rdev = info->user_ptr[0]; in nl802154_get_wpan_phy() 906 struct cfg802154_registered_device *rdev = info->user_ptr[0]; in nl802154_get_interface() 907 struct wpan_dev *wdev = info->user_ptr[1]; in nl802154_get_interface() 924 struct cfg802154_registered_device *rdev = info->user_ptr[0]; in nl802154_new_interface() 955 struct cfg802154_registered_device *rdev = info->user_ptr[0]; in nl802154_del_interface() 956 struct wpan_dev *wpan_dev = info->user_ptr[1]; in nl802154_del_interface() 968 info->user_ptr[1] = NULL; in nl802154_del_interface() 975 struct cfg802154_registered_device *rdev = info->user_ptr[0]; in nl802154_set_channel() 994 struct cfg802154_registered_device *rdev = info->user_ptr[0]; in nl802154_set_cca_mode() 1025 struct cfg802154_registered_device *rdev = info->user_ptr[0]; in nl802154_set_cca_ed_level() [all …]
|
| /linux/net/psp/ |
| H A D | psp_nl.c | 74 info->user_ptr[0] = psp_device_get_and_lock(genl_info_net(info), in psp_device_get_locked() 76 return PTR_ERR_OR_ZERO(info->user_ptr[0]); in psp_device_get_locked() 83 struct socket *socket = info->user_ptr[1]; in psp_device_unlock() 84 struct psp_dev *psd = info->user_ptr[0]; in psp_device_unlock() 140 struct psp_dev *psd = info->user_ptr[0]; in psp_nl_dev_get_doit() 189 struct psp_dev *psd = info->user_ptr[0]; in psp_nl_dev_set_doit() 231 struct psp_dev *psd = info->user_ptr[0]; in psp_nl_key_rotate_doit() 340 info->user_ptr[0] = psd; in psp_assoc_device_get_locked() 341 info->user_ptr[1] = socket; in psp_assoc_device_get_locked() 411 struct socket *socket = info->user_ptr[1]; in psp_nl_rx_assoc_doit() [all …]
|
| /linux/net/batman-adv/ |
| H A D | netlink.c | 400 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_get_mesh() 429 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_set_mesh() 689 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_tp_meter_start() 746 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_tp_meter_cancel() 874 struct batadv_hard_iface *hard_iface = info->user_ptr[1]; in batadv_netlink_cmd_get_hardif() 875 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_cmd_get_hardif() 907 struct batadv_hard_iface *hard_iface = info->user_ptr[1]; in batadv_netlink_set_hardif() 908 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_set_hardif() 1074 struct batadv_meshif_vlan *vlan = info->user_ptr[1]; in batadv_netlink_get_vlan() 1075 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_get_vlan() [all …]
|
| /linux/drivers/accessibility/speakup/ |
| H A D | i18n.c | 518 char *user_ptr = user; in fmt_validate() local 522 user_ptr = next_specifier(user_ptr); in fmt_validate() 523 if (template_ptr && user_ptr) { in fmt_validate() 525 valid = compare_specifiers(&template_ptr, &user_ptr); in fmt_validate() 530 if (template_ptr || user_ptr) in fmt_validate()
|
| /linux/net/wireless/ |
| H A D | nl80211.c | 3498 struct cfg80211_registered_device *rdev = info->user_ptr[0]; in nl80211_get_wiphy() 3810 struct cfg80211_registered_device *rdev = info->user_ptr[0]; in nl80211_set_channel() 3812 struct net_device *netdev = info->user_ptr[1]; in nl80211_set_channel() 4466 struct cfg80211_registered_device *rdev = info->user_ptr[0]; in nl80211_get_interface() 4467 struct wireless_dev *wdev = info->user_ptr[1]; in nl80211_get_interface() 4615 struct cfg80211_registered_device *rdev = info->user_ptr[0]; in nl80211_parse_vif_radio_mask() 4637 struct cfg80211_registered_device *rdev = info->user_ptr[0]; in nl80211_set_interface() 4641 struct net_device *dev = info->user_ptr[1]; in nl80211_set_interface() 4712 struct cfg80211_registered_device *rdev = info->user_ptr[0]; in _nl80211_new_interface() 4813 struct cfg80211_registered_device *rdev = info->user_ptr[0]; in nl80211_new_interface() [all …]
|
| /linux/net/devlink/ |
| H A D | sb.c | 207 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_sb_get_doit() 309 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_sb_pool_get_doit() 418 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_sb_pool_set_doit() 509 struct devlink_port *devlink_port = info->user_ptr[1]; in devlink_nl_sb_port_pool_get_doit() 627 struct devlink_port *devlink_port = info->user_ptr[1]; in devlink_nl_sb_port_pool_set_doit() 628 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_sb_port_pool_set_doit() 719 struct devlink_port *devlink_port = info->user_ptr[1]; in devlink_nl_sb_tc_pool_bind_get_doit() 867 struct devlink_port *devlink_port = info->user_ptr[1]; in devlink_nl_sb_tc_pool_bind_set_doit() 868 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_sb_tc_pool_bind_set_doit() 905 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_sb_occ_snapshot_doit() [all …]
|
| H A D | netlink.c | 222 info->user_ptr[0] = devlink; in __devlink_nl_pre_doit() 229 info->user_ptr[1] = devlink_port; in __devlink_nl_pre_doit() 233 info->user_ptr[1] = devlink_port; in __devlink_nl_pre_doit() 274 devlink = info->user_ptr[0]; in __devlink_nl_post_doit()
|
| H A D | dpipe.c | 216 struct devlink *devlink = info->user_ptr[0]; in devlink_dpipe_tables_fill() 293 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_dpipe_table_get_doit() 481 devlink = dump_ctx->info->user_ptr[0]; in devlink_dpipe_entry_ctx_prepare() 566 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_dpipe_entries_get_doit() 653 struct devlink *devlink = info->user_ptr[0]; in devlink_dpipe_headers_fill() 716 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_dpipe_headers_get_doit() 750 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_dpipe_table_counters_set_doit()
|
| /linux/drivers/net/ovpn/ |
| H A D | netlink.c | 75 netdevice_tracker *tracker = (netdevice_tracker *)&info->user_ptr[1]; in ovpn_nl_pre_doit() 82 info->user_ptr[0] = ovpn; in ovpn_nl_pre_doit() 90 netdevice_tracker *tracker = (netdevice_tracker *)&info->user_ptr[1]; in ovpn_nl_post_doit() 91 struct ovpn_priv *ovpn = info->user_ptr[0]; in ovpn_nl_post_doit() 344 struct ovpn_priv *ovpn = info->user_ptr[0]; in ovpn_nl_peer_new_doit() 469 struct ovpn_priv *ovpn = info->user_ptr[0]; in ovpn_nl_peer_set_doit() 653 struct ovpn_priv *ovpn = info->user_ptr[0]; in ovpn_nl_peer_get_doit() 779 struct ovpn_priv *ovpn = info->user_ptr[0]; in ovpn_nl_peer_del_doit() 878 struct ovpn_priv *ovpn = info->user_ptr[0]; in ovpn_nl_key_new_doit() 983 struct ovpn_priv *ovpn = info->user_ptr[0]; in ovpn_nl_key_get_doit() [all …]
|
| /linux/drivers/gpu/drm/i915/gem/ |
| H A D | i915_gem_userptr.c | 491 if (offset_in_page(args->user_ptr | args->user_size)) in i915_gem_userptr_ioctl() 494 if (!access_ok((char __user *)(unsigned long)args->user_ptr, args->user_size)) in i915_gem_userptr_ioctl() 514 ret = probe_range(current->mm, args->user_ptr, args->user_size); in i915_gem_userptr_ioctl() 532 obj->userptr.ptr = args->user_ptr; in i915_gem_userptr_ioctl()
|
| /linux/drivers/gpu/drm/etnaviv/ |
| H A D | etnaviv_drv.c | 393 if (offset_in_page(args->user_ptr | args->user_size) || in etnaviv_ioctl_gem_userptr() 394 (uintptr_t)args->user_ptr != args->user_ptr || in etnaviv_ioctl_gem_userptr() 396 args->user_ptr & ~PAGE_MASK) in etnaviv_ioctl_gem_userptr() 399 if (!access_ok((void __user *)(unsigned long)args->user_ptr, in etnaviv_ioctl_gem_userptr() 403 return etnaviv_gem_new_userptr(dev, file, args->user_ptr, in etnaviv_ioctl_gem_userptr()
|
| /linux/drivers/media/v4l2-core/ |
| H A D | v4l2-compat-ioctl32.c | 1027 void __user *user_ptr, size_t array_size, in v4l2_compat_get_array_args() argument 1047 struct v4l2_plane32 __user *p32 = user_ptr; in v4l2_compat_get_array_args() 1070 struct v4l2_ext_control32 __user *ec32 = user_ptr; in v4l2_compat_get_array_args() 1090 if (copy_from_user(mbuf, user_ptr, array_size)) in v4l2_compat_get_array_args() 1098 int v4l2_compat_put_array_args(struct file *file, void __user *user_ptr, in v4l2_compat_put_array_args() argument 1117 struct v4l2_plane32 __user *p32 = user_ptr; in v4l2_compat_put_array_args() 1140 struct v4l2_ext_control32 __user *ec32 = user_ptr; in v4l2_compat_put_array_args() 1163 if (copy_to_user(user_ptr, mbuf, array_size)) in v4l2_compat_put_array_args()
|