- assigned_to: nobody --> octodoo
In the kernel, AL internally allocates a real PD per
HCA. This PD is used for operating special QPs on each
port.
Applications that want to access the special QP's do
that through the aliases to this PD. One alias is
created automatically when a user process starts. The
application can create more aliases. Eventually, all
these aliases lead to the same PD in the kernel. So,
different userland applications can share the same
protection domain.
This design is okay for the MAD services because they
need a PD handle to get a special QP and send/receive
MADs furthermore. But,
it is unacceptable for the data applications that can
use the PD directly. If it was not for the VPD that
performs additional checks and prevents registering
resources with this PD directly from the application,
data corruption could happen. This issue has already
shown up in the MAD pools registration where AL had
erroneously tried to register the userland buffers with
the kernel PD.
Maybe AL expects additional checks from the VPD, but
this is at least strange. This looks like a design bug
- this PD handle should have been buried somewhere
deeply inside the kernel because all the MAD operation
goes through there anyway.