Re: [ 08/31] use clamp_t in UNAME26 fix

2012-10-26 Thread Jonathan Nieder
Greg Kroah-Hartman wrote: > On Thu, Oct 25, 2012 at 05:11:19PM -0700, Jonathan Nieder wrote: >> Greg Kroah-Hartman wrote: >>> v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40; >>> - copy = min(sizeof(buf), max_t(size_t, 1, len)); >>> + copy = clamp_t(size_t, len, 1,

Re: [ 08/31] use clamp_t in UNAME26 fix

2012-10-26 Thread Jonathan Nieder
Greg Kroah-Hartman wrote: On Thu, Oct 25, 2012 at 05:11:19PM -0700, Jonathan Nieder wrote: Greg Kroah-Hartman wrote: v = ((LINUX_VERSION_CODE 8) 0xff) + 40; - copy = min(sizeof(buf), max_t(size_t, 1, len)); + copy = clamp_t(size_t, len, 1, sizeof(buf));

Re: [ 08/31] use clamp_t in UNAME26 fix

2012-10-25 Thread Greg Kroah-Hartman
On Thu, Oct 25, 2012 at 05:11:19PM -0700, Jonathan Nieder wrote: > Hi, > > Greg Kroah-Hartman wrote: > > > commit 31fd84b95eb211d5db460a1dda85e004800a7b52 upstream. > > > > The min/max call needed to have explicit types on some architectures > > (e.g. mn10300). Use clamp_t instead to avoid the

[ 08/31] use clamp_t in UNAME26 fix

2012-10-25 Thread Greg Kroah-Hartman
3.0-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook commit 31fd84b95eb211d5db460a1dda85e004800a7b52 upstream. The min/max call needed to have explicit types on some architectures (e.g. mn10300). Use clamp_t instead to avoid the

Re: [ 08/31] use clamp_t in UNAME26 fix

2012-10-25 Thread Jonathan Nieder
Hi, Greg Kroah-Hartman wrote: > commit 31fd84b95eb211d5db460a1dda85e004800a7b52 upstream. > > The min/max call needed to have explicit types on some architectures > (e.g. mn10300). Use clamp_t instead to avoid the warning: > > kernel/sys.c: In function 'override_release': >

Re: [ 08/31] use clamp_t in UNAME26 fix

2012-10-25 Thread Jonathan Nieder
Hi, Greg Kroah-Hartman wrote: commit 31fd84b95eb211d5db460a1dda85e004800a7b52 upstream. The min/max call needed to have explicit types on some architectures (e.g. mn10300). Use clamp_t instead to avoid the warning: kernel/sys.c: In function 'override_release': kernel/sys.c:1287:10:

[ 08/31] use clamp_t in UNAME26 fix

2012-10-25 Thread Greg Kroah-Hartman
3.0-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook keesc...@chromium.org commit 31fd84b95eb211d5db460a1dda85e004800a7b52 upstream. The min/max call needed to have explicit types on some architectures (e.g. mn10300). Use clamp_t

Re: [ 08/31] use clamp_t in UNAME26 fix

2012-10-25 Thread Greg Kroah-Hartman
On Thu, Oct 25, 2012 at 05:11:19PM -0700, Jonathan Nieder wrote: Hi, Greg Kroah-Hartman wrote: commit 31fd84b95eb211d5db460a1dda85e004800a7b52 upstream. The min/max call needed to have explicit types on some architectures (e.g. mn10300). Use clamp_t instead to avoid the warning: