linux-stable/drivers/infiniband/hw/hfi1
Mitko Haralanov 08fe16f619 IB/hfi1: Improve J_KEY generation
Previously, J_KEY generation was based on the lower 16 bits
of the user's UID. While this works, it was not good enough
as a non-root user could collide with a root user given a
sufficiently large UID.

This patch attempt to improve the J_KEY generation by using
the following algorithm:

The 16 bit J_KEY space is partitioned into 3 separate spaces
reserved for different user classes:
   * all users with administtor privileges (including 'root')
     will use J_KEYs in the range of 0 to 31,
   * all kernel protocols, which use KDETH packets will use
     J_KEYs in the range of 32 to 63, and
   * all other users will use J_KEYs in the range of 64 to
     65535.

The above separation is aimed at preventing different user levels
from sending packets to each other and, additionally, separate
kernel protocols from all other types of users. The later is meant
to prevent the potential corruption of kernel memory by any other
type of user.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-08-22 15:00:42 -04:00
..
affinity.c IB/hfi1: Remove duplicated include from affinity.c 2016-08-22 14:27:14 -04:00
affinity.h IB/hfi1: Add sysfs entry to override SDMA interrupt affinity 2016-08-02 16:00:58 -04:00
aspm.h
chip.c IB/hfi1: Use the same capability state for all shared contexts 2016-08-02 22:46:21 -04:00
chip.h IB/hfi1: Use the same capability state for all shared contexts 2016-08-02 22:46:21 -04:00
chip_registers.h IB/hfi1: Read all firmware versions 2016-08-02 16:00:58 -04:00
common.h
debugfs.c IB/hfi1,IB/qib: Fix qp_stats sleep with rcu read lock held 2016-08-22 14:31:34 -04:00
debugfs.h
device.c
device.h
dma.c
driver.c IB/hfi1: Validate header in set_armed_active 2016-08-22 14:31:42 -04:00
efivar.c
efivar.h
eprom.c
eprom.h
file_ops.c IB/hfi1: Add missing error code assignment before test 2016-08-22 14:31:43 -04:00
firmware.c IB/hfi1: Read all firmware versions 2016-08-02 16:00:58 -04:00
hfi.h IB/hfi1: Improve J_KEY generation 2016-08-22 15:00:42 -04:00
init.c IB/hfi1: Using kfree_rcu() to simplify the code 2016-08-22 14:31:42 -04:00
intr.c
iowait.h
Kconfig Second round of merge items for 4.8 2016-08-04 20:26:31 -04:00
mad.c IB/hfi1: Return invalid field for non-QSFP CableInfo queries 2016-08-22 15:00:42 -04:00
mad.h IB/hfi1: Clean up port state structure definition 2016-08-02 12:00:54 -04:00
Makefile IB/hfi1: Remove TWSI references 2016-08-02 15:47:42 -04:00
mmu_rb.c IB/hfi1: Add cache evict LRU list 2016-08-02 22:46:21 -04:00
mmu_rb.h IB/hfi1: Remove unneeded mm argument in remove function 2016-08-02 22:46:21 -04:00
opa_compat.h
pcie.c IB/hfi1: Add static PCIe Gen3 CTLE tuning 2016-08-02 16:00:58 -04:00
pio.c IB/hfi1: Handle kzalloc failure in init_pervl_scs 2016-08-02 22:46:21 -04:00
pio.h
pio_copy.c
platform.c IB/hfi1: Reset QSFP on every run through channel tuning 2016-08-02 16:00:58 -04:00
platform.h
qp.c IB/hfi1,IB/qib: Fix qp_stats sleep with rcu read lock held 2016-08-22 14:31:34 -04:00
qp.h IB/hfi1: Rename struct ahg_ib_header to struct hfi1_ahg_info 2016-08-02 16:00:58 -04:00
qsfp.c IB/hfi1: Fetch monitor values on-demand for CableInfo query 2016-08-22 14:31:41 -04:00
qsfp.h IB/hfi1: Fetch monitor values on-demand for CableInfo query 2016-08-22 14:31:41 -04:00
rc.c IB/rdmavt, hfi1: Fix NFSoRDMA failure with FRMR enabled 2016-08-02 16:00:58 -04:00
ruc.c IB/hfi1: Rename hfi1_pio_header to hfi1_sdma_header. 2016-08-02 16:00:58 -04:00
sdma.c
sdma.h
sdma_txreq.h
sysfs.c IB/hfi1: Add sysfs entry to override SDMA interrupt affinity 2016-08-02 16:00:58 -04:00
trace.c IB/hfi1: Suppress sparse warnings 2016-06-06 19:37:23 -04:00
trace.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_ctxts.h IB/hfi1: Fix trace sparse errors 2016-08-02 12:00:54 -04:00
trace_dbg.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_ibhdrs.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_misc.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_rc.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_rx.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_tx.h IB/hfi1: Fix trace sparse errors 2016-08-02 12:00:54 -04:00
uc.c IB/rdmavt, hfi1: Fix NFSoRDMA failure with FRMR enabled 2016-08-02 16:00:58 -04:00
ud.c IB/qib, IB/hfi1: Fix grh creation in ud loopback 2016-08-02 16:00:58 -04:00
user_exp_rcv.c IB/hfi1: Fix memory leak during unexpected shutdown 2016-08-02 22:46:21 -04:00
user_exp_rcv.h
user_pages.c IB/hfi1: Make use of mm consistent 2016-08-02 22:46:21 -04:00
user_sdma.c IB/hfi1: Remove unneeded mm argument in remove function 2016-08-02 22:46:21 -04:00
user_sdma.h IB/hfi1: Use evict mmu rb operation 2016-08-02 22:46:21 -04:00
verbs.c Second round of merge items for 4.8 2016-08-04 20:26:31 -04:00
verbs.h IB/hfi1: Rename hfi1_pio_header to hfi1_sdma_header. 2016-08-02 16:00:58 -04:00
verbs_txreq.c IB/hfi1: Fix deadlock with txreq allocation slow path 2016-06-23 10:16:15 -04:00
verbs_txreq.h IB/hfi1: Rename hfi1_pio_header to hfi1_sdma_header. 2016-08-02 16:00:58 -04:00