public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] Ensure PSR.ac is cleared for early userspace
Date: Wed, 12 Nov 2008 01:35:50 +0000	[thread overview]
Message-ID: <200811120135.mAC1ZoSd017352@agluck-lia64.sc.intel.com> (raw)

Some kernels report a few unaligned exceptions during early userspace:

init(1): unaligned access to 0x6000000000089f0b, ip=0x40000000000e3581
init(1): unaligned access to 0x6000000000089f13, ip=0x40000000000e3620
init(1): unaligned access to 0x6000000000089f11, ip=0x40000000000e3640
init(1): unaligned access to 0x600000000008af1b, ip=0x40000000000e3581
init(1): unaligned access to 0x600000000008af23, ip=0x40000000000e3620
fsck(3193): unaligned access to 0x600000000001255b, ip=0x2000000000069491
fsck(3193): unaligned access to 0x6000000000012563, ip=0x2000000000069530
fsck(3193): unaligned access to 0x6000000000012561, ip=0x2000000000069550
mount(3205): unaligned access to 0x6000000000012c2b, ip=0x2000000000069491
mount(3205): unaligned access to 0x6000000000012c33, ip=0x2000000000069530
mount(3855): unaligned access to 0x6000000000012c6b, ip=0x2000000000069491
mount(3855): unaligned access to 0x6000000000012c73, ip=0x2000000000069530
mount(3855): unaligned access to 0x6000000000012c71, ip=0x2000000000069550

while others do not report these exceptions. A git bisection pointed
at an apparently innocent commit.  The real problem is that we do
not explicitly set or clear PSR.ac (we do clear it when executing
32-bit x86 binaries) so it is randomly set or clear in different
kernel builds.

Fix is to clear PSR.ac before transitioning to user code.


Signed-off-by: Tony Luck <tony.luck@intel.com>

---

Does the use of "rum" instruction need some paravirtualization? It is
not in a critical path (used a couple of times during boot).

diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 7ef0c59..595a0b6 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -499,6 +499,7 @@ GLOBAL_ENTRY(prefetch_stack)
 END(prefetch_stack)
 
 GLOBAL_ENTRY(kernel_execve)
+	rum IA64_PSR_AC
 	mov r15=__NR_execve			// put syscall number in place
 	break __BREAK_SYSCALL
 	br.ret.sptk.many rp

             reply	other threads:[~2008-11-12  1:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12  1:35 Luck, Tony [this message]
2008-11-13  6:22 ` [PATCH] Ensure PSR.ac is cleared for early userspace Isaku Yamahata
2008-11-15  1:38 ` Luck, Tony
2008-11-15  3:03 ` David Mosberger-Tang
2008-11-15 19:57 ` Tony Luck
2008-11-17 18:59 ` Rick Jones
2008-11-17 19:45 ` Luck, Tony
2008-11-17 19:52 ` Rick Jones
2008-11-17 20:58 ` Luck, Tony
2008-11-18  7:06 ` Petr Tesarik
2008-11-18  7:12 ` Matthew Wilcox
2008-11-18 11:58 ` Robin Holt
2008-11-20 22:45 ` Luck, Tony

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=200811120135.mAC1ZoSd017352@agluck-lia64.sc.intel.com \
    --to=tony.luck@intel.com \
    --cc=linux-ia64@vger.kernel.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