From: Ingo Molnar <mingo@kernel.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: x86@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>,
"H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
Mike Galbraith <efault@gmx.de>
Subject: Re: [PATCH v3 00/10] x86: ORC unwinder (previously undwarf)
Date: Wed, 12 Jul 2017 21:27:50 +0200 [thread overview]
Message-ID: <20170712192750.p4wwz6ptjrub7bav@gmail.com> (raw)
In-Reply-To: <20170712144254.tihj43mvdj2so74d@treble>
* Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> On Wed, Jul 12, 2017 at 10:27:10AM +0200, Ingo Molnar wrote:
> > > Create a new "ORC" unwinder, enabled by CONFIG_ORC_UNWINDER, and plug it
> > > into the x86 unwinder framework. Objtool is used to generate the ORC
> > > debuginfo. The ORC debuginfo format is basically a simplified version
> > > of DWARF CFI. More details below.
> >
> > BTW., we should perhaps consolidate our unwinder related Kconfig space,
> > hierarchically:
> >
> > CONFIG_UNWINDER
> > CONFIG_UNWINDER_ORC
> > CONFIG_UNWINDER_FRAME_POINTERS
> >
> > Note that as a side effect it would be a valid small systems build option to have
> > no unwinder at all, if CONFIG_EXPERT=y is set and such: !CONFIG_UNWINDER=n would
> > be a sibling to !CONFIG_BUG.
>
> So is the idea that CONFIG_UNWINDER=n means "use the 'guess' unwinder"?
> Or should it mean that the unwind API isn't available?
>
> Without frame pointers and orc, it defaults to the 'guess' unwinder, for
> which the only overhead is a tiny amount of code. It's still
> technically considered an unwinder because it plugs into the unwind
> interfaces (unwind_start(), unwind_next_frame(), etc) and is used for
> things like /proc/<pid>/stack.
>
> So I'm not really sure CONFIG_UNWINDER=n would make sense. Maybe there
> should just be a multiple-choice where you have to choose one of
> CONFIG_UNWINDER_{ORC,FRAME_POINTER,GUESS}.
Ok, you are right.
Maybe we could offer a menu of unwinders - i.e. make the whole Kconfig interface a
bit nicer:
CONFIG_UNWINDER_FRAME_POINTER
CONFIG_UNWINDER_ORC
CONFIG_UNWINDER_GUESS
... or so?
Default would be the historic FRAME_POINTER, at least initially, I think.
I wouldn't mind making CONFIG_UNWINDER_ORC the new default either, due to the
non-trivial speedup it offers - but maybe folks would object?
> > CONFIG_FRAME_POINTERS et al would be left for architectures where it has a meaning
> > beyond backtrace generation. (Not sure whether there's any such architectures.)
>
> Well, on x86, hardened usercopy relies on frame pointers, but not the
> unwinder. It does the frame pointer walk manually to avoid the full
> unwinder overhead. See arch_within_stack_frames().
Oh well...
> Ok, how about:
>
> "Orc unwind tables take up ~50% more RAM (+1.3MB on an x86 defconfig
> kernel) than DWARF eh_frame tables."
>
> (My previous 1MB number was from my distro-based config, and it also
> forgot to take into account the fast lookup table (".orc_lookup")).
Sounds good to me!
Thanks,
Ingo
next prev parent reply other threads:[~2017-07-12 19:27 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 15:33 Josh Poimboeuf
2017-07-11 15:33 ` [PATCH v3 01/10] x86/entry/64: Refactor IRQ stacks and make them NMI-safe Josh Poimboeuf
2017-07-18 10:40 ` [tip:x86/asm] " tip-bot for Andy Lutomirski
2017-07-11 15:33 ` [PATCH v3 02/10] x86/entry/64: Initialize the top of the IRQ stack before switching stacks Josh Poimboeuf
2017-07-18 10:41 ` [tip:x86/asm] " tip-bot for Andy Lutomirski
2017-07-11 15:33 ` [PATCH v3 03/10] x86/dumpstack: fix occasionally missing registers Josh Poimboeuf
2017-07-18 10:41 ` [tip:x86/asm] x86/dumpstack: Fix " tip-bot for Josh Poimboeuf
2017-07-11 15:33 ` [PATCH v3 04/10] x86/dumpstack: fix interrupt and exception stack boundary checks Josh Poimboeuf
2017-07-18 10:42 ` [tip:x86/asm] x86/dumpstack: Fix " tip-bot for Josh Poimboeuf
2017-07-11 15:33 ` [PATCH v3 05/10] objtool: add ORC unwind table generation Josh Poimboeuf
2017-07-18 10:42 ` [tip:x86/asm] objtool: Add " tip-bot for Josh Poimboeuf
2017-07-11 15:33 ` [PATCH v3 06/10] objtool, x86: add facility for asm code to provide unwind hints Josh Poimboeuf
2017-07-18 10:43 ` [tip:x86/asm] objtool, x86: Add " tip-bot for Josh Poimboeuf
2017-07-11 15:33 ` [PATCH v3 07/10] x86/entry/64: add unwind hint annotations Josh Poimboeuf
2017-07-18 10:43 ` [tip:x86/asm] x86/entry/64: Add " tip-bot for Josh Poimboeuf
2017-07-11 15:33 ` [PATCH v3 08/10] x86/asm: add unwind hint annotations to sync_core() Josh Poimboeuf
2017-07-18 10:43 ` [tip:x86/asm] x86/asm: Add " tip-bot for Josh Poimboeuf
2017-07-11 15:33 ` [PATCH v3 09/10] x86/unwind: add ORC unwinder Josh Poimboeuf
2017-07-14 17:22 ` [PATCH v3.1 " Josh Poimboeuf
2017-07-20 7:12 ` Jiri Slaby
2017-07-20 21:16 ` Josh Poimboeuf
2017-07-11 15:33 ` [PATCH v3 10/10] x86/kconfig: make it easier to switch to the new " Josh Poimboeuf
2017-07-12 8:27 ` [PATCH v3 00/10] x86: ORC unwinder (previously undwarf) Ingo Molnar
2017-07-12 14:42 ` Josh Poimboeuf
2017-07-12 19:27 ` Ingo Molnar [this message]
2017-07-14 17:17 ` Josh Poimboeuf
2017-07-25 9:09 ` Ingo Molnar
2017-07-25 17:58 ` Josh Poimboeuf
2017-07-25 18:46 ` Kees Cook
2017-07-12 21:49 ` Andres Freund
2017-07-12 22:32 ` Josh Poimboeuf
2017-07-12 22:36 ` Andres Freund
2017-07-12 22:40 ` Josh Poimboeuf
2017-07-12 22:54 ` Andres Freund
2017-07-13 7:12 ` Peter Zijlstra
2017-07-13 8:50 ` Peter Zijlstra
2017-07-13 8:51 ` Peter Zijlstra
2017-07-13 9:19 ` Ingo Molnar
2017-07-13 12:17 ` Josh Poimboeuf
2017-07-13 12:21 ` Josh Poimboeuf
2017-07-13 12:35 ` Josh Poimboeuf
2017-07-14 8:33 ` Ingo Molnar
2017-07-14 8:29 ` Ingo Molnar
2017-07-25 11:55 ` [RFC] perf: Delayed userspace unwind (Was: [PATCH v3 00/10] x86: ORC unwinder) Peter Zijlstra
2017-07-28 14:13 ` Jiri Olsa
2017-07-28 14:21 ` Peter Zijlstra
2017-07-29 3:35 ` Andy Lutomirski
2017-07-29 9:28 ` Peter Zijlstra
2017-07-12 22:30 ` [PATCH v3 00/10] x86: ORC unwinder (previously undwarf) Andi Kleen
2017-07-12 22:47 ` Josh Poimboeuf
2017-07-13 4:29 ` Andi Kleen
2017-07-13 13:15 ` Josh Poimboeuf
2017-07-13 9:29 ` Ingo Molnar
2017-07-12 23:22 ` Andy Lutomirski
2017-07-13 3:03 ` Mike Galbraith
2017-07-13 4:15 ` Andi Kleen
2017-07-13 4:28 ` Mike Galbraith
2017-07-13 4:40 ` Andi Kleen
2017-07-13 5:22 ` Mike Galbraith
2017-07-13 12:02 ` Jiri Kosina
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=20170712192750.p4wwz6ptjrub7bav@gmail.com \
--to=mingo@kernel.org \
--cc=efault@gmx.de \
--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=luto@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
all inboxes | Powered by JetHome®