Re: [PATCH v3 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag

2021-10-17 Thread Kyle Evans
On Fri, Oct 8, 2021 at 4:29 PM Warner Losh wrote: > > From: Guy Yur > > Switch checks for !(flags & MAP_ANONYMOUS) with checks for fd != -1. > MAP_STACK and MAP_GUARD both require fd == -1 and don't require mapping > the fd either. Add analysis from Guy Yur detailing the different cases > for

Re: [PATCH v3 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag

2021-10-09 Thread Richard Henderson
On 10/8/21 2:23 PM, Warner Losh wrote: From: Guy Yur Switch checks for !(flags & MAP_ANONYMOUS) with checks for fd != -1. MAP_STACK and MAP_GUARD both require fd == -1 and don't require mapping the fd either. Add analysis from Guy Yur detailing the different cases for MAP_GUARD and MAP_STACK.

[PATCH v3 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag

2021-10-08 Thread Warner Losh
From: Guy Yur Switch checks for !(flags & MAP_ANONYMOUS) with checks for fd != -1. MAP_STACK and MAP_GUARD both require fd == -1 and don't require mapping the fd either. Add analysis from Guy Yur detailing the different cases for MAP_GUARD and MAP_STACK. Signed-off-by: Guy Yur [ partially