lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <07920e80-831e-4e2c-932e-9a5a8fe2bd3f@gmx.de>
Date: Tue, 17 Dec 2024 01:43:36 +0100
From: Armin Wolf <W_Armin@....de>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: o2g.org.ru@...il.com, hdegoede@...hat.com, ilpo.jarvinen@...ux.intel.com,
 corentin.chary@...il.com, luke@...nes.dev, mjg59@...f.ucam.org,
 pali@...nel.org, eric.piel@...mplin-utc.net, jlee@...e.com,
 kenneth.t.chan@...il.com, coproscefalo@...il.com,
 linux-input@...r.kernel.org, platform-driver-x86@...r.kernel.org,
 linux-kernel@...r.kernel.org, josh@...huagrisham.com
Subject: Re: [PATCH] Input: i8042 - Add support for platform filter contexts

Am 16.12.24 um 18:21 schrieb Dmitry Torokhov:

> Hi Armin,
>
> On Mon, Dec 16, 2024 at 12:36:28AM +0100, Armin Wolf wrote:
>> Currently the platform filter cannot access any driver-specific state
>> which forces drivers installing a i8042 filter to have at least some
>> kind of global pointer for their filter.
>>
>> This however might cause issues should such a driver probe multiple
>> devices. Fix this by allowing callers of i8042_install_filter() to
>> submit a context pointer which is then passed to the i8042 filter.
> Right now i8042 supports only one instance of a filter, so the driver
> probing several devices will have to sort out the ownership of the
> filter anyways.
>
> Unless you plan on supporting multiple filters I do not see the need of
> storing the context in i8042. And if you decide to add support for
> multiple filters I would need to better understand the use case.
>
> Thanks.
>
I am well aware that the i8042 driver currently supports only a single platform filter.

The reason for introducing a context pointer is that otherwise drivers registering a i8042 filter
would need to provide such a global pointer for their filter themself, together with the necessary
locking since those driver can (theoretically) be instantiated multiple times.

With this patch the i8042 driver takes care of that so those driver can finally get rid of global
data structures which will break as soon as the driver is instantiated multiple times.

Additionally this new API will allow us to add support for multiple handlers later should the need
arise.

Thanks,
Armin Wolf


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ