Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread Jason Wang
On 12/15/2015 04:00 PM, P J P wrote: > +-- On Tue, 15 Dec 2015, Dmitry Fleytman wrote --+ > | Hello Prasad, > | > | Looks good. > | Reviewed-by: Dmitry Fleytman > > Great! Thank you. > -- > Prasad J Pandit / Red Hat Product Security Team > 47AF CE69 3A90 54AA 9045 1053 DD13

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread P J P
Hello Jason, +-- On Tue, 15 Dec 2015, Jason Wang wrote --+ | Patch looks good to me. Queued for 2.6 first. | | If you want to make this for 2.5, you may probably want to send a formal | patch with my "Reviewed-by: " to Peter directly consider we are near to | release. And use "For 2.5" as a

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread P J P
Hello Miao, +-- On Tue, 15 Dec 2015, Miao Yan wrote --+ | So far as I know, vmxnet3 doesn't have a flow control spec. Same is true for | e1000 emulation layer in esxi, writing to flow control register bits is | ignored. Maybe there are some buffering or throttling layer in-between that | do

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread Miao Yan
2015-12-14 19:58 GMT+08:00 P J P : > Hello Dmitry, Jason > > +-- On Sun, 13 Dec 2015, Dmitry Fleytman wrote --+ > | According to Linux driver code VMXNET3_CMD_QUIESCE_DEV does not flip > | paused/active states. It always disables device, see vmxnet3_resume() for > | > | >

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread P J P
+-- On Tue, 15 Dec 2015, Dmitry Fleytman wrote --+ | Hello Prasad, | | Looks good. | Reviewed-by: Dmitry Fleytman Great! Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-14 Thread P J P
Hello Dmitry, Jason +-- On Sun, 13 Dec 2015, Dmitry Fleytman wrote --+ | According to Linux driver code VMXNET3_CMD_QUIESCE_DEV does not flip | paused/active states. It always disables device, see vmxnet3_resume() for | |

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-14 Thread P J P
Hello Dmitry, +-- On Mon, 14 Dec 2015, Dmitry Fleytman wrote --+ | The patch looks basically good. | The only issue I can think of is that now vmxnet_tx_pkt_uninit and | vmxnet_rx_pkt_uninit may be called a few times in a row. For example guest | may quiesce device and then shutdown. In this

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-14 Thread Dmitry Fleytman
Hello Prasad, Looks good. Reviewed-by: Dmitry Fleytman Regards, Dmitry > On 15 Dec 2015, at 08:57 AM, P J P wrote: > > Hello Dmitry, > > +-- On Mon, 14 Dec 2015, Dmitry Fleytman wrote --+ > | The patch looks basically good. > | The only issue I can

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-14 Thread Dmitry Fleytman
Hello Prasad, > On 14 Dec 2015, at 13:58 PM, P J P wrote: > > Hello Dmitry, Jason > > +-- On Sun, 13 Dec 2015, Dmitry Fleytman wrote --+ > | According to Linux driver code VMXNET3_CMD_QUIESCE_DEV does not flip > | paused/active states. It always disables device, see

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-13 Thread Dmitry Fleytman
Hello Prasad, On 9 Dec 2015, at 17:28 PM, P J P wrote: > > Hello Jason, Dmitry, > > +-- On Tue, 8 Dec 2015, P J P wrote --+ > | |1) VMXNET3_CMD_QUIESCE_DEV > | > | IIUC, it is used to pause the device when the receiver end is unable to > | keee-up with the incoming

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-13 Thread Dmitry Fleytman
> On 11 Dec 2015, at 12:04 PM, P J P wrote: > > Hello Jason, > > +-- On Fri, 11 Dec 2015, Jason Wang wrote --+ > | I think it's possible for attacker. Better wait for Dmitry's answer for > | this. > > Okay. > > | > +/* Verify if device is active */ > | > +if

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-11 Thread Dmitry Fleytman
Sent from my iPhone > On 11 Dec 2015, at 11:10, Jason Wang wrote: > > > >> On 12/09/2015 11:28 PM, P J P wrote: >> Hello Jason, Dmitry, >> >> +-- On Tue, 8 Dec 2015, P J P wrote --+ >> | |1) VMXNET3_CMD_QUIESCE_DEV >> | >> | IIUC, it is used to pause the device

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-11 Thread P J P
Hello Jason, +-- On Fri, 11 Dec 2015, Jason Wang wrote --+ | I think it's possible for attacker. Better wait for Dmitry's answer for | this. Okay. | > +/* Verify if device is active */ | > +if (s->device_active) { | > +VMW_CFPRN("Vmxnet3 device is active"); | > +

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-11 Thread Jason Wang
On 12/09/2015 11:28 PM, P J P wrote: >Hello Jason, Dmitry, > > +-- On Tue, 8 Dec 2015, P J P wrote --+ > | |1) VMXNET3_CMD_QUIESCE_DEV > | > | IIUC, it is used to pause the device when the receiver end is unable to > | keee-up with the incoming flow. After a brief period, the operation

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-09 Thread P J P
Hello Jason, Dmitry, +-- On Tue, 8 Dec 2015, P J P wrote --+ | |1) VMXNET3_CMD_QUIESCE_DEV | | IIUC, it is used to pause the device when the receiver end is unable to | keee-up with the incoming flow. After a brief period, the operation could be | resumed again. | | |2) VMXNET3_REG_DSAL

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-08 Thread P J P
Hello Jason, +-- On Fri, 4 Dec 2015, Jason Wang wrote --+ | Better with "git send-email". Okay. | What if guest deactivate the device before re-activate the device? |Looks like it could be done through methods: | |1) VMXNET3_CMD_QUIESCE_DEV IIUC, it is used to pause the device when the

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-03 Thread Jason Wang
On 12/03/2015 03:17 PM, Dmitry Fleytman wrote: > Hello Prasad, > > The patch is good. > Jason, would you apply is from attachment or should it be resent by > "git send-email”? Better with "git send-email". And I've a question for this patch which needs to be answered before merging this. What

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-03 Thread P J P
Hello Dmitry, +-- On Thu, 3 Dec 2015, Dmitry Fleytman wrote --+ | The patch is good. | Jason, would you apply is from attachment or should it be resent by "git send-email”? | | Acked-by: Dmitry Fleytman > Thank you. (/me makes a note to learn

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-03 Thread Jason Wang
On 12/02/2015 08:17 PM, P J P wrote: > Hello Dmitry, all > > A memory leakage issue was reported by Mr Qinghao Tang, CC'd here. > > In that, the Qemu VMXNET3 paravirtual device emulator does not check > if the device is already active, before activating it. This leads to > host memory leakage

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-02 Thread Dmitry Fleytman
Hello Prasad, The patch is good. Jason, would you apply is from attachment or should it be resent by "git send-email”? Acked-by: Dmitry Fleytman > ~Dmitry > On 2 Dec 2015, at 14:17 PM, P J P wrote: > > Hello Dmitry, all > >

[Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-02 Thread P J P
Hello Dmitry, all A memory leakage issue was reported by Mr Qinghao Tang, CC'd here. In that, the Qemu VMXNET3 paravirtual device emulator does not check if the device is already active, before activating it. This leads to host memory leakage via calls to vmxnet_tx_pkt_init(), which calls