Re: [PATCH v3 4/9] bsd-user/mmap.c: mmap return ENOMEM on overflow

2021-10-14 Thread Kyle Evans
On Fri, Oct 8, 2021 at 4:27 PM Warner Losh wrote: > > mmap should return ENOMEM on len overflow rather than EINVAL. Return > EINVAL when len == 0 and ENOMEM when the rounded to a page length is 0. > Found by make check-tcg. > > Signed-off-by: Warner Losh > Reviewed-by: Richard Henderson >

[PATCH v3 4/9] bsd-user/mmap.c: mmap return ENOMEM on overflow

2021-10-08 Thread Warner Losh
mmap should return ENOMEM on len overflow rather than EINVAL. Return EINVAL when len == 0 and ENOMEM when the rounded to a page length is 0. Found by make check-tcg. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- bsd-user/mmap.c | 9 -