linux/drivers/infiniband/hw/ocrdma
Naresh Gottumukkala cffce99051 RDMA/ocrdma: Dont use PD 0 for userpace CQ DB
Create_CQ verb doesn't provide a PD pointer.  So, until now we are
creating all (both userspace and kernel) CQ DB regions from PD0.  This
will result in mmapping PD0 to applications.  A rogue userspace
application can mess things up.

Also more serious issues is even the be2net NIC uses PD0.

This patch addresses this problem by:

1) Create a PD page for every userspace application when the
   alloc_ucontext is called. This will be destroyed in
   dealloc_ucontext.
2) All CQs for that context will use the PD allocated in ucontext.
3) The first create_PD call from application will result in returning
   the PD address from its ucontext (no new PD will be created).
4) For subsecquent create_pd calls from application, we create new PDs for
   the application.

Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2013-09-02 21:18:32 -07:00
..
Kconfig RDMA/ocrdma: Fix build with IPV6=n 2012-05-08 11:17:49 -07:00
Makefile
ocrdma_abi.h RDMA/ocrdma: Remove __packed 2013-08-12 10:59:44 -07:00
ocrdma_ah.c RDMA/ocrdma: Remove redundant dev reference 2013-08-12 10:58:38 -07:00
ocrdma_ah.h
ocrdma_hw.c RDMA/ocrdma: Dont use PD 0 for userpace CQ DB 2013-09-02 21:18:32 -07:00
ocrdma_hw.h RDMA/ocrdma: Dont use PD 0 for userpace CQ DB 2013-09-02 21:18:32 -07:00
ocrdma_main.c RDMA/ocrdma: Dont use PD 0 for userpace CQ DB 2013-09-02 21:18:32 -07:00
ocrdma_sli.h RDMA/ocrdma: Dont use PD 0 for userpace CQ DB 2013-09-02 21:18:32 -07:00
ocrdma_verbs.c RDMA/ocrdma: Dont use PD 0 for userpace CQ DB 2013-09-02 21:18:32 -07:00
ocrdma_verbs.h RDMA/ocrdma: For ERX2 irrespective of Qid, num_posted offset is 24 2013-09-02 21:17:55 -07:00
ocrdma.h RDMA/ocrdma: Dont use PD 0 for userpace CQ DB 2013-09-02 21:18:32 -07:00