Re: kmem_calloc and overflow checks [was Re: [PATCH] netbsd32 swapctl, round 4]

2014-02-02 Thread Emmanuel Dreyfus
Jean-Yves Migeon wrote: > We are a bit sliding away from the original swap32 compat code from > Emmanuel though :) No problem, I will commit as is, and you can improve once the issue will be settled (in a few months, hopefully :-) -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz m...@netbsd.org

Re: kmem_calloc and overflow checks [was Re: [PATCH] netbsd32 swapctl, round 4]

2014-02-02 Thread Jean-Yves Migeon
Le 02/02/2014 16:56, Taylor R Campbell a écrit : Date: Sun, 02 Feb 2014 16:43:49 +0100 From: Jean-Yves Migeon Even functions like calloc(3) are not required to check for the overflow themselves when you pass them (number of elements, sizeof elements). Overflow checks are ra

kmem_calloc and overflow checks [was Re: [PATCH] netbsd32 swapctl, round 4]

2014-02-02 Thread Taylor R Campbell
Date: Sun, 02 Feb 2014 16:43:49 +0100 From: Jean-Yves Migeon Even functions like calloc(3) are not required to check for the overflow themselves when you pass them (number of elements, sizeof elements). Overflow checks are rather cumbersome in C... Calloc(3) may not check, but w