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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z7JMGq8iEaY7Fziw@smile.fi.intel.com>
Date: Sun, 16 Feb 2025 22:35:38 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Kurt Borja <kuurtb@...il.com>
Cc: platform-driver-x86@...r.kernel.org,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	Armin Wolf <W_Armin@....de>,
	Mario Limonciello <mario.limonciello@....com>,
	Hans de Goede <hdegoede@...hat.com>, Dell.Client.Kernel@...l.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v10 11/14] platform/x86: Split the alienware-wmi driver

On Fri, Feb 14, 2025 at 05:21:00PM -0500, Kurt Borja wrote:
> On Tue Feb 11, 2025 at 2:04 PM -05, Andy Shevchenko wrote:
> > On Tue, Feb 11, 2025 at 12:59:53PM -0500, Kurt Borja wrote:
> >> On Tue Feb 11, 2025 at 11:56 AM -05, Andy Shevchenko wrote:
> >> > On Fri, Feb 07, 2025 at 10:46:07AM -0500, Kurt Borja wrote:

...

> >> >> +		set_bit(profile, choices);
> >> >
> >> > Do you need it to be atomic?
> >> 
> >> I don't think so. `choices` belongs to this thread only.
> >
> > So, __set_bit() will suffice then.
> 
> For some reason I thought `set_bit` was the non-atomic one. This is good
> to know.

JFYI it is an old agreement that foo() is the locked (atomic) version of
__foo(), but this agreement is broken in many cases nowadays (in many drivers
:( unfortunately).

...

> >> >> +void __exit alienware_wmax_wmi_exit(void)
> >> >> +{
> >> >> +	wmi_driver_unregister(&alienware_wmax_wmi_driver);
> >> >> +}
> >> >
> >> > Why not moving these boilerplate to ->probe() and use module_wmi_driver()?
> >> 
> >> This 3 files are a single module and it has two WMI drivers so this
> >> can't be used.
> >
> > Can it be split to two separate modules then?
> 
> These two WMI drivers share a lot of features on old alienware models.
> Hence why I decided to link them together. IMO this bit of boilerplate
> is a fair tradeoff.

It can be split to three files, common parts, mod1, mod2.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ