Re: [v2] HID: corsair-void: Add Corsair Void headset family driver
From: Christophe JAILLET <hidden>
Date: 2024-08-22 06:15:22
Also in:
kernel-janitors, lkml
From: Christophe JAILLET <hidden>
Date: 2024-08-22 06:15:22
Also in:
kernel-janitors, lkml
Le 22/08/2024 à 03:11, Stuart a écrit :
quoted
If I recollect correctly, there may be an alignment issue and just using the stack is not enough to guaranty what is needed.I can't find any reference to issues with it, I'm not sure what I saw before. Also, it seems like the hid-asus driver is using it: https://elixir.bootlin.com/linux/v6.11-rc4/source/drivers/hid/hid-asus.c#L391 Stuart
It's not. asus_kbd_set_report() is called, and there, the array is explicitly kmemdup()'ed to a variable called dmabuf before calling hid_hw_raw_request(). I've not found an explicit documentation, but here are a few results from Google related to HID and DMA related issues: [1]: https://linux.kernel.narkive.com/2bRjLz9p/patch-hid-lenovo-don-t-use-stack-variables-for-dma-buffers [2]: https://bugzilla.kernel.org/show_bug.cgi?id=87991 [3]: https://git.kontron-electronics.de/estoll/linux-stm-lvds/-/commit/3d1355b3cfad53feba76a73b052c757a7de7f4de CJ