Andy Lutomirski
2021-Jun-03 17:33 UTC
[PATCH v1 1/8] virtio: Force only split mode with protected guest
On 6/2/21 5:41 PM, Andi Kleen wrote:> Only allow split mode when in a protected guest. Followon > patches harden the split mode code paths, and we don't want > an malicious host to force anything else. Also disallow > indirect mode for similar reasons.I read this as "the virtio driver is buggy. Let's disable most of the buggy code in one special case in which we need a driver without bugs. In all the other cases (e.g. hardware virtio device connected over USB-C), driver bugs are still allowed." Can we just fix the driver without special cases? --Andy
Andi Kleen
2021-Jun-03 18:00 UTC
[PATCH v1 1/8] virtio: Force only split mode with protected guest
On 6/3/2021 10:33 AM, Andy Lutomirski wrote:> On 6/2/21 5:41 PM, Andi Kleen wrote: >> Only allow split mode when in a protected guest. Followon >> patches harden the split mode code paths, and we don't want >> an malicious host to force anything else. Also disallow >> indirect mode for similar reasons. > I read this as "the virtio driver is buggy. Let's disable most of the > buggy code in one special case in which we need a driver without bugs. > In all the other cases (e.g. hardware virtio device connected over > USB-C), driver bugs are still allowed."My understanding is most of the other modes (except for split with separate descriptors) are obsolete and just there for compatibility. As long as they're deprecated they won't harm anyone. -Andi
Jason Wang
2021-Jun-04 02:20 UTC
[PATCH v1 1/8] virtio: Force only split mode with protected guest
? 2021/6/4 ??1:33, Andy Lutomirski ??:> On 6/2/21 5:41 PM, Andi Kleen wrote: >> Only allow split mode when in a protected guest. Followon >> patches harden the split mode code paths, and we don't want >> an malicious host to force anything else. Also disallow >> indirect mode for similar reasons. > I read this as "the virtio driver is buggy. Let's disable most of the > buggy code in one special case in which we need a driver without bugs. > In all the other cases (e.g. hardware virtio device connected over > USB-C), driver bugs are still allowed." > > Can we just fix the driver without special cases?I think we can, this is what this series tries to do: https://www.spinics.net/lists/kvm/msg241825.html It tries to fix without a special caring for any specific features. Thanks> > --Andy >