RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1740797 - Disable memfd in QEMU
Summary: Disable memfd in QEMU
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Marc-Andre Lureau
QA Contact: Yumei Huang
URL:
Whiteboard:
Depends On: 1738626 1813852
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-13 15:55 UTC by Marc-Andre Lureau
Modified: 2020-03-16 10:07 UTC (History)
11 users (show)

Fixed In Version: qemu-kvm-2.12.0-84.module+el8.1.0+3980+a02d9447
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1738626
Environment:
Last Closed: 2019-11-05 20:51:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3345 0 None None None 2019-11-05 20:51:39 UTC

Description Marc-Andre Lureau 2019-08-13 15:55:36 UTC
+++ This bug was initially created as a clone of Bug #1738626 +++

memfd is not needed by layered products right now, but it's currently enabled in our package. Let's disable it in QEMU so it doesn't get exposed unecessarily and untested.

This commit from libvirt gives us a good summary of what the feature is:
(but this BZ is about disabling it in QEMU, which is enough)

commit 24b74d187cab48a9dc9f409ea78900154c709579
Author: Marc-André Lureau <marcandre.lureau>
Date:   Thu Nov 15 15:55:53 2018 +0400

    qemu: add memfd source type
    
    Add a new memoryBacking source type "memfd", supported by QEMU (when
    the capability is available).
    
    A memfd is a specialized anonymous memory kind. As such, an anonymous
    source type could be automatically using a memfd. However, there are
    some complications when migrating from different memory backends in
    qemu (mainly due to the internal object naming at this point, but
    there could be more). For now, it is simpler and safer to simply
    introduce a new source type "memfd". Eventually, the "anonymous" type
    could learn to use memfd transparently in a separate change.
    
    The main benefits are that it doesn't need to create filesystem files,
    and it also enforces sealing, providing a bit more safety.

--- Additional comment from Danilo Cesar de Paula on 2019-08-13 14:06:09 UTC ---

QA_ACK, please?

Comment 4 Yumei Huang 2019-08-19 06:50:40 UTC
Verify:
qemu-kvm-2.12.0-84.module+el8.1.0+3980+a02d9447
kernel-4.18.0-131.el8.x86_64

Object memory-backend-memfd is no longer supported by qemu, 

# /usr/libexec/qemu-kvm -object memory-backend-memfd,id=mem0
qemu-kvm: -object memory-backend-memfd,id=mem0: invalid object type: memory-backend-memfd


But there are still related content in qemu-kvm man page, I think we should remove them as well.
"
-object
memory-backend-memfd,id=id,merge=on|off,dump=on|off,prealloc=on|off,size=size,host-nodes=host-
nodes,policy=default|preferred|bind|interleave,seal=on|off,hugetlb=on|off,hugetlbsize=size
      Creates an anonymous memory file backend object, which allows QEMU to share
      the memory with an external process (e.g. when using vhost-user). The memory
      is allocated with memfd and optional sealing. (Linux only)

"

Comment 5 Marc-Andre Lureau 2019-08-19 07:13:53 UTC
(In reply to Yumei Huang from comment #4)
> But there are still related content in qemu-kvm man page, I think we should
> remove them as well.
> "
> -object
> memory-backend-memfd,id=id,merge=on|off,dump=on|off,prealloc=on|off,
> size=size,host-nodes=host-
> nodes,policy=default|preferred|bind|interleave,seal=on|off,hugetlb=on|off,
> hugetlbsize=size
>       Creates an anonymous memory file backend object, which allows QEMU to
> share
>       the memory with an external process (e.g. when using vhost-user). The
> memory
>       is allocated with memfd and optional sealing. (Linux only)
> 
> "

The man page is the upstream version, I don't think we do downstream changes. The CLI is not supported afaik anyway.

Comment 6 Yumei Huang 2019-08-19 09:03:26 UTC
Thanks Marc.

Moving to verified per above comments.

Comment 8 errata-xmlrpc 2019-11-05 20:51:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3345


Note You need to log in before you can comment on or make changes to this bug.