]> asedeno.scripts.mit.edu Git - linux.git/commit
qed: Handle malicious VFs events
authorYuval Mintz <Yuval.Mintz@caviumnetworks.com>
Fri, 14 Oct 2016 09:19:22 +0000 (05:19 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Oct 2016 15:59:59 +0000 (11:59 -0400)
commit7eff82b0fc26937d23e59d3de8a1930b25d4738c
treebf9e495b6a89ecbb21914d8eb1795ac7aa8ecab2
parentc59f5291fd63f9892c8f1d4b94247aeea92305c5
qed: Handle malicious VFs events

Malicious VFs might be caught in several different methods:
  - Misusing their bar permission and being blocked by hardware.
  - Misusing their fastpath logic and being blocked by firmware.
  - Misusing their interaction with their PF via hw-channel,
    and being blocked by PF driver.

On the first two items, firmware would indicate to driver that
the VF is to be considered malicious, but would sometime still
allow the VF to communicate with the PF [depending on the exact
nature of the malicious activity done by the VF].
The current existing logic on the PF side lacks handling of such events,
and might allow the PF to perform some incorrect configuration on behalf
of a VF that was previously indicated as malicious.

The new scheme is simple -
Once the PF determines a VF is malicious it would:
 a. Ignore any further requests on behalf of the VF-driver.
 b. Prevent any configurations initiated by the hyperuser for
    the malicious VF, as firmware isn't willing to serve such.

The malicious indication would be cleared upon the VF flr,
after which it would become usable once again.

Signed-off-by: Yuval Mintz <Yuval.Mintz@caviumnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_sriov.c
drivers/net/ethernet/qlogic/qed/qed_sriov.h
drivers/net/ethernet/qlogic/qed/qed_vf.h