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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 May 2015 12:16:25 +0200
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	Michal Suchanek <hramrach@...il.com>
Cc:	Mark Brown <broonie@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, Hans de Goede <hdegoede@...hat.com>,
	linux-spi@...r.kernel.org, Martin Sperl <kernel@...tin.sperl.org>
Subject: Re: [PATCH] spi: Add option to bind spidev to all chipselects

Hi,

On Wed, May 13, 2015 at 09:34:41AM -0000, Michal Suchanek wrote:
> Bypass the check if CS is in use for spidev devices if CONFIG_SPIDEV_SHADOW is
> set.  Rename spidev devices to avoid sysfs conflict.
> 
> This allows dynamically loading SPI device overlays or communicating
> with SPI devices configured by a kernel driver from userspace.
> 
> Signed-off-by: Michal Suchanek <hramrach@...il.com>

Output from checkpatch:
total: 2 errors, 4 warnings, 4 checks, 157 lines checked

...

I told you a few times already to run checkpatch before sending your
patches, apparently you make a point at ignoring me. Fine.

That being said, I'm not sure this is the right approach, or at least,
it doesn't solve anything. If SPIDEV_SHADOW is not set, you will still
have the same issue with addition of new devices on previously unused
chip selects, and where we have an spidev device now.

What I think we should do is, when a new device is created, we just
lookup the modalias of the spi_device associated to it.

If that modalias is "spidev", then unregister the spidev device,
register the new device, you're done. If not, return an error.

On the SPIDEV_SHADOW stuff itself, I'm not sure this is such a good
idea. There's a good chance it will break the driver by doing stuff
behind its back, possibly in a way that will harm the whole kernel,
and it's something we usually try to avoid.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ