linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question on PD validation
@ 2021-10-11 23:05 Devale, Sindhu
  2021-10-12 16:10 ` Jason Gunthorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Devale, Sindhu @ 2021-10-11 23:05 UTC (permalink / raw)
  To: linux-rdma@vger.kernel.org; +Cc: Saleem, Shiraz

Hi all,

Currently, when an application creates a PD, the ib uverbs creates a PD uobj resource and tracks it through the xarray which is looked up using an uobj id/pd_handle. 

If a user application were to create a verb resource, example QP, with some random ibv_pd object  [i.e. one not allocated by user process], whose pd_handle happens to match the id of created PDs, the QP creation would succeed though one would expect it to fail For example:
During an alloc PD:
irdma_ualloc_pd, 122], pd_id: 44, ibv_pd: 0x8887c0, pd_handle: 0 

During create QP:
[irdma_ucreate_qp, 1480], ibv_pd: 0x8889f0, pd_handle: 0


Clearly, the ibv_pd that the application wants the QP to be associated with is not the same as the ibv_pd created during the allocation of PD. Yet, the creation of the QP is successful as the pd handle of 0 matches. 

It appears there is missing infrastructure to check if the incoming ibv_pd during create QP, MR etc is a valid one.

Looking for inputs.

Thank you,
Sindhu


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

end of thread, other threads:[~2021-10-16 15:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-11 23:05 Question on PD validation Devale, Sindhu
2021-10-12 16:10 ` Jason Gunthorpe
2021-10-15 23:09   ` Devale, Sindhu
2021-10-16 15:05     ` 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).