On Thu, Jul 8, 2021 at 6:44 PM Andi Kleen <ak@xxxxxxxxxxxxxxx> wrote: > > > > One allocation for the life of the driver that can have its direct map > > permissions changed rather than an allocation per-file descriptor and > > fragmenting the direct map. > > The vmap() approach discussed in another mail will solve that. Ok, not my first choice for how to handle the allocation side of that, but not broken. I'd still feel better if there was an actual data structure assigned to file->private_data rather than using that 'void *' pointer directly and casting throughout the driver.