qed: Make PF more robust against malicious VF
authorYuval Mintz <Yuval.Mintz@qlogic.com>
Sun, 5 Jun 2016 10:11:13 +0000 (13:11 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jun 2016 22:40:11 +0000 (15:40 -0700)
commit41086467d6647e66325f4c95eab84faa307f81ee
tree031c2728aa1ba16c0d473982471b8271e8d8884b
parent1cf2b1a971d29d4435a5c462b91d4a22325ec07d
qed: Make PF more robust against malicious VF

There are several requests the VF can make toward the PF which the driver
would pass to firmware without checking the validity first - specifically,
opening queues and updating vports. Such configurations might cause the
firmware to assert.

This adds validation of the legality of said configurations on the PF side
before passing it onward via ramrod to firmware.

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