From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from intranet.asianux.com (intranet.asianux.com [58.214.24.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 209472C00AA for ; Thu, 23 May 2013 20:42:29 +1000 (EST) Message-ID: <519DF25E.7060304@asianux.com> Date: Thu, 23 May 2013 18:41:34 +0800 From: Chen Gang MIME-Version: 1.0 To: Russell King - ARM Linux Subject: Re: [PATCH] arch: configuration, deleting 'CONFIG_BUG' since always need it. References: <519DCBEF.3090208@asianux.com> <20130523090534.GJ18614@n2100.arm.linux.org.uk> <201305231139.38233.arnd@arndb.de> <20130523100409.GK18614@n2100.arm.linux.org.uk> In-Reply-To: <20130523100409.GK18614@n2100.arm.linux.org.uk> Content-Type: text/plain; charset=UTF-8 Cc: Catalin Marinas , Linux-sh list , Heiko Carstens , "paulus@samba.org" , "H. Peter Anvin" , Michel Lespinasse , Hans-Christian Egtvedt , Linux-Arch , linux-s390@vger.kernel.org, uml-devel , Yoshinori Sato , Richard Weinberger , Helge Deller , the arch/x86 maintainers , "James E.J. Bottomley" , "mingo@redhat.com" , Geert Uytterhoeven , Frederic Weisbecker , Paul McKenney , =?UTF-8?B?SMOldmFyZCBTa2lubmVtb2Vu?= , Serge Hallyn , Mike Frysinger , Arnd Bergmann , Will Deacon , Jeff Dike , Akinobu Mita , uml-user , "uclinux-dist-devel@blackfin.uclinux.org" , Thomas Gleixner , "linux-arm-kernel@lists.infradead.org" , Parisc List , "linux-kernel@vger.kernel.org" , Richard Kuo , Paul Mundt , "Eric W. Biederman" , linux-hexagon@vger.kernel.org, Martin Schwidefsky , linux390@de.ibm.com, Andrew Morton , "linuxppc-dev@lists.ozlabs.org" , David Miller List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 05/23/2013 06:04 PM, Russell King - ARM Linux wrote: > So, if you want to use this, then you should update the CONFIG_BUG text > to include a warning to this effect: > > Warning: if CONFIG_BUG is turned off, and control flow reaches > a BUG(), the system behaviour will be undefined. > > so that people can make an informed choice about this, because at the > moment: > > Disabling this option eliminates support for BUG and WARN, reducing > the size of your kernel image and potentially quietly ignoring > numerous fatal conditions. You should only consider disabling this > option for embedded systems with no facilities for reporting errors. > Just say Y. > > will become completely misleading. Turning this option off will _not_ > result in "quietly ignoring numerous fatal conditions". > > And I come back to one of my previous arguments - is it not better to > panic() if we hit one of these conditions so that the system can try to > do a panic-reboot rather than continue blindly into the unknown? But I still suggest to delete CONFIG_BUG in common kernel. Since currently, disable 'CONFIG_BUG' is not a common features (most of architectures are always enable it), it is only belongs to some architectures specific features (may some embedded systems). It is not suitable to still let 'CONFIG_BUG' exist in "asm-generic/bug.h" which is only for common features. And each architecture can customize their own BUG(), if one architecture wants to Disabling this option, let it specify its own BUG(). So, most of architectures need not consider this issue again. Thanks. -- Chen Gang Asianux Corporation