From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753595AbdEPWkl (ORCPT ); Tue, 16 May 2017 18:40:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:32907 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753218AbdEPWkj (ORCPT ); Tue, 16 May 2017 18:40:39 -0400 Date: Wed, 17 May 2017 00:40:32 +0200 From: "Luis R. Rodriguez" To: Kees Cook Cc: "Luis R. Rodriguez" , Al Viro , Andrew Morton , "Eric W. Biederman" , Arnaldo Carvalho de Melo , Ingo Molnar , Mel Gorman , Subash Abhinov Kasiviswanathan , Jessica Yu , Rusty Russell , Steven Whitehouse , Deepa Dinamani , Matt Fleming , Alexey Dobriyan , Borislav Petkov , Dmitry Torokhov , shuah@kernel.org, Linus Torvalds , Guenter Roeck , linux-kselftest@vger.kernel.org, LKML Subject: Re: [PATCH v2 9/9] test_sysctl: test against int proc_dointvec() array support Message-ID: <20170516224032.GI17314@wotan.suse.de> References: <20170209012853.GJ24047@wotan.suse.de> <20170211003614.6579-1-mcgrof@kernel.org> <20170211003614.6579-10-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 13, 2017 at 02:07:53PM -0800, Kees Cook wrote: > On Fri, Feb 10, 2017 at 4:36 PM, Luis R. Rodriguez wrote: > > diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh > > index eedfba6f0a57..963d572155b1 100755 > > --- a/tools/testing/selftests/sysctl/sysctl.sh > > +++ b/tools/testing/selftests/sysctl/sysctl.sh > > @@ -137,6 +142,12 @@ verify() > > return 0 > > } > > > > +verify_diff_w() > > +{ > > + echo "$TEST_STR" | diff -w -u - $1 2>&1 > /dev/null > > Instead of shell redirection, just use -q ? Will try. > I love seeing these tests added. I have one other change I'd like to > add to sysctl, Upon a glance again at this stuff I can think of a few other checks but one battle at a time... > but I haven't had time to make sure it doesn't break > stuff. I haven't been able to prove it to myself, but I think it's > safe; I just need to update the tests to handle it: > > http://git.kernel.org/cgit/linux/kernel/git/kees/linux.git/commit/?h=sysctl/writes_strict&id=b63a38ca45bd9fb61545ce6ce66093147eb96a7c > > It'd need an update for the uint handler... That would also expands on the definition of the strict mode. I think this is fair if we take it for granted strict will always aim for correctness, but we also have to be fair and be clear on possible impact and ensure nothing will bust. I have a feeling though that we'd keep on going with these semantics on and on and on... which really is just irritating and it tells me something more wrong about this crap interface. Just a rant here... Luis