Re: [PATCH v1 1/3] linux-user: provide fallback pgd_find_hole for bare chroots

2020-06-01 Thread Richard Henderson
On 5/27/20 3:05 AM, Alex Bennée wrote: > +static uintptr_t pgd_find_hole_fallback(uintptr_t guest_size, uintptr_t brk, > long align) > +{ > +uintptr_t base; > + > +/* Start at the bottom and work our way up */ > +base = mmap_min_addr; > + > +while (true) { > +uintptr_t alig

[PATCH v1 1/3] linux-user: provide fallback pgd_find_hole for bare chroots

2020-05-27 Thread Alex Bennée
When running QEMU out of a chroot environment we may not have access to /proc/self/maps. As there is no other "official" way to introspect our memory map we need to fall back to the original technique of repeatedly trying to mmap an address range until we find one that works. Fortunately it's not