Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-22 Thread Alexander Bulekov
Also reported here in May: https://bugs.launchpad.net/qemu/+bug/1878067 -Alex On 201020 1930, P J P wrote: > From: Prasad J Pandit > > eth_get_gso_type() routine returns segmentation offload type based on > L3 protocol type. It calls g_assert_not_reached if L3 protocol is > unknown, making the

Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-21 Thread Peter Maydell
On Wed, 21 Oct 2020 at 07:29, Philippe Mathieu-Daudé wrote: > During the last 2 years I've been sending patches touching > various QEMU areas, but I never used qemu_log(). I always > used: > - qemu_log_mask(LOG_GUEST_ERROR/LOG_UNIMP, ... > - error_report/warn_report from "qemu/error-report.h" > -

Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-21 Thread P J P
+-- On Wed, 21 Oct 2020, Philippe Mathieu-Daudé wrote --+ | $ git grep qemu_log\( | wc -l | 661 | | This function seems used mostly by very old code. | It is declared in "qemu/log-for-trace.h" which looks like an internal API. | | Should we add a checkpatch rule to refuse new uses of qemu_log()?

Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-21 Thread Philippe Mathieu-Daudé
Hi Peter, Stefan, On 10/20/20 5:05 PM, Peter Maydell wrote: On Tue, 20 Oct 2020 at 15:05, P J P wrote: From: Prasad J Pandit eth_get_gso_type() routine returns segmentation offload type based on L3 protocol type. It calls g_assert_not_reached if L3 protocol is unknown, making the following

Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-21 Thread P J P
+-- On Tue, 20 Oct 2020, Peter Maydell wrote --+ | If the guest must have done something wrong to get us here: | use LOG_GUEST_ERROR +-- On Tue, 20 Oct 2020, Philippe Mathieu-Daudé wrote --+ | Not sure why you choose decimal, the usual format is "0x%04"PRIx16. Sent patch v3 with above updates.

Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-20 Thread Peter Maydell
On Tue, 20 Oct 2020 at 15:05, P J P wrote: > > From: Prasad J Pandit > > eth_get_gso_type() routine returns segmentation offload type based on > L3 protocol type. It calls g_assert_not_reached if L3 protocol is > unknown, making the following return statement unreachable. Remove the > g_assert

Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-20 Thread Philippe Mathieu-Daudé
On 10/20/20 4:00 PM, P J P wrote: From: Prasad J Pandit eth_get_gso_type() routine returns segmentation offload type based on L3 protocol type. It calls g_assert_not_reached if L3 protocol is unknown, making the following return statement unreachable. Remove the g_assert call, as it maybe

[PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-20 Thread P J P
From: Prasad J Pandit eth_get_gso_type() routine returns segmentation offload type based on L3 protocol type. It calls g_assert_not_reached if L3 protocol is unknown, making the following return statement unreachable. Remove the g_assert call, as it maybe triggered by a guest user. Reported-by: