[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe5a258e-3cf9-47f3-aa36-802813c9866f@wanadoo.fr>
Date: Thu, 22 Aug 2024 08:15:20 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Stuart <stuart.a.hayhurst@...il.com>
Cc: Markus Elfring <Markus.Elfring@....de>, linux-input@...r.kernel.org,
kernel-janitors@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Benjamin Tissoires <bentiss@...nel.org>, Jiri Kosina <jikos@...nel.org>
Subject: Re: [v2] HID: corsair-void: Add Corsair Void headset family driver
Le 22/08/2024 à 03:11, Stuart a écrit :
>> 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
Powered by blists - more mailing lists