Re: [PATCH v6 3/8] sysctl: Warn when a clamped sysctl parameter is set out of range

2018-05-01 Thread Waiman Long
On 04/30/2018 06:40 PM, Kees Cook wrote: > I like this series overall, thanks! No objections from me. One thing I > noted, though: > > On Fri, Apr 27, 2018 at 2:00 PM, Waiman Long wrote: >> if (param->min && *param->min > val) { >> if

Re: [PATCH v6 3/8] sysctl: Warn when a clamped sysctl parameter is set out of range

2018-05-01 Thread Waiman Long
On 04/30/2018 06:40 PM, Kees Cook wrote: > I like this series overall, thanks! No objections from me. One thing I > noted, though: > > On Fri, Apr 27, 2018 at 2:00 PM, Waiman Long wrote: >> if (param->min && *param->min > val) { >> if (clamp) { >>

Re: [PATCH v6 3/8] sysctl: Warn when a clamped sysctl parameter is set out of range

2018-04-30 Thread Kees Cook
I like this series overall, thanks! No objections from me. One thing I noted, though: On Fri, Apr 27, 2018 at 2:00 PM, Waiman Long wrote: > if (param->min && *param->min > val) { > if (clamp) { > val =

Re: [PATCH v6 3/8] sysctl: Warn when a clamped sysctl parameter is set out of range

2018-04-30 Thread Kees Cook
I like this series overall, thanks! No objections from me. One thing I noted, though: On Fri, Apr 27, 2018 at 2:00 PM, Waiman Long wrote: > if (param->min && *param->min > val) { > if (clamp) { > val = *param->min; > +

[PATCH v6 3/8] sysctl: Warn when a clamped sysctl parameter is set out of range

2018-04-27 Thread Waiman Long
Even with clamped sysctl parameters, it is still not that straight forward to figure out the exact range of those parameters. One may try to write extreme parameter values to see if they get clamped. To make it easier, a warning with the expected range will now be printed into the kernel ring

[PATCH v6 3/8] sysctl: Warn when a clamped sysctl parameter is set out of range

2018-04-27 Thread Waiman Long
Even with clamped sysctl parameters, it is still not that straight forward to figure out the exact range of those parameters. One may try to write extreme parameter values to see if they get clamped. To make it easier, a warning with the expected range will now be printed into the kernel ring