lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <188405.11267.qm@web50208.mail.re2.yahoo.com>
Date:	Sat, 30 Oct 2010 14:24:22 -0700 (PDT)
From:	Alex Davis <alex14641@...oo.com>
To:	linux-kernel@...r.kernel.org
Cc:	kvm@...r.kernel.org
Subject: Re: CD-ROM size not updated when switching CD-ROM images.

Forwarding to linux-kernel.

I code, therefore I am


--- On Sat, 10/30/10, Alex Davis <alex14641@...oo.com> wrote:

> From: Alex Davis <alex14641@...oo.com>
> Subject: Re: CD-ROM size not updated when switching CD-ROM images.
> To: "David Ahern" <dsahern@...il.com>
> Cc: "Stefan Hajnoczi" <stefanha@...il.com>, kvm@...r.kernel.org
> Date: Saturday, October 30, 2010, 4:32 PM
> 
> 
> --- On Wed, 10/20/10, David Ahern <dsahern@...il.com>
> wrote:
> 
> > From: David Ahern <dsahern@...il.com>
> > Subject: Re: CD-ROM size not updated when switching
> CD-ROM images.
> > To: "Alex Davis" <alex14641@...oo.com>
> > Cc: "Stefan Hajnoczi" <stefanha@...il.com>,
> kvm@...r.kernel.org
> > Date: Wednesday, October 20, 2010, 12:44 PM
> > 
> > 
> > On 10/19/10 18:03, Alex Davis wrote:
> > 
> > >> You ejected the CD-ROM on the QEMU side, the
> guest
> > doesn't
> > >> necessarily
> > >> know about the medium change.  What
> happens
> > when you
> > >> use "eject
> > >> /dev/sr0" inside the guest instead?
> > > I get a 'no medium found' error from the 'dd..'
> > command. After
> > > going into the the monitor, ejecting and
> reloading the
> > disk, 
> > > I still get the size of the first disk in the
> guest.
> > 
> > As I recall the old data is coming from the host page
> > cache; it is not
> > seeing the media change. Try dropping the cache in the
> host
> > on a media
> > change (echo 3 > /proc/sys/vm/drop_caches) or
> modify
> > qemu to close and
> > reopen the cdrom device.
> > 
> > David

> I am able to reproduce this problem with just a plain
> kernel using the ata_piix driver, an initrd that just starts a 
> shell, and plain qemu. When the disk is changed via the monitor,
> the guest invokes the error-handling code on the next read of the
> CD-ROM, but the code path doesn't trigger the 'update size' logic.
> I did an experiment where I placed the line 'sdev->changed = 1'
> in the sr_open method in sr.c of the guest > kernel source, the 
> size was updated, but I will look to see if there's something in
> qemu that can be changed to make it work properly.
> 
> Of course any input from the qemu/kvm developers is
> appreciated.
> 
> I code, therefore I am
> 
> > 
> > >>
> > >> I don't know how CD-ROM media change works
> on
> > real
> > >> hardware, but that
> > >> is the behavior that QEMU should be
> following.
> > >>
> > >> Stefan
> > > 
> > > 
> > >       
> > > --
> > > To unsubscribe from this list: send the line
> > "unsubscribe kvm" in
> > > the body of a message to majordomo@...r.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > > 
> > 
> 
> 
>       
> 


      
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ