[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [Qemu-devel] [Qemu-block] [PATCH] scsi-generic: preven
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-stable] [Qemu-devel] [Qemu-block] [PATCH] scsi-generic: prevent guest from exceeding SG_IO limits |
Date: |
Thu, 18 Apr 2019 12:32:49 +0100 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
On Thu, Apr 18, 2019 at 12:47:37PM +0200, Kevin Wolf wrote:
> Am 18.04.2019 um 11:48 hat Paolo Bonzini geschrieben:
> > On 17/04/19 14:30, Stefan Hajnoczi wrote:
> > > On Wed, Apr 17, 2019 at 12:54 PM Paolo Bonzini <address@hidden> wrote:
> > >> Linux places a limit of UIO_MAXIOV pages on SG_IO ioctls (and if the
> > >> limit
> > >> is exceeded, a confusing ENOMEM error is returned[1]). Prevent the guest
> > >> from exceeding these limits, by capping the maximum transfer length to
> > >> that value in the block limits VPD page.
> > >>
> > >> [1] Oh well, at least it was easier to follow the kernel source knowing
> > >> it had to end as ENOMEM...
> > >>
> > >> Cc: address@hidden
> > >> Cc: address@hidden
> > >> Cc: Stefan Hajnoczi <address@hidden>
> > >> Signed-off-by: Paolo Bonzini <address@hidden>
> > >> ---
> > >> hw/scsi/scsi-generic.c | 17 +++++++++++++----
> > >> 1 file changed, 13 insertions(+), 4 deletions(-)
> > >
> > > Reviewed-by: Stefan Hajnoczi <address@hidden>
> > >
> >
> > This is acually only an issue with kernels prior to 4.5, so it should be
> > fixed downstream instead.
>
> I don't think that upstream QEMU has kernels > 4.5 as an official
> requirement, though? We try to be compatible with quite old libs, so we
> should stay compatible with old kernels, too.
We've not explicitly stated or checked a min kernel version, but our
min kernel is defined implicitly by our targetted build platforms:
https://qemu.weilnetz.de/doc/qemu-doc.html#Supported-build-platforms
The oldest Linux distro under those rules is RHEL-7 (3.10.0), since
Debian Jessie actually updates its kernel version so is already on
version 4.5
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|