mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/4] MN10300: Fix ret_from_kernel_thread
@ 2013-05-28 14:34 David Howells
  2013-05-28 14:34 ` [PATCH 2/4] MN10300: Enable IRQs more in system call exit work path David Howells
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: David Howells @ 2013-05-28 14:34 UTC (permalink / raw)
  To: torvalds; +Cc: Al Viro, linux-am33-list, linux-kernel, Ken Cox

ret_from_kernel_thread needs to set A2 to the thread_info pointer before
jumping to syscall_exit.

Without this, we never correctly start userspace.

This was caused by the rejuggling of the fork/exec paths in commit:

	ddf23e87a804cbf6fa3818076b33fe023cce09fd
	Author: Al Viro <viro@zeniv.linux.org.uk>
	Date:   Thu Oct 11 17:32:41 2012 -0400
	Subject: mn10300: switch to saner kernel_execve() semantics

Reported-by: Ken Cox <jkc@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ken Cox <jkc@redhat.com>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
---

 arch/mn10300/kernel/entry.S |    1 +
 1 file changed, 1 insertion(+)


diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
index 0c631d3..92c3eea 100644
--- a/arch/mn10300/kernel/entry.S
+++ b/arch/mn10300/kernel/entry.S
@@ -60,6 +60,7 @@ ENTRY(ret_from_kernel_thread)
 	mov	(REG_D0,fp),d0
 	mov	(REG_A0,fp),a0
 	calls	(a0)
+	GET_THREAD_INFO a2		# A2 must be set on return from sys_exit()
 	jmp	sys_exit
 
 ENTRY(ret_from_kernel_execve)


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 1/4] MN10300: Fix ret_from_kernel_thread
@ 2013-05-28 14:31 David Howells
  0 siblings, 0 replies; 7+ messages in thread
From: David Howells @ 2013-05-28 14:31 UTC (permalink / raw)
  To: torvalds; +Cc: Al Viro, linux-am33-list, linux-kernel, Ken Cox

ret_from_kernel_thread needs to set A2 to the thread_info pointer before
jumping to syscall_exit.

Without this, we never correctly start userspace.

This was caused by the rejuggling of the fork/exec paths in commit:

	ddf23e87a804cbf6fa3818076b33fe023cce09fd
	Author: Al Viro <viro@zeniv.linux.org.uk>
	Date:   Thu Oct 11 17:32:41 2012 -0400
	Subject: mn10300: switch to saner kernel_execve() semantics

Reported-by: Ken Cox <jkc@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ken Cox <jkc@redhat.com>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
---

 arch/mn10300/kernel/entry.S |    1 +
 1 file changed, 1 insertion(+)


diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
index 0c631d3..92c3eea 100644
--- a/arch/mn10300/kernel/entry.S
+++ b/arch/mn10300/kernel/entry.S
@@ -60,6 +60,7 @@ ENTRY(ret_from_kernel_thread)
 	mov	(REG_D0,fp),d0
 	mov	(REG_A0,fp),a0
 	calls	(a0)
+	GET_THREAD_INFO a2		# A2 must be set on return from sys_exit()
 	jmp	sys_exit
 
 ENTRY(ret_from_kernel_execve)


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

end of thread, other threads:[~2013-05-28 18:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-28 14:34 [PATCH 1/4] MN10300: Fix ret_from_kernel_thread David Howells
2013-05-28 14:34 ` [PATCH 2/4] MN10300: Enable IRQs more in system call exit work path David Howells
2013-05-28 14:34 ` [PATCH 3/4] MN10300: ASB2305's PCI code needs the definition of XIRQ1 David Howells
2013-05-28 14:34 ` [PATCH 4/4] MN10300: Need pci_iomap() and __pci_ioport_map() defining David Howells
2013-05-28 17:06 ` [PATCH 1/4] MN10300: Fix ret_from_kernel_thread Linus Torvalds
2013-05-28 18:56 ` David Howells
  -- strict thread matches above, loose matches on Subject: below --
2013-05-28 14:31 David Howells

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

all inboxes | Powered by JetHome®