From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: loop in copy_user_generic_string Date: Tue, 04 Mar 2008 18:07:59 +0200 Message-ID: <47CD73DF.6070502@qumranet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net To: Zdenek Kabelac Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Zdenek Kabelac wrote: > Hello > > > I'm having weird problem and being a bit puzzled about where to look > for this bug. > > I'm using T61 - C2D 2GB > > So I'll describe symptoms: > > When I run inside my 0.5G smp qemu-kvm guest with Debian these two > loops in parallel: > > 'while : ; do dmsetup status ; done' > > and > > 'while : ; do cat /dev/zero >/dev/mapper/any_free_to_use_lvm_partition ; done' > > after a while dmsetup start to loop in this place: > > [ 356.257323] [] ? copy_user_generic_string+0x17/0x40 > > > I'm using preemptible kernel and the code will stay in the > copy_user_generic_string call forever eating 100%cpu - without > preemption the kernel gets dead. > > With preemption when I run at this moment second dmsetup status in > paralllel the busy-looped dmsetup gets finished and while loop starts > to continue agains until next dmsetup busy-loop. > > I've noticed that if I change inside drivers/md/dm-ioctl.c > copy_params the parameter tmp.data_size in the copy_from_user call to > just page size (4kB) - or when I replace vmalloc to kmalloc - the busy > loop will not happen. > > So it seems to be related to page jump somehow > > Anyway might have any idea - what is going on here ? > Most likely movs emulation is broken for long counts. Please post a disassembly of copy_user_generic_string to make sure we're looking at the same code. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/