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: <aQSL0wCr56zr5Y35@smile.fi.intel.com>
Date: Fri, 31 Oct 2025 12:13:39 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Jorge Marques <jorge.marques@...log.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org, gastmaier@...il.com
Subject: Re: [PATCH] iio: accel: Change adxl345 depend to negate adxl35x

On Fri, Oct 31, 2025 at 11:05:08AM +0100, Jorge Marques wrote:
> Change 'depends on INPUT_ADXL34X=n' to '!(INPUT_ADXL34X)' to allow both
> drivers to be compiled as modules. The user then can use the blacklist
> to block loading one.

> ---
> There are two drivers for the compatible:
> 
> - adi,adxl345
> 
> * IIO: 
>   drivers/iio/accel/adxl345_core.c
>   drivers/iio/accel/adxl345_spi.c
>   drivers/iio/accel/adxl345_i2c.c
> * Inputs:
>   drivers/input/misc/adxl34x-spi.c
>   drivers/input/misc/adxl34x-i2c.c
> 
> To disallows both being complied, the depends INPUT_ADXL34X=n
> was added to ADXL345 symbols. However, it should be possible to compile
> both as modules, then blacklist one of them in the /etc/modprobe.d/blacklist.conf
> file. This patch changes the rule to !(INPUT_ADXL34X) to allow both as
> modules, but still disallow INPUT_ADXL34X to be built-in and ADXL345 as
> module.
> 
> The following compatibles are not shared between both drivers:
> 
> * IIO:
>   adi,adxl375 spi/i2c
> * Inputs:
>   adi,adxl34x i2c

I like the idea, but I think this needs to be clearly stated in the Kconfig
help for both symbols. So user will _know_ that in such a case it's their
responsibility of properly made choice. On top of that you might want to
investigate existing DTS in the kernel and see if some of the choices may be
made at the platform / CPU level.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ