mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH for review] [127/145] i386: move kernel_thread_helper into entry.S
@ 2006-08-15 10:36 Jan Beulich
  2006-08-15 10:48 ` Andi Kleen
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2006-08-15 10:36 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

Just like done in the x86-64 patch that I just sent, I'd recommend
moving
the push added yesterday outside of the CFI-covered region (so that
in the unlikely event of being caught at the push there won't be an
ill
assumption that a [fake] return address is already on the stack, or
that
there is a return address at all):

ENTRY(kernel_thread_helper)
	pushl $0			# fake return address
	CFI_STARTPROC
	movl %edx,%eax
	pushl %edx
	CFI_ADJUST_CFA_OFFSET 4
	call *%ebx
	pushl %eax
	CFI_ADJUST_CFA_OFFSET 4
	call do_exit
	CFI_ENDPROC
ENDPROC(kernel_thread_helper)

Jan

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [PATCH for review] [127/145] i386: move kernel_thread_helper into entry.S
@ 2006-08-14 12:36 Jan Beulich
  2006-08-14 12:39 ` Andi Kleen
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2006-08-14 12:36 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

>> And this too - the value now in %eax has no relation with the
>> value known by the caller of this routine (which doesn't expect
>> any return from here anyway).
>
>Ok, but somehow it needs to be annotiated so that the unwinder stops
>and doesn't fall back. Can you please send a replacement patch that 
>does this correctly? 

Actually, with the previous attempt we still didn't achieve the
original
goal of terminating the frame chain at kernel_thread_helper. Thus
another try (the seemingly odd extra push can be avoided once we
start using CFI expressions, which the unwinder currently doesn't
support):

ENTRY(kernel_thread_helper)
	CFI_STARTPROC
	pushl $0			# fake return address
	movl %edx,%eax
	pushl %edx
	CFI_ADJUST_CFA_OFFSET 4
	call *%ebx
	pushl %eax
	CFI_ADJUST_CFA_OFFSET 4
	call do_exit
	CFI_ENDPROC
ENDPROC(kernel_thread_helper)

Jan

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <20060810 935.775038000@suse.de>]

end of thread, other threads:[~2006-08-15 10:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-15 10:36 [PATCH for review] [127/145] i386: move kernel_thread_helper into entry.S Jan Beulich
2006-08-15 10:48 ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2006-08-14 12:36 Jan Beulich
2006-08-14 12:39 ` Andi Kleen
     [not found] <20060810 935.775038000@suse.de>
2006-08-10 19:37 ` Andi Kleen
2006-08-11  8:33   ` Jan Beulich
2006-08-11  8:38     ` Andi Kleen
2006-08-11  9:48       ` Jan Beulich
2006-08-11 10:16         ` Andi Kleen

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®