From: "Alexander van Heukelum" <heukelum@fastmail.fm>
To: "Jan Beulich" <JBeulich@novell.com>,
"Ingo Molnar" <mingo@elte.hu>,
"Thomas Gleixner" <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i386: add unwind directives to syscall ptregs stubs
Date: Fri, 03 Sep 2010 01:09:06 +0200 [thread overview]
Message-ID: <1283468946.15328.1393106295@webmail.messagingengine.com> (raw)
In-Reply-To: <4C7FBCF00200007800013F99@vpn.id2.novell.com>
On Thu, 02 Sep 2010 14:04 +0100, "Jan Beulich" <JBeulich@novell.com> wrote:
> When these stubs are actual functions (i.e. having a return
> instruction) and have stack manipulation instructions in them, they
> should also be annotated to allow unwinding through them.
>
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
Compiles to exactly the same machine code.
Acked-by: Alexander van Heukelum <heukelum@fastmail.fm>
> ---
> arch/x86/kernel/entry_32.S | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> --- linux-2.6.36-rc3/arch/x86/kernel/entry_32.S
> +++ 2.6.36-rc3-x86-push-pop-cfi/arch/x86/kernel/entry_32.S
> @@ -750,14 +710,18 @@ ptregs_##name: \
> #define PTREGSCALL3(name) \
> ALIGN; \
> ptregs_##name: \
> + CFI_STARTPROC; \
> leal 4(%esp),%eax; \
> - pushl %eax; \
> + pushl_cfi %eax; \
> movl PT_EDX(%eax),%ecx; \
> movl PT_ECX(%eax),%edx; \
> movl PT_EBX(%eax),%eax; \
> call sys_##name; \
> addl $4,%esp; \
> - ret
> + CFI_ADJUST_CFA_OFFSET -4; \
> + ret; \
> + CFI_ENDPROC; \
> +ENDPROC(ptregs_##name)
>
> PTREGSCALL1(iopl)
> PTREGSCALL0(fork)
> @@ -772,15 +736,19 @@ PTREGSCALL1(vm86old)
> /* Clone is an oddball. The 4th arg is in %edi */
> ALIGN;
> ptregs_clone:
> + CFI_STARTPROC
> leal 4(%esp),%eax
> - pushl %eax
> - pushl PT_EDI(%eax)
> + pushl_cfi %eax
> + pushl_cfi PT_EDI(%eax)
> movl PT_EDX(%eax),%ecx
> movl PT_ECX(%eax),%edx
> movl PT_EBX(%eax),%eax
> call sys_clone
> addl $8,%esp
> + CFI_ADJUST_CFA_OFFSET -8
> ret
> + CFI_ENDPROC
> +ENDPROC(ptregs_clone)
>
> .macro FIXUP_ESPFIX_STACK
> /*
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
>
next prev parent reply other threads:[~2010-09-02 23:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-02 13:04 [PATCH] i386: add unwind directives to syscall ptregs stubs Jan Beulich
2010-09-02 23:09 ` Alexander van Heukelum [this message]
2010-09-03 7:12 ` [tip:x86/debug] i386: Add " tip-bot for Jan Beulich
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=1283468946.15328.1393106295@webmail.messagingengine.com \
--to=heukelum@fastmail.fm \
--cc=JBeulich@novell.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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