Re: [PATCH v2 8/9] bsd-user/mmap.c: Implement MAP_EXCL, required by jemalloc in head

2021-09-26 Thread Warner Losh
On Fri, Sep 24, 2021 at 6:00 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 9/21/21 9:56 PM, Warner Losh wrote: > > +/* Reject the mapping if any page within the range is mapped */ > > +if (flags & MAP_EXCL) { > > +for (addr = start; addr < end; addr++

Re: [PATCH v2 8/9] bsd-user/mmap.c: Implement MAP_EXCL, required by jemalloc in head

2021-09-24 Thread Richard Henderson
On 9/21/21 9:56 PM, Warner Losh wrote: +/* Reject the mapping if any page within the range is mapped */ +if (flags & MAP_EXCL) { +for (addr = start; addr < end; addr++) { +if (page_get_flags(addr) != 0) +goto fail; +} +

[PATCH v2 8/9] bsd-user/mmap.c: Implement MAP_EXCL, required by jemalloc in head

2021-09-21 Thread Warner Losh
From: Kyle Evans jemalloc requires a working MAP_EXCL. Ensure that no page is double mapped when specified. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/mmap.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c