Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-12-06 Thread Kees Cook
On Thu, Dec 6, 2018 at 12:52 AM Luis Chamberlain wrote: > > On Thu, Dec 06, 2018 at 03:36:15PM +0800, Cheng Lin wrote: > > If the number of input parameters is less than the total > > parameters, an EINVAL error will be returned. > > > > e.g. > > We use proc_doulongvec_minmax to pass up to two par

Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-12-06 Thread Luis Chamberlain
On Thu, Dec 06, 2018 at 03:36:15PM +0800, Cheng Lin wrote: > If the number of input parameters is less than the total > parameters, an EINVAL error will be returned. > > e.g. > We use proc_doulongvec_minmax to pass up to two parameters > with kern_table. > > { > .procname = "monitor_s

Re: Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-12-05 Thread Kees Cook
On Mon, Dec 3, 2018 at 12:14 PM Luis Chamberlain wrote: > Since this worked before I do agree that we need to keep it working now, > and I can't think of an issue with returning 0 now. Since this is about > semantics though I'd like a bit more review from at last one more > person. > > Kees, Eric,

Re: Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-12-03 Thread Luis Chamberlain
On Mon, Dec 03, 2018 at 01:12:39PM +0800, cheng.lin...@zte.com.cn wrote: > >Cheng, thanks for the patch! > > > >On Fri, Nov 30, 2018 at 02:35:17PM +0800, Cheng Lin wrote: > >> If the number of input parameters is less than the total > >> parameters, an INVAL error will be returned. > > > >Do you me

Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-11-30 Thread Luis Chamberlain
Cheng, thanks for the patch! On Fri, Nov 30, 2018 at 02:35:17PM +0800, Cheng Lin wrote: > If the number of input parameters is less than the total > parameters, an INVAL error will be returned. Do you mean EINVAL? > This patch ensure no error returned in this condition, just > like other interfa