From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Gang Subject: Re: [PATCH] arch: configuration, deleting 'CONFIG_BUG' since always need it. Date: Thu, 23 May 2013 18:41:34 +0800 Message-ID: <519DF25E.7060304@asianux.com> References: <519DCBEF.3090208@asianux.com> <20130523090534.GJ18614@n2100.arm.linux.org.uk> <201305231139.38233.arnd@arndb.de> <20130523100409.GK18614@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130523100409.GK18614@n2100.arm.linux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Russell King - ARM Linux 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 List-Id: linux-arch.vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <519DF25E.7060304@asianux.com> Date: Thu, 23 May 2013 18:41:34 +0800 From: Chen Gang MIME-Version: 1.0 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 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] arch: configuration, deleting 'CONFIG_BUG' since always need it. To: Russell King - ARM Linux Cc: Arnd Bergmann , Geert Uytterhoeven , =?UTF-8?B?SMOldmFyZCBTa2lubmVtb2Vu?= , Hans-Christian Egtvedt , Mike Frysinger , Yoshinori Sato , Richard Kuo , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , "paulus@samba.org" , Martin Schwidefsky , Heiko Carstens , linux390@de.ibm.com, Paul Mundt , Jeff Dike , Richard Weinberger , Thomas Gleixner , "mingo@redhat.com" , "H. Peter Anvin" , the arch/x86 maintainers , "Eric W. Biederman" , Serge Hallyn , Paul McKenney , Frederic Weisbecker , David Miller , Andrew Morton , Akinobu Mita , Catalin Marinas , Michel Lespinasse , Will Deacon , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "uclinux-dist-devel@blackfin.uclinux.org" , linux-hexagon@vger.kernel.org, Parisc List , "linuxppc-dev@lists.ozlabs.org" , linux-s390@vger.kernel.org, Linux-sh list , uml-devel , uml-user , Linux-Arch List-ID: 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: gang.chen@asianux.com (Chen Gang) Date: Thu, 23 May 2013 18:41:34 +0800 Subject: [PATCH] arch: configuration, deleting 'CONFIG_BUG' since always need it. In-Reply-To: <20130523100409.GK18614@n2100.arm.linux.org.uk> References: <519DCBEF.3090208@asianux.com> <20130523090534.GJ18614@n2100.arm.linux.org.uk> <201305231139.38233.arnd@arndb.de> <20130523100409.GK18614@n2100.arm.linux.org.uk> Message-ID: <519DF25E.7060304@asianux.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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