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

2021-09-25 Thread Philippe Mathieu-Daudé
On 9/22/21 06:56, 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 --- bsd-user/mmap.c | 9 - 1 file changed, 8 insertion

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

2021-09-24 Thread Richard Henderson
On 9/21/21 9:56 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 --- bsd-user/mmap.c | 9 - 1 file changed, 8 insertio

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

2021-09-21 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 --- bsd-user/mmap.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bsd-use