On Mon, Sep 08, 2025 at 10:30:13AM -0300, Jason Gunthorpe wrote: > On Mon, Sep 08, 2025 at 12:10:47PM +0100, Lorenzo Stoakes wrote: > > Now we have the capacity to set up the VMA in f_op->mmap_prepare and then > > later, once the VMA is established, insert a mixed mapping in > > f_op->mmap_complete, do so for kcov. > > > > We utilise the context desc->mmap_context field to pass context between > > mmap_prepare and mmap_complete to conveniently provide the size over which > > the mapping is performed. > > Why? > > + vma_desc_size(desc) != size) { > + res = -EINVAL; > > Just call some vma_size()? Ah yeah we can do you're right, as we assert vma_desc_size() == size, will fix that thanks! There is no vma_size() though, which is weird to me. There is vma_pages() << PAGE_SHIFT though... Maybe one to add! > > Jason Cheers, Lorenzo