linux_dsm_epyc7002/drivers/infiniband/sw/rdmavt
Mike Marciniszyn 09ce351dff IB/hfi1: Add limit test for RC/UC send via loopback
Fix potential memory corruption and panic in loopback for IB_WR_SEND
variants.

The code blindly assumes the posted length will fit in the fetched rwqe,
which is not a valid assumption.

Fix by adding a limit test, and triggering the appropriate send completion
and putting the QP in an error state.  This mimics the handling for
non-loopback QPs.

Fixes: 1570346153 ("IB/{hfi1, qib, rdmavt}: Move ruc_loopback to rdmavt")
Cc: <stable@vger.kernel.org> #v4.20+
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-01-21 14:20:08 -07:00
..
ah.c RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
ah.h RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
cq.c IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
cq.h IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
Kconfig IB/{hfi1, qib, rdmavt}: Move copy SGE logic into rdmavt 2018-10-03 16:38:28 -06:00
mad.c RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
mad.h IB/rdmavt: Clean up distinction between port number and index 2016-03-10 20:37:31 -05:00
Makefile This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
mcast.c infiniband: fix sw/rdmavt/* kernel-doc notation 2018-01-10 22:00:35 -07:00
mcast.h IB/rdmavt: Fix copyright date 2016-03-10 20:37:27 -05:00
mmap.c infiniband: Fix alignment of mmap cookies to support VIPT caching 2017-03-24 16:50:51 -04:00
mmap.h IB/rdmavt: Remove unnecessary exported functions 2016-03-10 20:38:10 -05:00
mr.c treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
mr.h IB/rdmavt: Add support for ib_map_mr_sg 2016-08-02 16:00:58 -04:00
pd.c IB/hfi1, rdmavt: Update copy_sge to use boolean arguments 2017-02-19 09:18:41 -05:00
pd.h IB/rdmavt: Fix copyright date 2016-03-10 20:37:27 -05:00
qp.c IB/hfi1: Add limit test for RC/UC send via loopback 2019-01-21 14:20:08 -07:00
qp.h IB/{hfi1, qib, rdmavt}: Move copy SGE logic into rdmavt 2018-10-03 16:38:28 -06:00
rc.c IB/hfi1, qib, rdmavt: Move AETH defines to rdma/ib_hdrs.h 2017-02-19 09:18:44 -05:00
srq.c RDMA/providers: Fix return value from create_srq callbacks 2018-07-30 20:29:45 -06:00
srq.h IB/rdmavt: Add srq functionality to rdmavt 2016-03-10 20:37:30 -05:00
trace_cq.h IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
trace_mr.h IB/rdmavt: Compress adjacent SGEs in rvt_lkey_ok() 2017-06-27 16:56:33 -04:00
trace_qp.h IB/rdmavt: Add trace for RNRNAK timer 2018-01-05 13:34:55 -05:00
trace_rc.h IB/rdmavt, IB/hfi1: Fix timer migration regressions 2017-04-05 14:45:09 -04:00
trace_rvt.h IB/rdmavt: Fix trace hierarchy 2016-12-11 15:25:13 -05:00
trace_tx.h IB/{hfi1, qib, rdmavt}: Move send completion logic to rdmavt 2018-10-03 16:38:28 -06:00
trace.c IB/rdmavt: Fix copyright date 2016-03-10 20:37:27 -05:00
trace.h IB/{rdmavt, hfi1, qib}: Remove get_card_name() downcall 2018-01-05 13:34:55 -05:00
vt.c RDMA: Start use ib_device_ops 2018-12-12 07:40:16 -07:00
vt.h IB: remove duplicate header files 2018-03-13 16:46:03 -04:00