From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8208-00038j-Ho for qemu-devel@nongnu.org; Sun, 13 Dec 2015 03:27:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8203-0004ZA-Iz for qemu-devel@nongnu.org; Sun, 13 Dec 2015 03:27:28 -0500 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:34869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8203-0004Z0-Ch for qemu-devel@nongnu.org; Sun, 13 Dec 2015 03:27:23 -0500 Received: by mail-wm0-x22b.google.com with SMTP id p66so7163889wmp.0 for ; Sun, 13 Dec 2015 00:27:23 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) From: Dmitry Fleytman In-Reply-To: Date: Sun, 13 Dec 2015 10:27:20 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <66A887B2-7CFF-45F9-AD7F-1381F8B1F318@daynix.com> <566105A2.6040508@redhat.com> <566A930C.7030901@redhat.com> Subject: Re: [Qemu-devel] net: vmxnet3: memory leakage issue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: P J P Cc: Qinghao Tang , Jason Wang , qemu-devel@nongnu.org > On 11 Dec 2015, at 12:04 PM, P J P wrote: >=20 > Hello Jason, >=20 > +-- On Fri, 11 Dec 2015, Jason Wang wrote --+ > | I think it's possible for attacker. Better wait for Dmitry's answer = for > | this. >=20 > Okay. >=20 > | > + /* Verify if device is active */ > | > + if (s->device_active) { > | > + VMW_CFPRN("Vmxnet3 device is active"); > | > + return; > | > + } > |=20 > | What if guest want to activate a paused device? >=20 > There is a 'resume' operation defined below. >=20 > | > case VMXNET3_CMD_QUIESCE_DEV: > | > - VMW_CBPRN("Set: VMXNET3_CMD_QUIESCE_DEV - pause the = device"); > | > - vmxnet3_deactivate_device(s); > | > + if (s->device_active & VMXNET3_DEV_ACTIVE) { > | > + VMW_CBPRN("Set: VMXNET3_CMD_QUIESCE_DEV - pause the = device"); > | > + vmxnet3_pause_device(s); > | > + } else if (s->device_active & VMXNET3_DEV_PAUSE) { > | > + VMW_CBPRN("Set: VMXNET3_CMD_QUIESCE_DEV - resume the = device"); > | > + vmxnet3_resume_device(s); > | > + } > |=20 > | Not sure this is the correct behavior. Is there a link to the spec? >=20 > I couldn't find a spec for vmxnet3; I referred the vmxnet3 kernel = driver,=20 > which seems to implement suspend & resume functions. Unfortunately the spec is not available. The device was implemented using Linux/Windows drivers as references. >=20 > -> = https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drive= rs/net/vmxnet3/vmxnet3_drv.c >=20 > In general, Ethernet documents talk about 'pause' frame mechanism to = stop NIC=20 > from buffering more data, till it has space available to process more, = when it=20 > resumes its operation. >=20 > Thank you. > -- > Prasad J Pandit / Red Hat Product Security Team > 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F