Re: ARM unaligned MMIO access with attribute((packed))

2011-02-02 Thread Russell King - ARM Linux
On Wed, Feb 02, 2011 at 01:38:31PM -0800, David Miller wrote: > From: Russell King - ARM Linux > Date: Wed, 2 Feb 2011 16:37:02 + > > > 1. there's no way to tell GCC that the inline assembly is a load > >instruction and therefore it needs to schedule the fol

Re: ARM unaligned MMIO access with attribute((packed))

2011-02-02 Thread Russell King - ARM Linux
On Wed, Feb 02, 2011 at 05:51:27PM +0100, Richard Guenther wrote: > > I would suggest fixing this by: > > > > 1. auditing all uses of __attribute__((packed)) in the Linux USB code > > and other drivers, removing the ones that are potentially harmful. > > > > 2. Changing the ARM MMIO functions to us

Re: ARM unaligned MMIO access with attribute((packed))

2011-02-02 Thread Russell King - ARM Linux
On Wed, Feb 02, 2011 at 05:00:20PM +0100, Arnd Bergmann wrote: > I would suggest fixing this by: > > 1. auditing all uses of __attribute__((packed)) in the Linux USB code > and other drivers, removing the ones that are potentially harmful. > > 2. Changing the ARM MMIO functions to use inline asse

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-22 Thread Russell King - ARM Linux
On Tue, Dec 22, 2009 at 02:09:02PM +, Dave Korn wrote: > Russell King - ARM Linux wrote: > > On Mon, Dec 21, 2009 at 11:30:43AM -0800, Richard Henderson wrote: > >> On 12/17/2009 10:17 AM, Russell King - ARM Linux wrote: > >>> How is "size-optimal trap"

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-21 Thread Russell King - ARM Linux
On Mon, Dec 21, 2009 at 11:30:43AM -0800, Richard Henderson wrote: > On 12/17/2009 10:17 AM, Russell King - ARM Linux wrote: >> How is "size-optimal trap" defined? > > E.g. Sparc and MIPS have "tcc" instructions that trap based on the > condition codes, and s

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
On Thu, Dec 17, 2009 at 07:48:37PM +, Russell King - ARM Linux wrote: > Given the lack of progress/bug reporting on ARM uclinux, the lack of > platform support and the lack of configurations, my view is that there > is no one actually using it. I know that I don't particularly t

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
On Thu, Dec 17, 2009 at 07:38:26PM +, Jamie Lokier wrote: > 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 who

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
On Thu, Dec 17, 2009 at 11:14:01AM -0800, 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 relate

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
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

Re: [PATCH] ARM: Convert BUG() to use unreachable()

2009-12-17 Thread Russell King - ARM Linux
On Thu, Dec 17, 2009 at 06:17:11PM +0100, Richard Guenther wrote: > On Thu, Dec 17, 2009 at 6:09 PM, David Daney > wrote: > > Jamie Lokier wrote: > >> > >> Uwe Kleine-König wrote: > >>> > >>> Use the new unreachable() macro instead of for(;;); > >>>        *(int *)0 = 0; > >>>          /* Avoid "