[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_eEUrkyq1NApL1U@infradead.org>
Date: Thu, 10 Apr 2025 01:41:54 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Shivank Garg <shivankg@....com>
Cc: seanjc@...gle.com, david@...hat.com, vbabka@...e.cz,
willy@...radead.org, akpm@...ux-foundation.org, shuah@...nel.org,
pbonzini@...hat.com, ackerleytng@...gle.com, paul@...l-moore.com,
jmorris@...ei.org, serge@...lyn.com, pvorel@...e.cz,
bfoster@...hat.com, tabba@...gle.com, vannapurve@...gle.com,
chao.gao@...el.com, bharata@....com, nikunj@....com,
michael.day@....com, yan.y.zhao@...el.com, Neeraj.Upadhyay@....com,
thomas.lendacky@....com, michael.roth@....com, aik@....com,
jgg@...dia.com, kalyazin@...zon.com, peterx@...hat.com,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-security-module@...r.kernel.org,
kvm@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-coco@...ts.linux.dev
Subject: Re: [PATCH RFC v7 3/8] security: Export
security_inode_init_security_anon for KVM guest_memfd
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.
Powered by blists - more mailing lists