On Sun, Jan 06, 2019 at 03:33:15PM +0200, Gal Pressman wrote: > > Otherwise there can be use-after free style security bugs. > > > > Since the efa_dealloc_ucontext does nothing, and BAR pages are being > > mapped, it must be wrong. > > Can you please elaborate? what would you like to see in dealloc_ucontext? Freeing bar page allocations. > > It kind of looks like it is trying to tie BAR allocation lifetime to > > individual objects? > > > > .. and all of this is why one generally focuses on the ucontext as the > > limit, as generally, allocating a ucontext implies allocating a BAR > > page, and thus the number of ucontexts is strictly limited by the BAR > > size. > > s/ucontext/PD/g is the case for EFA, our device is not aware of > ucontext but PDs. The BAR "reservation" is there for the lifetime of > the PD. Which is what I just said was wrong. Jason