]> git.baikalelectronics.ru Git - kernel.git/commit
i40e/i40evf: don't trust VF to reset itself
authorAlan Brady <alan.brady@intel.com>
Wed, 11 Oct 2017 21:49:43 +0000 (14:49 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 13 Oct 2017 21:27:13 +0000 (14:27 -0700)
commit1de72d6070f45e6842a31ea907bf5e0b21295566
tree0ff591f465bceac88b9a28bc499253ea0d70189e
parent1dfd48d5fecf05d730892da2bb45b55faa1ecc65
i40e/i40evf: don't trust VF to reset itself

When using 'ethtool -L' on a VF to change number of requested queues
from PF, we shouldn't trust the VF to reset itself after making the
request.  Doing it that way opens the door for a potentially malicious
VF to do nasty things to the PF which should never be the case.

This makes it such that after VF makes a successful request, PF will
then reset the VF to institute required changes.  Only if the request
fails will PF send a message back to VF letting it know the request was
unsuccessful.

Testing-hints:
There should be no real functional changes.  This is simply hardening
against a potentially malicious VF.

Signed-off-by: Alan Brady <alan.brady@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
include/linux/avf/virtchnl.h