qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:[PATCH v1 0/3] softmmu/physmem: file_ram_open() readonly improvements


From: ThinerLogoer
Subject: Re:[PATCH v1 0/3] softmmu/physmem: file_ram_open() readonly improvements
Date: Wed, 9 Aug 2023 01:26:17 +0800 (CST)

At 2023-08-08 03:07:31, "David Hildenbrand" <david@redhat.com> wrote:
>Patch #1 is the result of the discussion of:
>    "[PATCH v2] softmmu/physmem: try opening file readonly before failure
>     in file_ram_open" [1]
>
>Instead of handling it inside file_ram_open(), handle it in the caller
>and only fallback to readonly in a MAP_PRIVATE mapping.
>
>Patch #2 refuses to create readonly files instead of creating a new file
>and opening it writable. Patch #3 no longer returns
>directories from file_ram_open(), resulting in a better error message when
>trying to open a readonly file but specifying a directory.
>
>[1] https://lkml.kernel.org/r/20230726145912.88545-1-logoerthiner1@163.com
>
>Cc: Paolo Bonzini <pbonzini@redhat.com>
>Cc: Peter Xu <peterx@redhat.com>
>Cc: Igor Mammedov <imammedo@redhat.com>
>Cc: Thiner Logoer <logoerthiner1@163.com>
>Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>
>
>David Hildenbrand (2):
>  softmmu/physmem: fail creation of new files in file_ram_open() with
>    readonly=true
>  softmmu/physmem: never return directories from file_ram_open()
>
>Thiner Logoer (1):
>  softmmu/physmem: fallback to opening guest RAM file as readonly in a
>    MAP_PRIVATE mapping
>
> softmmu/physmem.c | 52 +++++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 44 insertions(+), 8 deletions(-)
>
>-- 
>2.41.0

I have tested the patch on my compilation environment. These patches does not
have problem on my setup. Great job on handling more cases about file
opening here!

--

Regards,

logoerthiner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]