Re: [PATCH] linux-user: Avoid mmap of the last byte of the reserved_va

2023-07-01 Thread Richard Henderson
On 6/30/23 18:06, Michael Tokarev wrote: 29.06.2023 11:08, Richard Henderson wrote: There is an overflow problem in mmap_find_vma_reserved: when reserved_va == UINT32_MAX, end may overflow to 0. Rather than a larger rewrite at this time, simply avoid the final byte of the VA, which avoids search

Re: [PATCH] linux-user: Avoid mmap of the last byte of the reserved_va

2023-06-30 Thread Michael Tokarev
29.06.2023 11:08, Richard Henderson wrote: There is an overflow problem in mmap_find_vma_reserved: when reserved_va == UINT32_MAX, end may overflow to 0. Rather than a larger rewrite at this time, simply avoid the final byte of the VA, which avoids searching the final page, which avoids the overf

Re: [PATCH] linux-user: Avoid mmap of the last byte of the reserved_va

2023-06-29 Thread Michael Tokarev
29.06.2023 11:08, Richard Henderson wrote: There is an overflow problem in mmap_find_vma_reserved: when reserved_va == UINT32_MAX, end may overflow to 0. Rather than a larger rewrite at this time, simply avoid the final byte of the VA, which avoids searching the final page, which avoids the overf

[PATCH] linux-user: Avoid mmap of the last byte of the reserved_va

2023-06-29 Thread Richard Henderson
There is an overflow problem in mmap_find_vma_reserved: when reserved_va == UINT32_MAX, end may overflow to 0. Rather than a larger rewrite at this time, simply avoid the final byte of the VA, which avoids searching the final page, which avoids the overflow. Cc: qemu-sta...@nongnu.org Resolves: ht