From: "Michael S. Tsirkin" <mst@redhat.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
"Kuppuswamy,
Sathyanarayanan" <sathyanarayanan.kuppuswamy@linux.intel.com>,
Kuppuswamy Sathyanarayanan <knsathya@kernel.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Michael Jamet <michael.jamet@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
X86 ML <x86@kernel.org>,
virtualization@lists.linux-foundation.org,
Yehezkel Bernat <YehezkelShB@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andreas Noever <andreas.noever@gmail.com>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Linux PCI <linux-pci@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Dan Williams <dan.j.williams@intel.com>,
USB list <linux-usb@vger.kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
"Reshetova, Elena" <elena.reshetova@intel.com>
Subject: Re: [PATCH v2 4/6] virtio: Initialize authorized attribute for confidential guest
Date: Sat, 2 Oct 2021 14:40:55 -0400 [thread overview]
Message-ID: <20211002142138-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <95ba71c5-87b8-7716-fbe4-bdc9b04b6812@linux.intel.com>
On Sat, Oct 02, 2021 at 07:20:22AM -0700, Andi Kleen wrote:
>
> On 10/2/2021 4:14 AM, Greg Kroah-Hartman wrote:
> > On Sat, Oct 02, 2021 at 07:04:28AM -0400, Michael S. Tsirkin wrote:
> > > On Fri, Oct 01, 2021 at 08:49:28AM -0700, Andi Kleen wrote:
> > > > > Do you have a list of specific drivers and kernel options that you
> > > > > feel you now "trust"?
> > > > For TDX it's currently only virtio net/block/console
> > > >
> > > > But we expect this list to grow slightly over time, but not at a high rate
> > > > (so hopefully <10)
> > > Well there are already >10 virtio drivers and I think it's reasonable
> > > that all of these will be used with encrypted guests. The list will
> > > grow.
> > What is keeping "all" drivers from being on this list?
>
> It would be too much work to harden them all, and it would be pointless
> because all these drivers are never legitimately needed in a virtualized
> environment which only virtualize a very small number of devices.
>
> > How exactly are
> > you determining what should, and should not, be allowed?
>
> Everything that has had reasonable effort at hardening can be added. But if
> someone proposes to add a driver that should trigger additional scrutiny in
> code review. We should also request them to do some fuzzing.
Looks like out of tree modules get a free pass then.
Which is exactly the reverse of what it should be,
people who spent the time to get their drivers into the kernel
expect that if kernel decides to change some API their
driver is automatically updated. This was always the social
contract, was it not?
> It's a bit similar to someone trying to add a new syscall interface. That
> also triggers much additional scrutiny for good reasons and people start
> fuzzing it.
>
>
> > How can
> > drivers move on, or off, of it over time?
>
> Adding something is submitting a patch to the allow list.
>
> I'm not sure the "off" case would happen, unless the driver is completely
> removed, or maybe it has some unfixable security problem. But that is all
> rather unlikely.
>
>
> >
> > And why not just put all of that into userspace and have it pick and
> > choose? That should be the end-goal here, you don't want to encode
> > policy like this in the kernel, right?
>
> How would user space know what drivers have been hardened? This is really
> something that the kernel needs to determine. I don't think we can outsource
> it to anyone else.
IIUC userspace is the distro. It can also do more than a binary on/off,
e.g. it can decide "only virtio", "no out of tree drivers".
A distro can also ship configs with a specific features
enabled/disabled. E.g. I can see where some GPU drivers will be
included by some distros since they are so useful, and excluded
by others since they are so big and hard to audit.
I don't see how the kernel can reasonably make a stand here.
Is "some audit and some fuzzing" a good policy? How much is enough?
> Also BTW of course user space can still override it, but really the defaults
> should be a kernel policy.
Well if userspace sets the policy then I'm not sure we also want
a kernel one ... but if yes I'd like it to be in a central
place so whoever is building the kernel can tweak it easily
and rebuild, without poking at individual drivers.
> There's also the additional problem that one of the goals of confidential
> guest is to just move existing guest virtual images into them without much
> changes. So it's better for such a case if as much as possible of the policy
> is in the kernel.
If it's e.g. the kernel command line then we can set that
when building the kernel right? No need for a dedicated interface
just for this ...
> But that's more a secondary consideration, the first point
> is really the important part.
>
>
> -Andi
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2021-10-02 18:41 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210930010511.3387967-1-sathyanarayanan.kuppuswamy@linux.intel.com>
[not found] ` <20210930010511.3387967-2-sathyanarayanan.kuppuswamy@linux.intel.com>
2021-09-30 1:42 ` [PATCH v2 1/6] driver core: Move the "authorized" attribute from USB/Thunderbolt to core Alan Stern
2021-09-30 1:55 ` Dan Williams
[not found] ` <f9b7cf97-0a14-1c80-12ab-23213ec2f4f2@linux.intel.com>
2021-09-30 4:59 ` Dan Williams
2021-09-30 9:05 ` Rafael J. Wysocki
2021-09-30 14:59 ` Alan Stern
2021-09-30 15:25 ` Dan Williams
[not found] ` <CA+CmpXtXn5wjxwow5va5u9qHcQDLkd4Sh2dcqB545SXaxV1GkQ@mail.gmail.com>
2021-09-30 15:28 ` Dan Williams
[not found] ` <CA+CmpXvGCAny-WHGioJQHF9ZZ5pCaR-E_rw5oeE82xC30naVXg@mail.gmail.com>
2021-09-30 19:04 ` Dan Williams
[not found] ` <c701ca61-4e7d-1060-102f-8f92dd6e6802@linux.intel.com>
2021-09-30 20:23 ` Dan Williams
[not found] ` <20210930010511.3387967-3-sathyanarayanan.kuppuswamy@linux.intel.com>
2021-09-30 10:59 ` [PATCH v2 2/6] driver core: Add common support to skip probe for un-authorized devices Michael S. Tsirkin
2021-09-30 13:52 ` Greg Kroah-Hartman
2021-09-30 14:38 ` Michael S. Tsirkin
2021-09-30 14:49 ` Greg Kroah-Hartman
2021-09-30 15:00 ` Michael S. Tsirkin
2021-09-30 15:22 ` Greg Kroah-Hartman
2021-09-30 17:17 ` Andi Kleen
2021-09-30 17:23 ` Greg Kroah-Hartman
2021-09-30 19:15 ` Andi Kleen
2021-10-01 6:29 ` Greg Kroah-Hartman
2021-10-01 15:51 ` Alan Stern
2021-10-01 15:56 ` Andi Kleen
2021-09-30 14:43 ` Alan Stern
2021-09-30 14:48 ` Michael S. Tsirkin
2021-09-30 15:32 ` Alan Stern
2021-09-30 15:52 ` Michael S. Tsirkin
2021-09-30 14:58 ` Michael S. Tsirkin
2021-09-30 15:35 ` Alan Stern
2021-09-30 15:59 ` Michael S. Tsirkin
2021-09-30 19:23 ` Andi Kleen
2021-09-30 20:44 ` Alan Stern
2021-09-30 20:52 ` Dan Williams
2021-10-01 1:41 ` Alan Stern
2021-10-01 2:20 ` Dan Williams
2021-09-30 21:12 ` Andi Kleen
[not found] ` <20210930010511.3387967-5-sathyanarayanan.kuppuswamy@linux.intel.com>
2021-09-30 11:03 ` [PATCH v2 4/6] virtio: Initialize authorized attribute for confidential guest Michael S. Tsirkin
2021-09-30 13:36 ` Dan Williams
2021-09-30 13:49 ` Greg Kroah-Hartman
[not found] ` <6d1e2701-5095-d110-3b0a-2697abd0c489@linux.intel.com>
2021-09-30 15:20 ` Michael S. Tsirkin
2021-09-30 15:23 ` Greg Kroah-Hartman
[not found] ` <1cfdce51-6bb4-f7af-a86b-5854b6737253@linux.intel.com>
2021-09-30 19:30 ` Andi Kleen
2021-10-01 7:03 ` Greg Kroah-Hartman
2021-10-01 15:49 ` Andi Kleen
2021-10-02 11:04 ` Michael S. Tsirkin
2021-10-02 11:14 ` Greg Kroah-Hartman
2021-10-02 14:20 ` Andi Kleen
2021-10-02 14:44 ` Greg Kroah-Hartman
2021-10-02 18:40 ` Michael S. Tsirkin [this message]
2021-10-03 6:40 ` Greg Kroah-Hartman
2021-10-04 21:04 ` Dan Williams
2021-10-01 16:13 ` Dan Williams
2021-10-01 16:45 ` Alan Stern
2021-10-01 18:09 ` Dan Williams
2021-10-01 19:00 ` Alan Stern
2021-10-01 19:57 ` Dan Williams
[not found] ` <YVqONA0vhl0/H3QE@lahna>
2021-10-05 22:33 ` Dan Williams
2021-10-06 5:45 ` Greg Kroah-Hartman
2021-09-30 19:25 ` Andi Kleen
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=20211002142138-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=YehezkelShB@gmail.com \
--cc=ak@linux.intel.com \
--cc=andreas.noever@gmail.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dan.j.williams@intel.com \
--cc=elena.reshetova@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=knsathya@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mingo@redhat.com \
--cc=rafael@kernel.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).