mbox series

[0/3] fix miss input validation

Message ID 1616830688-65506-1-git-send-email-humin29@huawei.com (mailing list archive)
Headers
Series fix miss input validation |

Message

humin (Q) March 27, 2021, 7:38 a.m. UTC
  The validity verification of input parameters should be performed at
API layer, not in the PMD.

This set of patches fix miss input validation.

Chengchang Tang (3):
  ethdev: fix miss input validation in module EEPROM dump API
  ethdev: fix miss input validation when access reg info
  ethdev: fix miss input validation when access EEPROM info

 drivers/net/e1000/igb_ethdev.c          |  3 ---
 drivers/net/hns3/hns3_regs.c            |  5 -----
 drivers/net/i40e/i40e_ethdev.c          |  3 ---
 drivers/net/ixgbe/ixgbe_ethdev.c        |  3 ---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c |  4 ++--
 drivers/net/octeontx2/otx2_ethdev_ops.c |  3 +--
 lib/librte_ethdev/rte_ethdev.c          | 10 ++++++++++
 lib/librte_ethdev/rte_ethdev.h          |  5 +++++
 8 files changed, 18 insertions(+), 18 deletions(-)
  

Comments

Ferruh Yigit April 1, 2021, 3:37 p.m. UTC | #1
On 3/27/2021 7:38 AM, Min Hu (Connor) wrote:
> The validity verification of input parameters should be performed at
> API layer, not in the PMD.
> 
> This set of patches fix miss input validation.
> 
> Chengchang Tang (3):
>    ethdev: fix miss input validation in module EEPROM dump API
>    ethdev: fix miss input validation when access reg info
>    ethdev: fix miss input validation when access EEPROM info
> 

The function updated in ethdev header file, and the ethdev .c file seems mixes 
within the patches [1], can you please send a new version to fix it, you can 
keep the acks to this version.

[1]
1/3:
* in .h: 'rte_eth_dev_get_module_info()', 'rte_eth_dev_set_eeprom()'
* in .c: 'rte_eth_dev_get_module_info()', 'rte_eth_dev_get_module_eeprom()'

3/3:
* in .h: 'rte_eth_dev_get_eeprom()', 'rte_eth_dev_get_module_eeprom()'
* in .c: 'rte_eth_dev_get_eeprom()', 'rte_eth_dev_set_eeprom()'
  
humin (Q) April 2, 2021, 2:59 a.m. UTC | #2
在 2021/4/1 23:37, Ferruh Yigit 写道:
> On 3/27/2021 7:38 AM, Min Hu (Connor) wrote:
>> The validity verification of input parameters should be performed at
>> API layer, not in the PMD.
>>
>> This set of patches fix miss input validation.
>>
>> Chengchang Tang (3):
>>    ethdev: fix miss input validation in module EEPROM dump API
>>    ethdev: fix miss input validation when access reg info
>>    ethdev: fix miss input validation when access EEPROM info
>>
> 
> The function updated in ethdev header file, and the ethdev .c file seems 
> mixes within the patches [1], can you please send a new version to fix 
> it, you can keep the acks to this version.
> 
> [1]
> 1/3:
> * in .h: 'rte_eth_dev_get_module_info()', 'rte_eth_dev_set_eeprom()'
> * in .c: 'rte_eth_dev_get_module_info()', 'rte_eth_dev_get_module_eeprom()'
> 
> 3/3:
> * in .h: 'rte_eth_dev_get_eeprom()', 'rte_eth_dev_get_module_eeprom()'
> * in .c: 'rte_eth_dev_get_eeprom()', 'rte_eth_dev_set_eeprom()'
> .
Thanks Ferruh,
   Fixed done in v2.