[Intel-wired-lan] [PATCH S25 10/12] ice: add validation in OP_CONFIG_VSI_QUEUES VF message

Bowers, AndrewX andrewx.bowers at intel.com
Wed Jul 31 18:14:07 UTC 2019


> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Tony Nguyen
> Sent: Thursday, July 25, 2019 2:54 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S25 10/12] ice: add validation in
> OP_CONFIG_VSI_QUEUES VF message
> 
> From: Michal Swiatkowski <michal.swiatkowski at intel.com>
> 
> Check num_queue_pairs to avoid access to unallocated field of
> vsi->tx_rings/vsi->rx_rings. Without this validation we can set
> vsi->alloc_txq/vsi->alloc_rxq to value smaller than
> vsi->ICE_MAX_BASE_QS_PER_VF
> and send this command with num_queue_pairs greater than
> vsi->alloc_txq/vsi->alloc_rxq. This lead to access to unallocated memory.
> 
> In VF vsi alloc_txq and alloc_rxq should be the same. Get minimum because
> looks more readable.
> 
> Also add validation for ring_len param. It should be greater than 32 and be
> multiple of 32. Incorrect value leads to hang traffic on PF.
> 
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski at intel.com>
> ---
>  .../net/ethernet/intel/ice/ice_virtchnl_pf.c  | 31 ++++++++++++++-----
>  1 file changed, 24 insertions(+), 7 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers at intel.com>




More information about the Intel-wired-lan mailing list