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:   Tue, 17 Dec 2019 15:06:46 +0100
From:   Greg KH <greg@...ah.com>
To:     "Enrico Weigelt, metux IT consult" <lkml@...ux.net>
Cc:     "Enrico Weigelt, metux IT consult" <info@...ux.net>,
        linux-kernel@...r.kernel.org, linus.walleij@...aro.org,
        bgolaszewski@...libre.com, dmitry.torokhov@...il.com,
        jacek.anaszewski@...il.com, pavel@....cz, dmurphy@...com,
        arnd@...db.de, masahiroy@...nel.org, michal.lkml@...kovi.net,
        kafai@...com, songliubraving@...com, yhs@...com, andriin@...com,
        linux-gpio@...r.kernel.org, linux-input@...r.kernel.org,
        linux-leds@...r.kernel.org, linux-arch@...r.kernel.org,
        linux-kbuild@...r.kernel.org, netdev@...r.kernel.org,
        bpf@...r.kernel.org
Subject: Re: [PATCH] RFC: platform driver registering via initcall tables

On Tue, Dec 17, 2019 at 02:44:39PM +0100, Enrico Weigelt, metux IT consult wrote:
> On 17.12.19 11:31, Greg KH wrote:
> 
> Hi,
> 
> > No, what is so "special" about platform drivers that they require this?
> 
> Nothing, of course ;-)
> 
> It's the the starting point for this PoC. The idea actually is doing
> this for all other driver types, too (eg. spi, pci, usb, ...). But
> they'll need their own tables, as different *_register() functions have
> to be called - just haven't implemented that yet.

That's not needed, and you are going to break the implicit ordering we
already have with link order.  You are going to have to figure out what
bus type the driver is, to determine what segment it was in, to figure
out what was loaded before what.

Not good.

> > If anything, we should be moving _AWAY_ from platform drivers and use
> > real bus drivers instead.
> 
> That would be nice, but, unfortunately, we have lots of devices which
> aren't attached to any (probing-capable) bus. That's why we have things
> like oftree, etc.
> 
> > Please no, I don't see why this is even needed.
> 
> The idea is getting rid of all the init code, which all just does the
> same, just calls some *_register() function.

There's no need to get rid of it, what are you trying to save here?  How
can you be sure init order is still the same?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ