OpenCloudOS-Kernel/drivers/infiniband/hw/cxgb4
Greg KH 3840c5b788 RDMA/cxgb4: Do not dma memory off of the stack
Nicolas pointed out that the cxgb4 driver is doing dma off of the stack,
which is generally considered a very bad thing.  On some architectures it
could be a security problem, but odds are none of them actually run this
driver, so it's just a "normal" bug.

Resolve this by allocating the memory for a message off of the heap
instead of the stack.  kmalloc() always will give us a proper memory
location that DMA will work correctly from.

Link: https://lore.kernel.org/r/20191001165611.GA3542072@kroah.com
Reported-by: Nicolas Waisman <nico@semmle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Potnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-10-04 15:13:27 -03:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cm.c 5.3 Merge window RDMA pull request 2019-07-15 20:38:15 -07:00
cq.c IB: Remove unneeded memset 2019-07-03 14:26:49 -03:00
device.c RDMA/iw_cxgb4: fix SRQ access from dump_qp() 2019-10-01 11:48:10 -03:00
ev.c cxgb4: Convert qpidr to XArray 2019-03-25 15:39:18 -03:00
id_table.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
iw_cxgb4.h RDMA: Convert CQ allocations to be under core responsibility 2019-06-11 16:39:49 -04:00
mem.c RDMA/cxgb4: Do not dma memory off of the stack 2019-10-04 15:13:27 -03:00
provider.c RDMA/{cxgb3, cxgb4, i40iw}: Remove common code 2019-08-12 10:19:43 -04:00
qp.c RDMA/iw_cxgb4: fix SRQ access from dump_qp() 2019-10-01 11:48:10 -03:00
resource.c RDMA/cxgb4: Use sizeof() notation 2019-05-27 14:32:17 -03:00
restrack.c netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
t4.h iw_cxgb4: complete the cached SRQ buffers 2019-02-08 17:02:05 -07:00
t4fw_ri_api.h iw_cxgb4: Support FW write completion WR 2018-08-02 20:16:02 -06:00