Re: [PATCH] sysctl: fix improper indication of integer sysctl parameter

2012-07-31 Thread Eric W. Biederman
David Howells writes: > Mitsuo Hayasaka wrote: > >> When we read the sysctl parameter, they are always treated >> as signed integer, and are casted into unsigned long type >> in the current kernel. If we set a value equivalent to >> (the maximum value in signed integer + 1) > > Wouldn't it be

Re: [PATCH] sysctl: fix improper indication of integer sysctl parameter

2012-07-31 Thread David Howells
Mitsuo Hayasaka wrote: > When we read the sysctl parameter, they are always treated > as signed integer, and are casted into unsigned long type > in the current kernel. If we set a value equivalent to > (the maximum value in signed integer + 1) Wouldn't it be better to return EINVAL or EDOM?

[PATCH] sysctl: fix improper indication of integer sysctl parameter

2012-07-31 Thread Mitsuo Hayasaka
Hi, This patch fixes the improper type casting of integer sysctl parameters. When we read the sysctl parameter, they are always treated as signed integer, and are casted into unsigned long type in the current kernel. If we set a value equivalent to (the maximum value in signed integer + 1) which

[PATCH] sysctl: fix improper indication of integer sysctl parameter

2012-07-31 Thread Mitsuo Hayasaka
Hi, This patch fixes the improper type casting of integer sysctl parameters. When we read the sysctl parameter, they are always treated as signed integer, and are casted into unsigned long type in the current kernel. If we set a value equivalent to (the maximum value in signed integer + 1) which

Re: [PATCH] sysctl: fix improper indication of integer sysctl parameter

2012-07-31 Thread David Howells
Mitsuo Hayasaka mitsuo.hayasaka...@hitachi.com wrote: When we read the sysctl parameter, they are always treated as signed integer, and are casted into unsigned long type in the current kernel. If we set a value equivalent to (the maximum value in signed integer + 1) Wouldn't it be better to

Re: [PATCH] sysctl: fix improper indication of integer sysctl parameter

2012-07-31 Thread Eric W. Biederman
David Howells dhowe...@redhat.com writes: Mitsuo Hayasaka mitsuo.hayasaka...@hitachi.com wrote: When we read the sysctl parameter, they are always treated as signed integer, and are casted into unsigned long type in the current kernel. If we set a value equivalent to (the maximum value in