Lines Matching refs:bpf
32 .allocated_size = hdev->bpf.allocated_data, in dispatch_hid_bpf_device_event()
35 .data = hdev->bpf.device_data, in dispatch_hid_bpf_device_event()
45 if (!hdev->bpf.device_data) in dispatch_hid_bpf_device_event()
48 memset(ctx_kern.data, 0, hdev->bpf.allocated_data); in dispatch_hid_bpf_device_event()
52 list_for_each_entry_rcu(e, &hdev->bpf.prog_list, list) { in dispatch_hid_bpf_device_event()
99 idx = srcu_read_lock(&hdev->bpf.srcu); in dispatch_hid_bpf_raw_requests()
100 list_for_each_entry_srcu(e, &hdev->bpf.prog_list, list, in dispatch_hid_bpf_raw_requests()
101 srcu_read_lock_held(&hdev->bpf.srcu)) { in dispatch_hid_bpf_raw_requests()
112 srcu_read_unlock(&hdev->bpf.srcu, idx); in dispatch_hid_bpf_raw_requests()
133 idx = srcu_read_lock(&hdev->bpf.srcu); in dispatch_hid_bpf_output_report()
134 list_for_each_entry_srcu(e, &hdev->bpf.prog_list, list, in dispatch_hid_bpf_output_report()
135 srcu_read_lock_held(&hdev->bpf.srcu)) { in dispatch_hid_bpf_output_report()
146 srcu_read_unlock(&hdev->bpf.srcu, idx); in dispatch_hid_bpf_output_report()
162 if (!hdev->bpf.rdesc_ops) in call_hid_bpf_rdesc_fixup()
171 ret = hdev->bpf.rdesc_ops->hid_rdesc_fixup(&ctx_kern.ctx); in call_hid_bpf_rdesc_fixup()
255 if (hdev->bpf.device_data) in hid_bpf_allocate_event_data()
258 return __hid_bpf_allocate_data(hdev, &hdev->bpf.device_data, &hdev->bpf.allocated_data); in hid_bpf_allocate_event_data()
529 from_hid_event_hook = ctx_kern->data && ctx_kern->data == ctx->hid->bpf.device_data; in hid_bpf_try_input_report()
604 list_for_each_entry_rcu(e, &hdev->bpf.prog_list, list) { in hid_bpf_connect_device()
622 kfree(hdev->bpf.device_data); in hid_bpf_disconnect_device()
623 hdev->bpf.device_data = NULL; in hid_bpf_disconnect_device()
624 hdev->bpf.allocated_data = 0; in hid_bpf_disconnect_device()
634 hdev->bpf.destroyed = true; in hid_bpf_destroy_device()
638 synchronize_srcu(&hdev->bpf.srcu); in hid_bpf_destroy_device()
639 cleanup_srcu_struct(&hdev->bpf.srcu); in hid_bpf_destroy_device()
645 INIT_LIST_HEAD(&hdev->bpf.prog_list); in hid_bpf_device_init()
646 mutex_init(&hdev->bpf.prog_list_lock); in hid_bpf_device_init()
647 return init_srcu_struct(&hdev->bpf.srcu); in hid_bpf_device_init()