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, 16 Aug 2018 12:44:00 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] uio: ensure class is registered before devices

On Thu, Aug 16, 2018 at 12:34:50PM +0200, Alexandre Belloni wrote:
> On 16/08/2018 12:04:13+0200, Greg Kroah-Hartman wrote:
> > On Thu, Aug 16, 2018 at 10:34:38AM +0200, Alexandre Belloni wrote:
> > > On 16/08/2018 10:01:12+0200, Greg Kroah-Hartman wrote:
> > > > On Thu, Aug 16, 2018 at 09:39:41AM +0200, Alexandre Belloni wrote:
> > > > > When both uio and the uio drivers are built in the kernel, it is possible
> > > > > for a driver to register devices before the uio class is registered.
> > > > 
> > > > How does this happen?  The link order should solve this issue, right?
> > > > 
> > > 
> > > Sure, if we can ensure uio_init() is called before any driver calls
> > > uio_register_device() then this would not happen. However, I'm not sure
> > > how you would want to achieve that.
> > 
> > That is the job of the link order, does this not work properly today?
> > How have you triggered this so that you could test your patch?
> > 
> 
> I have a (not yet upstreamed) MFD driver in drivers/mfd that is
> registering the uio device. It mostly look like uio_pci_generic.c.
> 
> When compiling both as builtin, it will crash that way.
> 
> There are no link dependency between uio_init and uio_register_device
> calls so I guess the linker can't reorder that properly.

Ah, ok, yes, that will break, I was looking at the kernel tree _today_ :)

I'll queue this up after 4.19-rc1 is out, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ