Re: [PATCH 00/10] IB: Replace safe uses for ib_get_dma_mr with pd->local_dma_lkey

Christoph Hellwig
2015-07-25T06:27:19Z

Hi Bart,

On Thu, Jul 23, 2015 at 06:47:26AM -0700, Bart Van Assche wrote:
> This statement might need some clarification. Are you aware that this memory
> region is only used if the kernel module parameter register_always is zero ?

The way I read the driver it's also used if the driver doesn't support
either FMR or FR (although no current in-tree IB driver falls into that
category), or as fallback if memory registration fails for some reason.

But given that rkeys are just 32-bit integers there also seems to be
some risk that a peer could simply brute force it even if it's never
sent out on the wire.