Re: missing compat-ioctl for CDROM_DRIVE_STATUS + FDGETPRM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 17, 2011 at 03:02:39PM +0200, Arnd Bergmann wrote:
> On Friday 17 June 2011 11:04:24 Johannes Stezenbach wrote:
> > running even a simple "qemu-img create -f qcow2 some.img 1G" causes
> > the following in dmesg on a Linux host with linux-2.6.39.1 x86_64 kernel
> > and 32bit userspace:
> > 
> > ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(00005326){t:'S';sz:0} arg(7fffffff) on some.img
> > ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(801c0204){t:02;sz:28} arg(fff77350) on some.img
> > 
> > (The same happens when starting a qemu or kvm vm.)
> > 
> > ioctl 00005326 seems to be CDROM_DRIVE_STATUS,
> > ioctl 801c0204 is FDGETPRM.  Both are used in
> > qemu/block/raw-posix.c in cdrom_probe_device()
> > and floppy_probe_device() respectively.
> > 
> > FWIW, I'm using qemu/kvm from Debian unstable
> > (qemu-0.14.0+dfsg-5.1, qemu-kvm-0.14.1+dfsg-1)
> 
> Both are handled by the kernel for block devices, but not for regular
> files. The messages may be annoying but they are harmless. We could
> silence them either by checking if the file is actually a block device in
> qemu-img, or by adding a nop handler to the kernel for regular files.

Sorry for very slow reply.  I think qemu's use of these ioctls
to probe if the device is a cdrom or floppy is valid, so instead
of adding a stat() call to check for block device in qemu, I think
it is better to silence the warning in the kernel.

Do I get it right that just adding two IGNORE_IOCTL() to
the ioctl_pointer array in linux/fs/compat_ioctl.c is sufficient,
like in commit 3f001711?
I.e. these ioctls are handled for block devices earlier
in compat_sys_ioctl()?


Thanks,
Johannes
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux