Re: [PATCH 1/2] proc/sysctl: add shared variables for range check

2019-04-10 Thread Kees Cook
On Mon, Apr 8, 2019 at 3:09 PM Matteo Croce wrote: > > In the sysctl code the proc_dointvec_minmax() function is often used to > validate the user supplied value between an allowed range. This function > uses the extra1 and extra2 members from struct ctl_table as minimum and > maximum allowed valu

[PATCH 1/2] proc/sysctl: add shared variables for range check

2019-04-08 Thread Matteo Croce
In the sysctl code the proc_dointvec_minmax() function is often used to validate the user supplied value between an allowed range. This function uses the extra1 and extra2 members from struct ctl_table as minimum and maximum allowed value. On sysctl handler declaration, in every source file there