From owner-cvs-all Thu Aug 23 17:51:42 2001 Delivered-To: cvs-all@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id 4D07A37B405; Thu, 23 Aug 2001 17:51:29 -0700 (PDT) (envelope-from grog@lemis.com) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id F0E116ACF2; Fri, 24 Aug 2001 10:21:27 +0930 (CST) Date: Fri, 24 Aug 2001 10:21:27 +0930 From: Greg Lehey To: John Baldwin Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/conf options src/sys/i386/conf NOTES src Message-ID: <20010824102127.A21776@wantadilla.lemis.com> References: <20010824095113.E9221@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jhb@FreeBSD.org on Thu, Aug 23, 2001 at 05:27:10PM -0700 Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF 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 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. #if defined(DDB) if (debugger_on_panic) { Debugger ("panic"); panicstr = NULL; #ifdef SMP atomic_store_rel_int(&panic_cpu, NOCPU); #endif return; } #endif boot(bootopt); Greg -- See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message