public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Ensure PSR.ac is cleared for early userspace
@ 2008-11-12  1:35 Luck, Tony
  2008-11-13  6:22 ` Isaku Yamahata
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Luck, Tony @ 2008-11-12  1:35 UTC (permalink / raw)
  To: linux-ia64

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-11-20 22:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12  1:35 [PATCH] Ensure PSR.ac is cleared for early userspace Luck, Tony
2008-11-13  6:22 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox