Re: [PATCH] Open file as read only on private mapping in qemu_ram_alloc_from_file

2023-07-26 Thread Igor Mammedov
On Wed, 26 Jul 2023 10:11:44 +0200 David Hildenbrand wrote: > On 25.07.23 18:01, ThinerLogoer wrote: > > > > At 2023-07-25 19:42:30, "David Hildenbrand" wrote: > >> Hi, > >> > >> patch subject should start with "softmmu/physmem: Open ..." > > > > Sorry I am newbie to the patch submission p

Re:Re: [PATCH] Open file as read only on private mapping in qemu_ram_alloc_from_file

2023-07-26 Thread ThinerLogoer
At 2023-07-26 16:11:44, "David Hildenbrand" wrote: > >> though the file never gets written. (the actual memory file & guest state >> file require >> separated hacking) >> >> And at least the patch provided here have been the solution to this last >> problem for me >> for a while. >> >> By the

Re: [PATCH] Open file as read only on private mapping in qemu_ram_alloc_from_file

2023-07-26 Thread David Hildenbrand
On 25.07.23 18:01, ThinerLogoer wrote: At 2023-07-25 19:42:30, "David Hildenbrand" wrote: Hi, patch subject should start with "softmmu/physmem: Open ..." Sorry I am newbie to the patch submission part. I will resubmit a version of patch if the final acceptable patch after discussion is mos

Re:Re: [PATCH] Open file as read only on private mapping in qemu_ram_alloc_from_file

2023-07-25 Thread ThinerLogoer
At 2023-07-25 19:42:30, "David Hildenbrand" wrote: >Hi, > >patch subject should start with "softmmu/physmem: Open ..." Sorry I am newbie to the patch submission part. I will resubmit a version of patch if the final acceptable patch after discussion is mostly the same. (For example, if this pat

[PATCH] Open file as read only on private mapping in qemu_ram_alloc_from_file

2023-07-25 Thread Thiner Logoer
An read only file can be mapped with read write as long as the mapping is private, which is very common case. Make qemu_ram_alloc_from_file open file as read only when the mapping is private, otherwise open will fail when file does not allow write. If this file does not exist or is a directory, th

Re: [PATCH] Open file as read only on private mapping in qemu_ram_alloc_from_file

2023-07-25 Thread David Hildenbrand
Hi, patch subject should start with "softmmu/physmem: Open ..." On 25.07.23 12:52, Thiner Logoer wrote: An read only file can be mapped with read write as long as the mapping is private, which is very common case. Make At least in the environments I know, using private file mappings is a corn