lkml.org 
[lkml]   [2023]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH gmem FIXUP] kvm: guestmem: do not use a file system
From
On Mon, Oct 09, 2023, Al Viro wrote:
> On Mon, Oct 09, 2023 at 07:32:48AM -0700, Sean Christopherson wrote:
>
> > Yeah, we found that out the hard way. Is using the "secure" variant to get a
> > per-file inode a sane approach, or is that abuse that's going to bite us too?
> >
> > /*
> > * Use the so called "secure" variant, which creates a unique inode
> > * instead of reusing a single inode. Each guest_memfd instance needs
> > * its own inode to track the size, flags, etc.
> > */
> > file = anon_inode_getfile_secure(anon_name, &kvm_gmem_fops, gmem,
> > O_RDWR, NULL);
>
> Umm... Is there any chance that your call site will ever be in a module?
> If not, you are probably OK with that variant.

Yes, this code can be compiled as a module. I assume there issues with the inode
outliving the module?

\
 
 \ /
  Last update: 2023-10-09 22:21    [W:0.097 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site