Lines Matching refs:struct_ops

152 HID-BPF is built "on top" of BPF, meaning that we use bpf struct_ops method to
157 1. event processing/filtering with ``SEC("struct_ops/hid_device_event")`` in libbpf
159 3. change of the report descriptor with ``SEC("struct_ops/hid_rdesc_fixup")`` or
160 ``SEC("struct_ops.s/hid_rdesc_fixup")`` in libbpf
176 Note that ``hid_rdesc_fixup`` can be declared as sleepable (``SEC("struct_ops.s/hid_rdesc_fixup")``…
182 Available ``struct_ops`` for HID-BPF:
195 Available API that can be used in all HID-BPF struct_ops programs:
201 Available API that can be used in syscall HID-BPF programs or in sleepable HID-BPF struct_ops progr…
249 programs can be attached to the same device. If a HID-BPF struct_ops has a
251 kernel will return `-EINVAL` when attaching the struct_ops.
261 ``SEC("struct_ops/hid_device_event")``
291 ``SEC("struct_ops/hid_rdesc_fixup")``
304 Whenever a struct_ops containing a ``SEC("struct_ops/hid_rdesc_fixup")`` program
308 In the same way, when this struct_ops is detached, the kernel issues a disconnect
312 all the user space file descriptors pointing at a HID-BPF struct_ops link are closed.
315 The previous owner will likely pin the struct_ops link in the bpffs, and we can then
321 We now use standard struct_ops attachment through ``bpf_map__attach_struct_ops()``.
322 But given that we need to attach a struct_ops to a dedicated HID device, the caller
323 must set ``hid_id`` in the struct_ops map before loading the program in the kernel.
391 SEC("struct_ops/hid_device_event")
415 SEC(".struct_ops.link")
427 hid_skel->struct_ops.haptic_tablet->hid_id = hid_id;