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:   Thu, 5 Aug 2021 19:51:26 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Andi Kleen <ak@...ux.intel.com>
Cc:     Kuppuswamy Sathyanarayanan 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Jonathan Corbet <corbet@....net>,
        Dan Williams <dan.j.williams@...el.com>,
        Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
        linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v1] driver: base: Add driver filter support

On Thu, Aug 05, 2021 at 06:52:25AM -0700, Andi Kleen wrote:
> 
> > Both thunderbolt and USB have the idea of "authorized" devices, that is
> > the logic that should be made generic and available for all busses to
> > use, by moving it to the driver core, just like the "removable" logic
> > got moved to the driver core recently (see 70f400d4d957 ("driver core:
> > Move the "removable" attribute from USB to core")
> 
> This looks like it's controlled by udev?  Have a default per bus, and let
> user space override it before setting up the device.

It's controlled by whatever you want to use in userspace.  usbguard has
been handling this logic in userspace for over a decade now just fine.

> This doesn't help us handle builtin drivers that initialize before user
> space is up.

Then have the default setting for your bus be "unauthorized" like we
allow for some busses today.

> We need something that works for all drivers. Also cannot just use a default
> at bootup because some drivers (like virtio or rtc) need to be initialized
> in early boot to make the system functional at all. So you need a way to
> distinguish these two cases in the pre user space boot.
> 
> That's basically what this patch implements the infrastructure for.

It also ignores the existing implementation we already have for this for
some busses, please do not do that.

> > Please use that type of interface, as we already have userspace tools
> > using it, and expand it for all busses in the system to use if they
> > want.  Otherwise with this proposal you will end up with multiple ways
> > to control the same bus type with different types of "filtering",
> > ensuring a mess.
> 
> How would such a proposal work for a platform driver that doesn't have a
> bus?

There is a platform bus, it's just a fake one.  The platform bus code
does the binding just like any other bus does, why is platform somehow
"special"?  Except for how it is abused...

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ