linux_dsm_epyc7002/net/rds
Gerd Rausch 787f95b1e3 net/rds: dma_map_sg is entitled to merge entries
[ Upstream commit fb4b1373dcab086d0619c29310f0466a0b2ceb8a ]

Function "dma_map_sg" is entitled to merge adjacent entries
and return a value smaller than what was passed as "nents".

Subsequently "ib_map_mr_sg" needs to work with this value ("sg_dma_len")
rather than the original "nents" parameter ("sg_len").

This old RDS bug was exposed and reliably causes kernel panics
(using RDMA operations "rds-stress -D") on x86_64 starting with:
commit c588072bba6b ("iommu/vt-d: Convert intel iommu driver to the iommu ops")

Simply put: Linux 5.11 and later.

Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Link: https://lore.kernel.org/r/60efc69f-1f35-529d-a7ef-da0549cad143@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 19:00:50 +02:00
..
af_rds.c net: pass a sockptr_t into ->setsockopt 2020-07-24 15:41:54 -07:00
bind.c net/rds: Check laddr_check before calling it 2019-09-27 12:10:55 +02:00
cong.c net: rds: delete duplicated words 2020-09-18 14:12:43 -07:00
connection.c RDS tcp loopback connection can hang 2021-06-16 12:01:36 +02:00
ib_cm.c RDMA: Add rdma_connect_locked() 2020-10-28 09:14:49 -03:00
ib_frmr.c net/rds: dma_map_sg is entitled to merge entries 2024-07-05 19:00:50 +02:00
ib_mr.h RDMA/rds: Remove FMR support for memory registration 2020-06-02 20:32:53 -03:00
ib_rdma.c RDMA/rds: Remove FMR support for memory registration 2020-06-02 20:32:53 -03:00
ib_recv.c net/rds: suppress page allocation failure error in recv buffer refill 2020-10-09 12:32:03 -07:00
ib_ring.c
ib_send.c net/rds: Handle ODP mr registration/unregistration 2020-01-18 11:48:19 +02:00
ib_stats.c net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' 2019-09-15 20:56:19 +02:00
ib_sysctl.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00
ib.c RDMA: Remove 'max_fmr' 2020-06-02 20:32:54 -03:00
ib.h RDMA: Lift ibdev_to_node from rds to common code 2021-02-26 10:12:59 +01:00
info.c rds: fix crash in rds_info_getsockopt() 2020-05-20 14:08:06 -07:00
info.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
loop.c rds: Changing IP address internal representation to struct in6_addr 2018-07-23 21:17:44 -07:00
loop.h rds: clean up loopback rds_connections on netns deletion 2018-06-27 10:11:03 +09:00
Makefile RDMA/rds: Remove FMR support for memory registration 2020-06-02 20:32:53 -03:00
message.c net/rds: Fix a use after free in rds_message_map_pages 2021-04-14 08:42:09 +02:00
page.c rds: remove dead code 2016-12-26 21:35:39 -05:00
rdma_transport.c net: rds: add service level support in rds-info 2019-08-24 16:55:25 -07:00
rdma_transport.h net: rds: rdma_transport.h: delete duplicated word 2020-07-19 18:14:51 -07:00
rdma.c net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS 2021-02-17 11:02:30 +01:00
rds_single_path.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rds.h net: pass a sockptr_t into ->setsockopt 2020-07-24 15:41:54 -07:00
recv.c net: rds: fix memory leak in rds_recvmsg 2021-06-23 14:42:42 +02:00
send.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
stats.c rds: check for excessive looping in rds_send_xmit 2019-08-15 12:04:24 -07:00
sysctl.c net: rds: fix coding style issues 2016-06-18 21:34:09 -07:00
tcp_connect.c net: add sock_no_linger 2020-05-28 11:11:44 -07:00
tcp_listen.c RDS tcp loopback connection can hang 2021-06-16 12:01:36 +02:00
tcp_recv.c rds: Changing IP address internal representation to struct in6_addr 2018-07-23 21:17:44 -07:00
tcp_send.c tcp: add tcp_sock_set_cork 2020-05-28 11:11:45 -07:00
tcp_stats.c net: rds: fix const array syntax 2011-07-01 16:16:19 -07:00
tcp.c RDS tcp loopback connection can hang 2021-06-16 12:01:36 +02:00
tcp.h RDS tcp loopback connection can hang 2021-06-16 12:01:36 +02:00
threads.c rds: make v3.1 as compat version 2019-02-04 14:59:11 -08:00
transport.c rds: transport module should be auto loaded when transport is set 2020-06-25 16:26:25 -07:00