All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kuppuswamy, Sathyanarayanan"  <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andi Kleen <ak@linux.intel.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Dan Williams <dan.j.williams@intel.com>,
	Kuppuswamy Sathyanarayanan <knsathya@kernel.org>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v1] driver: base: Add driver filter support
Date: Thu, 5 Aug 2021 11:53:52 -0700	[thread overview]
Message-ID: <7d6751b1-c476-51d3-25c6-b65c0e93d23b@linux.intel.com> (raw)
In-Reply-To: <YQwpa+LAYt7YZ5dh@kroah.com>



On 8/5/21 11:09 AM, Greg Kroah-Hartman wrote:
> On Thu, Aug 05, 2021 at 10:58:46AM -0700, Andi Kleen wrote:
>>
>> On 8/5/2021 10:51 AM, Greg Kroah-Hartman wrote:
>>>
>>> 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.
>>
>>
>> So how does that work with builtin USB drivers? Do you delay the USB binding
>> until usbguard starts up?
> 
> Yes.
> 
>>>> 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 some early boot drivers, just not all of them. For example in your
>> scheme we would need to reject all early platform drivers, which would break
>> booting. Or allow all early platform drivers, but then we exactly get into
>> the problem that there are far too many of them to properly harden.
> 
> Define "harden" please.  Why not just allow all platform drivers, they
> should all be trusted.  If not, well, you have bigger problems...

This driver filter framework will be mainly (at-least for now) used by
protected guest. "Protected guest" is the term we use define a VM
guest which ensures memory and data isolation when working with
untrusted VMM. You can find some basic introduction to it in following
links.

https://lwn.net/Articles/860352/
https://software.intel.com/content/www/br/pt/develop/articles/intel-trust-domain-extensions.html

In protected guest, since VMM is untrusted, device drivers that deals
with IO-memory and data had to audited and hardened against attack from
malicious VMM.

With this driver filter support, we can ensure only hardened drivers
are allowed to bind with device. This is applicable to built-in and
loadable kernel drivers.

I don't think there is a existing framework which does this right?

I am not sure how USB and Thunderbolt "authorzied" model works. But I
don't think it prevents built-in driver probes during kernel boot right?
I will also check this framework and get back to you.

> 
> Anyway, feel free to build on top of the existing scheme please, but do
> not ignore it and try to create yet-another-way-to-do-this that I have
> to maintain for the next 20+ years.
> 
> thanks,
> 
> greg k-h
> 

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer

  parent reply	other threads:[~2021-08-05 18:53 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 17:43 [PATCH v1] driver: base: Add driver filter support Kuppuswamy Sathyanarayanan
2021-08-04 18:08 ` Matthew Wilcox
2021-08-04 18:29   ` Kuppuswamy, Sathyanarayanan
2021-08-04 18:33     ` Matthew Wilcox
2021-08-04 19:27     ` Andi Kleen
2021-08-04 18:45   ` Dan Williams
2021-08-04 19:29 ` Greg Kroah-Hartman
2021-08-04 19:50   ` Andi Kleen
2021-08-04 20:09     ` Kuppuswamy, Sathyanarayanan
2021-08-05  7:50       ` Greg Kroah-Hartman
2021-08-05  7:49     ` Greg Kroah-Hartman
2021-08-05  7:55       ` Greg Kroah-Hartman
2021-08-05  7:58         ` Greg Kroah-Hartman
2021-08-05 13:52           ` Andi Kleen
2021-08-05 17:51             ` Greg Kroah-Hartman
2021-08-05 17:58               ` Andi Kleen
2021-08-05 18:09                 ` Greg Kroah-Hartman
2021-08-05 18:44                   ` Andi Kleen
2021-08-05 19:01                     ` Dan Williams
2021-08-05 19:08                       ` Kuppuswamy, Sathyanarayanan
2021-08-05 19:28                         ` Greg Kroah-Hartman
2021-08-05 21:10                       ` Andi Kleen
2021-08-06  1:00                         ` Dan Williams
2021-08-06  5:17                           ` Greg Kroah-Hartman
2021-08-06 14:36                             ` Dan Williams
2021-08-06  5:07                     ` Greg Kroah-Hartman
2021-08-05 18:53                   ` Kuppuswamy, Sathyanarayanan [this message]
2021-08-05 19:12                     ` Greg Kroah-Hartman
2021-08-05 19:18                       ` Dan Williams
2021-08-05 19:28                         ` Greg Kroah-Hartman
2021-08-05 19:52                           ` Dan Williams
2021-08-06 11:15                             ` Jonathan Cameron
2021-08-05 16:37           ` Dan Williams
2021-08-05 17:25             ` Kuppuswamy, Sathyanarayanan
2021-08-05 17:48               ` Greg Kroah-Hartman
2021-08-05 17:52               ` Andi Kleen
2021-08-05 18:11                 ` Greg Kroah-Hartman
2021-08-05 17:49             ` Greg Kroah-Hartman
2021-08-04 20:11   ` Dan Williams
2021-08-04 20:29     ` Kuppuswamy, Sathyanarayanan
2021-08-04 21:07     ` Matthew Wilcox
2021-08-04 21:28       ` Dan Williams
2021-08-05  4:45         ` Andi Kleen
2021-08-05  7:59         ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d6751b1-c476-51d3-25c6-b65c0e93d23b@linux.intel.com \
    --to=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=knsathya@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.