hid_bpf_try_input_report(9)
π hid_bpf_try_input_report(9)
okay so bestie, welcome to the Kernel API Manual π β this one's called hid_bpf_try_input_report, and it's literally the "no cap, just send it" version of injecting a HID report straight from a HID device into the kernel β¨
β NAME β
hid_bpf_try_input_report β inject a HID report in the kernel from a HID device π¦
β¨ SYNOPSIS β¨
__bpf_kfunc int hid_bpf_try_input_report (struct hid_bpf_ctx *ctx , enum
hid_report_type type , u8 *buf , const size_t buf__sz );
like, copy that exactly, don't come for me π
π«Ά ARGUMENTS π«Ά
ctxβ the HID-BPF context that you already made earlier inhid_bpf_allocate_context, bestie. no context, no vibes πtypeβ the type of the report, and it's one ofHID_INPUT_REPORT,HID_FEATURE_REPORT, orHID_OUTPUT_REPORTπbufβ aPTR_TO_MEMbuffer, iconicbuf__szβ the size of the data to transfer, fr fr, count it correctly π
πΈ DESCRIPTION πΈ
Returns 0 on success, and a negative error code otherwise π β that's the whole mood.
The way this works: it will immediately fail if the device is not available, so it's totally safe to use in IRQ context π₯. that's the main character energy right there β no blocking, no waiting, just a quick vibe check and out β¨π
π SEE ALSO π
- Kernel file
./drivers/hid/bpf/hid_bpf_dispatch.c hid_bpf_get_data(9)hid_bpf_allocate_context(9)hid_bpf_release_context(9)hid_bpf_hw_request(9)hid_bpf_hw_output_report(9)hid_bpf_input_report(9)
go read those too, iykyk ππ¦
ngl this page's home directory is ./drivers/hid/bpf and it's dated October 2026 β so yeah, mark your calendars and hydrate π
that's the whole page bestie, slay, periodt, go inject some reports responsibly πππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms