[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest
From: |
Kirill A . Shutemov |
Subject: |
Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory |
Date: |
Fri, 2 Sep 2022 15:30:10 +0300 |
On Fri, Sep 02, 2022 at 06:27:57PM +0800, Chao Peng wrote:
> > + if (flags & MFD_INACCESSIBLE) {
> > + struct file *inaccessible_file;
> > +
> > + inaccessible_file = memfd_mkinaccessible(file);
> > + if (IS_ERR(inaccessible_file)) {
> > + error = PTR_ERR(inaccessible_file);
> > + goto err_file;
> > + }
>
> The new file should alse be marked as O_LARGEFILE otherwise setting the
> initial size greater than 2^31 on the fd will be refused by ftruncate().
>
> + inaccessible_file->f_flags |= O_LARGEFILE;
> +
Good catch. Thanks.
I will modify memfd_mkinaccessible() to do this.
--
Kiryl Shutsemau / Kirill A. Shutemov
Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory, Andy Lutomirski, 2022/09/09
Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory, Andy Lutomirski, 2022/09/09