Re: [PATCH V2] physmem: fix qemu_ram_alloc_from_fd size calculation

2025-01-07 Thread David Hildenbrand
On 07.01.25 17:11, Steven Sistare wrote: On 1/7/2025 5:01 AM, David Hildenbrand wrote: On 02.01.25 22:32, Steve Sistare wrote: qemu_ram_alloc_from_fd allocates space if file_size == 0.  If non-zero, it uses the existing space and verifies it is large enough, but the verification was broken when

Re: [PATCH V2] physmem: fix qemu_ram_alloc_from_fd size calculation

2025-01-07 Thread Steven Sistare
On 1/7/2025 5:01 AM, David Hildenbrand wrote: On 02.01.25 22:32, Steve Sistare wrote: qemu_ram_alloc_from_fd allocates space if file_size == 0.  If non-zero, it uses the existing space and verifies it is large enough, but the verification was broken when the offset parameter was introduced.  As

Re: [PATCH V2] physmem: fix qemu_ram_alloc_from_fd size calculation

2025-01-07 Thread David Hildenbrand
On 02.01.25 22:32, Steve Sistare wrote: qemu_ram_alloc_from_fd allocates space if file_size == 0. If non-zero, it uses the existing space and verifies it is large enough, but the verification was broken when the offset parameter was introduced. As a result, a file smaller than offset passes the

[PATCH V2] physmem: fix qemu_ram_alloc_from_fd size calculation

2025-01-02 Thread Steve Sistare
qemu_ram_alloc_from_fd allocates space if file_size == 0. If non-zero, it uses the existing space and verifies it is large enough, but the verification was broken when the offset parameter was introduced. As a result, a file smaller than offset passes the verification and causes errors later. Fi