[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if support
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported |
Date: |
Tue, 27 Nov 2018 15:49:42 +0400 |
Hi
On Tue, Nov 27, 2018 at 3:11 PM Ilya Maximets <address@hidden> wrote:
>
> If seals are not supported, memfd_create() will fail.
> Furthermore, there is no way to disable it in this case because
> '.seal' property is not registered.
>
> This issue leads to vhost-user-test failures on RHEL 7.2:
>
> qemu-system-x86_64: -object memory-backend-memfd,id=mem,size=2M,: \
> failed to create memfd: Invalid argument
>
> Signed-off-by: Ilya Maximets <address@hidden>
This will change the default behaviour of memfd backend, and may thus
me considered a break.
Instead, memfd vhost-user-test should skipped (or tuned with
sealed=false if unsupported)
> ---
> backends/hostmem-memfd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c
> index b6836b28e5..ee39bdbde6 100644
> --- a/backends/hostmem-memfd.c
> +++ b/backends/hostmem-memfd.c
> @@ -129,8 +129,8 @@ memfd_backend_instance_init(Object *obj)
> {
> HostMemoryBackendMemfd *m = MEMORY_BACKEND_MEMFD(obj);
>
> - /* default to sealed file */
> - m->seal = true;
> + /* default to sealed file if supported */
> + m->seal = qemu_memfd_check(MFD_ALLOW_SEALING);
> }
>
> static void
> --
> 2.17.1
>
- [Qemu-devel] [PATCH 0/4] memfd fixes., Ilya Maximets, 2018/11/27
- Message not available
- [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Ilya Maximets, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported,
Marc-André Lureau <=
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Ilya Maximets, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Ilya Maximets, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Ilya Maximets, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Ilya Maximets, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH 1/4] hostmem-memfd: enable seals only if supported, Gerd Hoffmann, 2018/11/27
- Message not available