This series allows for CONFIG_INFINIBAND without
CONFIG_INFINIBAND_ADDR_TRANS (aka RDMA communication manager).
Fuzzing has been finding fair number of CM bugs.
So provide an option to disable it in systems which don't need it.
Changes since last posting (https://lkml.org/lkml/2018/4/25/1266):
- added ("ib_srp: depend on INFINIBAND_ADDR_TRANS") patch
This series passed the 0-day builder.
I perfomed manual static analysis of this series based on next-20180424,
looking for dependencies.
$ git grep -w CONFIG_INFINIBAND_ADDR_TRANS
drivers/infiniband/core/Makefile:infiniband-$(CONFIG_INFINIBAND_ADDR_TRANS) := rdma_cm.o
drivers/infiniband/core/Makefile:user_access-$(CONFIG_INFINIBAND_ADDR_TRANS) := rdma_ucm.o
$ grep -w -e rdma_cm -e rdma_ucm drivers/infiniband/core/Makefile
infiniband-$(CONFIG_INFINIBAND_ADDR_TRANS) := rdma_cm.o
user_access-$(CONFIG_INFINIBAND_ADDR_TRANS) := rdma_ucm.o
rdma_cm-y := cma.o
rdma_cm-$(CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS) += cma_configfs.o
rdma_ucm-y := ucma.o
$ grep EXPORT drivers/infiniband/core/{cma,ucma}.c
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_event_msg);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_reject_msg);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_is_consumer_reject);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_consumer_reject_data);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(__rdma_create_id);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_create_qp);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_destroy_qp);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_init_qp_attr);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_destroy_id);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_get_service_id);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_read_gids);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_set_service_type);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_set_ib_path);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_resolve_route);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_resolve_addr);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_set_reuseaddr);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_set_afonly);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_listen);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_bind_addr);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_connect);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(__rdma_accept);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_notify);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_reject);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_disconnect);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_join_multicast);
drivers/infiniband/core/cma.c:EXPORT_SYMBOL(rdma_leave_multicast);
$ git grep -lw \
-e __rdma_accept \
-e __rdma_create_id \
-e rdma_bind_addr \
-e rdma_connect \
-e rdma_consumer_reject_data \
-e rdma_create_qp \
-e rdma_destroy_id \
-e rdma_destroy_qp \
-e rdma_disconnect \
-e rdma_event_msg \
-e rdma_get_service_id \
-e rdma_init_qp_attr \
-e rdma_is_consumer_reject \
-e rdma_join_multicast \
-e rdma_leave_multicast \
-e rdma_listen \
-e rdma_notify \
-e rdma_read_gids \
-e rdma_reject \
-e rdma_reject_msg \
-e rdma_resolve_addr \
-e rdma_resolve_route \
-e rdma_set_afonly \
-e rdma_set_ib_path \
-e rdma_set_reuseaddr \
-e rdma_set_service_type
drivers/infiniband/core/cma.c
drivers/infiniband/core/ucma.c
drivers/infiniband/hw/qedr/verbs.c
drivers/infiniband/ulp/iser/iser_verbs.c
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/net/ethernet/qlogic/qed/qed_rdma.c
drivers/nvme/host/rdma.c
drivers/nvme/target/rdma.c
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
fs/cifs/smbdirect.c
include/linux/qed/qed_rdma_if.h
include/rdma/rdma_cm.h
include/rdma/rdma_cm_ib.h
net/9p/trans_rdma.c
net/rds/ib.c
net/rds/ib_cm.c
net/rds/rdma_transport.c
net/sunrpc/xprtrdma/svc_rdma_transport.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/verbs.c
# analysis of each file:
drivers/infiniband/hw/qedr/verbs.c
drivers/net/ethernet/qlogic/qed/qed_rdma.c
include/linux/qed/qed_rdma_if.h
- not a direct function call
include/rdma/rdma_cm.h
include/rdma/rdma_cm_ib.h
- just prototypes
drivers/infiniband/core/cma.c
drivers/infiniband/core/ucma.c
- depends on INFINIBAND_ADDR_TRANS
drivers/infiniband/ulp/iser/iser_verbs.c
- depends on INFINIBAND_ISER => INFINIBAND_ADDR_TRANS
drivers/infiniband/ulp/isert/ib_isert.c
- depends on INFINIBAND_ISERT => INFINIBAND_ADDR_TRANS
drivers/infiniband/ulp/srp/ib_srp.c
- depends on INFINIBAND_SRP => INFINIBAND_ADDR_TRANS
per this series' "ib_srp: depend on INFINIBAND_ADDR_TRANS"
drivers/infiniband/ulp/srpt/ib_srpt.c
- depends on INFINIBAND_SRPT => INFINIBAND_ADDR_TRANS
per this series' "ib_srpt: depend on INFINIBAND_ADDR_TRANS"
drivers/nvme/host/rdma.c
- depends on NVME_RDMA => INFINIBAND_ADDR_TRANS
per this series' "nvme: depend on INFINIBAND_ADDR_TRANS"
drivers/nvme/target/rdma.c
- depends on NVME_TARGET_RDMA => INFINIBAND_ADDR_TRANS
per this series' "nvmet-rdma: depend on INFINIBAND_ADDR_TRANS"
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
- depends on LNET_XPRT_IB => INFINIBAND_ADDR_TRANS
fs/cifs/smbdirect.c
- depends on CIFS_SMB_DIRECT => INFINIBAND_ADDR_TRANS
per this series' "cifs: smbd: depend on INFINIBAND_ADDR_TRANS"
net/9p/trans_rdma.c
- depends on NET_9P_RDMA => INFINIBAND_ADDR_TRANS
net/rds/ib.c
net/rds/ib_cm.c
net/rds/rdma_transport.c
- depends on RDS_RDMA => INFINIBAND_ADDR_TRANS
net/sunrpc/xprtrdma/svc_rdma_transport.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/verbs.c
- depends on SUNRPC_XPRT_RDMA => INFINIBAND_ADDR_TRANS
Greg Thelen (6):
nvme: depend on INFINIBAND_ADDR_TRANS
nvmet-rdma: depend on INFINIBAND_ADDR_TRANS
ib_srpt: depend on INFINIBAND_ADDR_TRANS
cifs: smbd: depend on INFINIBAND_ADDR_TRANS
ib_srp: depend on INFINIBAND_ADDR_TRANS
IB: make INFINIBAND_ADDR_TRANS configurable
drivers/infiniband/Kconfig | 5 ++++-
drivers/infiniband/ulp/srp/Kconfig | 2 +-
drivers/infiniband/ulp/srpt/Kconfig | 2 +-
drivers/nvme/host/Kconfig | 2 +-
drivers/nvme/target/Kconfig | 2 +-
fs/cifs/Kconfig | 2 +-
6 files changed, 9 insertions(+), 6 deletions(-)
--
2.17.0.484.g0c8726318c-goog
NVME_RDMA code depends on INFINIBAND_ADDR_TRANS provided symbols. So
declare the kconfig dependency. This is necessary to allow for enabling
INFINIBAND without INFINIBAND_ADDR_TRANS.
Signed-off-by: Greg Thelen <[email protected]>
Cc: Tarick Bedeir <[email protected]>
---
drivers/nvme/host/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig
index b979cf3bce65..88a8b5916624 100644
--- a/drivers/nvme/host/Kconfig
+++ b/drivers/nvme/host/Kconfig
@@ -27,7 +27,7 @@ config NVME_FABRICS
config NVME_RDMA
tristate "NVM Express over Fabrics RDMA host driver"
- depends on INFINIBAND && BLOCK
+ depends on INFINIBAND && INFINIBAND_ADDR_TRANS && BLOCK
select NVME_CORE
select NVME_FABRICS
select SG_POOL
--
2.17.0.484.g0c8726318c-goog
NVME_TARGET_RDMA code depends on INFINIBAND_ADDR_TRANS provided symbols.
So declare the kconfig dependency. This is necessary to allow for
enabling INFINIBAND without INFINIBAND_ADDR_TRANS.
Signed-off-by: Greg Thelen <[email protected]>
Cc: Tarick Bedeir <[email protected]>
---
drivers/nvme/target/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/Kconfig b/drivers/nvme/target/Kconfig
index 5f4f8b16685f..3c7b61ddb0d1 100644
--- a/drivers/nvme/target/Kconfig
+++ b/drivers/nvme/target/Kconfig
@@ -27,7 +27,7 @@ config NVME_TARGET_LOOP
config NVME_TARGET_RDMA
tristate "NVMe over Fabrics RDMA target support"
- depends on INFINIBAND
+ depends on INFINIBAND && INFINIBAND_ADDR_TRANS
depends on NVME_TARGET
select SGL_ALLOC
help
--
2.17.0.484.g0c8726318c-goog
CIFS_SMB_DIRECT code depends on INFINIBAND_ADDR_TRANS provided symbols.
So declare the kconfig dependency. This is necessary to allow for
enabling INFINIBAND without INFINIBAND_ADDR_TRANS.
Signed-off-by: Greg Thelen <[email protected]>
Cc: Tarick Bedeir <[email protected]>
Reviewed-by: Long Li <[email protected]>
---
fs/cifs/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
index 741749a98614..5f132d59dfc2 100644
--- a/fs/cifs/Kconfig
+++ b/fs/cifs/Kconfig
@@ -197,7 +197,7 @@ config CIFS_SMB311
config CIFS_SMB_DIRECT
bool "SMB Direct support (Experimental)"
- depends on CIFS=m && INFINIBAND || CIFS=y && INFINIBAND=y
+ depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
help
Enables SMB Direct experimental support for SMB 3.0, 3.02 and 3.1.1.
SMB Direct allows transferring SMB packets over RDMA. If unsure,
--
2.17.0.484.g0c8726318c-goog
INFINIBAND_SRPT code depends on INFINIBAND_ADDR_TRANS provided symbols.
So declare the kconfig dependency. This is necessary to allow for
enabling INFINIBAND without INFINIBAND_ADDR_TRANS.
Signed-off-by: Greg Thelen <[email protected]>
Cc: Tarick Bedeir <[email protected]>
---
drivers/infiniband/ulp/srpt/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/srpt/Kconfig b/drivers/infiniband/ulp/srpt/Kconfig
index 31ee83d528d9..fb8b7182f05e 100644
--- a/drivers/infiniband/ulp/srpt/Kconfig
+++ b/drivers/infiniband/ulp/srpt/Kconfig
@@ -1,6 +1,6 @@
config INFINIBAND_SRPT
tristate "InfiniBand SCSI RDMA Protocol target support"
- depends on INFINIBAND && TARGET_CORE
+ depends on INFINIBAND && INFINIBAND_ADDR_TRANS && TARGET_CORE
---help---
Support for the SCSI RDMA Protocol (SRP) Target driver. The
--
2.17.0.484.g0c8726318c-goog
INFINIBAND_SRP code depends on INFINIBAND_ADDR_TRANS provided symbols.
So declare the kconfig dependency. This is necessary to allow for
enabling INFINIBAND without INFINIBAND_ADDR_TRANS.
Signed-off-by: Greg Thelen <[email protected]>
Cc: Tarick Bedeir <[email protected]>
---
drivers/infiniband/ulp/srp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/srp/Kconfig b/drivers/infiniband/ulp/srp/Kconfig
index c74ee9633041..99db8fe5173a 100644
--- a/drivers/infiniband/ulp/srp/Kconfig
+++ b/drivers/infiniband/ulp/srp/Kconfig
@@ -1,6 +1,6 @@
config INFINIBAND_SRP
tristate "InfiniBand SCSI RDMA Protocol"
- depends on SCSI
+ depends on SCSI && INFINIBAND_ADDR_TRANS
select SCSI_SRP_ATTRS
---help---
Support for the SCSI RDMA Protocol over InfiniBand. This
--
2.17.0.484.g0c8726318c-goog
Allow INFINIBAND without INFINIBAND_ADDR_TRANS because fuzzing has been
finding fair number of CM bugs. So provide option to disable it.
Signed-off-by: Greg Thelen <[email protected]>
Cc: Tarick Bedeir <[email protected]>
---
drivers/infiniband/Kconfig | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index ee270e065ba9..2a972ed6851b 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -61,9 +61,12 @@ config INFINIBAND_ON_DEMAND_PAGING
pages on demand instead.
config INFINIBAND_ADDR_TRANS
- bool
+ bool "RDMA/CM"
depends on INFINIBAND
default y
+ ---help---
+ Support for RDMA communication manager (CM).
+ This allows for a generic connection abstraction over RDMA.
config INFINIBAND_ADDR_TRANS_CONFIGFS
bool
--
2.17.0.484.g0c8726318c-goog
On Thu, 2018-04-26 at 11:19 -0700, Greg Thelen wrote:
> INFINIBAND_SRP code depends on INFINIBAND_ADDR_TRANS provided symbols.
> So declare the kconfig dependency. This is necessary to allow for
> enabling INFINIBAND without INFINIBAND_ADDR_TRANS.
Reviewed-by: Bart Van Assche <[email protected]>
On Thu, 2018-04-26 at 11:19 -0700, Greg Thelen wrote:
> Allow INFINIBAND without INFINIBAND_ADDR_TRANS because fuzzing has been
> finding fair number of CM bugs. So provide option to disable it.
Reviewed-by: Bart Van Assche <[email protected]>
On Thu, 2018-04-26 at 11:19 -0700, Greg Thelen wrote:
> INFINIBAND_SRPT code depends on INFINIBAND_ADDR_TRANS provided symbols.
> So declare the kconfig dependency. This is necessary to allow for
> enabling INFINIBAND without INFINIBAND_ADDR_TRANS.
Reviewed-by: Bart Van Assche <[email protected]>
On Thu, 2018-04-26 at 11:19 -0700, Greg Thelen wrote:
> This series allows for CONFIG_INFINIBAND without
> CONFIG_INFINIBAND_ADDR_TRANS (aka RDMA communication manager).
> Fuzzing has been finding fair number of CM bugs.
> So provide an option to disable it in systems which don't need it.
>
> Changes since last posting (https://lkml.org/lkml/2018/4/25/1266):
> - added ("ib_srp: depend on INFINIBAND_ADDR_TRANS") patch
[ snip explanation of series ]
Thanks for taking the time to research this out. Series applied.
--
Doug Ledford <[email protected]>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD