linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Fix data abort accessing proc_info from __lookup_processor_type (Re: [PATCH 03/10] ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type)
Date: Sat, 23 Oct 2010 11:18:19 -0700	[thread overview]
Message-ID: <20101023181819.GB19376@atomide.com> (raw)
In-Reply-To: <20101023083044.GA13009@n2100.arm.linux.org.uk>

* Russell King - ARM Linux <linux@arm.linux.org.uk> [101023 01:21]:
> On Fri, Oct 22, 2010 at 11:51:08AM -0700, Tony Lindgren wrote:
> > diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> > index 1953e3d..a58b91d 100644
> > --- a/arch/arm/kernel/vmlinux.lds.S
> > +++ b/arch/arm/kernel/vmlinux.lds.S
> > @@ -114,6 +114,7 @@ SECTIONS
> >  			*(.glue_7)
> >  			*(.glue_7t)
> >  		*(.got)			/* Global offset table		*/
> > +			. = ALIGN(4);
> >  			ARM_CPU_KEEP(PROC_INFO)
> 
> The got table should also be word aligned - but the kernel doesn't use
> one.  In any case, it would be a good idea to place it before the .got.

OK, updated patch below.

By moving ARM_CPU_KEEP(PROC_INFO) around I've confirmed that it's
happening at rodata.*. Do you want also another align before .glue_7
as well?

Regards,

Tony

From: Tony Lindgren <tony@atomide.com>
Date: Fri, 22 Oct 2010 12:41:55 -0700
Subject: [PATCH] ARM: Fix data abort accessing proc_info from __lookup_processor_type

Commit 5085f3ff458521045f7e43da62b8c30ea7df2e82 added better support for
CONFIG_HOTPLUG_CPU by keeping proc_info around. However, depending on
the Kconfig options selected, this can make the booting fail mysteriously
early on.

Turns out a data abort can happen in __lookup_processor in ldmia r5 {r3, r4}.
When it happens the address loaded to r5 is not aligned. Fix the problem by
aligning proc_info.

Reported-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-by: Anand Gadiyar <gadiyar@ti.com>

diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 1953e3d..cead889 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -113,6 +113,7 @@ SECTIONS
 			*(.rodata.*)
 			*(.glue_7)
 			*(.glue_7t)
+		. = ALIGN(4);
 		*(.got)			/* Global offset table		*/
 			ARM_CPU_KEEP(PROC_INFO)
 	}

      reply	other threads:[~2010-10-23 18:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 17:09 [PATCH 03/10] ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type Russell King - ARM Linux
2010-10-04 19:25 ` Jeff Ohlstein
2010-10-04 19:30   ` Russell King - ARM Linux
2010-10-22 18:51 ` [PATCH] ARM: Fix data abort accessing proc_info from __lookup_processor_type (Re: [PATCH 03/10] ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type) Tony Lindgren
2010-10-22 20:14   ` Anand Gadiyar
2010-10-23  8:30   ` Russell King - ARM Linux
2010-10-23 18:18     ` Tony Lindgren [this message]

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=20101023181819.GB19376@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).