From owner-cvs-all Thu Aug 23 18:16: 6 2001 Delivered-To: cvs-all@freebsd.org Received: from foo.osd.bsdi.com (foo.lab.nuxi.com [66.123.5.77]) by hub.freebsd.org (Postfix) with ESMTP id B396C37B401; Thu, 23 Aug 2001 18:15:59 -0700 (PDT) (envelope-from jhb@foo.osd.bsdi.com) Received: (from jhb@localhost) by foo.osd.bsdi.com (8.11.4/8.11.4) id f7O1Fu604903; Thu, 23 Aug 2001 18:15:56 -0700 (PDT) (envelope-from jhb) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010824103018.C21776@wantadilla.lemis.com> Date: Thu, 23 Aug 2001 18:15:56 -0700 (PDT) From: John Baldwin To: Greg Lehey Subject: Re: cvs commit: src/sys/conf options src/sys/i386/conf NOTES src Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 24-Aug-01 Greg Lehey wrote: > On Thursday, 23 August 2001 at 17:56:28 -0700, John Baldwin wrote: >> >> On 24-Aug-01 Greg Lehey wrote: >>> On Thursday, 23 August 2001 at 17:27:10 -0700, John Baldwin wrote: >>>> >>>> On 24-Aug-01 Greg Lehey wrote: >>>>> On Thursday, 23 August 2001 at 13:32:21 -0700, John Baldwin wrote: >>>>>> jhb 2001/08/23 13:32:21 PDT >>>>>> >>>>>> Modified files: >>>>>> sys/conf options >>>>>> sys/i386/conf NOTES >>>>>> sys/kern kern_shutdown.c >>>>>> sys/sys param.h >>>>>> Log: >>>>>> Add a new kernel option RESTARTABLE_PANICS. If this option is >>>>>> present, >>>>>> then one can restart from a panic by resetting the panicstr variable >>>>>> to >>>>>> NULL. This commit conditionalizes the previously committed >>>>>> functionality >>>>>> on this variable. It also removes the __dead2 attribute from the >>>>>> panic() >>>>>> function so that when one continues from a panic() the behavior will >>>>>> be predictable. >>>>> >>>>> The only way I can see to restart from a panic is to enter the >>>>> debugger and then return, and your code seems to bear this out. Am I >>>>> missing something? I would think that we can always return from the >>>>> debugger if we want to continue, and that the RESTARTABLE_PANICS and >>>>> check for null format string are not necessary. Are you concerned >>>>> about people who will return from the debugger when they don't mean >>>>> to? There are plenty of other ways to shoot down the system from the >>>>> debugger. >>>> >>>> Err. If you continue from the debugger, the panic() function calls boot() >>>> which >>>> reboots the system. If you chagne panicstr to NULL, then we don't call >>>> boot() >>>> but return from panic(), thus effectively turning the panic() into a >>>> Debugger(). >>> >>> So reset the panic string. >> >> Ah, no. The intent is not to restart from all panics. This lets >> you, the developer, decide at panic time if one wants to try and >> restart or not. If you do, you clear panicstr, otherwise it panics >> normally. > > Do you return from the debugger to panic? I never do. Hmm. I suppose most people use the panic command or some such. I guess I could do that, so you dont' have to explicitly clear panicstr, but it will do it for you. RESTARTABLE_PANICS is still necessary because of panic having __dead2 in the normal case, and not having it in the RESTARTABLE_PANICS case. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message