]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Enable DEVX on IB
authorYishai Hadas <yishaih@mellanox.com>
Thu, 20 Sep 2018 18:45:21 +0000 (21:45 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 27 Sep 2018 19:01:33 +0000 (13:01 -0600)
commitd41299d86d9c3edb95c63baa9b3142d614b084c6
tree37562fb5fa578afa25fe922594035f47fa64bc5d
parent9e876a0d15ac962b02986bbf2d577659a814adc2
IB/mlx5: Enable DEVX on IB

IB has additional protections with SELinux that cannot be extended to the
DEVX domain. SELinux can restrict access to pkeys. The first version of
DEVX blocked IB entirely until this could be understood.

Since DEVX requires CAP_NET_RAW, it supersedes the SELinux restriction and
allows userspace to form arbitrary packets with arbitrary pkeys.

Thus we enable IB for DEVX when CAP_NET_RAW is given.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c