qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 40/45] osdep: introduce qemu_mprotect_rwx/non


From: Emilio G. Cota
Subject: Re: [Qemu-devel] [PATCH v2 40/45] osdep: introduce qemu_mprotect_rwx/none
Date: Tue, 18 Jul 2017 00:57:23 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]