From owner-svn-src-head@freebsd.org Mon Dec 28 13:44:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BA6EA544D9; Mon, 28 Dec 2015 13:44:32 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCDD91802; Mon, 28 Dec 2015 13:44:31 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aDY66-000ETE-1J; Mon, 28 Dec 2015 16:44:26 +0300 Date: Mon, 28 Dec 2015 16:44:25 +0300 From: Slawa Olhovchenkov To: Bruce Evans Cc: Konstantin Belousov , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Dmitry Chagin , svn-src-head@freebsd.org Subject: Re: svn commit: r292777 - in head: lib/libc/sys sys/kern Message-ID: <20151228134425.GH70867@zxy.spb.ru> References: <201512271537.tBRFb7nN095297@repo.freebsd.org> <1451236237.1369.9.camel@freebsd.org> <20151228083418.B1014@besplex.bde.org> <20151228081313.GM3625@kib.kiev.ua> <20151228200006.Q2819@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151228200006.Q2819@besplex.bde.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2015 13:44:32 -0000 On Mon, Dec 28, 2015 at 09:17:50PM +1100, Bruce Evans wrote: > On Mon, 28 Dec 2015, Konstantin Belousov wrote: > > > On Mon, Dec 28, 2015 at 09:35:11AM +1100, Bruce Evans wrote: > >> If this causes a panic, then it is from a sanity check detecting the > >> invalid conversion later. A negative value in days breaks the loop > >> logic but seems to give premature exit from the loops instead of many > >> iterations. > > It causes the panic due to out of bound accesses to bin2bcd_data[] array. > > The issue affects around twenty rtc drivers, according to the quick grep > > for clock_ts_to_ct() usage. It probably also affects geom raid modules, > > but I did not looked there at all. > > > > As I understand, people prefer to have ability to test practically > > useless values for the current time, by the cost the unplugged easy > > kernel panic, in the production systems ? Am I right ? > > It is not unreasonable to panic when such tests fail, just like for other > settings of unreasonable values. Only the superuser can make them, and > the superuser should know better than to run them on production systems. Only one valid reasson for panic may be exist: fatal destruction of internal structures (impossibility to recovery). All other reaason must not be caused panic. Disconnecting USB flash. Removing floppy discs. Lost root FS. All above must not be cused panic. VAX/VMS don't panic after break half of RAM druing intesive work.