From: Andy Lutomirski <luto@kernel.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: X86 ML <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
live-patching@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andy Lutomirski <luto@kernel.org>, Jiri Slaby <jslaby@suse.cz>,
Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [RFC PATCH 06/10] x86/entry: add CFI hint undwarf annotations
Date: Thu, 1 Jun 2017 07:03:18 -0700 [thread overview]
Message-ID: <CALCETrUq9wivJ6B4Bg5k+E7ud0ipHarMdc5vbe1ocp+a=1RJdA@mail.gmail.com> (raw)
In-Reply-To: <1d852057ba39f2f5f02f196c604b8baecce33fea.1496293620.git.jpoimboe@redhat.com>
On Wed, May 31, 2017 at 10:44 PM, Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> Add CFI hint undwarf annotations to entry_64.S. This will enable the
> undwarf unwinder to unwind through any location in the entry code
> including syscalls, interrupts, and exceptions.
>
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
> arch/x86/entry/Makefile | 1 -
> arch/x86/entry/calling.h | 5 +++++
> arch/x86/entry/entry_64.S | 56 ++++++++++++++++++++++++++++++++++++++++++-----
> 3 files changed, 55 insertions(+), 7 deletions(-)
>
> diff --git a/arch/x86/entry/Makefile b/arch/x86/entry/Makefile
> index 9976fce..af28a8a 100644
> --- a/arch/x86/entry/Makefile
> +++ b/arch/x86/entry/Makefile
> @@ -2,7 +2,6 @@
> # Makefile for the x86 low level entry code
> #
>
> -OBJECT_FILES_NON_STANDARD_entry_$(BITS).o := y
> OBJECT_FILES_NON_STANDARD_entry_64_compat.o := y
>
> CFLAGS_syscall_64.o += $(call cc-option,-Wno-override-init,)
> diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h
> index 05ed3d3..bbec02e 100644
> --- a/arch/x86/entry/calling.h
> +++ b/arch/x86/entry/calling.h
> @@ -1,4 +1,6 @@
> #include <linux/jump_label.h>
> +#include <asm/undwarf.h>
> +
>
> /*
>
Just to make sure I understand this, if we unwind from...
> @@ -112,6 +114,7 @@ For 32-bit we have the following conventions - kernel is built with
> movq %rdx, 12*8+\offset(%rsp)
> movq %rsi, 13*8+\offset(%rsp)
...here..., will objtool think that rdx and rsi (etc) still live in
their respective regs, or will it find them in the on-stack data given
by CFI_REGS? If the former, how does undwarf deal with the
corresponding pops?
> movq %rdi, 14*8+\offset(%rsp)
> + CFI_REGS offset=\offset extra=0
> @@ -414,6 +424,7 @@ ENTRY(ret_from_fork)
> 2:
> movq %rsp, %rdi
> call syscall_return_slowpath /* returns with IRQs disabled */
> + CFI_REGS
I'm confused. syscall_return_slowpath didn't change anything relevant
to unwinding, right? What's CFI_REGS here for?
next prev parent reply other threads:[~2017-06-01 14:03 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 5:44 [RFC PATCH 00/10] x86: undwarf unwinder Josh Poimboeuf
2017-06-01 5:44 ` [RFC PATCH 01/10] objtool: move checking code to check.c Josh Poimboeuf
2017-06-14 7:22 ` Jiri Slaby
2017-06-01 5:44 ` [RFC PATCH 02/10] objtool, x86: add several functions and files to the objtool whitelist Josh Poimboeuf
2017-06-14 7:24 ` Jiri Slaby
2017-06-14 13:03 ` Josh Poimboeuf
2017-06-01 5:44 ` [RFC PATCH 03/10] objtool: stack validation 2.0 Josh Poimboeuf
2017-06-01 5:44 ` [RFC PATCH 04/10] objtool: add undwarf debuginfo generation Josh Poimboeuf
2017-06-14 8:42 ` Jiri Slaby
2017-06-14 13:27 ` Josh Poimboeuf
2017-06-22 7:47 ` Jiri Slaby
2017-06-22 12:49 ` Josh Poimboeuf
2017-06-01 5:44 ` [RFC PATCH 05/10] objtool, x86: add facility for asm code to provide CFI hints Josh Poimboeuf
2017-06-01 13:57 ` Andy Lutomirski
2017-06-01 14:16 ` Josh Poimboeuf
2017-06-01 14:40 ` Andy Lutomirski
2017-06-01 15:02 ` Josh Poimboeuf
2017-06-01 5:44 ` [RFC PATCH 06/10] x86/entry: add CFI hint undwarf annotations Josh Poimboeuf
2017-06-01 14:03 ` Andy Lutomirski [this message]
2017-06-01 14:23 ` Josh Poimboeuf
2017-06-01 14:28 ` Josh Poimboeuf
2017-06-01 14:39 ` Andy Lutomirski
2017-06-01 15:01 ` Josh Poimboeuf
2017-06-01 5:44 ` [RFC PATCH 07/10] x86/asm: add CFI hint annotations to sync_core() Josh Poimboeuf
2017-06-01 5:44 ` [RFC PATCH 08/10] extable: rename 'sortextable' script to 'sorttable' Josh Poimboeuf
2017-06-01 5:44 ` [RFC PATCH 09/10] extable: add undwarf table sorting ability to sorttable script Josh Poimboeuf
2017-06-01 5:44 ` [RFC PATCH 10/10] x86/unwind: add undwarf unwinder Josh Poimboeuf
2017-06-01 11:05 ` Peter Zijlstra
2017-06-01 12:26 ` Josh Poimboeuf
2017-06-01 12:47 ` Jiri Slaby
2017-06-01 13:02 ` Josh Poimboeuf
2017-06-01 13:42 ` Peter Zijlstra
2017-06-01 13:10 ` Peter Zijlstra
2017-06-01 12:13 ` Peter Zijlstra
2017-06-01 12:36 ` Josh Poimboeuf
2017-06-01 13:12 ` Peter Zijlstra
2017-06-01 15:03 ` Josh Poimboeuf
2017-06-14 11:45 ` Jiri Slaby
2017-06-14 13:44 ` Josh Poimboeuf
2017-06-01 6:08 ` [RFC PATCH 00/10] x86: " Ingo Molnar
2017-06-01 11:58 ` Josh Poimboeuf
2017-06-01 12:17 ` Peter Zijlstra
2017-06-01 12:33 ` Jiri Slaby
2017-06-01 12:52 ` Josh Poimboeuf
2017-06-01 12:57 ` Jiri Slaby
2017-06-01 12:47 ` Josh Poimboeuf
2017-06-01 13:25 ` Peter Zijlstra
2017-06-06 14:14 ` Sergey Senozhatsky
2017-06-01 13:50 ` Andy Lutomirski
2017-06-01 13:50 ` Ingo Molnar
2017-06-01 13:58 ` Jiri Slaby
2017-06-02 8:30 ` Jiri Slaby
2017-06-01 14:05 ` Josh Poimboeuf
2017-06-01 14:08 ` Jiri Slaby
2017-06-02 10:40 ` Mel Gorman
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='CALCETrUq9wivJ6B4Bg5k+E7ud0ipHarMdc5vbe1ocp+a=1RJdA@mail.gmail.com' \
--to=luto@kernel.org \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).