linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fix entry-common.S
@ 2008-05-14  2:09 Hideo Saito
  2008-05-15  4:26 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Hideo Saito @ 2008-05-14  2:09 UTC (permalink / raw)
  To: linux-sh

Hi Paul,

In the code on entry-common.S, it seems that the following fix is needed, because the code causes to jump to |resume_userspace| from |syscall_badsys| without set r8.

--- arch/sh/kernel/entry-common.S.org	2008-04-17 11:49:44.000000000 +0900
+++ arch/sh/kernel/entry-common.S	2008-04-21 14:47:14.000000000 +0900
@@ -143,16 +143,17 @@ noresched:
 #ifdef CONFIG_TRACE_IRQFLAGS
 3:	.long	trace_hardirqs_on
 4:	.long	trace_hardirqs_off
 #endif
 #endif
 
 ENTRY(resume_userspace)
 	! r8: current_thread_info
+	get_current_thread_info r8, r0
 	cli
 #ifdef CONFIG_TRACE_IRQFLAGS
 	mov.l	5f, r0
 	jsr	@r0
 	 nop
 #endif
 	mov.l	@(TI_FLAGS,r8), r0		! current_thread_info->flags
 	tst	#_TIF_WORK_MASK, r0

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

* Re: fix entry-common.S
  2008-05-14  2:09 fix entry-common.S Hideo Saito
@ 2008-05-15  4:26 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2008-05-15  4:26 UTC (permalink / raw)
  To: linux-sh

On Wed, May 14, 2008 at 11:09:00AM +0900, Hideo Saito wrote:
> In the code on entry-common.S, it seems that the following fix is
> needed, because the code causes to jump to |resume_userspace| from
> |syscall_badsys| without set r8.
> 
That's true for the syscall_badsys path, but not for any of the other
resume_userspace callees. The comment at the beginning of
resume_userspace indicates that we expect r8 to be set by the caller,
which looks like it got trampled in the syscall_badsys case. So, I've
moved the r8 assignment in to the syscall_badsys path instead.

Good catch, thanks!

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

end of thread, other threads:[~2008-05-15  4:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-14  2:09 fix entry-common.S Hideo Saito
2008-05-15  4:26 ` Paul Mundt

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).