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]
Date:   Thu, 7 Jan 2021 17:40:52 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Gustav Wiklander <gustavwi@...s.com>
Cc:     Gustav Wiklander <gustav.wiklander@...s.com>, kernel@...s.com,
        linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: spidev: Fix so the module is autoloaded when built
 as external

On Tue, Jan 05, 2021 at 10:44:21AM +0100, Gustav Wiklander wrote:
> On 1/4/21 10:34 PM, Mark Brown wrote:
> > On Mon, Jan 04, 2021 at 04:34:35PM +0100, Gustav Wiklander wrote:

> > > The spi framework sets the modalias for the spi device to belong in
> > > either the acpi device table or the SPI device table. It can never
> > > be in the OF table. Therefore the spidev driver should populate the
> > > spi device table rather than the OF table.

> > Why is this a good solution rather than ensuring the the OF IDs can be
> > used directly?

> You suggestion is of course a solid alternative forward. However, the
> downside with supporting the OF device table for automatic module loading is
> that a lot of spi device drivers must be updated. Also

Is the module code too limited to cope with more than one table?

> If adding support of OF device table the spi device drivers must now include
> a MODULE_DEVICE_TABLE(of,...) as the spi device alias will no longer match
> the alias in the module.

> This command gives 186 spi device drivers.

How about SPI drivers that already have an OF table and expect it to
work, I rather suspect we have a lot of cases where people are adding
SPI IDs to DT that don't appear in the module tables and frankly I think
that's a reasonable expectation.  If there's an issue here beyond
missing MODULE_DEVICE_TABLEs in drivers I'd expect it to be fixed in the
core, otherwise we're just leaving sharp edges for everyone.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ