All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-rc 0/3] RDMA fixes for 4.13
@ 2017-08-23  5:35 Leon Romanovsky
       [not found] ` <20170823053542.17754-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Leon Romanovsky @ 2017-08-23  5:35 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky

Hi Doug,

Those patches were found after you asked me if I have new patches
for the rdma-rc and at that time I really didn't have.

There are three patches in this series, two from Majd and one from Noa.

The patch from Noa was the one which pushed me to send it now.
Latest changes to support LID started to use port number to determine
port type, and it is not always safe. This allows access to non-allocated
memory, despite the fact that the scope of this attack is limited by the size
of port (u8), but it is better to fix it now and don't bother ourselves
with stable@ e.t.c.

The patches from Majd are fixing one panic and one as a followup to
latest discussion with Selvin about common modify_port function.

Thanks
----------------------------------------------------------------
Majd Dibbiny (2):
      IB/mlx5: Fix Raw Packet QP event handler assignment
      IB/mlx5: Always return success for RoCE modify port

Noa Osherovich (1):
      IB/core: Avoid accessing non-allocated memory when inferring port type

 drivers/infiniband/core/uverbs_cmd.c | 11 +++++++----
 drivers/infiniband/core/verbs.c      |  7 ++++++-
 drivers/infiniband/hw/mlx5/main.c    |  6 ++++++
 drivers/infiniband/hw/mlx5/qp.c      |  1 +
 include/rdma/ib_verbs.h              |  1 +
 5 files changed, 21 insertions(+), 5 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH rdma-rc 1/3] IB/core: Avoid accessing non-allocated memory when inferring port type
       [not found] ` <20170823053542.17754-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-08-23  5:35   ` Leon Romanovsky
  2017-08-23  5:35   ` [PATCH rdma-rc 2/3] IB/mlx5: Fix Raw Packet QP event handler assignment Leon Romanovsky
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2017-08-23  5:35 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Noa Osherovich

From: Noa Osherovich <noaos-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Commit 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types")
introduced the concept of type in ah_attr:
 * During ib_register_device, each port is checked for its type which
   is stored in ib_device's port_immutable array.
 * During uverbs' modify_qp, the type is inferred using the port number
   in ib_uverbs_qp_dest struct (address vector) by accessing the
   relevant port_immutable array and the type is passed on to
   providers.

IB spec (version 1.3) enforces a valid port value only in Reset to
Init. During Init to RTR, the address vector must be valid but port
number is not mentioned as a field in the address vector, so its
value is not validated, which leads to accesses to a non-allocated
memory when inferring the port type.

Save the real port number in ib_qp during modify to Init (when the
comp_mask indicates that the port number is valid) and use this value
to infer the port type.

Avoid copying the address vector fields if the matching bit is not set
in the attr_mask. Address vector can't be modified before the port, so
no valid flow is affected.

Fixes: 44c58487d51a ('IB/core: Define 'ib' and 'roce' rdma_ah_attr types')
Signed-off-by: Noa Osherovich <noaos-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/core/uverbs_cmd.c | 11 +++++++----
 drivers/infiniband/core/verbs.c      |  7 ++++++-
 include/rdma/ib_verbs.h              |  1 +
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index c551d2b275fd..15833fc6b769 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -1522,6 +1522,7 @@ static int create_qp(struct ib_uverbs_file *file,
 		qp->qp_type	  = attr.qp_type;
 		atomic_set(&qp->usecnt, 0);
 		atomic_inc(&pd->usecnt);
+		qp->port = 0;
 		if (attr.send_cq)
 			atomic_inc(&attr.send_cq->usecnt);
 		if (attr.recv_cq)
@@ -1962,8 +1963,9 @@ static int modify_qp(struct ib_uverbs_file *file,
 	attr->alt_timeout	  = cmd->base.alt_timeout;
 	attr->rate_limit	  = cmd->rate_limit;

-	attr->ah_attr.type = rdma_ah_find_type(qp->device,
-					       cmd->base.dest.port_num);
+	if (cmd->base.attr_mask & IB_QP_AV)
+		attr->ah_attr.type = rdma_ah_find_type(qp->device,
+						       cmd->base.dest.port_num);
 	if (cmd->base.dest.is_global) {
 		rdma_ah_set_grh(&attr->ah_attr, NULL,
 				cmd->base.dest.flow_label,
@@ -1981,8 +1983,9 @@ static int modify_qp(struct ib_uverbs_file *file,
 	rdma_ah_set_port_num(&attr->ah_attr,
 			     cmd->base.dest.port_num);

-	attr->alt_ah_attr.type = rdma_ah_find_type(qp->device,
-						   cmd->base.dest.port_num);
+	if (cmd->base.attr_mask & IB_QP_ALT_PATH)
+		attr->alt_ah_attr.type =
+			rdma_ah_find_type(qp->device, cmd->base.dest.port_num);
 	if (cmd->base.alt_dest.is_global) {
 		rdma_ah_set_grh(&attr->alt_ah_attr, NULL,
 				cmd->base.alt_dest.flow_label,
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 7f8fe443df46..b456e3ca1876 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -838,6 +838,7 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
 	spin_lock_init(&qp->mr_lock);
 	INIT_LIST_HEAD(&qp->rdma_mrs);
 	INIT_LIST_HEAD(&qp->sig_mrs);
+	qp->port = 0;

 	if (qp_init_attr->qp_type == IB_QPT_XRC_TGT)
 		return ib_create_xrc_qp(qp, qp_init_attr);
@@ -1297,7 +1298,11 @@ int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr,
 		if (ret)
 			return ret;
 	}
-	return ib_security_modify_qp(qp, attr, attr_mask, udata);
+	ret = ib_security_modify_qp(qp, attr, attr_mask, udata);
+	if (!ret && (attr_mask & IB_QP_PORT))
+		qp->port = attr->port_num;
+
+	return ret;
 }
 EXPORT_SYMBOL(ib_modify_qp_with_udata);

diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index b5732432bb29..88c32aba32f7 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -1683,6 +1683,7 @@ struct ib_qp {
 	enum ib_qp_type		qp_type;
 	struct ib_rwq_ind_table *rwq_ind_tbl;
 	struct ib_qp_security  *qp_sec;
+	u8			port;
 };

 struct ib_mr {
--
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH rdma-rc 2/3] IB/mlx5: Fix Raw Packet QP event handler assignment
       [not found] ` <20170823053542.17754-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-08-23  5:35   ` [PATCH rdma-rc 1/3] IB/core: Avoid accessing non-allocated memory when inferring port type Leon Romanovsky
@ 2017-08-23  5:35   ` Leon Romanovsky
  2017-08-23  5:35   ` [PATCH rdma-rc 3/3] IB/mlx5: Always return success for RoCE modify port Leon Romanovsky
  2017-08-24 19:41   ` [PATCH rdma-rc 0/3] RDMA fixes for 4.13 Doug Ledford
  3 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2017-08-23  5:35 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Majd Dibbiny

From: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

In case we have SQ and RQ for Raw Packet QP, the SQ's event handler
wasn't assigned.

Fixing this by assigning event handler for each WQ after creation.

[ 1877.145243] Call Trace:
[ 1877.148644] <IRQ>
[ 1877.150580] [<ffffffffa07987c5>] ? mlx5_rsc_event+0x105/0x210 [mlx5_core]
[ 1877.159581] [<ffffffffa0795bd7>] ? mlx5_cq_event+0x57/0xd0 [mlx5_core]
[ 1877.167137] [<ffffffffa079208e>] mlx5_eq_int+0x53e/0x6c0 [mlx5_core]
[ 1877.174526] [<ffffffff8101a679>] ? sched_clock+0x9/0x10
[ 1877.180753] [<ffffffff810f717e>] handle_irq_event_percpu+0x3e/0x1e0
[ 1877.188014] [<ffffffff810f735d>] handle_irq_event+0x3d/0x60
[ 1877.194567] [<ffffffff810f9fe7>] handle_edge_irq+0x77/0x130
[ 1877.201129] [<ffffffff81014c3f>] handle_irq+0xbf/0x150
[ 1877.207244] [<ffffffff815ed78a>] ? atomic_notifier_call_chain+0x1a/0x20
[ 1877.214829] [<ffffffff815f434f>] do_IRQ+0x4f/0xf0
[ 1877.220498] [<ffffffff815e94ad>] common_interrupt+0x6d/0x6d
[ 1877.227025] <EOI>
[ 1877.228967] [<ffffffff814834e2>] ? cpuidle_enter_state+0x52/0xc0
[ 1877.236990] [<ffffffff81483615>] cpuidle_idle_call+0xc5/0x200
[ 1877.243676] [<ffffffff8101bc7e>] arch_cpu_idle+0xe/0x30
[ 1877.249831] [<ffffffff810b4725>] cpu_startup_entry+0xf5/0x290
[ 1877.256513] [<ffffffff815cfee1>] start_secondary+0x265/0x27b
[ 1877.263111] Code: Bad RIP value.
[ 1877.267296] RIP [< (null)>] (null)
[ 1877.273264] RSP <ffff88046fd63df8>
[ 1877.277531] CR2: 0000000000000000

Fixes: 19098df2da78 ("IB/mlx5: Refactor mlx5_ib_qp to accommodate other QP types")
Signed-off-by: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/hw/mlx5/qp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 0889ff367c86..f58f8f5f3ebe 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1238,6 +1238,7 @@ static int create_raw_packet_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
 			goto err_destroy_tis;

 		sq->base.container_mibqp = qp;
+		sq->base.mqp.event = mlx5_ib_qp_event;
 	}

 	if (qp->rq.wqe_cnt) {
--
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH rdma-rc 3/3] IB/mlx5: Always return success for RoCE modify port
       [not found] ` <20170823053542.17754-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-08-23  5:35   ` [PATCH rdma-rc 1/3] IB/core: Avoid accessing non-allocated memory when inferring port type Leon Romanovsky
  2017-08-23  5:35   ` [PATCH rdma-rc 2/3] IB/mlx5: Fix Raw Packet QP event handler assignment Leon Romanovsky
@ 2017-08-23  5:35   ` Leon Romanovsky
       [not found]     ` <20170823053542.17754-4-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-08-24 19:41   ` [PATCH rdma-rc 0/3] RDMA fixes for 4.13 Doug Ledford
  3 siblings, 1 reply; 7+ messages in thread
From: Leon Romanovsky @ 2017-08-23  5:35 UTC (permalink / raw)
  To: Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Majd Dibbiny,
	Selvin Xavier

From: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

CM layer calls ib_modify_port() regardless of the link layer.

For the Ethernet ports, qkey violation and Port capabilities
are meaningless. Therefore, always return success for ib_modify_port
calls on the Ethernet ports.

Cc: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Signed-off-by: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/hw/mlx5/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index a7f2e60085c4..f7fcde1ff0aa 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -1085,6 +1085,12 @@ static int mlx5_ib_modify_port(struct ib_device *ibdev, u8 port, int mask,
 	bool is_ib = (mlx5_ib_port_link_layer(ibdev, port) ==
 		      IB_LINK_LAYER_INFINIBAND);

+	/* CM layer calls ib_modify_port() regardless of the link layer. For
+	 * Ethernet ports, qkey violation and Port capabilities are meaningless.
+	 */
+	if (!is_ib)
+		return 0;
+
 	if (MLX5_CAP_GEN(dev->mdev, ib_virt) && is_ib) {
 		change_mask = props->clr_port_cap_mask | props->set_port_cap_mask;
 		value = ~props->clr_port_cap_mask | props->set_port_cap_mask;
--
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH rdma-rc 3/3] IB/mlx5: Always return success for RoCE modify port
       [not found]     ` <20170823053542.17754-4-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-08-24 14:39       ` Yuval Shaia
  2017-08-24 15:32         ` Leon Romanovsky
  0 siblings, 1 reply; 7+ messages in thread
From: Yuval Shaia @ 2017-08-24 14:39 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Majd Dibbiny,
	Selvin Xavier

On Wed, Aug 23, 2017 at 08:35:42AM +0300, Leon Romanovsky wrote:
> From: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> CM layer calls ib_modify_port() regardless of the link layer.
> 
> For the Ethernet ports, qkey violation and Port capabilities
> are meaningless. Therefore, always return success for ib_modify_port
> calls on the Ethernet ports.
> 
> Cc: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
>  drivers/infiniband/hw/mlx5/main.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> index a7f2e60085c4..f7fcde1ff0aa 100644
> --- a/drivers/infiniband/hw/mlx5/main.c
> +++ b/drivers/infiniband/hw/mlx5/main.c
> @@ -1085,6 +1085,12 @@ static int mlx5_ib_modify_port(struct ib_device *ibdev, u8 port, int mask,
>  	bool is_ib = (mlx5_ib_port_link_layer(ibdev, port) ==
>  		      IB_LINK_LAYER_INFINIBAND);
> 
> +	/* CM layer calls ib_modify_port() regardless of the link layer. For
> +	 * Ethernet ports, qkey violation and Port capabilities are meaningless.
> +	 */
> +	if (!is_ib)
> +		return 0;
> +

Alternatively you better stick to the convention used in mlx5_ib_add and do
the check there before installing the hook, like it is done for
mlx5_ib_get_netdev.

>  	if (MLX5_CAP_GEN(dev->mdev, ib_virt) && is_ib) {
>  		change_mask = props->clr_port_cap_mask | props->set_port_cap_mask;
>  		value = ~props->clr_port_cap_mask | props->set_port_cap_mask;
> --
> 2.14.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH rdma-rc 3/3] IB/mlx5: Always return success for RoCE modify port
  2017-08-24 14:39       ` Yuval Shaia
@ 2017-08-24 15:32         ` Leon Romanovsky
  0 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2017-08-24 15:32 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Majd Dibbiny,
	Selvin Xavier

[-- Attachment #1: Type: text/plain, Size: 2273 bytes --]

On Thu, Aug 24, 2017 at 05:39:01PM +0300, Yuval Shaia wrote:
> On Wed, Aug 23, 2017 at 08:35:42AM +0300, Leon Romanovsky wrote:
> > From: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >
> > CM layer calls ib_modify_port() regardless of the link layer.
> >
> > For the Ethernet ports, qkey violation and Port capabilities
> > are meaningless. Therefore, always return success for ib_modify_port
> > calls on the Ethernet ports.
> >
> > Cc: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> > Signed-off-by: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Reviewed-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > ---
> >  drivers/infiniband/hw/mlx5/main.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> > index a7f2e60085c4..f7fcde1ff0aa 100644
> > --- a/drivers/infiniband/hw/mlx5/main.c
> > +++ b/drivers/infiniband/hw/mlx5/main.c
> > @@ -1085,6 +1085,12 @@ static int mlx5_ib_modify_port(struct ib_device *ibdev, u8 port, int mask,
> >  	bool is_ib = (mlx5_ib_port_link_layer(ibdev, port) ==
> >  		      IB_LINK_LAYER_INFINIBAND);
> >
> > +	/* CM layer calls ib_modify_port() regardless of the link layer. For
> > +	 * Ethernet ports, qkey violation and Port capabilities are meaningless.
> > +	 */
> > +	if (!is_ib)
> > +		return 0;
> > +
>
> Alternatively you better stick to the convention used in mlx5_ib_add and do
> the check there before installing the hook, like it is done for
> mlx5_ib_get_netdev.

It is patch preparation to Selvin's common modify_qp change. In his
change, it is checked outside of this function in global ib_modify_qp
function.

Thanks

>
> >  	if (MLX5_CAP_GEN(dev->mdev, ib_virt) && is_ib) {
> >  		change_mask = props->clr_port_cap_mask | props->set_port_cap_mask;
> >  		value = ~props->clr_port_cap_mask | props->set_port_cap_mask;
> > --
> > 2.14.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH rdma-rc 0/3] RDMA fixes for 4.13
       [not found] ` <20170823053542.17754-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-08-23  5:35   ` [PATCH rdma-rc 3/3] IB/mlx5: Always return success for RoCE modify port Leon Romanovsky
@ 2017-08-24 19:41   ` Doug Ledford
  3 siblings, 0 replies; 7+ messages in thread
From: Doug Ledford @ 2017-08-24 19:41 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Wed, 2017-08-23 at 08:35 +0300, Leon Romanovsky wrote:
> Hi Doug,
> 
> Those patches were found after you asked me if I have new patches
> for the rdma-rc and at that time I really didn't have.
> 
> There are three patches in this series, two from Majd and one from
> Noa.
> 
> The patch from Noa was the one which pushed me to send it now.
> Latest changes to support LID started to use port number to determine
> port type, and it is not always safe. This allows access to non-
> allocated
> memory, despite the fact that the scope of this attack is limited by
> the size
> of port (u8), but it is better to fix it now and don't bother
> ourselves
> with stable@ e.t.c.
> 
> The patches from Majd are fixing one panic and one as a followup to
> latest discussion with Selvin about common modify_port function.
> 
> Thanks
> ----------------------------------------------------------------
> Majd Dibbiny (2):
>       IB/mlx5: Fix Raw Packet QP event handler assignment
>       IB/mlx5: Always return success for RoCE modify port
> 
> Noa Osherovich (1):
>       IB/core: Avoid accessing non-allocated memory when inferring
> port type
> 
>  drivers/infiniband/core/uverbs_cmd.c | 11 +++++++----
>  drivers/infiniband/core/verbs.c      |  7 ++++++-
>  drivers/infiniband/hw/mlx5/main.c    |  6 ++++++
>  drivers/infiniband/hw/mlx5/qp.c      |  1 +
>  include/rdma/ib_verbs.h              |  1 +
>  5 files changed, 21 insertions(+), 5 deletions(-)

Thanks, applied for -rc.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-24 19:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23  5:35 [PATCH rdma-rc 0/3] RDMA fixes for 4.13 Leon Romanovsky
     [not found] ` <20170823053542.17754-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-23  5:35   ` [PATCH rdma-rc 1/3] IB/core: Avoid accessing non-allocated memory when inferring port type Leon Romanovsky
2017-08-23  5:35   ` [PATCH rdma-rc 2/3] IB/mlx5: Fix Raw Packet QP event handler assignment Leon Romanovsky
2017-08-23  5:35   ` [PATCH rdma-rc 3/3] IB/mlx5: Always return success for RoCE modify port Leon Romanovsky
     [not found]     ` <20170823053542.17754-4-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-24 14:39       ` Yuval Shaia
2017-08-24 15:32         ` Leon Romanovsky
2017-08-24 19:41   ` [PATCH rdma-rc 0/3] RDMA fixes for 4.13 Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.