Re: [PATCH] linux-user: Adjust pgd_find_hole_fallback result with guest_loaddr

2021-03-05 Thread Richard Henderson
On 3/5/21 7:06 AM, Ivan A. Melnikov wrote: Especially since, as far as I remeber, comparing unsigned value with -1 (which is int) is UB. It is certainly not undefined behaviour. The defined behaviour is to promote to the common type, which will do exactly what we want. r~

Re: [PATCH] linux-user: Adjust pgd_find_hole_fallback result with guest_loaddr

2021-03-05 Thread Ivan A. Melnikov
Alex, thank you for the review. On Fri, Mar 05, 2021 at 02:03:43PM +, Alex Bennée wrote: > > Ivan A. Melnikov writes: > > > While pgd_find_hole_fallback returns the beginning of the > > hole found, pgb_find_hole returns guest_base, which > > is somewhat different as the binary qemu-user is

Re: [PATCH] linux-user: Adjust pgd_find_hole_fallback result with guest_loaddr

2021-03-05 Thread Alex Bennée
Ivan A. Melnikov writes: > While pgd_find_hole_fallback returns the beginning of the > hole found, pgb_find_hole returns guest_base, which > is somewhat different as the binary qemu-user is loading > usually has non-zero load address. > > Failing to take this into account leads to random crashe