Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-29 Thread Luis R. Rodriguez
On Thu, Mar 29, 2018 at 02:47:18PM -0400, Waiman Long wrote: > On 03/29/2018 02:15 PM, Luis R. Rodriguez wrote: > > On Mon, Mar 19, 2018 at 11:39:19AM -0400, Waiman Long wrote: > >> On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: > >>> On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote:

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-29 Thread Luis R. Rodriguez
On Thu, Mar 29, 2018 at 02:47:18PM -0400, Waiman Long wrote: > On 03/29/2018 02:15 PM, Luis R. Rodriguez wrote: > > On Mon, Mar 19, 2018 at 11:39:19AM -0400, Waiman Long wrote: > >> On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: > >>> On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote:

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-29 Thread Waiman Long
On 03/29/2018 02:15 PM, Luis R. Rodriguez wrote: > On Mon, Mar 19, 2018 at 11:39:19AM -0400, Waiman Long wrote: >> On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: >>> On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: When the CTL_FLAGS_CLAMP_RANGE flag is set in the ctl_table

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-29 Thread Waiman Long
On 03/29/2018 02:15 PM, Luis R. Rodriguez wrote: > On Mon, Mar 19, 2018 at 11:39:19AM -0400, Waiman Long wrote: >> On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: >>> On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: When the CTL_FLAGS_CLAMP_RANGE flag is set in the ctl_table

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-29 Thread Luis R. Rodriguez
On Mon, Mar 19, 2018 at 11:39:19AM -0400, Waiman Long wrote: > On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: > > On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: > >> When the CTL_FLAGS_CLAMP_RANGE flag is set in the ctl_table > >> entry, any update from the userspace will be

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-29 Thread Luis R. Rodriguez
On Mon, Mar 19, 2018 at 11:39:19AM -0400, Waiman Long wrote: > On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: > > On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: > >> When the CTL_FLAGS_CLAMP_RANGE flag is set in the ctl_table > >> entry, any update from the userspace will be

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-19 Thread Waiman Long
On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: > On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: >> When the CTL_FLAGS_CLAMP_RANGE flag is set in the ctl_table >> entry, any update from the userspace will be clamped to the given >> range without error if either the

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-19 Thread Waiman Long
On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: > On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: >> When the CTL_FLAGS_CLAMP_RANGE flag is set in the ctl_table >> entry, any update from the userspace will be clamped to the given >> range without error if either the

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-16 Thread Luis R. Rodriguez
On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: > When the CTL_FLAGS_CLAMP_RANGE flag is set in the ctl_table > entry, any update from the userspace will be clamped to the given > range without error if either the proc_dointvec_minmax() or the > proc_douintvec_minmax() handlers is

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-16 Thread Luis R. Rodriguez
On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: > When the CTL_FLAGS_CLAMP_RANGE flag is set in the ctl_table > entry, any update from the userspace will be clamped to the given > range without error if either the proc_dointvec_minmax() or the > proc_douintvec_minmax() handlers is

[PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-16 Thread Waiman Long
When minimum/maximum values are specified for a sysctl parameter in the ctl_table structure with proc_dointvec_minmax() handler, update to that parameter will fail with error if the given value is outside of the required range. There are use cases where it may be better to clamp the value of the

[PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-16 Thread Waiman Long
When minimum/maximum values are specified for a sysctl parameter in the ctl_table structure with proc_dointvec_minmax() handler, update to that parameter will fail with error if the given value is outside of the required range. There are use cases where it may be better to clamp the value of the