On 4/10/2025 2:11 PM, Christoph Hellwig wrote: > On Tue, Apr 08, 2025 at 11:23:57AM +0000, Shivank Garg wrote: >> KVM guest_memfd is implementing its own inodes to store metadata for >> backing memory using a custom filesystem. This requires the ability to >> initialize anonymous inode using security_inode_init_security_anon(). >> >> As guest_memfd currently resides in the KVM module, we need to export this >> symbol for use outside the core kernel. In the future, guest_memfd might be >> moved to core-mm, at which point the symbols no longer would have to be >> exported. When/if that happens is still unclear. > > This really should be a EXPORT_SYMBOL_GPL, if at all. > > But you really should look into a new interface in anon_inode.c that > can be reused instead of duplicating anonymouns inode logic in kvm.ko. > I agree, it makes sense. I'll use EXPORT_SYMBOL_GPL in next version and look into reusing reusing existing logic. Thanks, Shivank
- [PATCH RFC v7 0/8] Add NUMA mempolicy support for KVM gu... Shivank Garg
- [PATCH RFC v7 3/8] security: Export security_inode_... Shivank Garg
- Re: [PATCH RFC v7 3/8] security: Export securit... Paul Moore
- Re: [PATCH RFC v7 3/8] security: Export sec... Shivank Garg
- Re: [PATCH RFC v7 3/8] security: Export... David Hildenbrand
- Re: [PATCH RFC v7 3/8] security: Export securit... Christoph Hellwig
- Re: [PATCH RFC v7 3/8] security: Export sec... Shivank Garg
- Re: [PATCH RFC v7 3/8] security: Export sec... David Hildenbrand
- Re: [PATCH RFC v7 3/8] security: Export... Shivank Garg
- [PATCH RFC v7 1/8] mm/filemap: Add mempolicy suppor... Shivank Garg
- [PATCH RFC v7 5/8] KVM: guest_memfd: Make guest mem... Shivank Garg
- Re: [PATCH RFC v7 5/8] KVM: guest_memfd: Make g... Christoph Hellwig
- Re: [PATCH RFC v7 5/8] KVM: guest_memfd: Ma... Ackerley Tng
- Re: [PATCH RFC v7 5/8] KVM: guest_memfd... Christoph Hellwig
- [PATCH RFC v7 7/8] KVM: guest_memfd: Enforce NUMA m... Shivank Garg
- Re: [PATCH RFC v7 7/8] KVM: guest_memfd: Enforc... Ackerley Tng
- Re: [PATCH RFC v7 7/8] KVM: guest_memfd: En... Shivank Garg