]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Check P_KEY for all sent packets from user mode
authorSebastian Sanchez <sebastian.sanchez@intel.com>
Tue, 12 Apr 2016 18:22:21 +0000 (11:22 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 28 Apr 2016 20:32:27 +0000 (16:32 -0400)
commit3d5841bcb683222090a761f3706096ba6e07d5d6
tree8d0b28f3d63f0fe5be61b80f5c21c662a16fc252
parent03b03c75ab2374fc73d4801ed486e3dc1af6360d
IB/hfi1: Check P_KEY for all sent packets from user mode

Add the P_KEY check for user-context mechanism for
both PIO and SDMA. For PIO, the
SendCtxtCheckEnable.DisallowKDETHPackets is set by
default. When the P_KEY is set,
SendCtxtCheckEnable.DisallowKDETHPackets is cleared.
For SDMA, a software check was included. This change
requires user processes to set the P_KEY before sending
any packets, otherwise, the sent packet will fail. The
original submission didn't have this check but it's
required.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Mikto Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/chip.c
drivers/staging/rdma/hfi1/hfi.h
drivers/staging/rdma/hfi1/user_sdma.c
drivers/staging/rdma/hfi1/verbs.c