Re: [QEMU-SECURITY] [PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-26 Thread Alexander Bulekov
On 210226 1814, P J P wrote: > Hello Alex, > > On Thursday, 25 February, 2021, 10:00:33 pm IST, Alexander Bulekov > wrote:  > On 210225 1128, Alexander Bulekov wrote: > > On 210225 1931, P J P wrote: > > > +-- On Wed, 24 Feb 2021, Philippe Mathieu-Daudé wrote --+ > > > | On 2/24/21 2:17 PM,

Re: [QEMU-SECURITY] [PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-26 Thread P J P
Hello Alex, On Thursday, 25 February, 2021, 10:00:33 pm IST, Alexander Bulekov wrote:  On 210225 1128, Alexander Bulekov wrote: > On 210225 1931, P J P wrote: > > +-- On Wed, 24 Feb 2021, Philippe Mathieu-Daudé wrote --+ > > | On 2/24/21 2:17 PM, Jason Wang wrote: > > | > On 2021/2/24 6:11 下午,

Re: [PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-25 Thread Alexander Bulekov
On 210225 1128, Alexander Bulekov wrote: > On 210225 1931, P J P wrote: > > +-- On Wed, 24 Feb 2021, Philippe Mathieu-Daudé wrote --+ > > | On 2/24/21 2:17 PM, Jason Wang wrote: > > | > On 2021/2/24 6:11 下午, Philippe Mathieu-Daudé wrote: > > | >> IIUC the guest could trigger an infinite loop and

Re: [PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-25 Thread Alexander Bulekov
On 210225 1931, P J P wrote: > +-- On Wed, 24 Feb 2021, Philippe Mathieu-Daudé wrote --+ > | On 2/24/21 2:17 PM, Jason Wang wrote: > | > On 2021/2/24 6:11 下午, Philippe Mathieu-Daudé wrote: > | >> IIUC the guest could trigger an infinite loop and brick the emulated > | >> device model. Likely

Re: [PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-25 Thread Philippe Mathieu-Daudé
On 2/24/21 6:53 AM, Jason Wang wrote: > Some NIC supports loopback mode and this is done by calling > nc->info->receive() directly which in fact suppresses the effort of > reentrancy check that is done in qemu_net_queue_send(). > > Unfortunately we can use qemu_net_queue_send() here since for

Re: [PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-25 Thread P J P
+-- On Wed, 24 Feb 2021, Philippe Mathieu-Daudé wrote --+ | On 2/24/21 2:17 PM, Jason Wang wrote: | > On 2021/2/24 6:11 下午, Philippe Mathieu-Daudé wrote: | >> IIUC the guest could trigger an infinite loop and brick the emulated | >> device model. Likely exhausting the stack, so either SEGV by

Re: [PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-24 Thread Philippe Mathieu-Daudé
On 2/24/21 2:17 PM, Jason Wang wrote: > > On 2021/2/24 6:11 下午, Philippe Mathieu-Daudé wrote: >> On 2/24/21 6:53 AM, Jason Wang wrote: >>> Some NIC supports loopback mode and this is done by calling >>> nc->info->receive() directly which in fact suppresses the effort of >>> reentrancy check that

Re: [PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-24 Thread Jason Wang
On 2021/2/24 6:11 下午, Philippe Mathieu-Daudé wrote: On 2/24/21 6:53 AM, Jason Wang wrote: Some NIC supports loopback mode and this is done by calling nc->info->receive() directly which in fact suppresses the effort of reentrancy check that is done in qemu_net_queue_send(). Unfortunately we

Re: [PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-24 Thread Philippe Mathieu-Daudé
On 2/24/21 6:53 AM, Jason Wang wrote: > Some NIC supports loopback mode and this is done by calling > nc->info->receive() directly which in fact suppresses the effort of > reentrancy check that is done in qemu_net_queue_send(). > > Unfortunately we can use qemu_net_queue_send() here since for

[PATCH 1/6] net: introduce qemu_receive_packet()

2021-02-23 Thread Jason Wang
Some NIC supports loopback mode and this is done by calling nc->info->receive() directly which in fact suppresses the effort of reentrancy check that is done in qemu_net_queue_send(). Unfortunately we can use qemu_net_queue_send() here since for loop back there's no sender as peer, so this patch