[net,v1] net/smc: Add warning about remote memory exposure

Submitted by Leon Romanovsky on May 16, 2017, 6:51 a.m.

Details

Message ID 20170516065138.24789-1-leon@kernel.org
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Leon Romanovsky May 16, 2017, 6:51 a.m.
From: Christoph Hellwig <hch@lst.de>

The driver explicitly bypasses APIs to register all memory once a
connection is made, and thus allows remote access to memory.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
---
Dave,
Can you please forward this patch to stable?
Thanks
---
 Changes from v0:
  * Remove BROKEN Kconfig option as a followup of this discussion
    https://patchwork.ozlabs.org/patch/760454/
  * Refine commit message
---
 net/smc/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

--
2.12.2

Comments

Leon Romanovsky May 16, 2017, 7:03 a.m.
+ linux-rdma ML.

On Tue, May 16, 2017 at 09:51:38AM +0300, Leon Romanovsky wrote:
> From: Christoph Hellwig <hch@lst.de>
>
> The driver explicitly bypasses APIs to register all memory once a
> connection is made, and thus allows remote access to memory.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Leon Romanovsky <leon@kernel.org>
> ---
> Dave,
> Can you please forward this patch to stable?
> Thanks
> ---
>  Changes from v0:
>   * Remove BROKEN Kconfig option as a followup of this discussion
>     https://patchwork.ozlabs.org/patch/760454/
>   * Refine commit message
> ---
>  net/smc/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/net/smc/Kconfig b/net/smc/Kconfig
> index c717ef0896aa..33954852f3f8 100644
> --- a/net/smc/Kconfig
> +++ b/net/smc/Kconfig
> @@ -8,6 +8,10 @@ config SMC
>  	  The Linux implementation of the SMC-R solution is designed as
>  	  a separate socket family SMC.
>
> +	  Warning: SMC will expose all memory for remote reads and writes
> +	  once a connection is established.  Don't enable this option except
> +	  for tightly controlled lab environment.
> +
>  	  Select this option if you want to run SMC socket applications
>
>  config SMC_DIAG
> --
> 2.12.2
>
Ursula Braun May 16, 2017, 3:04 p.m.
On 05/16/2017 08:51 AM, Leon Romanovsky wrote:
> From: Christoph Hellwig <hch@lst.de>
> 
> The driver explicitly bypasses APIs to register all memory once a
> connection is made, and thus allows remote access to memory.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Leon Romanovsky <leon@kernel.org>
> ---
> Dave,
> Can you please forward this patch to stable?
> Thanks
> ---
>  Changes from v0:
>   * Remove BROKEN Kconfig option as a followup of this discussion
>     https://patchwork.ozlabs.org/patch/760454/
>   * Refine commit message
> ---
>  net/smc/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/smc/Kconfig b/net/smc/Kconfig
> index c717ef0896aa..33954852f3f8 100644
> --- a/net/smc/Kconfig
> +++ b/net/smc/Kconfig
> @@ -8,6 +8,10 @@ config SMC
>  	  The Linux implementation of the SMC-R solution is designed as
>  	  a separate socket family SMC.
> 
> +	  Warning: SMC will expose all memory for remote reads and writes
> +	  once a connection is established.  Don't enable this option except
> +	  for tightly controlled lab environment.
> +
>  	  Select this option if you want to run SMC socket applications
> 
>  config SMC_DIAG
> --
> 2.12.2
> 

Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
David Miller May 16, 2017, 6:53 p.m.
From: Leon Romanovsky <leon@kernel.org>
Date: Tue, 16 May 2017 09:51:38 +0300

> From: Christoph Hellwig <hch@lst.de>
> 
> The driver explicitly bypasses APIs to register all memory once a
> connection is made, and thus allows remote access to memory.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Leon Romanovsky <leon@kernel.org>

Applied.

Patch hide | download patch | download mbox

diff --git a/net/smc/Kconfig b/net/smc/Kconfig
index c717ef0896aa..33954852f3f8 100644
--- a/net/smc/Kconfig
+++ b/net/smc/Kconfig
@@ -8,6 +8,10 @@  config SMC
 	  The Linux implementation of the SMC-R solution is designed as
 	  a separate socket family SMC.

+	  Warning: SMC will expose all memory for remote reads and writes
+	  once a connection is established.  Don't enable this option except
+	  for tightly controlled lab environment.
+
 	  Select this option if you want to run SMC socket applications

 config SMC_DIAG