Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Jason McIntyre
On Mon, Jul 21, 2014 at 06:59:12AM +, Doug Hogan wrote: Make it clear what check implies for mallocarray. Thanks to dlg@ for pointing this behavior out. some take this, please. jmc Index: share/man/man9/malloc.9 ===

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Jean-Philippe Ouellet
On Mon, Jul 21, 2014 at 06:59:12AM +, Doug Hogan wrote: -objects and checks for arithmetic overflow. +objects and calls +.Xr panic 9 +on arithmetic overflow. That is misleading in the M_CANFAIL case. I'm not terribly good at wording things, but I suggest something more like this

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Doug Hogan
On Tue, Jul 22, 2014 at 02:51:17AM -0400, Jean-Philippe Ouellet wrote: That is misleading in the M_CANFAIL case. I'm not terribly good at wording things, but I suggest something more like this instead: Hmm I think it's only misleading in the M_CANFAIL case. I think this diff makes it a

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Ted Unangst
On Tue, Jul 22, 2014 at 21:21, Doug Hogan wrote: On Tue, Jul 22, 2014 at 02:51:17AM -0400, Jean-Philippe Ouellet wrote: That is misleading in the M_CANFAIL case. I'm not terribly good at wording things, but I suggest something more like this instead: Hmm I think it's only misleading in the

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Theo de Raadt
On Tue, Jul 22, 2014 at 21:21, Doug Hogan wrote: On Tue, Jul 22, 2014 at 02:51:17AM -0400, Jean-Philippe Ouellet wrote: That is misleading in the M_CANFAIL case. I'm not terribly good at wording things, but I suggest something more like this instead: Hmm I think it's only misleading in the

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Mark Kettenis
Date: Tue, 22 Jul 2014 21:21:39 + From: Doug Hogan d...@acyclic.org On Tue, Jul 22, 2014 at 02:51:17AM -0400, Jean-Philippe Ouellet wrote: That is misleading in the M_CANFAIL case. I'm not terribly good at wording things, but I suggest something more like this instead: Hmm I

Re: PATCH: overflow behavior in malloc(9)

2014-07-22 Thread Ted Unangst
On Wed, Jul 23, 2014 at 00:02, Mark Kettenis wrote: Hmm, I believe, quite strongly, that we should always panic when a arithmetic overflow is detected. The M_CANFAIL flag is really there to allow for failure in certain low-memory conditions, not to recover from programming bugs. The