Re: [PATCH] [RFC] kernfs: Allow vm_ops->close() if VMA is never split

From: Richard Weinberger
Date: Mon Jul 13 2020 - 03:42:58 EST


----- UrsprÃngliche Mail -----
> Von: "richard" <richard@xxxxxx>
> An: "linux-kernel" <linux-kernel@xxxxxxxxxxxxxxx>
> CC: tj@xxxxxxxxxx, "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>, ebiederm@xxxxxxxxxxxx, "dan j williams"
> <dan.j.williams@xxxxxxxxx>, "richard" <richard@xxxxxx>
> Gesendet: Samstag, 4. Juli 2020 22:56:19
> Betreff: [PATCH] [RFC] kernfs: Allow vm_ops->close() if VMA is never split

> 10 years ago commit a6849fa1f7d7 ("sysfs: Fail bin file mmap if vma close is
> implemented.")
> removed support for vm_ops->close() for mmap on sysfs.
> As far I understand the reason is that due to the wrapping in kernfs
> every VMA split operation needs to be tracked to call vm_ops->close()
> for all fragments. This is not feasible with reasonable effort.
>
> Since commit 31383c6865a5 ("mm, hugetlbfs: introduce ->split() to
> vm_operations_struct")
> we can get notified as soon a VMA is split, this can help to relax the
> restriction.
> So I propose to allow having a custom close under the condition that a
> VMA cannot get split.
>
> Signed-off-by: Richard Weinberger <richard@xxxxxx>

*friendly ping*

Thanks,
//richard