All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Joe Buck <Joe.Buck@synopsys.COM>
Cc: "Russell King - ARM Linux" <linux@arm.linux.org.uk>,
	"Richard Guenther" <richard.guenther@gmail.com>,
	"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>,
	"Jamie Lokier" <jamie@shareable.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH] ARM: Convert BUG() to use unreachable()
Date: Thu, 17 Dec 2009 11:33:16 -0800	[thread overview]
Message-ID: <4B2A877C.3000504@caviumnetworks.com> (raw)
In-Reply-To: <20091217191401.GD10707@synopsys.com>

Joe Buck wrote:
> On Thu, Dec 17, 2009 at 11:06:13AM -0800, Russell King - ARM Linux wrote:
>> On Thu, Dec 17, 2009 at 10:35:17AM -0800, Joe Buck wrote:
>>> Besides, didn't I see a whole bunch of kernel security patches related
>>> to null pointer dereferences lately?  If page 0 can be mapped, you
>>> suddenly won't get your trap.
>> Page 0 can not be mapped on ARM kernels since the late 1990s, and this
>> protection is independent of the generic kernel.
>>
>> Milage may vary on other architectures, but that's not a concern here.
> 
> I don't understand, though, why you would want to implement a generally
> useful facility (make the kernel trap so you can do a post-mortem
> analysis) in a way that's only safe for the ARM port.
> 

Each Linux kernel architecture has in its architecture specific bug.h an 
implementation that is deemed by the architecture maintainers to work. 
As far as I know, few if any of these use __builtin_trap().

Some could be converted to __builtin_trap(), others cannot (x86 for 
example).  If we enhanced __builtin_trap() to take an argument for the 
trap code, MIPS could be converted.  But as it stands now 
__builtin_trap() is not very useful.

As more architectures start adding funky tables that get generated by 
the inline asm (as in x86), __builtin_trap() becomes less useful.

David Daney

  reply	other threads:[~2009-12-17 19:34 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08  9:55 [PATCH] ARM: Convert BUG() to use unreachable() Uwe Kleine-König
2009-12-08  9:55 ` Uwe Kleine-König
2009-12-08 17:07 ` David Daney
2009-12-10 17:50 ` Russell King - ARM Linux
2009-12-10 17:50   ` Russell King - ARM Linux
2009-12-10 17:55   ` David Daney
2009-12-16 13:58     ` Uwe Kleine-König
2009-12-16 13:58       ` Uwe Kleine-König
2009-12-17 15:01 ` Jamie Lokier
2009-12-17 15:01   ` Jamie Lokier
2009-12-17 17:09   ` David Daney
2009-12-17 17:17     ` Richard Guenther
2009-12-17 17:17       ` Richard Guenther
2009-12-17 18:17       ` Russell King - ARM Linux
2009-12-17 18:17         ` Russell King - ARM Linux
2009-12-17 18:35         ` Joe Buck
2009-12-17 18:35           ` Joe Buck
2009-12-17 19:06           ` Russell King - ARM Linux
2009-12-17 19:06             ` Russell King - ARM Linux
2009-12-17 19:14             ` Joe Buck
2009-12-17 19:14               ` Joe Buck
2009-12-17 19:33               ` David Daney [this message]
2009-12-17 19:33               ` Russell King - ARM Linux
2009-12-17 19:33                 ` Russell King - ARM Linux
2009-12-17 19:38               ` Jamie Lokier
2009-12-17 19:38                 ` Jamie Lokier
2009-12-17 19:48                 ` Russell King - ARM Linux
2009-12-17 19:48                   ` Russell King - ARM Linux
2009-12-17 19:58                   ` Russell King - ARM Linux
2009-12-17 19:58                     ` Russell King - ARM Linux
2009-12-17 19:04         ` Jamie Lokier
2009-12-17 19:04           ` Jamie Lokier
2009-12-21 19:30         ` Richard Henderson
2009-12-21 19:30           ` Richard Henderson
2009-12-21 20:10           ` Russell King - ARM Linux
2009-12-21 20:10             ` Russell King - ARM Linux
2009-12-22 14:09             ` Dave Korn
2009-12-22 14:09               ` Dave Korn
2009-12-22 14:12               ` Russell King - ARM Linux
2009-12-22 14:12                 ` Russell King - ARM Linux
2009-12-22 14:49                 ` Dave Korn
2009-12-22 14:49                   ` Dave Korn
2009-12-22 11:33       ` Paolo Bonzini
2009-12-22 11:33         ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B2A877C.3000504@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=Joe.Buck@synopsys.COM \
    --cc=gcc@gcc.gnu.org \
    --cc=jamie@shareable.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=richard.guenther@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.