Re: [Qemu-devel] [PATCH v2] net: mipsnet: check transmit buffer size before sending

2016-06-15 Thread Peter Maydell
On 15 June 2016 at 09:48, Jason Wang wrote: > I tend to remove mipsnet in the future (maybe 2.8). If we're going to do this then I think: (1) we should remove the whole mipssim machine model, not just its ethernet device (2) we should announce in the 2.7 release notes

Re: [Qemu-devel] [PATCH v2] net: mipsnet: check transmit buffer size before sending

2016-06-15 Thread Jason Wang
On 2016年06月13日 15:17, P J P wrote: Hello Jason, +-- On Mon, 13 Jun 2016, Jason Wang wrote --+ | > case MIPSNET_TX_DATA_BUFFER: | > s->tx_buffer[s->tx_written++] = val; | | I believe we may still have a buffer overflow here, no? No, this is the overflow that the patch is

Re: [Qemu-devel] [PATCH v2] net: mipsnet: check transmit buffer size before sending

2016-06-13 Thread P J P
Hello Jason, +-- On Mon, 13 Jun 2016, Jason Wang wrote --+ | > case MIPSNET_TX_DATA_BUFFER: | > s->tx_buffer[s->tx_written++] = val; | | I believe we may still have a buffer overflow here, no? No, this is the overflow that the patch is meant to fix. | > -if

Re: [Qemu-devel] [PATCH v2] net: mipsnet: check transmit buffer size before sending

2016-06-12 Thread Jason Wang
On 2016年06月08日 18:37, P J P wrote: From: Prasad J Pandit When processing MIPSnet I/O port write operation, it uses a transmit buffer tx_buffer[MAX_ETH_FRAME_SIZE=1514]. Two indices 's->tx_written' and 's->tx_count' are used to control data written to this buffer. If

[Qemu-devel] [PATCH v2] net: mipsnet: check transmit buffer size before sending

2016-06-08 Thread P J P
From: Prasad J Pandit When processing MIPSnet I/O port write operation, it uses a transmit buffer tx_buffer[MAX_ETH_FRAME_SIZE=1514]. Two indices 's->tx_written' and 's->tx_count' are used to control data written to this buffer. If the two were to be equal before writing,