* [PATCH 05/28] IB/srpt: Disable RDMA access by the initiator [not found] <20180103213938.11664-1-bart.vanassche@wdc.com> @ 2018-01-03 21:39 ` Bart Van Assche 2018-01-04 3:12 ` Jason Gunthorpe 2018-01-03 21:39 ` [PATCH 06/28] IB/srpt: Fix ACL lookup during login Bart Van Assche 1 sibling, 1 reply; 4+ messages in thread From: Bart Van Assche @ 2018-01-03 21:39 UTC (permalink / raw) To: Jason Gunthorpe; +Cc: Doug Ledford, linux-rdma, Bart Van Assche, stable With the SRP protocol all RDMA operations are initiated by the target. Since no RDMA operations are initiated by the initiator, do not grant the initiator permission to submit RDMA reads or writes to the target. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: <stable@vger.kernel.org> --- drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 8a1bd354b1cc..7c4249038004 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1013,8 +1013,7 @@ static int srpt_init_ch_qp(struct srpt_rdma_ch *ch, struct ib_qp *qp) return -ENOMEM; attr->qp_state = IB_QPS_INIT; - attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ | - IB_ACCESS_REMOTE_WRITE; + attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE; attr->port_num = ch->sport->port; attr->pkey_index = 0; -- 2.15.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 05/28] IB/srpt: Disable RDMA access by the initiator 2018-01-03 21:39 ` [PATCH 05/28] IB/srpt: Disable RDMA access by the initiator Bart Van Assche @ 2018-01-04 3:12 ` Jason Gunthorpe 0 siblings, 0 replies; 4+ messages in thread From: Jason Gunthorpe @ 2018-01-04 3:12 UTC (permalink / raw) To: Bart Van Assche; +Cc: Doug Ledford, linux-rdma, stable On Wed, Jan 03, 2018 at 01:39:15PM -0800, Bart Van Assche wrote: > With the SRP protocol all RDMA operations are initiated by the target. > Since no RDMA operations are initiated by the initiator, do not grant > the initiator permission to submit RDMA reads or writes to the target. > > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > Cc: <stable@vger.kernel.org> > drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c > index 8a1bd354b1cc..7c4249038004 100644 > +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c > @@ -1013,8 +1013,7 @@ static int srpt_init_ch_qp(struct srpt_rdma_ch *ch, struct ib_qp *qp) > return -ENOMEM; > > attr->qp_state = IB_QPS_INIT; > - attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ | > - IB_ACCESS_REMOTE_WRITE; > + attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE; > attr->port_num = ch->sport->port; > attr->pkey_index = 0; Applied to for-rc thanks Jason ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 06/28] IB/srpt: Fix ACL lookup during login [not found] <20180103213938.11664-1-bart.vanassche@wdc.com> 2018-01-03 21:39 ` [PATCH 05/28] IB/srpt: Disable RDMA access by the initiator Bart Van Assche @ 2018-01-03 21:39 ` Bart Van Assche 2018-01-04 3:12 ` Jason Gunthorpe 1 sibling, 1 reply; 4+ messages in thread From: Bart Van Assche @ 2018-01-03 21:39 UTC (permalink / raw) To: Jason Gunthorpe; +Cc: Doug Ledford, linux-rdma, Bart Van Assche, stable Make sure that the initiator port GUID is stored in ch->ini_guid. Note: when initiating a connection sgid and dgid members in struct sa_path_rec represent the source and destination GIDs. When accepting a connection however sgid represents the destination GID and dgid the source GID. Fixes: commit 2bce1a6d2209 ("IB/srpt: Accept GUIDs as port names") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: <stable@vger.kernel.org> --- drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 7c4249038004..bfa576aa9f03 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -2077,7 +2077,7 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id, goto destroy_ib; } - guid = (__be16 *)¶m->primary_path->sgid.global.interface_id; + guid = (__be16 *)¶m->primary_path->dgid.global.interface_id; snprintf(ch->ini_guid, sizeof(ch->ini_guid), "%04x:%04x:%04x:%04x", be16_to_cpu(guid[0]), be16_to_cpu(guid[1]), be16_to_cpu(guid[2]), be16_to_cpu(guid[3])); -- 2.15.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 06/28] IB/srpt: Fix ACL lookup during login 2018-01-03 21:39 ` [PATCH 06/28] IB/srpt: Fix ACL lookup during login Bart Van Assche @ 2018-01-04 3:12 ` Jason Gunthorpe 0 siblings, 0 replies; 4+ messages in thread From: Jason Gunthorpe @ 2018-01-04 3:12 UTC (permalink / raw) To: Bart Van Assche; +Cc: Doug Ledford, linux-rdma, stable On Wed, Jan 03, 2018 at 01:39:16PM -0800, Bart Van Assche wrote: > Make sure that the initiator port GUID is stored in ch->ini_guid. > Note: when initiating a connection sgid and dgid members in struct > sa_path_rec represent the source and destination GIDs. When accepting > a connection however sgid represents the destination GID and dgid the > source GID. > > Fixes: commit 2bce1a6d2209 ("IB/srpt: Accept GUIDs as port names") > Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> > Cc: <stable@vger.kernel.org> > drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to for-rc, thanks Jason ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-04 3:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180103213938.11664-1-bart.vanassche@wdc.com>
2018-01-03 21:39 ` [PATCH 05/28] IB/srpt: Disable RDMA access by the initiator Bart Van Assche
2018-01-04 3:12 ` Jason Gunthorpe
2018-01-03 21:39 ` [PATCH 06/28] IB/srpt: Fix ACL lookup during login Bart Van Assche
2018-01-04 3:12 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).