On Mon, Jul 17, 2017 at 18:26:09 -1000, Richard Henderson wrote: > On 07/16/2017 10:04 AM, Emilio G. Cota wrote: > >+static int qemu_mprotect__osdep(void *addr, size_t size, int prot) > >+{ > >+ void *start = QEMU_ALIGN_PTR_DOWN(addr, qemu_real_host_page_size); > >+ void *end = QEMU_ALIGN_PTR_UP(addr + size, qemu_real_host_page_size); > > I'm not keen on this. Any good reason for it as opposed to asserting that > the inputs are already page aligned?
No particular reason other than "kept the same behaviour we had". Let's go with asserts, I like that approach much better actually. E.