mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Hari Mishal" <harimishal1@gmail.com>,
	"Jason Wang" <jasowangio@gmail.com>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
	elena.reshetova@intel.com, carlos.bilbao.osdev@gmail.com
Subject: Re: [PATCH v2 1/4] virtio-mem: validate device-reported block size
Date: Fri, 17 Jul 2026 12:00:58 +0100	[thread overview]
Message-ID: <0b1d22bb-f929-45ca-bfd9-a1598791cff3@kernel.org> (raw)
In-Reply-To: <2026071717-unfiled-manned-3305@gregkh>

On 7/17/26 12:44, Greg Kroah-Hartman wrote:
> On Fri, Jul 17, 2026 at 11:21:34AM +0100, David Hildenbrand (Arm) wrote:
>> On 7/17/26 12:15, Greg Kroah-Hartman wrote:
>>>
>>> Ok, so you want this patch :)
>>
>> I fail to see the value of this patch given that there are plenty of other cases
>> the device can mess with us.
> 
> How can the device mess with us?

I raised some examples already, like lying about which memory chunks it makes
available.

I guess it could also throw a random "requested_size" at us. It could make up a
wrong physical address region. I assume there is plenty more we'd have to check.

Again, I'm not saying that this couldn't/shouldn't be done, but it requires some
*real thought* about all possible things a device could do.

> 
>> But sure, let's check for some conditions if it makes us feel warm and fluffy as
>> we audited a driver and it's now super safe, fine with me.
> 
> I'm all for the folly of "it's an audited driver!" claims, but you all
> need to decide either you do or you do not trust the device.  Either way
> is fine with me.

Well, exactly, that is what I am saying. I don't know what we care about. This
patch here feels incomplete and that's what grinds my gears. It doesn't
magically make us deal with malicious devices.

And I don't buy the story about "buggy virtio-mem devices that set
block_size==0", which doesn't make any sense in any possible reality.

> 
> If you don't trust it, great, take patches that fix that.  If you do
> trust it, great, reject those types of patches.
> 
> But pick one please.

Yes, I'd expect that we have general virtio guifance. I only co-maintain some
virtio bits and have no idea about the expected trust model and when we would
consider a devices trusted.

And what it would take to get there.

-- 
Cheers,

David

  reply	other threads:[~2026-07-17 11:01 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 14:22 [PATCH 0/4] virtio: validate device-reported values across drivers Hari Mishal
2026-07-15 14:22 ` [PATCH 1/4] virtio-mem: validate device-reported block size Hari Mishal
2026-07-15 15:57   ` Michael S. Tsirkin
2026-07-15 16:41   ` [PATCH v2 " Hari Mishal
2026-07-16  8:55     ` David Hildenbrand (Arm)
2026-07-16 14:18       ` Greg Kroah-Hartman
2026-07-16 15:59         ` David Hildenbrand (Arm)
2026-07-17  5:03           ` Greg Kroah-Hartman
2026-07-17  5:48           ` Michael S. Tsirkin
2026-07-17  8:39             ` David Hildenbrand (Arm)
2026-07-17  8:59               ` Michael S. Tsirkin
2026-07-17  9:14                 ` Greg Kroah-Hartman
2026-07-17 10:10                   ` Michael S. Tsirkin
2026-07-17 10:15                     ` Greg Kroah-Hartman
2026-07-17 10:21                       ` David Hildenbrand (Arm)
2026-07-17 10:28                         ` Michael S. Tsirkin
2026-07-17 10:44                         ` Greg Kroah-Hartman
2026-07-17 11:00                           ` David Hildenbrand (Arm) [this message]
2026-07-17 10:23                       ` Michael S. Tsirkin
2026-07-17 10:46                         ` Greg Kroah-Hartman
2026-07-17 10:52                           ` Michael S. Tsirkin
2026-07-17 12:07                             ` Greg Kroah-Hartman
2026-07-17 13:08                               ` Michael S. Tsirkin
2026-07-17 14:31                                 ` Greg Kroah-Hartman
2026-07-17 15:27                                   ` Michael Kelley
2026-07-17 16:28                                   ` Michael S. Tsirkin
2026-07-17 16:30                                     ` Michael S. Tsirkin
2026-07-18  3:31                                 ` Carlos Bilbao
2026-07-15 14:22 ` [PATCH 2/4] virtio_input: validate device-reported multitouch slot count Hari Mishal
2026-07-15 15:50   ` Michael S. Tsirkin
2026-07-15 16:07     ` Hari Mishal
2026-07-15 16:11       ` Michael S. Tsirkin
2026-07-15 18:25         ` Dmitry Torokhov
     [not found]           ` <CAMmC+=DXS=xs0CZyf+N-71NT8D51xQYatBv=dfVQC1aBohDdmA@mail.gmail.com>
     [not found]             ` <alkTnRb9qhgcMGGi@google.com>
2026-07-16 17:33               ` Dmitry Torokhov
2026-07-15 16:41   ` [PATCH v2 " Hari Mishal
2026-07-15 14:22 ` [PATCH 3/4] virtio_console: avoid NULL portdev dereference in in_intr() Hari Mishal
2026-07-15 14:22 ` [PATCH 4/4] virtio_console: take a kref in find_port_by_vq() to fix port UAF Hari Mishal
2026-07-15 14:42   ` [PATCH v2 " Hari Mishal

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=0b1d22bb-f929-45ca-bfd9-a1598791cff3@kernel.org \
    --to=david@kernel.org \
    --cc=carlos.bilbao.osdev@gmail.com \
    --cc=elena.reshetova@intel.com \
    --cc=eperezma@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=harimishal1@gmail.com \
    --cc=jasowangio@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /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